pyzip

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i pyzip

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

7.91 kB

Total Files

8

Last publish

Collaborators

  • jojoee