Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "filter-map", | ||
"version": "1.0.0", | ||
"description": "A filter function for Maps.", | ||
"version": "2.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "node test" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/matthewlucock/filter-map.git" | ||
"url": "git+https://github.com/npm/deprecate-holder.git" | ||
}, | ||
"author": { | ||
"name": "Matt Lucock", | ||
"email": "matthewlucock@icloud.com", | ||
"url": "https://github.com/matthewlucock" | ||
}, | ||
"license": "MIT", | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/matthewlucock/filter-map/issues" | ||
"url": "https://github.com/npm/deprecate-holder/issues" | ||
}, | ||
"homepage": "https://github.com/matthewlucock/filter-map", | ||
"keywords": [ | ||
"map", | ||
"maps", | ||
"filter", | ||
"filtering", | ||
"keys", | ||
"values", | ||
"collection", | ||
"es6" | ||
], | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"eslint": "^3.14.0", | ||
"mocha": "^3.2.0" | ||
} | ||
"homepage": "https://github.com/npm/deprecate-holder#readme" | ||
} |
@@ -1,28 +0,5 @@ | ||
# filter-map | ||
# Deprecated Package | ||
[![npm](https://img.shields.io/npm/v/filter-map.svg)](https://www.npmjs.com/package/filter-map) [![npm](https://img.shields.io/npm/l/filter-map.svg)](https://opensource.org/licenses/MIT) [![Build Status](https://travis-ci.org/matthewlucock/filter-map.svg?branch=master)](https://travis-ci.org/matthewlucock/filter-map) | ||
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name. | ||
A filter function for JavaScript [Maps](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map). Constructs a new Map with every key-value pair from the given map that satisfies a given function. | ||
You can get it with `npm i filter-map`. | ||
```javascript | ||
const filterMap = require("filter-map"); | ||
const exampleMap = new Map([ | ||
["a", 1], | ||
["b", 2], | ||
["c", 3], | ||
["d", 4] | ||
]); | ||
// Filter even-numbered values out of the Map. | ||
const filteredMap = filterMap(exampleMap, (key, value) => value % 2); | ||
filteredMap.has("a"); // true | ||
filteredMap.has("b"); // false | ||
filteredMap.has("c"); // true | ||
filteredMap.has("d"); // false | ||
``` | ||
`filterMap` takes a Map and a filtering function, and returns the newly constructed Map. The filtering function takes a key and a value, and can return any value, which is then casted to a Boolean to determine whether to filter the key-value pair. | ||
Please contact support@npmjs.com if you have questions about this package. |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
672
2
0
6
3