many-keys-map
Advanced tools
Comparing version 1.0.3 to 2.0.0
@@ -1,1 +0,1 @@ | ||
export = Map; | ||
export default Map; |
@@ -1,3 +0,1 @@ | ||
'use strict'; | ||
const nullKey = Symbol('null'); // `objectHashes` key for null | ||
@@ -7,3 +5,3 @@ | ||
module.exports = class ManyKeysMap extends Map { | ||
export default class ManyKeysMap extends Map { | ||
constructor() { | ||
@@ -16,3 +14,2 @@ super(); | ||
// eslint-disable-next-line prefer-rest-params | ||
const [pairs] = arguments; // Map compat | ||
@@ -57,3 +54,3 @@ if (pairs === null || pairs === undefined) { | ||
const hashes = typeof key === 'object' || typeof key === 'function' ? '_objectHashes' : typeof key === 'symbol' ? '_symbolHashes' : false; | ||
const hashes = typeof key === 'object' || typeof key === 'function' ? '_objectHashes' : (typeof key === 'symbol' ? '_symbolHashes' : false); | ||
@@ -109,2 +106,2 @@ if (!hashes) { | ||
} | ||
}; | ||
} |
{ | ||
"name": "many-keys-map", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "A `Map` subclass with support for multiple keys for one entry.", | ||
@@ -16,4 +16,6 @@ "keywords": [ | ||
"repository": "fregante/many-keys-map", | ||
"funding": "https://github.com/sponsors/fregante", | ||
"license": "MIT", | ||
"author": "Federico Brigante <opensource@bfred.it> (bfred.it)", | ||
"author": "Federico Brigante <me@fregante.com> (https://fregante.com)", | ||
"type": "module", | ||
"files": [ | ||
@@ -32,5 +34,5 @@ "index.d.ts", | ||
"devDependencies": { | ||
"ava": "^2", | ||
"xo": "^0.20" | ||
"ava": "^4", | ||
"xo": "^0.52" | ||
} | ||
} |
@@ -1,6 +0,4 @@ | ||
# many-keys-map [![(size)][badge-gzip]](#no-link) [![(status)][badge-travis]][link-travis] | ||
# many-keys-map [![(size)][badge-gzip]](#no-link) | ||
[badge-gzip]: https://img.shields.io/bundlephobia/minzip/many-keys-map.svg?label=gzipped | ||
[badge-travis]: https://api.travis-ci.com/fregante/many-keys-map.svg?branch=master | ||
[link-travis]: https://travis-ci.org/fregante/many-keys-map | ||
[link-npm]: https://www.npmjs.com/package/many-keys-map | ||
@@ -44,3 +42,3 @@ | ||
```js | ||
const ManyKeysMap = require('many-keys-map'); | ||
import ManyKeysMap from 'many-keys-map'; | ||
@@ -47,0 +45,0 @@ const groups = new ManyKeysMap(); |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
Yes
6752
83
87