sqnc
v3.0.8
Published
Numeric and symbolic sequence generator, with iterators and utf16 support
Downloads
13
Maintainers
Readme
sqnc |
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
Or just load from CDN
<script src="//cdn.jsdelivr.net/npm/[email protected]/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