├── .gitignore ├── .npmrc ├── README.md ├── acrobat └── README.md ├── aes ├── README.md ├── patch.sublime-project ├── patch │ ├── README.md │ ├── array.every │ │ ├── .npmignore │ │ ├── README.md │ │ ├── every.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.filter │ │ ├── .npmignore │ │ ├── README.md │ │ ├── filter.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.find │ │ ├── .npmignore │ │ ├── README.md │ │ ├── find.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.foreach │ │ ├── .npmignore │ │ ├── README.md │ │ ├── foreach.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.from │ │ ├── .npmignore │ │ ├── README.md │ │ ├── from.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.indexof │ │ ├── .npmignore │ │ ├── README.md │ │ ├── indexof.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.isarray │ │ ├── .npmignore │ │ ├── README.md │ │ ├── isarray.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.lastindexof │ │ ├── .npmignore │ │ ├── README.md │ │ ├── lastindexof.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.map │ │ ├── .npmignore │ │ ├── README.md │ │ ├── map.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.reduce │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── reduce.js │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.reduceright │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── reduceRight.js │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── array.some │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── some.js │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── bundle.array │ │ ├── .npmignore │ │ ├── README.md │ │ ├── array.js │ │ ├── bundle.array.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── bundle.es5 │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bundle.es5.js │ │ ├── es5.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── bundle.es6 │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bundle.es6.js │ │ ├── es6.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── bundle.object │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bundle.object.js │ │ ├── object.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── console.log │ │ ├── .npmignore │ │ ├── README.md │ │ ├── log.js │ │ ├── log.log │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── function.bind │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bind.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── json.clone │ │ ├── .npmignore │ │ ├── README.md │ │ ├── clone.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── json.comparable │ │ ├── .npmignore │ │ ├── README.md │ │ ├── comparable.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── json.cycle │ │ ├── .npmignore │ │ ├── README.md │ │ ├── cycle.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── json.equals │ │ ├── .npmignore │ │ ├── README.md │ │ ├── equals.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── json.file │ │ ├── .npmignore │ │ ├── README.md │ │ ├── file.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── json.instantiate │ │ ├── .npmignore │ │ ├── README.md │ │ ├── instantiate.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-all.jsx │ │ │ ├── test-required.jsx │ │ │ └── test.js │ ├── json.parserecurse │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── parserecurse.js │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── json.parsestate │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── parsestate.js │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── json.validate │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── test │ │ │ ├── results_log.md │ │ │ ├── test-object.jsx │ │ │ ├── test-string.jsx │ │ │ └── test.js │ │ └── validate.js │ ├── json │ │ ├── .npmignore │ │ ├── README.md │ │ ├── json.js │ │ ├── package.json │ │ └── test │ │ │ ├── parse.test.jsx │ │ │ ├── results_log.md │ │ │ ├── stringify.test.jsx │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── number.isfinite │ │ ├── .npmignore │ │ ├── README.md │ │ ├── isfinite.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── number.isinteger │ │ ├── .npmignore │ │ ├── README.md │ │ ├── isinteger.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.assign │ │ ├── .npmignore │ │ ├── README.md │ │ ├── assign.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.create │ │ ├── .npmignore │ │ ├── README.md │ │ ├── create.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.defineproperties │ │ ├── .npmignore │ │ ├── README.md │ │ ├── defineproperties.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.defineproperty │ │ ├── .npmignore │ │ ├── README.md │ │ ├── defineproperty.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.freeze │ │ ├── .npmignore │ │ ├── README.md │ │ ├── freeze.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.getownpropertydescriptor │ │ ├── .npmignore │ │ ├── README.md │ │ ├── getownpropertydescriptor.js │ │ ├── package.json │ │ └── test │ │ │ ├── configurable.test.jsx │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── value.test.jsx │ ├── object.getownpropertynames │ │ ├── .npmignore │ │ ├── README.md │ │ ├── getownpropertynames.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.getprototypeof │ │ ├── .npmignore │ │ ├── README.md │ │ ├── getprototypeof.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.isextensible │ │ ├── .npmignore │ │ ├── README.md │ │ ├── isextensible.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.isfrozen │ │ ├── .npmignore │ │ ├── README.md │ │ ├── isfrozen.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.issealed │ │ ├── .npmignore │ │ ├── README.md │ │ ├── issealed.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.keys │ │ ├── .npmignore │ │ ├── README.md │ │ ├── keys.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.preventextensions │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── preventextensions.js │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.seal │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── seal.js │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ ├── object.setprototypeof │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── setprototypeof.js │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test.js │ │ │ └── test.jsx │ └── string.trim │ │ ├── .npmignore │ │ ├── README.md │ │ ├── package.json │ │ ├── test │ │ ├── results_log.md │ │ ├── test.js │ │ └── test.jsx │ │ └── trim.js └── util │ ├── README.md │ ├── jaw │ ├── .npmignore │ ├── README.md │ ├── jaw.js │ ├── package.json │ └── test │ │ ├── results_log.md │ │ ├── test-get.jsx │ │ ├── test-init.jsx │ │ └── test.js │ └── schema │ ├── README.md │ └── schema.document │ ├── README.md │ ├── document.js │ ├── package.json │ └── test │ ├── results_log.md │ ├── test.js │ └── test.jsx ├── afx └── README.md ├── ai └── README.md ├── boilerplate ├── README.md ├── module │ ├── README.md │ └── ___moduleName___ │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ ├── results_log.md │ │ ├── test-warn.jsx │ │ └── test.js └── util │ ├── README.md │ └── ___utilName___ │ ├── .npmignore │ ├── README.md │ ├── ___utilName___.js │ ├── package.json │ └── test │ ├── results_log.md │ ├── test-warn.jsx │ └── test.js ├── bridge └── README.md ├── docs ├── API-Registry.md ├── Dev-Environment.md ├── Package-Naming-Conventions.md ├── Publishing.md ├── README.md └── Testing.md ├── ind ├── README.md ├── module │ ├── README.md │ └── outerspace │ │ ├── .npmignore │ │ ├── README.md │ │ ├── outerspace.js │ │ ├── package.json │ │ └── test │ │ ├── results_log.md │ │ ├── test-warn.jsx │ │ └── test.js └── util │ ├── README.md │ ├── bounds │ ├── .npmignore │ ├── README.md │ ├── bounds.js │ ├── package.json │ └── test │ │ ├── results_log.md │ │ ├── test-getInfo.jsx │ │ ├── test-normalise.jsx │ │ ├── test-offset.jsx │ │ ├── test-relativeOfset.jsx │ │ └── test.js │ ├── font │ ├── .npmignore │ ├── README.md │ ├── font.js │ ├── package.json │ └── test │ │ ├── results_log.md │ │ ├── test-warn.jsx │ │ └── test.js │ ├── layer │ ├── .npmignore │ ├── README.md │ ├── layer.js │ ├── package.json │ └── test │ │ ├── results_log.md │ │ ├── test-locker.jsx │ │ ├── test-moveAndSelect.jsx │ │ ├── test-validOr.jsx │ │ └── test.js │ ├── menuloader │ ├── .npmignore │ ├── README.md │ ├── menuloader.js │ ├── package.json │ └── test │ │ ├── results_log.md │ │ ├── test-load-file-after.jsx │ │ ├── test-load-file-sub.jsx │ │ ├── test-load-file.jsx │ │ ├── test-load-main-sub.jsx │ │ ├── test-load-main.jsx │ │ └── test.js │ ├── pageitems │ ├── .npmignore │ ├── README.md │ ├── package.json │ ├── pageitems.js │ └── test │ │ ├── results_log.md │ │ ├── test-addRect.jsx │ │ ├── test-addRectToPage.jsx │ │ ├── test-addTextFrame.jsx │ │ ├── test-getParentPage-pasteBoard.jsx │ │ ├── test-header.js │ │ └── test.js │ ├── pages │ ├── .npmignore │ ├── README.md │ ├── package.json │ ├── pages.js │ └── test │ │ ├── results_log.md │ │ ├── test-getByLabel.jsx │ │ ├── test-getInfo-page.jsx │ │ ├── test-getInfo-spread.jsx │ │ └── test.js │ ├── rulers │ ├── .npmignore │ ├── README.md │ ├── package.json │ ├── rulers.js │ └── test │ │ ├── convert-test.jsx │ │ ├── indUnitsFrom-test.jsx │ │ ├── load-test.jsx │ │ ├── measure-data.js │ │ ├── niceNameFor-test.jsx │ │ ├── numToGridStep-test.jsx │ │ ├── results_log.md │ │ ├── ruler-data.js │ │ ├── set-get-test.jsx │ │ └── test.js │ └── styles │ ├── .npmignore │ ├── README.md │ ├── package.json │ ├── styles.js │ └── test │ ├── results_log.md │ ├── test-warn.jsx │ └── test.js ├── init ├── .npmignore ├── README.md ├── init.js ├── package.json └── test │ ├── init-test.jsx │ ├── load-test.jsx │ ├── results_log.md │ └── test.js ├── ps ├── README.md ├── module │ ├── README.md │ └── jam │ │ ├── README.md │ │ ├── jam.actions │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.books │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.colors │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.engine │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.helpers │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.json │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.layers │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.shapes │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.styles │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ ├── jam.text │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ │ ├── results_log.md │ │ │ ├── test-warn.jsx │ │ │ └── test.js │ │ └── jam.utils │ │ ├── .npmignore │ │ ├── README.md │ │ ├── ___moduleName___.js │ │ ├── package.json │ │ └── test │ │ ├── results_log.md │ │ ├── test-warn.jsx │ │ └── test.js └── util │ └── README.md └── sui ├── README.md ├── module ├── README.md └── jaxon │ ├── .npmignore │ ├── README.md │ ├── jaxon.js │ ├── package.json │ └── test │ ├── jaxonLoader.js │ ├── results_log.md │ ├── test-getByIndex.jsx │ ├── test-getByKey.jsx │ ├── test-getPropertyList.jsx │ ├── test-init_get.jsx │ ├── test-overwriteIndex.jsx │ ├── test-presetAdd.jsx │ ├── test-presetAddUnique.jsx │ ├── test-presetLoad.jsx │ ├── test-presetRemove.jsx │ ├── test-presetRemoveWhere.jsx │ ├── test-save2Disk.jsx │ └── test.js └── util ├── README.md └── groupList ├── .npmignore ├── README.md ├── groupList.js ├── package.json └── test ├── results_log.md ├── test-warn.jsx └── test.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .*.jsx 3 | 4 | # virtual env (As defined in package) 5 | build-node-venv.sh 6 | .venv/ 7 | 8 | npm-debug.log* 9 | results.md 10 | 11 | # Compiled binary addons (https://nodejs.org/api/addons.html) 12 | build/Release 13 | 14 | # Dependency directories 15 | node_modules/ 16 | 17 | # Optional npm cache directory 18 | .npm 19 | 20 | package-lock.json -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /acrobat/README.md: -------------------------------------------------------------------------------- 1 | # ACROBAT scope 2 | 3 | Here you can find all the modules that target Acrobat. 4 | 5 | 6 | ## More info 7 | 8 | Read [the docs](./docs/README.md) 9 | -------------------------------------------------------------------------------- /aes/README.md: -------------------------------------------------------------------------------- 1 | # AES scope 2 | 3 | Here you can find all the modules that target Adobe ExtendScript. 4 | 5 | * [`patch`](./patch/README.md) 6 | * [`util`](./util/README.md) 7 | 8 | ## About ExtendScript 9 | Adobe ExtendScript implements the [ECMAScript](https://en.wikipedia.org/wiki/ECMAScript) (JavaScript) language according to the ECMA-262 (ECMAScript 3) and ECMA-357 (XML) specification. 10 | It also defines a global debugging object, the dollar (`$`) object, and a reporting utility for ExtendScript elements called the ExtendScript Reflection interface. See [estk.aenhancers.com](http://estk.aenhancers.com) 11 | 12 | 13 | ## More info 14 | 15 | Read [the docs](../docs/README.md) 16 | -------------------------------------------------------------------------------- /aes/patch.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "path": "./", 6 | "folder_exclude_patterns": 7 | [ 8 | ".git", 9 | ".venv", 10 | "node_modules", 11 | ] 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /aes/patch/array.every/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.every/README.md: -------------------------------------------------------------------------------- 1 | # array.every 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.every.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.every) 4 | 5 | > ES5 Shim 6 | 7 | The `every()` method tests whether all elements in the array pass the test implemented by the provided function. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/every.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.every 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.every/every.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.every/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.every.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.every [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-13: array.every [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12: array.every [pass: 1, fail: 0] 12 | - ✔ Darwin illustrator-21: array.every [pass: 1, fail: 0] 13 | -------------------------------------------------------------------------------- /aes/patch/array.every/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.every', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.every/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../every.js' 2 | 3 | function isBigEnough(element, index, array) { 4 | return element >= 10; 5 | }; 6 | 7 | $.writeln( [12, 54, 18, 130, 44].every(isBigEnough) === true ); 8 | -------------------------------------------------------------------------------- /aes/patch/array.filter/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.filter/README.md: -------------------------------------------------------------------------------- 1 | # array.filter 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.filter.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.filter) 4 | 5 | > ES5 Shim 6 | 7 | The `filter()` method creates a new array with all elements that pass the test implemented by the provided function. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/filter.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.filter 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.filter/filter.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.filter/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.filter.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.filter [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.filter [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.filter [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.filter/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.filter', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.filter/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../filter.js' 2 | #include '../../json/json.js' 3 | 4 | function isBigEnough(value) { 5 | return value >= 10; 6 | }; 7 | 8 | var filtered = [12, 5, 8, 130, 44].filter(isBigEnough); 9 | 10 | $.writeln( JSON.stringify(filtered) === JSON.stringify([12, 130, 44]) ); 11 | -------------------------------------------------------------------------------- /aes/patch/array.find/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.find/README.md: -------------------------------------------------------------------------------- 1 | # array.find 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.find.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.find) 4 | 5 | > ES5 Shim 6 | 7 | The `find()` method returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned. 8 | 9 | Source: [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.find 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.find/find.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.find/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.find.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.find [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.find [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.find [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.find/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.find', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.find/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../find.js' 2 | 3 | var array1 = [5, 12, 8, 130, 44]; 4 | 5 | var found = array1.find(function(element) { 6 | return element > 10; 7 | }); 8 | 9 | $.writeln( found === 12 ); 10 | -------------------------------------------------------------------------------- /aes/patch/array.foreach/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.foreach/README.md: -------------------------------------------------------------------------------- 1 | # array.foreach 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.foreach.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.foreach) 4 | 5 | > ES5 Shim 6 | 7 | The `forEach()` method executes a provided function once for each array element. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/forEach.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.foreach 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.foreach/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.foreach.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.foreach [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.foreach [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.foreach [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.foreach/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.foreach', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.foreach/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../foreach.js' 2 | #include '../../json/json.js' 3 | 4 | var items = ['item1', 'item2', 'item3']; 5 | var myCopy = new Array(); 6 | 7 | items.forEach(function(item){ 8 | myCopy.push(item) 9 | }); 10 | 11 | $.writeln(JSON.stringify(items) === JSON.stringify(myCopy)); 12 | -------------------------------------------------------------------------------- /aes/patch/array.from/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.from/README.md: -------------------------------------------------------------------------------- 1 | # array.from 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.from.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.from) 4 | 5 | > ES6 Shim 6 | 7 | The `from()` method creates a new Array instance from an array-like or iterable object. 8 | 9 | Source: [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.from 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.from/from.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.from/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.from.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.from [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.from [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.from [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.from/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.from', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.from/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../from.js' 2 | #include '../../json/json.js' 3 | 4 | var x = Array.from('foo'); 5 | var expected = ['f','o','o']; 6 | 7 | $.writeln( JSON.stringify(x) === JSON.stringify(expected) ); 8 | -------------------------------------------------------------------------------- /aes/patch/array.indexof/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.indexof/README.md: -------------------------------------------------------------------------------- 1 | # array.indexof 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.indexof.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.indexof) 4 | 5 | > ES5 Shim 6 | 7 | The `indexOf()` method searches the array for the specified item, and returns its position. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/indexOf.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.indexof 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.indexof/indexof.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.indexof/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.indexof.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.indexof [pass: 1, fail: 0] 10 | - ✔ Darwin photoshop-19: array.indexof [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12: array.indexof [pass: 1, fail: 0] 12 | - ✔ Darwin indesign-13: array.indexof [pass: 1, fail: 0] 13 | - ✔ Darwin illustrator-21: array.indexof [pass: 1, fail: 0] 14 | -------------------------------------------------------------------------------- /aes/patch/array.indexof/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.indexof', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.indexof/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../indexof.js' 2 | 3 | var testData = ['This','is','a','test','a']; 4 | 5 | $.writeln( testData.indexOf('a') === 2 && testData.indexOf('a', 3) === 4 ); 6 | -------------------------------------------------------------------------------- /aes/patch/array.isarray/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.isarray/README.md: -------------------------------------------------------------------------------- 1 | # array.isarray 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.isarray.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.isarray) 4 | 5 | > ES5 Shim 6 | 7 | The `isArray()` method determines whether the passed value is an Array. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/isArray.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.isarray 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.isarray/isarray.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray 3 | */ 4 | if (!Array.isArray) { 5 | Array.isArray = function(arg) { 6 | if (arg === void 0 || arg === null) { 7 | return false; 8 | }; 9 | return (arg.__class__ === 'Array'); 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /aes/patch/array.isarray/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.isarray.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18 array.isarray [pass: 1, fail: 0] 10 | - ✔ Darwin photoshop-19 array.isarray [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12 array.isarray [pass: 1, fail: 0] 12 | - ✔ Darwin indesign-13 array.isarray test [pass: 1, fail: 0] 13 | - ✔ Darwin illustrator-21: array.isarray [pass: 1, fail: 0] 14 | -------------------------------------------------------------------------------- /aes/patch/array.isarray/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.isarray', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.isarray/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../isarray.js' 2 | 3 | var testData = { 4 | "obj": { "this":"is", "a":"test", "object":true}, 5 | "arr": ["This","is","a","test","array"] 6 | }; 7 | 8 | $.writeln( Array.isArray(testData.arr) === true); 9 | -------------------------------------------------------------------------------- /aes/patch/array.lastindexof/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.lastindexof/README.md: -------------------------------------------------------------------------------- 1 | # array.lastindexof 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.lastindexof.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.lastindexof) 4 | 5 | > ES5 Shim 6 | 7 | The `lastIndexOf()` method returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/lastIndexOf.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.lastindexof 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.lastindexof/lastindexof.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.lastindexof/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.lastindexof.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.lastindexof [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.lastindexof [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.lastindexof [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.lastindexof/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.lastindexof', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.lastindexof/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../lastindexof.js' 2 | 3 | var animals = ['Dodo', 'Tiger', 'Penguin', 'Dodo']; 4 | 5 | $.writeln( animals.lastIndexOf('Dodo') === 3); 6 | -------------------------------------------------------------------------------- /aes/patch/array.map/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.map/README.md: -------------------------------------------------------------------------------- 1 | # array.map 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.map.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.map) 4 | 5 | > ES5 Shim 6 | 7 | The Array.map() method creates a new array with the results of calling a provided function on every element in the calling array. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/map.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.map 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.map/map.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.map/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.map.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.map [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.map [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.map [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.map/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.map', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.map/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../map.js' 2 | #include '../../json/json.js' 3 | 4 | var numbers = [1, 4, 9]; 5 | var doubles = numbers.map(function(num) { 6 | return num * 2; 7 | }); 8 | 9 | $.writeln( JSON.stringify(doubles) === '[2,8,18]' ); 10 | -------------------------------------------------------------------------------- /aes/patch/array.reduce/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.reduce/README.md: -------------------------------------------------------------------------------- 1 | # array.reduce 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.reduce.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.reduce) 4 | 5 | > ES5 Shim 6 | 7 | The `Array.reduce()` method applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/reduce.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.reduce 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.reduce/reduce.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.reduce/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.reduce.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.reduce [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.reduce [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.reduce [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.reduce/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.reduce', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.reduce/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../reduce.js' 2 | 3 | var sum = [0, 1, 2, 3].reduce(function (accumulator, currentValue) { 4 | return accumulator + currentValue; 5 | }, 0); 6 | 7 | $.writeln( sum === 6); 8 | -------------------------------------------------------------------------------- /aes/patch/array.reduceright/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.reduceright/README.md: -------------------------------------------------------------------------------- 1 | # array.reduceright 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.reduceright.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.reduceright) 4 | 5 | > ES5 Shim 6 | 7 | The `reduceRight()` method applies a function against an accumulator and each value of the array (from right-to-left) to reduce it to a single value. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/reduceRight.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.reduceright 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.reduceright/reduceright.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.reduceright/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.reduceright.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.reduceright [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.reduceright [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.reduceright [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.reduceright/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.reduceright', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.reduceright/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../reduceright.js' 2 | 3 | var sum = [0, 1, 2, 3].reduceRight(function(a, b) { 4 | return a + b; 5 | }); 6 | 7 | $.writeln( sum === 6); 8 | -------------------------------------------------------------------------------- /aes/patch/array.some/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/array.some/README.md: -------------------------------------------------------------------------------- 1 | # array.some 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.array.some.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.array.some) 4 | 5 | > ES5 Shim 6 | 7 | The `Array.some()` method tests whether at least one element in the array passes the test implemented by the provided function. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Array/some.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.array.some 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.array.some/some.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/array.some/some.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some 3 | */ 4 | // Production steps of ECMA-262, Edition 5, 15.4.4.17 5 | // Reference: http://es5.github.io/#x15.4.4.17 6 | if (!Array.prototype.some) { 7 | Array.prototype.some = function(callback, thisArg) { 8 | 9 | if (this === void 0 || this === null) { 10 | throw new TypeError('Array.prototype.some called on null or undefined'); 11 | } 12 | 13 | if (callback.__class__ !== 'Function') { 14 | throw new TypeError(callback + ' is not a function'); 15 | } 16 | 17 | var t = Object(this); 18 | var len = t.length >>> 0; 19 | 20 | var T = arguments.length > 1 ? thisArg : void 0; 21 | for (var i = 0; i < len; i++) { 22 | if (i in t && callback.call(T, t[i], i, t)) { 23 | return true; 24 | } 25 | } 26 | 27 | return false; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /aes/patch/array.some/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## array.some.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: array.some [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: array.some [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: array.some [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/array.some/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('array.some', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/array.some/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../some.js' 2 | 3 | var array = [1, 2, 3, 4, 5]; 4 | 5 | var even = function(element) { 6 | // checks whether an element is even 7 | return element % 2 === 0; 8 | }; 9 | 10 | $.writeln( array.some(even) === true); 11 | -------------------------------------------------------------------------------- /aes/patch/bundle.array/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | *.source.js -------------------------------------------------------------------------------- /aes/patch/bundle.array/README.md: -------------------------------------------------------------------------------- 1 | # bundle.array 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.bundle.array.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.bundle.array) 4 | 5 | > Bundle 6 | 7 | A collection of `Array` polyfills for Exendscript. 8 | 9 | 10 | ## Install 11 | 12 | npm install @extendscript/aes.patch.bundle.array 13 | 14 | ## Include 15 | 16 | #include 'node_modules/@extendscript/aes.patch.bundle.array/array.js' 17 | 18 | ## Update Bundle 19 | 20 | npm run bundle 21 | 22 | ## Test 23 | 24 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 25 | 26 | npm run test target-1 target-2 27 | 28 | We keep [a log of test results](./test/results_log.md) 29 | -------------------------------------------------------------------------------- /aes/patch/bundle.array/bundle.array.js: -------------------------------------------------------------------------------- 1 | // ExtendScript Polyfill Array bundle 2 | // https://github.com/ExtendScript/extendscript-modules 3 | 4 | #include 'node_modules/@extendscript/aes.patch.array.every/every.js' 5 | #include 'node_modules/@extendscript/aes.patch.array.filter/filter.js' 6 | #include 'node_modules/@extendscript/aes.patch.array.find/find.js' 7 | #include 'node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 8 | #include 'node_modules/@extendscript/aes.patch.array.from/from.js' 9 | #include 'node_modules/@extendscript/aes.patch.array.indexof/indexof.js' 10 | #include 'node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 11 | #include 'node_modules/@extendscript/aes.patch.array.lastindexof/lastindexof.js' 12 | #include 'node_modules/@extendscript/aes.patch.array.map/map.js' 13 | #include 'node_modules/@extendscript/aes.patch.array.reduce/reduce.js' 14 | #include 'node_modules/@extendscript/aes.patch.array.reduceright/reduceright.js' 15 | #include 'node_modules/@extendscript/aes.patch.array.some/some.js' 16 | -------------------------------------------------------------------------------- /aes/patch/bundle.array/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## bundle.array.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin illustrator-21: bundle.array [pass: 1, fail: 0] 10 | - ✔ Darwin photoshop-18: bundle.array [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12: bundle.array [pass: 1, fail: 0] -------------------------------------------------------------------------------- /aes/patch/bundle.array/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('bundle.array', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/bundle.array/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../array.js' 2 | 3 | var loaded = false; 4 | 5 | if ( Array.prototype.every && 6 | Array.prototype.filter && 7 | Array.prototype.find && 8 | Array.prototype.forEach && 9 | Array.from && 10 | Array.prototype.indexOf && 11 | Array.isArray && 12 | Array.prototype.lastIndexOf && 13 | Array.prototype.map && 14 | Array.prototype.reduce && 15 | Array.prototype.reduceRight && 16 | Array.prototype.some ) { 17 | loaded = true; 18 | } 19 | 20 | $.writeln( loaded === true ); 21 | -------------------------------------------------------------------------------- /aes/patch/bundle.es5/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | *.source.js -------------------------------------------------------------------------------- /aes/patch/bundle.es5/README.md: -------------------------------------------------------------------------------- 1 | # bundle.es5 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.bundle.es5.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.bundle.es5) 4 | 5 | > Bundle 6 | 7 | A collection of ES5 polyfills for Exendscript. 8 | 9 | 10 | ## Install 11 | 12 | npm install @extendscript/aes.patch.bundle.es5 13 | 14 | ## Include 15 | 16 | #include 'node_modules/@extendscript/aes.patch.bundle.es5/es5.js' 17 | 18 | ## Update Bundle 19 | 20 | npm run bundle 21 | 22 | ## Test 23 | 24 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 25 | 26 | npm run test target-1 target-2 27 | 28 | We keep [a log of test results](./test/results_log.md) 29 | -------------------------------------------------------------------------------- /aes/patch/bundle.es5/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## bundle.es5.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin illustrator-21: bundle.es5 [pass: 1, fail: 0] 10 | - ✔ Darwin photoshop-18: bundle.es5 [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12: bundle.es5 [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/bundle.es5/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('bundle.es5', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/bundle.es5/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../es5.js' 2 | 3 | var loaded = false; 4 | 5 | if ( Array.prototype.every && 6 | Array.prototype.filter && 7 | Array.prototype.forEach && 8 | Array.prototype.indexOf && 9 | Array.isArray && 10 | Array.prototype.lastIndexOf && 11 | Array.prototype.map && 12 | Array.prototype.reduce && 13 | Array.prototype.some && 14 | Function.prototype.bind && 15 | Object.create && 16 | Object.defineProperties && 17 | Object.defineProperty && 18 | Object.freeze && 19 | Object.getOwnPropertyDescriptor && 20 | Object.getOwnPropertyNames && 21 | Object.getPrototypeOf && 22 | Object.isExtensible && 23 | Object.isFrozen && 24 | Object.isSealed && 25 | Object.keys && 26 | Object.preventExtensions && 27 | Object.seal ){ 28 | loaded = true; 29 | } 30 | 31 | $.writeln( loaded === true ); -------------------------------------------------------------------------------- /aes/patch/bundle.es6/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | *.source.js -------------------------------------------------------------------------------- /aes/patch/bundle.es6/README.md: -------------------------------------------------------------------------------- 1 | # bundle.es6 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.bundle.es6.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.bundle.es6) 4 | 5 | > Bundle 6 | 7 | A collection of ES6 polyfills for Exendscript. 8 | 9 | 10 | ## Install 11 | 12 | npm install @extendscript/aes.patch.bundle.es6 13 | 14 | ## Include 15 | 16 | #include 'node_modules/@extendscript/aes.patch.bundle.es6/es6.js' 17 | 18 | ## Update Bundle 19 | 20 | npm run bundle 21 | 22 | ## Test 23 | 24 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 25 | 26 | npm run test target-1 target-2 27 | 28 | We keep [a log of test results](./test/results_log.md) 29 | -------------------------------------------------------------------------------- /aes/patch/bundle.es6/bundle.es6.js: -------------------------------------------------------------------------------- 1 | // ExtendScript Polyfill ES6 bundle 2 | // https://github.com/ExtendScript/extendscript-modules 3 | 4 | // Get ExtendScript to ES5 5 | #include 'node_modules/@extendscript/aes.patch.bundle.es5/es5.js' 6 | // ES6 from here 7 | #include 'node_modules/@extendscript/aes.patch.array.from/from.js' 8 | #include 'node_modules/@extendscript/aes.patch.object.assign/assign.js' 9 | #include 'node_modules/@extendscript/aes.patch.number.isfinite/isfinite.js' 10 | -------------------------------------------------------------------------------- /aes/patch/bundle.es6/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## bundle.es6.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin illustrator-21: bundle.es6 [pass: 1, fail: 0] 10 | - ✔ Darwin photoshop-18: bundle.es6 [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12: bundle.es6 [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/bundle.es6/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('bundle.es6', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/bundle.es6/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../es6.js' 2 | 3 | var loaded = false; 4 | 5 | if ( Array.prototype.every && 6 | Array.prototype.filter && 7 | Array.prototype.forEach && 8 | Array.prototype.indexOf && 9 | Array.isArray && 10 | Array.prototype.lastIndexOf && 11 | Array.prototype.map && 12 | Array.prototype.reduce && 13 | Array.prototype.some && 14 | Function.prototype.bind && 15 | Object.create && 16 | Object.defineProperties && 17 | Object.defineProperty && 18 | Object.freeze && 19 | Object.getOwnPropertyDescriptor && 20 | Object.getOwnPropertyNames && 21 | Object.getPrototypeOf && 22 | Object.isExtensible && 23 | Object.isFrozen && 24 | Object.isSealed && 25 | Object.keys && 26 | Object.preventExtensions && 27 | Object.seal && 28 | 29 | /* ES6 */ 30 | Array.from && 31 | Object.assign && 32 | Number.isFinite ){ 33 | 34 | loaded = true; 35 | } 36 | 37 | $.writeln( loaded === true ); -------------------------------------------------------------------------------- /aes/patch/bundle.object/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | *.source.js -------------------------------------------------------------------------------- /aes/patch/bundle.object/README.md: -------------------------------------------------------------------------------- 1 | # bundle.object 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.bundle.object.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.bundle.object) 4 | 5 | > Bundle 6 | 7 | A collection of `Object` polyfills for Exendscript. 8 | 9 | 10 | ## Install 11 | 12 | npm install @extendscript/aes.patch.bundle.object 13 | 14 | ## Include 15 | 16 | #include 'node_modules/@extendscript/aes.patch.bundle.object/object.js' 17 | 18 | ## Update Bundle 19 | 20 | npm run bundle 21 | 22 | ## Test 23 | 24 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 25 | 26 | npm run test target-1 target-2 27 | 28 | We keep [a log of test results](./test/results_log.md) 29 | -------------------------------------------------------------------------------- /aes/patch/bundle.object/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## bundle.object.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin illustrator-21: bundle.object [pass: 1, fail: 0] 10 | - ✔ Darwin photoshop-18: bundle.object [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12: bundle.object [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/bundle.object/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('bundle.object', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/bundle.object/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../object.js' 2 | 3 | var loaded = false; 4 | 5 | if ( Object.assign && 6 | Object.create && 7 | Object.defineProperties && 8 | Object.defineProperty && 9 | Object.freeze && 10 | Object.getOwnPropertyDescriptor && 11 | Object.getOwnPropertyNames && 12 | Object.getPrototypeOf && 13 | Object.isExtensible && 14 | Object.isFrozen && 15 | Object.isSealed && 16 | Object.keys && 17 | Object.preventExtensions && 18 | Object.seal && 19 | Object.setPrototypeOf ) { 20 | loaded = true; 21 | } 22 | 23 | $.writeln( loaded === true ); -------------------------------------------------------------------------------- /aes/patch/console.log/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/console.log/README.md: -------------------------------------------------------------------------------- 1 | # console.log 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.console.log.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.console.log) 4 | 5 | > Fill 6 | 7 | A `console.log()` for ExtendScript. 8 | 9 | Source: [Bruno Herfst](https://gist.github.com/GitBruno/b00528511c1ecd43bc76481c8c93b759) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.console.log 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.console.log/log.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/console.log/log.log: -------------------------------------------------------------------------------- 1 | 16:41:21 GMT+1000: This is a log test... -------------------------------------------------------------------------------- /aes/patch/console.log/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@extendscript/aes.patch.console.log", 3 | "version": "2.0.0", 4 | "description": "A `console.log()` for ExtendScript.", 5 | "main": "log.js", 6 | "scripts": { 7 | "node-env": "curl https://raw.githubusercontent.com/ES-Collection/build-node-venv/master/build-node-venv.sh > ./.bnv.sh && chmod +x ./.bnv.sh && ./.bnv.sh && rm ./.bnv.sh", 8 | "prepublishOnly": "npm config set scope extendscript", 9 | "test": "node ./test/test.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/ExtendScript/extendscript-modules.git" 14 | }, 15 | "keywords": [ 16 | "extendscript", 17 | "polyfill", 18 | "fill", 19 | "console", 20 | "log" 21 | ], 22 | "author": "extendscript.org", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/ExtendScript/extendscript-modules/issues" 26 | }, 27 | "homepage": "https://github.com/ExtendScript/extendscript-modules#readme", 28 | "devDependencies": { 29 | "@extendscript/tap-es": ">=1.0.5" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /aes/patch/console.log/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## console.log.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin illustrator-21: console.log [pass: 1, fail: 0] 10 | - ✔ Darwin photoshop-18: console.log [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12: console.log [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/console.log/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('console.log', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/console.log/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../log.js' 2 | 3 | // Remove logfile if exist 4 | if( console.logFile.exists ) { 5 | console.logFile.remove(); 6 | }; 7 | 8 | // Only write to file log 9 | console.settings.writeToConsole = false; 10 | 11 | console.log("This is a log test..."); 12 | 13 | $.writeln( console.logFile.exists === true ); 14 | -------------------------------------------------------------------------------- /aes/patch/function.bind/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/function.bind/README.md: -------------------------------------------------------------------------------- 1 | # function.bind 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.function.bind.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.function.bind) 4 | 5 | > ES5 Sham 6 | 7 | The `bind()` method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called. 8 | 9 | > __WARNING!__ Bound functions used as constructors NOT supported by this polyfill! 10 | 11 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Function/bind.js) 12 | 13 | ## Install 14 | 15 | npm install @extendscript/aes.patch.function.bind 16 | 17 | ## Include 18 | 19 | #include 'node_modules/@extendscript/aes.patch.function.bind/bind.js' 20 | 21 | ## Test 22 | 23 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 24 | 25 | npm run test target-1 target-2 26 | 27 | We keep [a log of test results](./test/results_log.md) 28 | -------------------------------------------------------------------------------- /aes/patch/function.bind/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## function.bind.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: function.bind [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: function.bind [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: function.bind [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/function.bind/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('function.bind', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/function.bind/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../bind.js' 2 | 3 | var module = { 4 | x: 42, 5 | getX: function() { 6 | return this.x; 7 | } 8 | } 9 | 10 | var unboundGetX = module.getX; 11 | 12 | var boundGetX = unboundGetX.bind(module); 13 | 14 | $.writeln( boundGetX() === 42); 15 | -------------------------------------------------------------------------------- /aes/patch/json.clone/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.clone/README.md: -------------------------------------------------------------------------------- 1 | # json.clone 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.json.clone.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.json.clone) 4 | 5 | > Extension 6 | 7 | Adds the `clone()` method to JSON 8 | 9 | 10 | ## Install 11 | 12 | npm install @extendscript/aes.patch.json.clone 13 | 14 | ## Include 15 | 16 | #include 'node_modules/@extendscript/aes.patch.json.clone/clone.js' 17 | 18 | ## Test 19 | 20 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 21 | 22 | npm run test target-1 target-2 23 | 24 | We keep [a log of test results](./test/results_log.md) 25 | -------------------------------------------------------------------------------- /aes/patch/json.clone/clone.js: -------------------------------------------------------------------------------- 1 | 2 | // JSON is a peer dependency so will be loaded 3 | 4 | if (typeof JSON.clone !== 'function') { 5 | 6 | // The clone method takes a JSON object and returns a clone of the JSON object. 7 | 8 | JSON.clone = function ( json_obj ) { 9 | if (typeof json_obj === undefined) { 10 | return undefined; 11 | }; 12 | return JSON.parse(JSON.stringify( json_obj )); 13 | }; 14 | 15 | }; 16 | -------------------------------------------------------------------------------- /aes/patch/json.clone/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.clone.js 6 | 7 | > Version 1.0 8 | 9 | - ✔ Darwin indesign-13: json.clone [pass: 1, fail: 0] -------------------------------------------------------------------------------- /aes/patch/json.clone/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.clone', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json.clone/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../../json/json.js' 2 | #include '../clone.js' 3 | 4 | var test_Obj = {name:"test",num:0} 5 | var clone = JSON.clone( test_Obj ); 6 | 7 | $.writeln( (JSON.stringify(test_Obj) === JSON.stringify(clone)) && (test_Obj != clone) ); 8 | -------------------------------------------------------------------------------- /aes/patch/json.comparable/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.comparable/README.md: -------------------------------------------------------------------------------- 1 | # json.comparable 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.json.comparable.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.json.comparable) 4 | 5 | > Extension 6 | 7 | Adds the `comparable()` method to JSON, which make it possible to compare two values on equality. It sorts arrays and objects before doing a `JSON.stringify()` comparison. 8 | 9 | Source: [jib:stackoverflow](https://stackoverflow.com/questions/201183/how-to-determine-equality-for-two-javascript-objects) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.json.comparable 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.json.comparable/comparable.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/json.comparable/comparable.js: -------------------------------------------------------------------------------- 1 | /* 2 | json.equals 3 | https://stackoverflow.com/questions/201183/how-to-determine-equality-for-two-javascript-objects 4 | */ 5 | 6 | if (typeof JSON.comparable !== 'function') { 7 | JSON.comparable = function ( _this , _that ) { 8 | // We create an object of the data 9 | var __this = {"_":_this}; 10 | var __that = {"_":_that}; 11 | 12 | var comparable = function comparable( o ) { 13 | return (typeof o === 'undefined' ? 'undefined' : _typeof(o)) != 'object' || !o ? o : Object.keys(o).sort().reduce(function (c, key) { 14 | return c[key] = comparable(o[key]), c; 15 | }, {}); 16 | }; 17 | 18 | return (JSON.stringify(comparable(__this)) == JSON.stringify(comparable(__that))); 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /aes/patch/json.comparable/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.comparable.js 6 | 7 | > Version 0 8 | 9 | 10 | -------------------------------------------------------------------------------- /aes/patch/json.comparable/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.comparable', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json.comparable/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../comparable.js' 2 | 3 | $.writeln( undefined === true); 4 | -------------------------------------------------------------------------------- /aes/patch/json.cycle/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.cycle/README.md: -------------------------------------------------------------------------------- 1 | # json.cycle 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.json.cycle.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.json.cycle) 4 | 5 | > Extension 6 | 7 | Adds `decycle()` and `retrocycle()` to JSON, which make it possible to encode cyclical structures and dags in JSON, and to then recover them. 8 | 9 | Source: [JSON-js](https://github.com/douglascrockford/JSON-js/blob/master/cycle.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.json.cycle 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.json.cycle/cycle.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/json.cycle/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.cycle.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /aes/patch/json.cycle/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.cycle', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json.cycle/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../cycle.js' 2 | 3 | $.writeln( undefined === true); 4 | -------------------------------------------------------------------------------- /aes/patch/json.equals/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.equals/README.md: -------------------------------------------------------------------------------- 1 | # json.equals 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.json.equals.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.json.equals) 4 | 5 | > Extension 6 | 7 | Adds `equals()` to JSON. Checks deep equality between two JSON objects. 8 | 9 | Source: [dhavalpowar/node-json-equal](https://github.com/dhavalpowar/node-json-equal) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.json.equals 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.json.equals/equals.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/json.equals/equals.js: -------------------------------------------------------------------------------- 1 | 2 | // JSON is a peer dependency so will be loaded 3 | -------------------------------------------------------------------------------- /aes/patch/json.equals/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.equals.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /aes/patch/json.equals/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.equals', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json.equals/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../equals.js' 2 | 3 | $.writeln( undefined === true); 4 | -------------------------------------------------------------------------------- /aes/patch/json.file/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.file/README.md: -------------------------------------------------------------------------------- 1 | # json.file 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.json.file.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.json.file) 4 | 5 | > Extension 6 | 7 | Adds the `openFile()` and `saveFile()` methods to JSON 8 | 9 | ## Install 10 | 11 | npm install @extendscript/aes.patch.json.file 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/aes.patch.json.file/file.js' 16 | 17 | ## Test 18 | 19 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 20 | 21 | npm run test target-1 target-2 22 | 23 | We keep [a log of test results](./test/results_log.md) 24 | -------------------------------------------------------------------------------- /aes/patch/json.file/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.file.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /aes/patch/json.file/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.file', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json.file/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../file.js' 2 | 3 | $.writeln( undefined === true); 4 | -------------------------------------------------------------------------------- /aes/patch/json.instantiate/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.instantiate/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.instantiate.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin indesign-13: json.instantiate [pass: 1, fail: 0] 10 | -------------------------------------------------------------------------------- /aes/patch/json.instantiate/test/test-all.jsx: -------------------------------------------------------------------------------- 1 | #include '../node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 2 | #include '../node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 3 | #include '../node_modules/@extendscript/aes.patch.json/json.js' 4 | #include '../instantiate.js' 5 | 6 | var schema = { 7 | "type": "object", 8 | "properties": { 9 | "name": { "type": "string", "default": "New Preset" }, 10 | "bool": { "type": ["null", "boolean"] }, 11 | "obj": { "type": "object", 12 | "properties": { 13 | "x": { "type": "number", "default": 0 }, 14 | "y": { "type": "number", "default": 0 } 15 | } 16 | } 17 | } 18 | }; 19 | 20 | var preset = JSON.instantiate( schema, {requiredPropertiesOnly: false} ); 21 | 22 | $.writeln( JSON.stringify(preset) === '{"name":"New Preset","bool":null,"obj":{"x":0,"y":0}}'); 23 | -------------------------------------------------------------------------------- /aes/patch/json.instantiate/test/test-required.jsx: -------------------------------------------------------------------------------- 1 | #include '../node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 2 | #include '../node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 3 | #include '../node_modules/@extendscript/aes.patch.json/json.js' 4 | #include '../instantiate.js' 5 | 6 | var schema = { 7 | "title": "Test", 8 | "type" : "object", 9 | "properties": { 10 | "a" : {"type": "string", "default": "hi"}, 11 | "b" : {"type": "object"} 12 | }, 13 | "required" : ["a"] 14 | }; 15 | 16 | var preset = JSON.instantiate( schema ); 17 | 18 | $.writeln( JSON.stringify(preset) === '{"a":"hi"}'); 19 | -------------------------------------------------------------------------------- /aes/patch/json.instantiate/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.instantiate', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json.parserecurse/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.parserecurse/README.md: -------------------------------------------------------------------------------- 1 | # json.parserecurse 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.json.parserecurse.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.json.parserecurse) 4 | 5 | > Extension 6 | 7 | The `JSON.parseRecurse()` method is an alternate `JSON.parse()` function that uses recursive descent instead of eval. 8 | 9 | Source: [JSON-js](https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.json.parserecurse 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.json.parserecurse/parserecurse.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/json.parserecurse/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.parse.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /aes/patch/json.parserecurse/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.parse', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json.parserecurse/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../parse.js' 2 | 3 | $.writeln( undefined === true); 4 | -------------------------------------------------------------------------------- /aes/patch/json.parsestate/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.parsestate/README.md: -------------------------------------------------------------------------------- 1 | # json.parsestate 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.json.parsestate.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.json.parsestate) 4 | 5 | > Extension 6 | 7 | The `JSON.parseState()` method is an alternate `JSON.parse()` that uses a state machine instead of eval. 8 | 9 | Source: [JSON-js](https://github.com/douglascrockford/JSON-js/blob/master/json_parse_state.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.json.parsestate 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.json.parsestate/parsestate.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/json.parsestate/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.parse-state.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /aes/patch/json.parsestate/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.parse-state', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json.parsestate/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../parsestate.js' 2 | 3 | $.writeln( undefined === true); 4 | -------------------------------------------------------------------------------- /aes/patch/json.validate/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json.validate/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.validate.js 6 | 7 | > Version 1.0.1 8 | 9 | - ✔ Darwin indesign-13: json.validate [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-13: json.validate [pass: 1, fail: 0] 11 | -------------------------------------------------------------------------------- /aes/patch/json.validate/test/test-string.jsx: -------------------------------------------------------------------------------- 1 | #include '../node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 2 | #include '../node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 3 | #include '../node_modules/@extendscript/aes.patch.array.indexof/indexof.js' 4 | #include '../node_modules/@extendscript/aes.patch.object.keys/keys.js' 5 | #include '../node_modules/@extendscript/aes.patch.json/json.js' 6 | #include '../validate.js' 7 | 8 | var errors = JSON.validate('apple', {type: 'string', maxLength: 5}); 9 | 10 | $.writeln( errors.length === 0); 11 | -------------------------------------------------------------------------------- /aes/patch/json.validate/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json.validate', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/json/README.md: -------------------------------------------------------------------------------- 1 | # json 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.json.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.json) 4 | 5 | > ES5 Shim 6 | 7 | Adds the light-weight, language independent, data interchange format `JSON` to ExtendScript. 8 | 9 | Source: [JSON-js](https://github.com/douglascrockford/JSON-js/blob/master/json2.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.json 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.json/json.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json) like so: 22 | 23 | npm run test target 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/json/test/parse.test.jsx: -------------------------------------------------------------------------------- 1 | #include "../json.js" 2 | 3 | var json = '{"hundred":100}'; 4 | var obj = JSON.parse(json); 5 | 6 | $.writeln( obj.hundred === 100); 7 | -------------------------------------------------------------------------------- /aes/patch/json/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## json.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: json [pass: 2, fail: 0] 10 | - ✔ Darwin indesign-12: json [pass: 2, fail: 0] 11 | - ✔ Darwin illustrator-21: json [pass: 2, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/json/test/stringify.test.jsx: -------------------------------------------------------------------------------- 1 | #include "../json.js" 2 | 3 | var obj = {"hundred":100}; 4 | var json = JSON.stringify(obj); 5 | 6 | $.writeln( json === '{"hundred":100}'); 7 | -------------------------------------------------------------------------------- /aes/patch/json/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('json', d+'/*.test.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/json/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../json.js' 2 | 3 | var jsonString = ('{"test":true}'); 4 | 5 | $.writeln( JSON.stringify(JSON.parse(jsonString)) === jsonString); 6 | -------------------------------------------------------------------------------- /aes/patch/number.isfinite/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/number.isfinite/README.md: -------------------------------------------------------------------------------- 1 | # number.isfinite 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.number.isfinite.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.number.isfinite) 4 | 5 | > ES6 Shim 6 | 7 | The `Number.isFinite()` method determines whether the passed value is a finite number. 8 | 9 | Source: [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.number.isfinite 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.number.isfinite/isfinite.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/number.isfinite/isfinite.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite 3 | */ 4 | Number.isFinite = Number.isFinite || function(value) { 5 | return typeof value === 'number' && isFinite(value); 6 | }; 7 | -------------------------------------------------------------------------------- /aes/patch/number.isfinite/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## number.isfinite.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: number.isfinite [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: number.isfinite [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: number.isfinite [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/number.isfinite/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('number.isfinite', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/number.isfinite/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../isfinite.js' 2 | 3 | $.writeln( Number.isFinite('0') === false ); 4 | -------------------------------------------------------------------------------- /aes/patch/number.isinteger/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /aes/patch/number.isinteger/README.md: -------------------------------------------------------------------------------- 1 | # isinteger 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.number.isinteger.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.number.isinteger) 4 | 5 | > Polyfill 6 | 7 | The `Number.isInteger()` method determines whether the passed value is an integer. 8 | 9 | ## Install 10 | 11 | npm install @extendscript/aes.patch.number.isinteger 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/aes.patch.number.isinteger/isinteger.js' 16 | 17 | ## Use 18 | 19 | Number.isInteger(0); // true 20 | 21 | ## Test 22 | 23 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 24 | 25 | npm run test myTarget 26 | 27 | We keep [a log of test results](./test/results_log.md) 28 | 29 | 30 | ## More info 31 | 32 | Read [the docs](../docs/README.md) 33 | -------------------------------------------------------------------------------- /aes/patch/number.isinteger/isinteger.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger 3 | */ 4 | Number.isInteger = Number.isInteger || function(value) { 5 | return typeof value === 'number' && 6 | isFinite(value) && 7 | Math.floor(value) === value; 8 | }; 9 | -------------------------------------------------------------------------------- /aes/patch/number.isinteger/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## isinteger.js 6 | 7 | > Version 1.0 8 | 9 | - ✔ Darwin indesign-CC-2018: number.isinteger [pass: 1, fail: 0] 10 | - ✔ Darwin photoshop-CC-2018: number.isinteger [pass: 1, fail: 0] -------------------------------------------------------------------------------- /aes/patch/number.isinteger/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | 6 | tapes.add('number.isinteger', d+'/test*.jsx', targets, true); 7 | tapes.run(d+'/results.md'); 8 | -------------------------------------------------------------------------------- /aes/patch/number.isinteger/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include "../isinteger.js" 2 | 3 | $.writeln( Number.isInteger(1) && !Number.isInteger(0.1) ); 4 | -------------------------------------------------------------------------------- /aes/patch/object.assign/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.assign/README.md: -------------------------------------------------------------------------------- 1 | # object.assign 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.assign.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.assign) 4 | 5 | > ES6 Shim 6 | 7 | The `assign()` method is used to copy values of all enumerable own properties from one or more source objects to a target object. It will return the target object. 8 | 9 | Source: [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.assign 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.assign/assign.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.assign/assign.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign 3 | */ 4 | 5 | if (typeof Object.assign != 'function') { 6 | Object.prototype.assign = function(target, varArgs) { 7 | 'use strict'; 8 | if (target == null) { // TypeError if undefined or null 9 | throw new TypeError('Cannot convert undefined or null to object'); 10 | } 11 | 12 | var to = Object(target); 13 | 14 | for (var index = 1; index < arguments.length; index++) { 15 | var nextSource = arguments[index]; 16 | 17 | if (nextSource != null) { // Skip over if undefined or null 18 | for (var nextKey in nextSource) { 19 | // Avoid bugs when hasOwnProperty is shadowed 20 | if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { 21 | to[nextKey] = nextSource[nextKey]; 22 | } 23 | } 24 | } 25 | } 26 | return to; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /aes/patch/object.assign/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.assign.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.assign [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.assign [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.assign [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.assign/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.assign', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.assign/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../assign.js' 2 | 3 | var object1 = { 4 | a: 1, 5 | b: 2, 6 | c: 3 7 | }; 8 | 9 | var object2 = Object.assign({c: 4, d: 5}, object1); 10 | 11 | $.writeln( object2.c === 3 && object2.d === 5 ); 12 | -------------------------------------------------------------------------------- /aes/patch/object.create/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.create/README.md: -------------------------------------------------------------------------------- 1 | # object.create 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.create.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.create) 4 | 5 | > ES5 Shim 6 | 7 | The `create()` method creates a new object with the specified prototype. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/create.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.create 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.create/create.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.create/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.create.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.create [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.create [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.create [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.create/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.create', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.create/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../create.js' 2 | 3 | var person = { 4 | isHuman: false, 5 | getIntroduction: function () { 6 | return 'My name is ' + this.name + '. Am I human? ' + this.isHuman; 7 | } 8 | }; 9 | 10 | var me = Object.create(person); 11 | 12 | me.name = "Matthew"; // "name" is a property set on "me", but not on "person" 13 | me.isHuman = true; // inherited properties can be overwritten 14 | 15 | $.writeln( me.getIntroduction() === "My name is Matthew. Am I human? true"); 16 | -------------------------------------------------------------------------------- /aes/patch/object.defineproperties/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.defineproperties/README.md: -------------------------------------------------------------------------------- 1 | # object.defineproperties 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.defineproperties.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.defineproperties) 4 | 5 | > ES5 Sham 6 | 7 | The `Object.defineProperties()` method defines new or modifies existing properties directly on an object, returning the object. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/defineProperties.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.defineproperties 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.defineproperties/defineproperties.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.defineproperties/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.defineproperties.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.defineproperties [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.defineproperties [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.defineproperties [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.defineproperties/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.defineproperties', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.defineproperties/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../defineproperties.js' 2 | 3 | var object1 = {}; 4 | 5 | Object.defineProperties(object1, { 6 | property1: { 7 | value: 42, 8 | writable: true 9 | }, 10 | property2: {} 11 | }); 12 | 13 | $.writeln( object1.property1 === 42); 14 | -------------------------------------------------------------------------------- /aes/patch/object.defineproperty/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.defineproperty/README.md: -------------------------------------------------------------------------------- 1 | # object.defineproperty 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.defineproperty.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.defineproperty) 4 | 5 | > ES5 Sham 6 | 7 | The static method `Object.defineProperty()` defines a new property directly on an object, or modifies an existing property on an object, and returns the object. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/defineProperty.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.defineproperty 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.defineproperty/defineproperty.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.defineproperty/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.defineproperty.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.defineproperty [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.defineproperty [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.defineproperty [pass: 1, fail: 0] -------------------------------------------------------------------------------- /aes/patch/object.defineproperty/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.defineproperty', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.defineproperty/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../defineproperty.js' 2 | 3 | var object1 = {}; 4 | 5 | Object.defineProperty(object1, 'property1', { 6 | value: 42, 7 | writable: false 8 | }); 9 | 10 | $.writeln( object1.property1 === 42); 11 | -------------------------------------------------------------------------------- /aes/patch/object.freeze/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.freeze/freeze.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/es-shims/es5-shim/blob/master/es5-sham.js 3 | */ 4 | // ES5 15.2.3.9 5 | // http://es5.github.com/#x15.2.3.9 6 | if (!Object.freeze) { 7 | Object.freeze = function freeze(object) { 8 | if (Object(object) !== object) { 9 | throw new TypeError('Object.freeze can only be called on Objects.'); 10 | } 11 | // this is misleading and breaks feature-detection, but 12 | // allows "securable" code to "gracefully" degrade to working 13 | // but insecure code. 14 | return object; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /aes/patch/object.freeze/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.freeze.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.freeze [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.freeze [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.freeze [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.freeze/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.freeze', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.freeze/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../freeze.js' 2 | 3 | const object1 = { 4 | property1: 42 5 | }; 6 | 7 | const object2 = Object.freeze(object1); 8 | 9 | object2.property1 = 33; 10 | // Throws an error in strict mode 11 | 12 | $.writeln( object2.property1 === 33); // 33!! 13 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertydescriptor/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.getownpropertydescriptor/getownpropertydescriptor.js: -------------------------------------------------------------------------------- 1 | if (!Object.getOwnPropertyDescriptor) { 2 | 3 | Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { 4 | if (Object(object) !== object) { 5 | throw new TypeError('Object.getOwnPropertyDescriptor can only be called on Objects.'); 6 | } 7 | 8 | var descriptor; 9 | if (!Object.prototype.hasOwnProperty.call(object, property)) { 10 | return descriptor; 11 | } 12 | 13 | descriptor = { 14 | enumerable: Object.prototype.propertyIsEnumerable.call(object, property), 15 | configurable: true 16 | }; 17 | 18 | descriptor.value = object[property]; 19 | 20 | var psPropertyType = object.reflect.find(property).type; 21 | descriptor.writable = !(psPropertyType === "readonly"); 22 | 23 | return descriptor; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertydescriptor/test/configurable.test.jsx: -------------------------------------------------------------------------------- 1 | #include '../getownpropertydescriptor.js' 2 | 3 | var obj = { 4 | prop: 42 5 | } 6 | 7 | var descr = Object.getOwnPropertyDescriptor(obj, 'prop'); 8 | 9 | $.writeln( descr.configurable === true); 10 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertydescriptor/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.getownpropertydescriptor.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18 [pass: 2, fail: 0] 10 | - ✔ Darwin indesign-12 [pass: 2, fail: 0] 11 | - ✔ Darwin illustrator-21 [pass: 2, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertydescriptor/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.reportScriptName(true); 6 | 7 | tapes.add('object.getownpropertydescriptor', d+'/*.jsx', targets, true); 8 | tapes.run(d+'/results.md'); 9 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertydescriptor/test/value.test.jsx: -------------------------------------------------------------------------------- 1 | #include '../getownpropertydescriptor.js' 2 | 3 | var obj = { 4 | prop1: 42 5 | } 6 | 7 | var descr = Object.getOwnPropertyDescriptor(obj, 'prop1'); 8 | 9 | $.writeln( descr.value === 42); 10 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertynames/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.getownpropertynames/README.md: -------------------------------------------------------------------------------- 1 | # object.getownpropertynames 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.getownpropertynames.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.getownpropertynames) 4 | 5 | > ES5 Sham 6 | 7 | The `Object.getOwnPropertyNames()` method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly upon a given object. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/getOwnPropertyNames.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.getownpropertynames 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.getownpropertynames/getownpropertynames.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertynames/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.getownpropertynames.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.getownpropertynames [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.getownpropertynames [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.getownpropertynames [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertynames/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | 6 | tapes.add('object.getownpropertynames', d+'/*.jsx', targets, true); 7 | tapes.run(d+'/results.md'); 8 | -------------------------------------------------------------------------------- /aes/patch/object.getownpropertynames/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../getownpropertynames.js' 2 | #include '../../json/json.js' 3 | 4 | var myObj = { a: 1, b: 2, c: 3 }; 5 | 6 | var actual = Object.getOwnPropertyNames( myObj ); 7 | var expected = ["a", "b", "c"]; 8 | 9 | $.writeln( JSON.stringify(actual) === JSON.stringify(expected)); 10 | -------------------------------------------------------------------------------- /aes/patch/object.getprototypeof/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.getprototypeof/README.md: -------------------------------------------------------------------------------- 1 | # object.getprototypeof 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.getprototypeof.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.getprototypeof) 4 | 5 | > ES5 Sham 6 | 7 | The `Object.getPrototypeOf()` method returns the prototype (i.e. the value of the internal `Prototype` property) of the specified object. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/getPrototypeOf.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.getprototypeof 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.getprototypeof/getprototypeof.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.getprototypeof/getprototypeof.js: -------------------------------------------------------------------------------- 1 | if (!Object.getPrototypeOf) { 2 | Object.getPrototypeOf = function(object) { 3 | if (Object(object) !== object) { 4 | throw new TypeError('Object.getPrototypeOf can only be called on Objects.'); 5 | } 6 | return object.__proto__; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /aes/patch/object.getprototypeof/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.getprototypeof.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.getprototypeof [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.getprototypeof [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.getprototypeof [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.getprototypeof/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.getprototypeof', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.getprototypeof/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../getprototypeof.js' 2 | #include '../../object.create/create.js' 3 | 4 | var pType = {}; 5 | var obj1 = Object.create(pType); 6 | 7 | $.writeln( Object.getPrototypeOf(obj1) === pType ); // expected: true 8 | -------------------------------------------------------------------------------- /aes/patch/object.isextensible/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.isextensible/README.md: -------------------------------------------------------------------------------- 1 | # object.isextensible 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.isextensible.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.isextensible) 4 | 5 | > ES5 Sham 6 | 7 | The Object.isExtensible() method determines if an object is extensible (whether it can have new properties added to it). 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/isExtensible.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.isextensible 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.isextensible/isextensible.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.isextensible/isextensible.js: -------------------------------------------------------------------------------- 1 | // ES5 15.2.3.13 2 | // http://es5.github.com/#x15.2.3.13 3 | if (!Object.isExtensible) { 4 | Object.isExtensible = function isExtensible(object) { 5 | if (Object(object) !== object) { 6 | throw new TypeError('Object.isExtensible can only be called on Objects.'); 7 | } 8 | return true; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /aes/patch/object.isextensible/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.isextensible.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.isextensible [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.isextensible [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.isextensible [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.isextensible/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.isextensible', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.isextensible/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../isextensible.js' 2 | 3 | var object1 = {}; 4 | 5 | $.writeln( Object.isExtensible(object1) === true); 6 | -------------------------------------------------------------------------------- /aes/patch/object.isfrozen/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.isfrozen/README.md: -------------------------------------------------------------------------------- 1 | # object.isfrozen 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.isfrozen.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.isfrozen) 4 | 5 | > ES5 Sham 6 | 7 | The Object.isFrozen() determines if an object is frozen. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/isFrozen.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.isfrozen 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.isfrozen/isfrozen.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.isfrozen/isfrozen.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/es-shims/es5-shim/blob/master/es5-sham.js 3 | */ 4 | // ES5 15.2.3.12 5 | // http://es5.github.com/#x15.2.3.12 6 | if (!Object.isFrozen) { 7 | Object.isFrozen = function isFrozen(object) { 8 | if (Object(object) !== object) { 9 | throw new TypeError('Object.isFrozen can only be called on Objects.'); 10 | } 11 | return false; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /aes/patch/object.isfrozen/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.isfrozen.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.isfrozen [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.isfrozen [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.isfrozen [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.isfrozen/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.isfrozen', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.isfrozen/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../isfrozen.js' 2 | 3 | var object1 = { 4 | property1: 42 5 | }; 6 | 7 | // Note: Object.freeze does not work in ExtendScript 8 | $.writeln( Object.isFrozen(object1) === false ); 9 | -------------------------------------------------------------------------------- /aes/patch/object.issealed/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.issealed/README.md: -------------------------------------------------------------------------------- 1 | # object.issealed 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.issealed.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.issealed) 4 | 5 | > ES5 Sham 6 | 7 | The `Object.isSealed()` method determines if an object is sealed. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/isSealed.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.issealed 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.issealed/issealed.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.issealed/issealed.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/es-shims/es5-shim/blob/master/es5-sham.js 3 | */ 4 | // ES5 15.2.3.11 5 | // http://es5.github.com/#x15.2.3.11 6 | if (!Object.isSealed) { 7 | Object.isSealed = function isSealed(object) { 8 | if (Object(object) !== object) { 9 | throw new TypeError('Object.isSealed can only be called on Objects.'); 10 | } 11 | return false; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /aes/patch/object.issealed/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.issealed.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.issealed [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.issealed [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.issealed [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.issealed/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.issealed', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.issealed/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../issealed.js' 2 | 3 | const obj = { 4 | prop: 42 5 | }; 6 | 7 | $.writeln( Object.isSealed(obj) === false); 8 | -------------------------------------------------------------------------------- /aes/patch/object.keys/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.keys/README.md: -------------------------------------------------------------------------------- 1 | # object.keys 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.object.keys.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.object.keys) 4 | 5 | > ES5 Shim 6 | 7 | The `Object.keys()` method returns an array of a given object's own enumerable properties. 8 | 9 | Source: [ps-scripting-es5shim](https://github.com/EugenTepin/ps-scripting-es5shim/blob/master/lib/Object/keys.js) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.object.keys 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.object.keys/keys.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/object.keys/keys.js: -------------------------------------------------------------------------------- 1 | if (!Object.keys) { 2 | Object.keys = function(object) { 3 | if (Object(object) !== object) { 4 | throw new TypeError('Object.keys can only be called on Objects.'); 5 | } 6 | var hasOwnProperty = Object.prototype.hasOwnProperty; 7 | var result = []; 8 | for (var prop in object) { 9 | if (hasOwnProperty.call(object, prop)) { 10 | result.push(prop); 11 | } 12 | } 13 | return result; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /aes/patch/object.keys/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.keys.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.keys [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.keys [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.keys [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.keys/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.keys', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.keys/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../keys.js' 2 | #include '../../json/json.js' 3 | 4 | var enumArr = Object.keys({0:"a",1:"b",2:"c"}) 5 | 6 | $.writeln( JSON.stringify(enumArr) === '["0","1","2"]' ); 7 | -------------------------------------------------------------------------------- /aes/patch/object.preventextensions/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.preventextensions/preventextensions.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/es-shims/es5-shim/blob/master/es5-sham.js 3 | */ 4 | // ES5 15.2.3.10 5 | // http://es5.github.com/#x15.2.3.10 6 | if (!Object.preventExtensions) { 7 | Object.preventExtensions = function preventExtensions(object) { 8 | 9 | if (Object(object) !== object) { 10 | throw new TypeError('Object.preventExtensions can only be called on Objects.'); 11 | } 12 | // this is misleading and breaks feature-detection, but 13 | // allows "securable" code to "gracefully" degrade to working 14 | // but insecure code. 15 | return object; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /aes/patch/object.preventextensions/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.preventextensions.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.preventextensions [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.preventextensions [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.preventextensions [pass: 1, fail: 0] -------------------------------------------------------------------------------- /aes/patch/object.preventextensions/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.preventextensions', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.preventextensions/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../preventextensions.js' 2 | 3 | var obj = {}; 4 | var obj2 = Object.preventExtensions(obj); 5 | 6 | $.writeln( obj === obj2 ); 7 | -------------------------------------------------------------------------------- /aes/patch/object.seal/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.seal/seal.js: -------------------------------------------------------------------------------- 1 | /* 2 | https://github.com/es-shims/es5-shim/blob/master/es5-sham.js 3 | */ 4 | // ES5 15.2.3.8 5 | // http://es5.github.com/#x15.2.3.8 6 | if (!Object.seal) { 7 | Object.seal = function seal(object) { 8 | if (Object(object) !== object) { 9 | throw new TypeError('Object.seal can only be called on Objects.'); 10 | } 11 | // this is misleading and breaks feature-detection, but 12 | // allows "securable" code to "gracefully" degrade to working 13 | // but insecure code. 14 | return object; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /aes/patch/object.seal/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.seal.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.seal [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.seal [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.seal [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.seal/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.seal', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.seal/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../seal.js' 2 | 3 | var object1 = { 4 | property1: 42, 5 | property2: 84 6 | }; 7 | 8 | Object.seal(object1); // This does not fail nor seal 9 | delete object1.property1; // Still works 10 | 11 | $.writeln( object1.property1 === undefined); 12 | -------------------------------------------------------------------------------- /aes/patch/object.setprototypeof/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/object.setprototypeof/setprototypeof.js: -------------------------------------------------------------------------------- 1 | // Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf 2 | Object.setPrototypeOf = Object.setPrototypeOf || function(obj, proto) { 3 | obj.__proto__ = proto; 4 | return obj; 5 | } 6 | -------------------------------------------------------------------------------- /aes/patch/object.setprototypeof/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## object.setprototypeof.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: object.setprototypeof [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: object.setprototypeof [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: object.setprototypeof [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/object.setprototypeof/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('object.setprototypeof', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/object.setprototypeof/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../setprototypeof.js' 2 | 3 | var proto = { y: 2 }; 4 | 5 | var obj = { x: 10 }; 6 | Object.setPrototypeOf(obj, proto); 7 | 8 | $.writeln( obj.y === 2 ); 9 | -------------------------------------------------------------------------------- /aes/patch/string.trim/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /aes/patch/string.trim/README.md: -------------------------------------------------------------------------------- 1 | # string.trim 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.patch.string.trim.svg)](https://www.npmjs.org/package/@extendscript/aes.patch.string.trim) 4 | 5 | > ES5 Shim 6 | 7 | The trim() method removes whitespace from both ends of a string. 8 | 9 | Source: [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim) 10 | 11 | ## Install 12 | 13 | npm install @extendscript/aes.patch.string.trim 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/aes.patch.string.trim/trim.js' 18 | 19 | ## Test 20 | 21 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 22 | 23 | npm run test target-1 target-2 24 | 25 | We keep [a log of test results](./test/results_log.md) 26 | -------------------------------------------------------------------------------- /aes/patch/string.trim/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## string.trim.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin photoshop-18: string.trim [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12: string.trim [pass: 1, fail: 0] 11 | - ✔ Darwin illustrator-21: string.trim [pass: 1, fail: 0] 12 | -------------------------------------------------------------------------------- /aes/patch/string.trim/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('string.trim', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/patch/string.trim/test/test.jsx: -------------------------------------------------------------------------------- 1 | #include '../trim.js' 2 | 3 | var orig = ' foo '; 4 | 5 | $.writeln( orig.trim() === 'foo'); 6 | -------------------------------------------------------------------------------- /aes/patch/string.trim/trim.js: -------------------------------------------------------------------------------- 1 | /* 2 | Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim 3 | */ 4 | if (!String.prototype.trim) { 5 | String.prototype.trim = function () { 6 | return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /aes/util/README.md: -------------------------------------------------------------------------------- 1 | # AES.UTIL scope 2 | 3 | This is a collection of utilities for [ExtendScript](https://en.wikipedia.org/wiki/ExtendScript). 4 | 5 | * [x] [`jaw`](./jaw) 6 | * [ ] [`schema`](./schema) 7 | 8 | ## More info 9 | 10 | Read [the docs](../docs/README.md) 11 | -------------------------------------------------------------------------------- /aes/util/jaw/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /aes/util/jaw/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## jaw.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin indesign-13: jaw [pass: 1, fail: 0] 10 | -------------------------------------------------------------------------------- /aes/util/jaw/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | tapes.reportScriptName(true); 5 | 6 | tapes.add('jaw', d+'/test*.jsx', targets, true); 7 | tapes.run(d+'/results.md'); 8 | -------------------------------------------------------------------------------- /aes/util/schema/README.md: -------------------------------------------------------------------------------- 1 | # schema 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/aes.schema.svg)](https://www.npmjs.org/package/@extendscript/aes.schema) 4 | 5 | 6 | Some ExtendScript related JSON schemas. 7 | 8 | - [ ] [`document`](./document/README.md) 9 | 10 | ## More info 11 | 12 | Read [the docs](../../docs/README.md) 13 | -------------------------------------------------------------------------------- /aes/util/schema/schema.document/README.md: -------------------------------------------------------------------------------- 1 | # schema.document 2 | 3 | > JSON Schema 4 | 5 | The `document` schema describes a document roughly following the [InDesign DOM](http://jongware.mit.edu/idcs6js/pc_Document.html). 6 | 7 | ## Install 8 | 9 | npm install @extendscript/aes.util.schema.document 10 | 11 | ## Include 12 | 13 | #include 'node_modules/@extendscript/aes.util.schema.document/document.js' 14 | 15 | ## Test 16 | 17 | You can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 18 | 19 | npm run test target-1 target-2 20 | 21 | We keep [a log of test results](./test/results_log.md) 22 | -------------------------------------------------------------------------------- /aes/util/schema/schema.document/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your environment and add the result below. Thanks! 4 | 5 | ## schema.document 6 | 7 | > Version 0 8 | 9 | -------------------------------------------------------------------------------- /aes/util/schema/schema.document/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.add('schema.document', d+'/*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /aes/util/schema/schema.document/test/test.jsx: -------------------------------------------------------------------------------- 1 | $.writeln( false === true); 2 | -------------------------------------------------------------------------------- /afx/README.md: -------------------------------------------------------------------------------- 1 | # AFX scope 2 | 3 | Here you can find all the modules that target After Effects. 4 | 5 | 6 | ## More info 7 | 8 | Read [the docs](../docs/README.md) 9 | -------------------------------------------------------------------------------- /ai/README.md: -------------------------------------------------------------------------------- 1 | # AI scope 2 | 3 | Here you can find all the modules that target Illustrator. 4 | 5 | 6 | ## More info 7 | 8 | Read [the docs](../docs/README.md) 9 | -------------------------------------------------------------------------------- /boilerplate/README.md: -------------------------------------------------------------------------------- 1 | # Boilerplates 2 | 3 | Some lightweight boilerplates... 4 | 5 | ## Create a Module 6 | 7 | Kick off a [new module](./module) to contribute to this Library. 8 | 9 | ## Create an App 10 | 11 | Start a [new project](https://github.com/ExtendScript/extendscripter-boilerplate) using the modules. Keep in mind that you want contribute a module as well. The best applications consist mostly of a compilation of modules. We like push-ups! 12 | -------------------------------------------------------------------------------- /boilerplate/module/___moduleName___/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /boilerplate/module/___moduleName___/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /boilerplate/module/___moduleName___/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /boilerplate/module/___moduleName___/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /boilerplate/module/___moduleName___/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /boilerplate/util/___utilName___/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /boilerplate/util/___utilName___/README.md: -------------------------------------------------------------------------------- 1 | # ___utilName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___utilName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___utilName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___utilName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___utilName___/___utilName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___utilName___ = Sky.getUtil("___utilName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /boilerplate/util/___utilName___/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___utilName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /boilerplate/util/___utilName___/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___utilName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /boilerplate/util/___utilName___/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___utilName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /bridge/README.md: -------------------------------------------------------------------------------- 1 | # BRIDGE scope 2 | 3 | Here you can find all the modules that target Bridge. 4 | 5 | 6 | ## More info 7 | 8 | Read [the docs](../docs/README.md) 9 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Docs 2 | 3 | > If you are looking for documentation about a specific module, please check the `README.md` in the module's folder. 4 | 5 | * [API Registry](./API-Registry.md) 6 | * [Dev Environment](./Dev-Environment.md) 7 | * [Package Naming Conventions](./Package-Naming-Conventions.md) 8 | * [Testing](./Testing.md) 9 | * [Publishing](./Publishing.md) -------------------------------------------------------------------------------- /ind/README.md: -------------------------------------------------------------------------------- 1 | # IND scope 2 | 3 | Here you can find some extendscript modules that target InDesign. 4 | 5 | * [`module`](./module/README.md) 6 | * [`util`](./util/README.md) 7 | 8 | ## About InDesign 9 | 10 | Adobe InDesign is publishing software that can be used to create posters, flyers, brochures, magazines, newspapers, presentations, books and ebooks. InDesign can also publish content suitable for tablet devices in conjunction with Adobe Digital Publishing Suite. 11 | 12 | InDesign supports XML, style sheets, and other coding markup, making it suitable for exporting tagged text content for use in other digital and online formats. 13 | 14 | ## More info 15 | 16 | Read [the docs](../docs/README.md) 17 | -------------------------------------------------------------------------------- /ind/module/README.md: -------------------------------------------------------------------------------- 1 | # IND.MODULE scope 2 | 3 | This is a collection of modules for [InDesign](https://en.wikipedia.org/wiki/Adobe_InDesign). 4 | 5 | - [ ] [outerspace](outerspace) 6 | 7 | ## More info 8 | 9 | Read [the docs](../../docs/README.md) -------------------------------------------------------------------------------- /ind/module/outerspace/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/module/outerspace/README.md: -------------------------------------------------------------------------------- 1 | # outerspace 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/ind.module.outerspace.svg)](https://www.npmjs.org/package/@extendscript/ind.module.outerspace) 4 | 5 | > Module 6 | 7 | Bleed and Slug tools for InDesign. 8 | 9 | > This is an opinionated tool to deal with items in the slugs. I might split the more basic functions to `ind.util.bleeds` and `ind.util.slugs` later pending how big and usefull it's utils are. 10 | 11 | ## Install 12 | 13 | npm install @extendscript/ind.module.outerspace 14 | 15 | ## Include 16 | 17 | #include 'node_modules/@extendscript/ind.module.outerspace/outerspace.js' 18 | 19 | ## Use 20 | 21 | Load the module by creating a reference. 22 | 23 | var OuterSpace = Sky.getModule("outerspace") 24 | 25 | ## Test 26 | 27 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 28 | 29 | npm run test myTarget 30 | 31 | We keep [a log of test results](./test/results_log.md) 32 | 33 | 34 | ## More info 35 | 36 | Read [the docs](../docs/README.md) 37 | -------------------------------------------------------------------------------- /ind/module/outerspace/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## outerspace.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ind/module/outerspace/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../outerspace.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ind/module/outerspace/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('outerspace', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ind/util/README.md: -------------------------------------------------------------------------------- 1 | # IND.UTIL scope 2 | 3 | This is a collection of utilities for [InDesign](https://en.wikipedia.org/wiki/Adobe_InDesign). 4 | 5 | - [x] [bounds](bounds) 6 | - [ ] [font](font) 7 | - [x] [layer](layer) 8 | - [x] [menuloader](menuloader) 9 | - [x] [pageitems](pageitems) 10 | - [x] [pages](pages) 11 | - [x] [rulers](rulers) 12 | 13 | ## More info 14 | 15 | Read [the docs](../../docs/README.md) 16 | -------------------------------------------------------------------------------- /ind/util/bounds/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/util/bounds/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## bounds.js 6 | 7 | > Version 1.1.0 8 | 9 | - ✔ Darwin indesign-13 test-relativeOfset.jsx: bounds [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-13 test-offset.jsx: bounds [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-13 test-normalise.jsx: bounds [pass: 1, fail: 0] 12 | - ✔ Darwin indesign-13 test-getInfo.jsx: bounds [pass: 1, fail: 0] 13 | -------------------------------------------------------------------------------- /ind/util/bounds/test/test-getInfo.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../node_modules/@extendscript/aes.patch.json/json.js" 3 | 4 | #include "../bounds.js" 5 | 6 | var boundsUtil = Sky.getUtil("bounds"); 7 | var boundsInfo = boundsUtil.getInfo([10,10,20,20]); 8 | 9 | $.writeln( JSON.stringify(boundsInfo) === '{"bounds":[10,10,20,20],"height":10,"width":10,"topLeft":{"x":10,"y":10},"topCenter":{"x":15,"y":10},"topRight":{"x":20,"y":10},"midLeft":{"x":10,"y":15},"midCenter":{"x":15,"y":15},"midRight":{"x":20,"y":15},"botLeft":{"x":10,"y":20},"botCenter":{"x":15,"y":20},"botRight":{"x":20,"y":20}}' ); 10 | -------------------------------------------------------------------------------- /ind/util/bounds/test/test-normalise.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../node_modules/@extendscript/aes.patch.json/json.js" 3 | 4 | #include "../bounds.js" 5 | 6 | var boundsUtil = Sky.getUtil("bounds"); 7 | 8 | $.writeln( JSON.stringify( boundsUtil.normalise([10,10,20,20]) ) === '[0,0,10,10]' ); 9 | -------------------------------------------------------------------------------- /ind/util/bounds/test/test-offset.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../node_modules/@extendscript/aes.patch.json/json.js" 3 | 4 | #include "../bounds.js" 5 | 6 | var boundsUtil = Sky.getUtil("bounds"); 7 | 8 | $.writeln( JSON.stringify( boundsUtil.offset([10,10,20,20], [5,10]) ) === '[20,15,30,25]' ); 9 | -------------------------------------------------------------------------------- /ind/util/bounds/test/test-relativeOfset.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../node_modules/@extendscript/aes.patch.json/json.js" 3 | 4 | #include "../bounds.js" 5 | 6 | var boundsUtil = Sky.getUtil("bounds"); 7 | var relativeOfset = boundsUtil.getRelativeOfset([10,10,20,20],[100,100,200,200]); 8 | 9 | $.writeln( JSON.stringify(relativeOfset) === '{"bounds":[10,10,20,20],"height":10,"width":10,"topLeft":{"x":-90,"y":-90},"topCenter":{"x":-135,"y":-90},"topRight":{"x":-180,"y":-90},"midLeft":{"x":-90,"y":-135},"midCenter":{"x":-135,"y":-135},"midRight":{"x":-180,"y":-135},"botLeft":{"x":-90,"y":-180},"botCenter":{"x":-135,"y":-180},"botRight":{"x":-180,"y":-180}}' ); 10 | -------------------------------------------------------------------------------- /ind/util/bounds/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | tapes.reportScriptName(true); 5 | 6 | tapes.add('bounds', d+'/test-*.jsx', targets, true); 7 | tapes.run(d+'/results.md'); 8 | -------------------------------------------------------------------------------- /ind/util/font/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/util/font/README.md: -------------------------------------------------------------------------------- 1 | # font 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/ind.util.font.svg)](https://www.npmjs.org/package/@extendscript/ind.util.font) 4 | 5 | > Utility 6 | 7 | Some tools for interacting with fonts. 8 | 9 | ## Install 10 | 11 | npm install @extendscript/ind.util.font 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/ind.util.font/font.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var font = Sky.getUtil("font") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ind/util/font/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## font.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ind/util/font/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../font.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ind/util/font/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('font', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ind/util/layer/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/util/layer/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## layer.js 6 | 7 | > Version 1 8 | 9 | - ✔ Darwin indesign-13: layer [pass: 1, fail: 0] 10 | 11 | > Version 2 12 | 13 | - ✔ Darwin indesign-13 test-validOr.jsx: layer [pass: 1, fail: 0] 14 | - ✔ Darwin indesign-13 test-moveAndSelect.jsx: layer [pass: 1, fail: 0] 15 | - ✔ Darwin indesign-13 test-locker.jsx: layer [pass: 1, fail: 0] 16 | -------------------------------------------------------------------------------- /ind/util/layer/test/test-locker.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../layer.js" 3 | 4 | var LayerUtil = Sky.getUtil("layer"); 5 | 6 | var Doc = app.documents.add(); 7 | 8 | var validLayer = LayerUtil.get( Doc, "unlocked", true ); 9 | 10 | var originalLock = validLayer.locked; 11 | var previousLock = LayerUtil.locker( validLayer, true ); // false 12 | 13 | var result = validLayer.locked === !(originalLock); 14 | 15 | Doc.close(SaveOptions.NO); 16 | 17 | $.writeln( (originalLock === previousLock) === result === true ); 18 | -------------------------------------------------------------------------------- /ind/util/layer/test/test-moveAndSelect.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../layer.js" 3 | 4 | var LayerUtil = Sky.getUtil("layer"); 5 | 6 | var Doc = app.documents.add(); 7 | 8 | // This function touches most layer functions 9 | var myLayerName = LayerUtil.moveAndSelect( Doc, "test", -1, true ).name; 10 | 11 | Doc.close(SaveOptions.NO); 12 | 13 | $.writeln( myLayerName === "test"); 14 | -------------------------------------------------------------------------------- /ind/util/layer/test/test-validOr.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../layer.js" 3 | 4 | var LayerUtil = Sky.getUtil("layer"); 5 | 6 | var Doc = app.documents.add(); 7 | 8 | // This function touches most layer functions 9 | var invalidLayer = LayerUtil.get( Doc, "test1", false ); 10 | var validLayer = LayerUtil.get( Doc, "test2", true ); 11 | var myLayerName = LayerUtil.validOr(invalidLayer, validLayer).name; 12 | 13 | Doc.close(SaveOptions.NO); 14 | 15 | $.writeln( myLayerName === "test2"); 16 | -------------------------------------------------------------------------------- /ind/util/layer/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.reportScriptName(true); 6 | 7 | tapes.add('layer', d+'/test*.jsx', targets, true); 8 | tapes.run(d+'/results.md'); 9 | -------------------------------------------------------------------------------- /ind/util/menuloader/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/util/menuloader/test/test-load-file-after.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../menuloader.js" 3 | 4 | var MenuLoader = Sky.getUtil("menuloader"); 5 | 6 | var sayHello = function() { 7 | alert( "Hello!" ); 8 | }; 9 | 10 | var Options = { 11 | path: [app.translateKeyString('$ID/TouchMenuFile'), app.translateKeyString("$ID/New")], 12 | loc: LocationOptions.AFTER, 13 | ref: app.translateKeyString("$ID/Document") + "...", 14 | fun: sayHello 15 | }; 16 | 17 | var testMenu = new MenuLoader.template("MenuLoader File Sub Test After New Document...", Options); 18 | 19 | testMenu.load(true); 20 | var loaded = testMenu.isLoaded(); 21 | 22 | testMenu.unload(true); 23 | var unloaded = !testMenu.isLoaded(); 24 | 25 | $.writeln( loaded === true && unloaded === true); 26 | -------------------------------------------------------------------------------- /ind/util/menuloader/test/test-load-file-sub.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../menuloader.js" 3 | 4 | var MenuLoader = Sky.getUtil("menuloader"); 5 | 6 | var Options = { 7 | path: "File", 8 | sub: [ 9 | { caption: "Above the Line...", fun: function(){ alert("Above the Line...") }, subName: "" }, 10 | { separator: true, subName: "" }, 11 | { caption: "... the Line...", fun: function(){ alert("Below the Line...") }, subName: "Below ..." } 12 | ] 13 | }; 14 | 15 | var testMenu = new MenuLoader.template("MenuLoader File Sub Test", Options); 16 | 17 | testMenu.load(true); 18 | var loaded = testMenu.isLoaded(); 19 | 20 | testMenu.unload(true); 21 | var unloaded = !testMenu.isLoaded(); 22 | 23 | $.writeln( loaded === true && unloaded === true); 24 | -------------------------------------------------------------------------------- /ind/util/menuloader/test/test-load-file.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../menuloader.js" 3 | 4 | var MenuLoader = Sky.getUtil("menuloader"); 5 | 6 | var sayHello = function() { 7 | alert( "Hello!" ); 8 | }; 9 | 10 | var testMenu = new MenuLoader.template("MenuLoader Test", {path: "File", fun: sayHello}); 11 | 12 | MenuLoader.load(testMenu, true); 13 | 14 | var menu = MenuLoader.getMenu( testMenu ); 15 | 16 | var loaded = menu.isValid; 17 | 18 | MenuLoader.unload(testMenu, true); 19 | var unloaded = !menu.isValid; 20 | 21 | $.writeln( loaded === true && unloaded === true); 22 | -------------------------------------------------------------------------------- /ind/util/menuloader/test/test-load-main-sub.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../menuloader.js" 3 | 4 | var MenuLoader = Sky.getUtil("menuloader"); 5 | 6 | var Options = { 7 | sub: [ 8 | { caption: "Above the Line...", fun: function(){ alert("Above the Line...") }, subName: "" }, 9 | { separator: true, subName: "" }, 10 | { caption: "... the Line...", fun: function(){ alert("Below the Line...") }, subName: "Below ..." } 11 | ] 12 | }; 13 | 14 | var testMenu = new MenuLoader.template("MenuLoader Sub Test", Options); 15 | 16 | testMenu.load(); 17 | 18 | var menu = MenuLoader.getMenu( testMenu ); 19 | 20 | var loaded = menu.isValid; 21 | var unloaded = !testMenu.unload().isLoaded(); 22 | 23 | $.writeln( loaded === true && unloaded === true); 24 | -------------------------------------------------------------------------------- /ind/util/menuloader/test/test-load-main.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../menuloader.js" 3 | 4 | var MenuLoader = Sky.getUtil("menuloader"); 5 | 6 | var sayHello = function() { 7 | alert( "Hello!" ); 8 | }; 9 | 10 | var testMenu = new MenuLoader.template("MenuLoader Main Test", {fun: sayHello}); 11 | 12 | var loaded = testMenu.load().isLoaded(); 13 | var unloaded = !testMenu.unload().isLoaded(); 14 | 15 | $.writeln( loaded === true && unloaded === true); 16 | -------------------------------------------------------------------------------- /ind/util/menuloader/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | tapes.reportScriptName(true); 5 | 6 | tapes.add('menuloader', d+'/test*.jsx', targets, true); 7 | tapes.run(d+'/results.md'); 8 | -------------------------------------------------------------------------------- /ind/util/pageitems/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/util/pageitems/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## pageitems.js 6 | 7 | > Version 1.0.0 8 | 9 | - ✔ Darwin indesign-13 test-getParentPage-pasteBoard.jsx: pageitems [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-13 test-addTextFrame.jsx: pageitems [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-13 test-addRectToPage.jsx: pageitems [pass: 1, fail: 0] 12 | - ✔ Darwin indesign-13 test-addRect.jsx: pageitems [pass: 1, fail: 0] 13 | -------------------------------------------------------------------------------- /ind/util/pageitems/test/test-addRect.jsx: -------------------------------------------------------------------------------- 1 | #include "test-header.js" 2 | 3 | var Doc = app.documents.add(); 4 | with( Doc.documentPreferences ){ 5 | pageHeight = "100mm"; 6 | pageWidth = "100mm"; 7 | documentBleedUniformSize = true; 8 | documentSlugUniformSize = true; 9 | documentBleedTopOffset = "10mm"; 10 | documentSlugTopOffset = "10mm"; 11 | }; 12 | 13 | var rect = Pageitems.addRect( Doc.pages[0], {strokeWeight: "0.25mm"} ); 14 | var strokePoints = parseFloat(rect.strokeWeight); 15 | 16 | Doc.close(SaveOptions.NO); 17 | 18 | $.writeln( strokePoints === 0.70866141732283 ); 19 | -------------------------------------------------------------------------------- /ind/util/pageitems/test/test-addRectToPage.jsx: -------------------------------------------------------------------------------- 1 | #include "test-header.js" 2 | 3 | var Bounds = Sky.getUtil("bounds"); 4 | 5 | var Doc = app.documents.add(); 6 | with( Doc.documentPreferences ){ 7 | pageHeight = "100mm"; 8 | pageWidth = "100mm"; 9 | documentBleedUniformSize = true; 10 | documentSlugUniformSize = true; 11 | documentBleedTopOffset = "10mm"; 12 | documentSlugTopOffset = "10mm"; 13 | }; 14 | 15 | // Set rulers to mm to test our rectangle size 16 | Rulers.set( app.activeDocument, "MM"); 17 | 18 | var rect = Pageitems.addRectToPage( Doc.pages[0] ); 19 | var rectWidth = Bounds.getInfo(rect.geometricBounds).width; 20 | 21 | Doc.close(SaveOptions.NO); 22 | 23 | $.writeln( Number(rectWidth) === 100 ); 24 | -------------------------------------------------------------------------------- /ind/util/pageitems/test/test-addTextFrame.jsx: -------------------------------------------------------------------------------- 1 | #include "test-header.js" 2 | 3 | var Doc = app.documents.add(); 4 | with( Doc.documentPreferences ){ 5 | pageHeight = "100mm"; 6 | pageWidth = "100mm"; 7 | documentBleedUniformSize = true; 8 | documentSlugUniformSize = true; 9 | documentBleedTopOffset = "10mm"; 10 | documentSlugTopOffset = "10mm"; 11 | }; 12 | 13 | var tf = Pageitems.addTextFrame( Doc.pages[0], {contents: "OK", autoSizingType: "HEIGHT_AND_WIDTH"} ); 14 | var contents = tf.contents; 15 | 16 | Doc.close(SaveOptions.NO); 17 | 18 | $.writeln( contents === "OK" ); 19 | -------------------------------------------------------------------------------- /ind/util/pageitems/test/test-getParentPage-pasteBoard.jsx: -------------------------------------------------------------------------------- 1 | #include "test-header.js" 2 | 3 | // Does this work properly when item is on paste-board? 4 | // Add test to proof 5 | 6 | var Doc = app.documents.add(); 7 | with( Doc.documentPreferences ){ 8 | pageHeight = "100mm"; 9 | pageWidth = "100mm"; 10 | documentBleedUniformSize = true; 11 | documentSlugUniformSize = true; 12 | documentBleedTopOffset = "10mm"; 13 | documentSlugTopOffset = "10mm"; 14 | pagesPerDocument = 3; 15 | facingPages = true; 16 | }; 17 | 18 | var rect = Pageitems.addRect( Doc.pages[2] ); 19 | rect.move(undefined, [0,-30]); // Move rectangle off the page 20 | 21 | var parentPage = Pageitems.getParentPage( rect ).name; 22 | 23 | Doc.close(SaveOptions.NO); 24 | 25 | $.writeln( parentPage === "3"); 26 | -------------------------------------------------------------------------------- /ind/util/pageitems/test/test-header.js: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../node_modules/@extendscript/aes.patch.bundle.array/array.js" 3 | #include "../node_modules/@extendscript/ind.util.pages/pages.js" 4 | #include "../node_modules/@extendscript/ind.util.bounds/bounds.js" 5 | #include "../node_modules/@extendscript/ind.util.rulers/rulers.js" 6 | 7 | #include "../pageitems.js" 8 | 9 | var Pageitems = Sky.getUtil("pageitems"); 10 | var Rulers = Sky.getUtil("rulers"); 11 | -------------------------------------------------------------------------------- /ind/util/pageitems/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | tapes.reportScriptName(true); 5 | 6 | tapes.add('pageitems', d+'/test*.jsx', targets, true); 7 | tapes.run(d+'/results.md'); 8 | -------------------------------------------------------------------------------- /ind/util/pages/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/util/pages/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## pages.js 6 | 7 | > Version 1 8 | 9 | - ✔ Darwin indesign-13: pages [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-13: pages [pass: 1, fail: 0] 11 | -------------------------------------------------------------------------------- /ind/util/pages/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('pages', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ind/util/rulers/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/util/rulers/test/indUnitsFrom-test.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../rulers.js" 3 | #include "./ruler-data.js" 4 | 5 | var Rulers = Sky.getUtil("rulers"); 6 | 7 | var failed = []; 8 | 9 | for (var u = 0; u < rulerUnits.length; u++) { 10 | var rulerUnit = rulerUnits[u]; 11 | for (var v = 0; v < rulerUnit.strVals.length; v++) { 12 | var strVal = rulerUnit.strVals[v]; 13 | var result = Rulers.indUnitsFrom(strVal); 14 | if( result !== rulerUnit.indUnits ) { 15 | failed.push(strVal); 16 | }; 17 | }; 18 | }; 19 | 20 | $.writeln( failed.length === 0 ); -------------------------------------------------------------------------------- /ind/util/rulers/test/load-test.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../rulers.js" 3 | 4 | var loaded = (typeof Sky.getUtil("rulers").set === "function") 5 | 6 | $.writeln( loaded === true ); 7 | -------------------------------------------------------------------------------- /ind/util/rulers/test/niceNameFor-test.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../rulers.js" 3 | #include "./ruler-data.js" 4 | 5 | var Rulers = Sky.getUtil("rulers"); 6 | 7 | var failed = []; 8 | 9 | for (var u = 0; u < rulerUnits.length; u++) { 10 | var rulerUnit = rulerUnits[u]; 11 | var longName = Rulers.niceNameFor(rulerUnit.indUnits); 12 | var shortName = Rulers.niceNameFor(rulerUnit.indUnits, true); 13 | 14 | if( longName !== rulerUnit.names[0] || shortName !== rulerUnit.names[1] ) { 15 | failed.push(rulerUnits.names[0]); 16 | }; 17 | }; 18 | 19 | $.writeln( failed.length === 0 ); -------------------------------------------------------------------------------- /ind/util/rulers/test/numToGridStep-test.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../rulers.js" 3 | 4 | var Rulers = Sky.getUtil("rulers"); 5 | 6 | var confirmValues = [5,10,15,20,25,30]; 7 | var resultValues = []; 8 | 9 | resultValues.push( Rulers.numToGridStep( 3, 5 ) ); 10 | resultValues.push( Rulers.numToGridStep( 8, 5 ) ); 11 | resultValues.push( Rulers.numToGridStep( 14, 5 ) ); 12 | resultValues.push( Rulers.numToGridStep( 21, 5 ) ); 13 | resultValues.push( Rulers.numToGridStep( 25, 5 ) ); 14 | resultValues.push( Rulers.numToGridStep( 32, 5 ) ); 15 | 16 | var failed = []; 17 | 18 | for (var i = 0; i < confirmValues.length; i++) { 19 | if(confirmValues[i] !== resultValues[i]) { 20 | failed.push(i); 21 | } 22 | }; 23 | 24 | $.writeln( failed.length === 0 ); -------------------------------------------------------------------------------- /ind/util/rulers/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## rulers.js 6 | 7 | > Version 3.0.0 8 | 9 | - ✔ Darwin indesign-12 set-get-test.jsx: rulers [pass: 1, fail: 0] 10 | - ✔ Darwin indesign-12 numToGridStep-test.jsx: rulers [pass: 1, fail: 0] 11 | - ✔ Darwin indesign-12 niceNameFor-test.jsx: rulers [pass: 1, fail: 0] 12 | - ✔ Darwin indesign-12 load-test.jsx: rulers [pass: 1, fail: 0] 13 | - ✔ Darwin indesign-12 indUnitsFrom-test.jsx: rulers [pass: 1, fail: 0] 14 | - ✔ Darwin indesign-12 convert-test.jsx: rulers [pass: 1, fail: 0] -------------------------------------------------------------------------------- /ind/util/rulers/test/set-get-test.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../rulers.js" 3 | 4 | var Rulers = Sky.getUtil("rulers"); 5 | 6 | var Doc = app.documents.add(); 7 | 8 | var originalUnits = Rulers.set( Doc, {units: "ciceros"} ); 9 | var newUnits = Doc.viewPreferences.horizontalMeasurementUnits; 10 | var getUnits = Rulers.get( Doc ).xruler; 11 | 12 | Doc.close(SaveOptions.NO); 13 | 14 | $.writeln( "ciceros" === String(getUnits).toLowerCase() && "ciceros" === String(newUnits).toLowerCase() ); 15 | -------------------------------------------------------------------------------- /ind/util/rulers/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | tapes.reportScriptName(true); 5 | 6 | tapes.add('rulers', d+'/*test.jsx', targets, true); 7 | tapes.run(d+'/results.md'); 8 | -------------------------------------------------------------------------------- /ind/util/styles/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ind/util/styles/README.md: -------------------------------------------------------------------------------- 1 | # styles 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/ind.util.styles.svg)](https://www.npmjs.org/package/@extendscript/ind.util.styles) 4 | 5 | > Utility 6 | 7 | Tools to create and adjust character, paragraph and object styles in InDesign. 8 | 9 | ## Install 10 | 11 | npm install @extendscript/ind.util.styles 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/ind.util.styles/styles.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var styles = Sky.getUtil("styles") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ind/util/styles/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## styles.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ind/util/styles/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../styles.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ind/util/styles/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('styles', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /init/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md -------------------------------------------------------------------------------- /init/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@extendscript/modules.init", 3 | "version": "2.4.0", 4 | "description": "This module creates the shared `Sky` object. A peer-dependency for all ExtendScript Modules.", 5 | "main": "init.js", 6 | "scripts": { 7 | "buildEnv": "curl https://raw.githubusercontent.com/ES-Collection/build-node-venv/master/build-node-venv.sh > ./.bnv.sh && chmod +x ./.bnv.sh && ./.bnv.sh && rm ./.bnv.sh", 8 | "prepublishOnly": "npm config set scope extendscript", 9 | "test": "node ./test/test.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/ExtendScript/extendscript-modules.git" 14 | }, 15 | "keywords": [ 16 | "extendscript", 17 | "extendscript-modules", 18 | "main" 19 | ], 20 | "author": "extendscript.org", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/ExtendScript/extendscript-modules/issues" 24 | }, 25 | "homepage": "https://github.com/ExtendScript/extendscript-modules#readme", 26 | "devDependencies": { 27 | "@extendscript/tap-es": ">=1.0.4" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /init/test/init-test.jsx: -------------------------------------------------------------------------------- 1 | #include "../init.js" 2 | 3 | var GlobalX233 = function() { 4 | $.global.X = 33; 5 | }; 6 | 7 | Sky.IQ.add( GlobalX233 ); 8 | 9 | Sky.init(); 10 | 11 | $.writeln( X === 33); 12 | -------------------------------------------------------------------------------- /init/test/load-test.jsx: -------------------------------------------------------------------------------- 1 | #include "../init.js" 2 | 3 | var loaded = false; 4 | var unloaded = false; 5 | 6 | if (typeof Sky.unload === "function") { 7 | loaded = true; 8 | Sky.unload(); 9 | }; 10 | 11 | if( typeof Sky === null ) { 12 | unloaded = true; 13 | }; 14 | 15 | // Sky should be loaded and unloaded 16 | $.writeln( typeof loaded === typeof unloaded === true); 17 | -------------------------------------------------------------------------------- /init/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | 4 | tapes.reportDuration(false); 5 | tapes.reportScriptName(true); 6 | 7 | tapes.add('init', d+'/*test.jsx', targets, true); 8 | tapes.run(d+'/results.md'); 9 | -------------------------------------------------------------------------------- /ps/README.md: -------------------------------------------------------------------------------- 1 | # PS scope 2 | 3 | Here you can find all the modules that target Photoshop. 4 | 5 | * [`module`](./module/README.md) 6 | * [`util`](./util/README.md) 7 | 8 | ## More info 9 | 10 | Read [the docs](../docs/README.md) 11 | -------------------------------------------------------------------------------- /ps/module/README.md: -------------------------------------------------------------------------------- 1 | # PS.MODULE scope 2 | 3 | This is a collection of modules for [Photoshop](https://en.wikipedia.org/wiki/Adobe_Photoshop). 4 | 5 | - [ ] [jam](jam) 6 | - [ ] [actions](jam/actions) 7 | - [ ] [books](jam/books) 8 | - [ ] [colors](jam/colors) 9 | - [ ] [engine](jam/engine) 10 | - [ ] [helpers](jam/helpers) 11 | - [ ] [json](jam/json) 12 | - [ ] [layers](jam/layers) 13 | - [ ] [shapes](jam/shapes) 14 | - [ ] [styles](jam/styles) 15 | - [ ] [text](jam/text) 16 | - [ ] [utils](jam/utils) 17 | 18 | ## More info 19 | 20 | Read [the docs](../../docs/README.md) -------------------------------------------------------------------------------- /ps/module/jam/jam.actions/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.actions/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.actions/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.actions/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.actions/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.books/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.books/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.books/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.books/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.books/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.colors/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.colors/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.colors/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.colors/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.colors/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.engine/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.engine/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.engine/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.engine/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.engine/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.helpers/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.helpers/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.helpers/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.helpers/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.helpers/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.json/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.json/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.json/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.json/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.json/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.layers/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.layers/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.layers/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.layers/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.layers/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.shapes/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.shapes/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.shapes/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.shapes/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.shapes/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.styles/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.styles/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.styles/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.styles/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.styles/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.text/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.text/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.text/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.text/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.text/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/module/jam/jam.utils/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /ps/module/jam/jam.utils/README.md: -------------------------------------------------------------------------------- 1 | # ___moduleName___ 2 | 3 | [![version](https://img.shields.io/npm/v/@extendscript/___path___.___moduleName___.svg)](https://www.npmjs.org/package/@extendscript/___path___.___moduleName___) 4 | 5 | > ___type___ 6 | 7 | ___description___ 8 | 9 | ## Install 10 | 11 | npm install @extendscript/___path___.___moduleName___ 12 | 13 | ## Include 14 | 15 | #include 'node_modules/@extendscript/___path___.___moduleName___/___moduleName___.js' 16 | 17 | ## Use 18 | 19 | Load the module by creating a reference. 20 | 21 | var ___moduleName___ = Sky.getUtil("___moduleName___") 22 | 23 | ## Test 24 | 25 | We can test the code against a range of [targets](https://github.com/nbqx/fakestk/blob/master/resources/versions.json): 26 | 27 | npm run test myTarget 28 | 29 | We keep [a log of test results](./test/results_log.md) 30 | 31 | 32 | ## More info 33 | 34 | Read [the docs](../docs/README.md) 35 | -------------------------------------------------------------------------------- /ps/module/jam/jam.utils/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## ___moduleName___.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /ps/module/jam/jam.utils/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../___moduleName___.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /ps/module/jam/jam.utils/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('___moduleName___', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | -------------------------------------------------------------------------------- /ps/util/README.md: -------------------------------------------------------------------------------- 1 | # PS.UTIL scope 2 | 3 | This is a collection of utilities for [Photoshop](https://en.wikipedia.org/wiki/Adobe_Photoshop). 4 | 5 | - [ ] []() 6 | 7 | ## More info 8 | 9 | Read [the docs](../../docs/README.md) 10 | -------------------------------------------------------------------------------- /sui/README.md: -------------------------------------------------------------------------------- 1 | # SUI scope 2 | 3 | Here you can find all the modules that target ScriptUI. 4 | 5 | * [`module`](./module/README.md) 6 | * [`util`](./util/README.md) 7 | 8 | ## More info 9 | 10 | Read [the docs](../docs/README.md) 11 | -------------------------------------------------------------------------------- /sui/module/README.md: -------------------------------------------------------------------------------- 1 | # SUI.MODULE scope 2 | 3 | This is a collection of modules for ScriptUI. 4 | 5 | - [x] [module.jaxon](jaxon) 6 | 7 | ## More info 8 | 9 | Read [the docs](../../docs/README.md) 10 | -------------------------------------------------------------------------------- /sui/module/jaxon/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /sui/module/jaxon/test/test-getByIndex.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include '../node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 3 | #include '../node_modules/@extendscript/aes.patch.array.indexof/indexof.js' 4 | #include '../node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 5 | #include '../node_modules/@extendscript/aes.patch.object.keys/keys.js' 6 | #include '../node_modules/@extendscript/aes.patch.json/json.js' 7 | #include '../node_modules/@extendscript/aes.patch.json.clone/clone.js' 8 | #include '../node_modules/@extendscript/aes.patch.json.instantiate/instantiate.js' 9 | #include '../node_modules/@extendscript/aes.patch.json.validate/validate.js' 10 | #include '../node_modules/@extendscript/aes.util.jaw/jaw.js' 11 | #include '../jaxon.js' 12 | #include './jaxonLoader.js' // Conatains test-data 13 | 14 | // Load a fresh instance of Jaxon 15 | var Manager = Jaxon.init(testFileName, Schema, standardPresets); 16 | 17 | $.writeln( Manager.Presets.getByIndex( 1 ).name === Manager.Presets.getByIndex( -2 ).name ); 18 | -------------------------------------------------------------------------------- /sui/module/jaxon/test/test-getByKey.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include '../node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 3 | #include '../node_modules/@extendscript/aes.patch.array.indexof/indexof.js' 4 | #include '../node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 5 | #include '../node_modules/@extendscript/aes.patch.object.keys/keys.js' 6 | #include '../node_modules/@extendscript/aes.patch.json/json.js' 7 | #include '../node_modules/@extendscript/aes.patch.json.clone/clone.js' 8 | #include '../node_modules/@extendscript/aes.patch.json.instantiate/instantiate.js' 9 | #include '../node_modules/@extendscript/aes.patch.json.validate/validate.js' 10 | #include '../node_modules/@extendscript/aes.util.jaw/jaw.js' 11 | #include '../jaxon.js' 12 | #include './jaxonLoader.js' // Conatains test-data 13 | 14 | // Load a fresh instance of Jaxon 15 | var Manager = Jaxon.init(testFileName, Schema, standardPresets); 16 | 17 | var aPreset = Manager.Presets.getByKey('name','Test 02'); 18 | 19 | $.writeln( aPreset.name === 'Test 02' ); 20 | -------------------------------------------------------------------------------- /sui/module/jaxon/test/test-init_get.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include '../node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 3 | #include '../node_modules/@extendscript/aes.patch.array.indexof/indexof.js' 4 | #include '../node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 5 | #include '../node_modules/@extendscript/aes.patch.object.keys/keys.js' 6 | #include '../node_modules/@extendscript/aes.patch.json/json.js' 7 | #include '../node_modules/@extendscript/aes.patch.json.clone/clone.js' 8 | #include '../node_modules/@extendscript/aes.patch.json.instantiate/instantiate.js' 9 | #include '../node_modules/@extendscript/aes.patch.json.validate/validate.js' 10 | #include '../node_modules/@extendscript/aes.util.jaw/jaw.js' 11 | #include '../jaxon.js' 12 | #include './jaxonLoader.js' // Conatains test-data 13 | 14 | // Load a fresh instance of Jaxon 15 | var Manager = Jaxon.init(testFileName, Schema, standardPresets); 16 | 17 | $.writeln( JSON.stringify(standardPresets) === JSON.stringify(Manager.Presets.get()) ); 18 | -------------------------------------------------------------------------------- /sui/module/jaxon/test/test-presetRemove.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include '../node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 3 | #include '../node_modules/@extendscript/aes.patch.array.indexof/indexof.js' 4 | #include '../node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 5 | #include '../node_modules/@extendscript/aes.patch.object.keys/keys.js' 6 | #include '../node_modules/@extendscript/aes.patch.json/json.js' 7 | #include '../node_modules/@extendscript/aes.patch.json.clone/clone.js' 8 | #include '../node_modules/@extendscript/aes.patch.json.instantiate/instantiate.js' 9 | #include '../node_modules/@extendscript/aes.patch.json.validate/validate.js' 10 | #include '../node_modules/@extendscript/aes.util.jaw/jaw.js' 11 | #include '../jaxon.js' 12 | #include './jaxonLoader.js' // Conatains test-data 13 | 14 | // Load fresh instance of Jaxon 15 | var Manager = Jaxon.init(testFileName, Schema, standardPresets); 16 | 17 | Manager.Presets.remove(0); // "Test 01" 18 | 19 | $.writeln( Manager.Presets.getByIndex(0).name == "Test 02" ); 20 | -------------------------------------------------------------------------------- /sui/module/jaxon/test/test-presetRemoveWhere.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include '../node_modules/@extendscript/aes.patch.array.foreach/foreach.js' 3 | #include '../node_modules/@extendscript/aes.patch.array.indexof/indexof.js' 4 | #include '../node_modules/@extendscript/aes.patch.array.isarray/isarray.js' 5 | #include '../node_modules/@extendscript/aes.patch.object.keys/keys.js' 6 | #include '../node_modules/@extendscript/aes.patch.json/json.js' 7 | #include '../node_modules/@extendscript/aes.patch.json.clone/clone.js' 8 | #include '../node_modules/@extendscript/aes.patch.json.instantiate/instantiate.js' 9 | #include '../node_modules/@extendscript/aes.patch.json.validate/validate.js' 10 | #include '../node_modules/@extendscript/aes.util.jaw/jaw.js' 11 | #include '../jaxon.js' 12 | #include './jaxonLoader.js' // Conatains test-data 13 | 14 | // Load fresh instance of Jaxon 15 | var Manager = Jaxon.init(testFileName, Schema, standardPresets); 16 | 17 | Manager.Presets.removeWhere('bool', false); 18 | 19 | $.writeln( Manager.Presets.get().length == 2 ); 20 | -------------------------------------------------------------------------------- /sui/module/jaxon/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | tapes.reportScriptName(true); 5 | 6 | tapes.add('jaxon', d+'/test*.jsx', targets, true); 7 | tapes.run(d+'/results.md'); 8 | -------------------------------------------------------------------------------- /sui/util/README.md: -------------------------------------------------------------------------------- 1 | # SUI.UTIL scope 2 | 3 | This is a collection of utilities for working with the ScriptUI module from ExtendScript. 4 | 5 | - [ ] [util.groupList](groupList) 6 | 7 | ## More info 8 | 9 | Read [the docs](../../docs/README.md) 10 | -------------------------------------------------------------------------------- /sui/util/groupList/.npmignore: -------------------------------------------------------------------------------- 1 | .venv 2 | test/results.md 3 | -------------------------------------------------------------------------------- /sui/util/groupList/test/results_log.md: -------------------------------------------------------------------------------- 1 | # Results Log 2 | 3 | As tests may be run by different people on different platforms the results are logged here. If you don't see your software version listed here, please run the test in your enviroment and add the result below. Thanks! 4 | 5 | ## groupList.js 6 | 7 | > Version 0 8 | -------------------------------------------------------------------------------- /sui/util/groupList/test/test-warn.jsx: -------------------------------------------------------------------------------- 1 | #include "../node_modules/@extendscript/modules.init/init.js" 2 | #include "../groupList.js" 3 | 4 | $.writeln( undefined === true); 5 | -------------------------------------------------------------------------------- /sui/util/groupList/test/test.js: -------------------------------------------------------------------------------- 1 | var argv = require('minimist')(process.argv.slice(2)); // Remove nodePath, scriptpath 2 | var tapes = require("@extendscript/tap-es"), targets = argv._, d = require('path').resolve(__dirname); 3 | tapes.reportDuration(false); 4 | 5 | tapes.add('groupList', d+'/test*.jsx', targets, true); 6 | tapes.run(d+'/results.md'); 7 | --------------------------------------------------------------------------------