Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

p-props

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-props - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

20

index.js
'use strict';
const map = input => new Promise((resolve, reject) => {
Promise.all(input.values()).then(values => {
const map = input => {
return Promise.all(input.values()).then(values => {
const ret = new Map();

@@ -13,11 +13,11 @@

resolve(ret);
}).catch(reject);
});
return ret;
});
};
const obj = input => new Promise((resolve, reject) => {
const obj = input => {
// TODO: use `Object.entries()` when targeting Node.js 6
const keys = Object.keys(input);
Promise.all(keys.map(key => input[key])).then(values => {
return Promise.all(keys.map(key => input[key])).then(values => {
const ret = {};

@@ -36,6 +36,6 @@

resolve(ret);
}).catch(reject);
});
return ret;
});
};
module.exports = input => input instanceof Map ? map(input) : obj(input);
{
"name": "p-props",
"version": "1.0.0",
"version": "1.1.0",
"description": "Like `Promise.all()` but for `Map` and `Object`",

@@ -29,3 +29,2 @@ "license": "MIT",

"properties",
"props",
"entries",

@@ -42,8 +41,5 @@ "async",

"ava": "*",
"delay": "^1.3.1",
"delay": "^2.0.0",
"xo": "*"
},
"xo": {
"esnext": true
}
}

@@ -11,3 +11,3 @@ # p-props [![Build Status](https://travis-ci.org/sindresorhus/p-props.svg?branch=master)](https://travis-ci.org/sindresorhus/p-props)

```
$ npm install --save p-props
$ npm install p-props
```

@@ -14,0 +14,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc