https://github.com/jojoee/pyzip
:tada: Fast and safe Python `zip` with no dependencies
https://github.com/jojoee/pyzip
combine fast merge python zip
Last synced: about 1 year ago
JSON representation
:tada: Fast and safe Python `zip` with no dependencies
- Host: GitHub
- URL: https://github.com/jojoee/pyzip
- Owner: jojoee
- License: mit
- Created: 2018-08-27T10:41:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-26T01:26:01.000Z (almost 4 years ago)
- Last Synced: 2024-05-01T14:24:32.801Z (about 2 years ago)
- Topics: combine, fast, merge, python, zip
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyzip


[](https://codecov.io/github/jojoee/pyzip)
[](https://www.npmjs.com/package/pyzip)
[](http://opensource.org/licenses/MIT)
[](https://github.com/semantic-release/semantic-release) [](https://greenkeeper.io/)
Fast and safe Python `zip` with no dependencies
## Installation
```
// npm
npm install pyzip
const pyzip = require('pyzip')
```
## Example usage
```javascript
// 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
- [2. Built-in Functions - zip](https://docs.python.org/3/library/functions.html#zip)