global.existy = (value)->
value?
global.not_Null = global.existyThese are helper methods that are added to the global object, the main reason is that they can handle null values, where the normal prototypes are not able to detect that (in a controlled way)
existy value
confirms that a value exists (i.e. is not null or undefined)
global.existy = (value)->
value?
global.not_Null = global.existyglobal.is_Null = (value)->
value is nullglobal.file_Exists = (file)->
if not_Null(file)
file.file_Exists()
else
falseusing target,callback
simulates a ‘using’ or ‘with’ language feaure where the this object (inside callback)
is changed to value
global.using = (target,callback)->
callback.apply(target)global.truthly = (value)->
value? and value != falseglobal.log = console.log