How to convert these CocoaScript “braces notation” to JavaScript “dot notation” syntax?
[fileManager createDirectoryAtPath: tmpFolder withIntermediateDirectories: true attributes: nil error: nil];
and
[doc saveArtboardOrSlice: artboard toFile: fileName]
I've struggling with the CocoaScript “braces notation” format and want to use JavaScript instead combining them. I'm not sure if this even possible in all cases, like above. I get almost everything to work, but when I've syntax like above, I do not get it to right.
I tried something like:
var fileManager = NSFileManager.defaultManager();
fileManager.createDirectoryAtPath(tmpFolder).withIntermediateDirectories(true).attributes(nil).error(nil);
So I do not understand how to convert these "inner variables/properties", those which are e.g. "withIntermediateDirectories: true" to JavaScript dot notation syntax.
The equivalent of:
is: