1.0.2 • Published 2 years ago

pyzip v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

pyzip

Codecov Version - npm License - npm semantic-release Greenkeeper badge

Fast and safe Python zip with no dependencies

Installation

// npm
npm install pyzip
const pyzip = require('pyzip')

Example usage

// normal
pyzip(['a', 'b', 'c', 'd'], [1, 2, 3, 4]) // [['a', 1], ['b', 2], ['c', 3], ['d', 4]]

// not the same length, return less'
pyzip(['a', 'b', 'c', 'd'], [1, 2, 3, 4]) // [['a', 1], ['b', 2], ['c', 3], ['d', 4]]
pyzip(['a', 'b'], [1, 2, 3]) // [['a', 1], ['b', 2]]

// more than 2 args
pyzip(['a', 'b', 'c'], [1, 2, 3, 4], ['A', 'B']) // [['a', 1, 'A'], ['b', 2, 'B']]

// empty array
pyzip([], []) // []

// all invalid will returns empty array ([])
pyzip([1, 2, 3])
pyzip('', '')
pyzip(1, 2)
pyzip(undefined, undefined)
pyzip(1, '2')

Reference