-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require Node.js 8, add TypeScript definition, refactor to async-await #9
Require Node.js 8, add TypeScript definition, refactor to async-await #9
Conversation
index.d.ts
Outdated
|
||
export type Mapper<ValueType, KeyType, MappedValueType> = ( | ||
element: ValueType, | ||
index: KeyType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The index
is always number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry? It definitely is the key
from the hashmap/Map passed to p-props:
await pMap(Object.entries(input), ([key, value]) => mapper(value, key), options);
See the destructuring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I was just confused about the naming.
## The dependency [p-props](https://github.com/sindresorhus/p-props) was updated from `1.2.0` to `2.0.0`. This version is **not covered** by your **current version range**. If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update. --- <details> <summary>Release Notes for v2.0.0</summary> <p>Breaking:</p> <ul> <li>Require Node.js 8</li> </ul> <p>Enhancements:</p> <ul> <li>Add TypeScript definition (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="419249247" data-permission-text="Issue title is private" data-url="sindresorhus/p-props#9" data-hovercard-type="pull_request" data-hovercard-url="/sindresorhus/p-props/pull/9/hovercard" href="https://urls.greenkeeper.io/sindresorhus/p-props/pull/9">#9</a>) <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/sindresorhus/p-props/commit/f6071ee74e3d2b5a254a816e86ab59e0aba3af2f/hovercard" href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/f6071ee74e3d2b5a254a816e86ab59e0aba3af2f"><tt>f6071ee</tt></a></li> </ul> <p><a class="commit-link" href="https://urls.greenkeeper.io/sindresorhus/p-props/compare/v1.2.0...v2.0.0"><tt>v1.2.0...v2.0.0</tt></a></p> </details> <details> <summary>Commits</summary> <p>The new version differs by 4 commits.</p> <ul> <li><a href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/2cd268b5214c51d1f567abc17cce64e535872280"><code>2cd268b</code></a> <code>2.0.0</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/eb0cee183c733cd00ab5f7aec68e400ca166708c"><code>eb0cee1</code></a> <code>Meta tweaks</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/f6071ee74e3d2b5a254a816e86ab59e0aba3af2f"><code>f6071ee</code></a> <code>Require Node.js 8, add TypeScript definition, refactor to async-await (#9)</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/00ba4d392947decfe9060b6978a7564fc577eb3f"><code>00ba4d3</code></a> <code>Drop support for Node.js 4 - fixes #1 (#7)</code></li> </ul> <p>See the <a href="https://urls.greenkeeper.io/sindresorhus/p-props/compare/15370888fbc458b904be3204e8eaac02d8adcc10...2cd268b5214c51d1f567abc17cce64e535872280">full diff</a></p> </details> <details> <summary>FAQ and help</summary> There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new). </details> --- Your [Greenkeeper](https://greenkeeper.io) bot 🌴
## The dependency [p-props](https://github.com/sindresorhus/p-props) was updated from `1.2.0` to `2.0.0`. This version is **not covered** by your **current version range**. If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update. --- <details> <summary>Release Notes for v2.0.0</summary> <p>Breaking:</p> <ul> <li>Require Node.js 8</li> </ul> <p>Enhancements:</p> <ul> <li>Add TypeScript definition (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="419249247" data-permission-text="Issue title is private" data-url="sindresorhus/p-props#9" data-hovercard-type="pull_request" data-hovercard-url="/sindresorhus/p-props/pull/9/hovercard" href="https://urls.greenkeeper.io/sindresorhus/p-props/pull/9">#9</a>) <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/sindresorhus/p-props/commit/f6071ee74e3d2b5a254a816e86ab59e0aba3af2f/hovercard" href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/f6071ee74e3d2b5a254a816e86ab59e0aba3af2f"><tt>f6071ee</tt></a></li> </ul> <p><a class="commit-link" href="https://urls.greenkeeper.io/sindresorhus/p-props/compare/v1.2.0...v2.0.0"><tt>v1.2.0...v2.0.0</tt></a></p> </details> <details> <summary>Commits</summary> <p>The new version differs by 4 commits.</p> <ul> <li><a href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/2cd268b5214c51d1f567abc17cce64e535872280"><code>2cd268b</code></a> <code>2.0.0</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/eb0cee183c733cd00ab5f7aec68e400ca166708c"><code>eb0cee1</code></a> <code>Meta tweaks</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/f6071ee74e3d2b5a254a816e86ab59e0aba3af2f"><code>f6071ee</code></a> <code>Require Node.js 8, add TypeScript definition, refactor to async-await (#9)</code></li> <li><a href="https://urls.greenkeeper.io/sindresorhus/p-props/commit/00ba4d392947decfe9060b6978a7564fc577eb3f"><code>00ba4d3</code></a> <code>Drop support for Node.js 4 - fixes #1 (#7)</code></li> </ul> <p>See the <a href="https://urls.greenkeeper.io/sindresorhus/p-props/compare/15370888fbc458b904be3204e8eaac02d8adcc10...2cd268b5214c51d1f567abc17cce64e535872280">full diff</a></p> </details> <details> <summary>FAQ and help</summary> There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new). </details> --- Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Fixes #6.