🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

pyzip

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyzip - npm Package Compare versions

Comparing version
0.0.1
to
1.0.0
+10
-9
.travis.yml
sudo: false
language: node_js
node_js:
- 6
- 7
- 8
cache:
directories:
- node_modules
branches:
only:
- master
- ~/.npm
notifications:
email: false
node_js:
- '10'
- '9'
- '8'
- '6'
before_script:

@@ -21,2 +19,5 @@ - npm prune

- npm run coverage.report
- npm run semantic-release
- npm run travis-deploy-once "npm run semantic-release"
branches:
except:
- /^v\d+\.\d+\.\d+$/
{
"name": "pyzip",
"version": "0.0.1",
"version": "1.0.0",
"description": "Fast and safe Python `zip` with no dependencies",

@@ -12,5 +12,6 @@ "main": "index.js",

"coverage.report": "cat ./coverage/lcov.info | codecov",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"semantic-release": "semantic-release",
"standard": "standard",
"validate": "npm run standard && npm run coverage.check"
"validate": "npm run standard && npm run coverage.check",
"travis-deploy-once": "travis-deploy-once"
},

@@ -51,4 +52,5 @@ "config": {

"jest": "^21.0.1",
"semantic-release": "^11.0.2",
"standard": "^10.0.3"
"semantic-release": "^15.9.12",
"standard": "^10.0.3",
"travis-deploy-once": "^5.0.4"
},

@@ -55,0 +57,0 @@ "jest": {

+16
-18
# pyzip
# pyzip
[![Travis](https://img.shields.io/travis/jojoee/pyzip.svg)](https://travis-ci.org/jojoee/pyzip)

@@ -12,5 +10,2 @@ [![Dependency Status](https://david-dm.org/jojoee/pyzip.svg)](https://david-dm.org/jojoee/pyzip)

Python zip, fast and safe
Fast and safe Python `zip` with no dependencies

@@ -29,21 +24,24 @@

```javascript
// intersect() // {}
// intersect({}) // {}
// intersect(null) // {}
// intersect(undefined) // {}
// normal
pyzip(['a', 'b', 'c', 'd'], [1, 2, 3, 4]) // [['a', 1], ['b', 2], ['c', 3], ['d', 4]]
// const obj1 = { a: 'a', b: 'b', c: 'c' }
// const obj2 = { a: 'a', b: 'x', c: 'c' }
// const obj3 = { a: 'a', c: 'c' } // subset of obj
// intersect(obj1, obj2) // { a: 'a', b: 'b', c: 'c' }
// intersect(obj1, obj3, obj2) // { a: 'a', c: 'c' }
```
// 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]]
<!-- ## TODO
[ ] example usage -->
// 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)