align.js
v0.0.1
Published
Lightweight Alignment Normalise library, the aligns two arrays, to be same number of arrays length with no-dependecies
Downloads
2
Readme
Align.js
Lightweight Alignment Normalise library, the aligns two arrays, to be same number of arrays length with no-dependecies
Installing
$ npm install align.js
# or
$ yarn add align.js
CDN
# jsDelivr
https://cdn.jsdelivr.net/npm/align.js
# unpkg
https://unpkg.com/align.js
# npmcdn
https://npmcdn.com/align.js
Usage
on Node.js
var Align = require('align.js');
var align1 = [1, 2, 3, 4, 5];
var align2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var alignValue = Align(align1, align2);
// { firstAlign: align1-normalised-count, secondAlign: align2, alignedCount: 5 }
on Browser
<script src="https://cdn.jsdelivr.net/npm/align.js"></script>
var align1 = [1, 2, 3, 4, 5];
var align2 = [1, 2, 3, 5, 6, 7, 8, 9, 10, 11];
var alignValue = Align(align1, align2);
// { firstAlign: align1-normalised-count, secondAlign: align2, alignedCount: 5 }