Skip to content
/ pyzip Public

🎉 Fast and safe Python `zip` with no dependencies

License

Notifications You must be signed in to change notification settings

jojoee/pyzip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyzip

continuous-integration release 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