8000 GitHub - fregante/flat-zip: Merges arrays like a zipper. Like `lodash.zip().flat().take(limit)` but a tenth of the size!
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Merges arrays like a zipper. Like `lodash.zip().flat().take(limit)` but a tenth of the size!

License

Notifications You must be signed in to change notification settings

fregante/flat-zip

Repository files navigation

flat-zip

Merges arrays like a zipper. Like lodash.zip().flat().take(limit) but a tenth of the size!

Install

npm install flat-zip
import {flatZip} from 'flat-zip';
const {flatZip} = require('flat-zip');

Usage

flatZip([
	['a', 'b', 'c'],
	['€', '฿'],
	[100, 200, 300, 400, 500],
]);
// -> ['a', '€', 100, 'b', '฿', 200, 'c', 300, 400, 500]

With a length limit:

flatZip([
	['a', 'b', 'c'],
	['€', '฿'],
	[100, 200, 300, 400, 500],
], 4);
// -> ['a', '€', 100, 'b']

License

MIT © Federico Brigante

About

Merges arrays like a zipper. Like `lodash.zip().flat().take(limit)` but a tenth of the size!

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0