Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sqnc

forceuser27MIT3.0.8TypeScript support: included

Numeric and symbolic sequence generator, with iterators and utf16 support

sequence, generator, range, step

readme

sqnc | Build Status Coverage Status npm repository

Utility for numeric or symbolic seqence generation. Specify range of values, step or custom function to create array with seqence

Installation

Install as npm package

npm i sqnc --save

Or simply download *.js file

sqnc.js@3.0.8

Or just load from CDN

<script src="//cdn.jsdelivr.net/npm/sqnc@3.0.8/dist/sqnc.js" integrity="sha512-3tikuegV0rx0lArqTp53bFeEFfgc9E9HuBpFkX2TqxP7PkIJ2Pdn/iMmUfna5VsUdEjN1fX6j1u2sgSbe0eGgQ==" crossorigin="anonymous">
</script>

And then use sqnc as global variable

<script>
    console.log(sqnc("👶", "👰"));
</script>

Documentation

Example

Run example with runkit

const sqnc = require("sqnc");

console.log(sqnc("A", "Z").toArray()); // Alphabet
console.log(sqnc("👶", "👰").toArray()); // Some emojis
console.log(sqnc(25, 0, 5).toArray()); // From 25 to 0 with step 5
console.log(sqnc("☠").toArray(5)); // Make Array(5) of Skull and bones symbol