The Array tools library for orxapi.
If you haven't used NodeJs before, be sure to have install the LTS version on your desktop ! Check your version with this command:
node -v
v8.0.0
npm install orxapi.tools.toscroll --save-dev
This library is written in TypeScript, but you can use JavaScript.
TypeScript code
import { makeArray, range } from "orxapi.tools.array";
// Create array calendar with 42 days (7 days x 6 weeks)
const days = makeArray(42);
// Create option list with range
const optionList = seq("2..8").map((value: number) => ({ code: `${value}`, val: `${value}` }));
-
makeArray Make a fill array with number
-
rangeDeprecated use seq method
-
seq Make a fill array with number between min and max value
-
pad Format a Number, Exactly Two in Length
-
chuck Split an array on multiple array
See docs for more information
This library was designed to work with ES 5+
- [ ] Add tests
- [ ] Improve the documentation