orxapi.tools.array
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

npm version

orxapi.tools.array

The Array tools library for orxapi.

Getting Started

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

Installation

npm install orxapi.tools.toscroll --save-dev

This library is written in TypeScript, but you can use JavaScript.

Usage

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}` }));

Methods

  • makeArray Make a fill array with number
  • range Deprecated 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+

TODO

  • [ ] Add tests
  • [ ] Improve the documentation

/orxapi.tools.array/

    Package Sidebar

    Install

    npm i orxapi.tools.array

    Weekly Downloads

    44

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    8.5 kB

    Total Files

    9

    Last publish

    Collaborators

    • emmanuel.s