orderAlign
In the order specified the array
Install
npm i order-align
Usage
const orderAlign = ;;
Example
String
const orderList = 'foo' 'bar' 'baz';const dataArr = 'baz' 'foo' 'bar'; const result = ;console;// [ 'foo', 'bar', 'baz' ]
Object
const orderList = 'foo' 'bar' 'baz';const dataArr = name: 'baz' name: 'foo' name: 'bar'; const result = ;console;// [ { name: 'foo' }, { name: 'bar' }, { name: 'baz' } ]