Answer the question
In order to leave comments, you need to log in
Global CoffeeScript function?
Hello. I use global functions by declaring them through the window object, can I do something to use my own objects for each file with functions?
window.capitalize_Words = ( $str ) -> "#{ $str.charAt( 0 ).toUpperCase( ) }#{ $str.slice( 1 ) }"
capitalize_Words = ( $str ) -> "#{ $str.charAt( 0 ).toUpperCase( ) }#{ $str.slice( 1 ) }"
root = exports ? this
root.capitalize_Words( 'Тест' )
Uncaught ReferenceError: root is not defined
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question