@skpm/util
v0.1.28
Published
A drop in replacement for the util NodeJS module
Downloads
36
Readme
util
for Sketch
All the util nodejs API is available.
Additionally, 5 more methods are available:
isNativeObject
: return whether the argument is a native objc objectgetNativeClass
: return the class name of a native objecttoArray
: cast assimilated arrays (NSArray
) to a proper JS arraytoObject
: cast assimilated objects (NSDictionary
) to a proper JS objecttoJSObject
: cast any object or primitive into its proper JS counterpart. Note thatNSDictionary
andNSArray
elements are not recursively converted unless anoptions
object is passed as the second argument andoptions.recurse
is set totrue
Because of CocoaScript, isNull
is not going to work.