Ranger
lightweight library for creating arrays of numbers
Installation:
npm install range-create --save
Use in browser
<script src="https://unpkg.com/range-create@0.0.1/dist/browser/ranger.js" ></script>
Live example on code pen
https://codepen.io/anon/pen/MRPJmO
Methods:
init
create array with simple string
Examples:
const R = defaultinit // without step (default is 1)let arr = console// [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ] // with steparr = console// [ 0, 5, 10, 15, 20 ] // count downarr = console// [ 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36 ] // count down with steparr = console// [ 10, 5, 0, -5, -10 ] // float numbersarr = console// [ 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5 ]
any question ? Ask It :)
made with ❤️ for you