Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ES7 Proposal: Map#toJSON https://github.com/DavidBruant/Map-Set.prototype.toJSON
Rejected ESNext Proposal: Map#toJSON https://github.com/DavidBruant/Map-Set.prototype.toJSON
This polyfill is spec-compliant (based on the spec so far). It will work in every engine in which Map exists natively, or where it is polyfilled with the (es6-shim)es6-shim-url
var mapToJSON = require('map-tojson');
var assert = require('assert');
var items = ['a', 'b', 'c'];
var entries = [[1, 2], [3, 4]];
assert.deepEqual(mapToJSON(new Set()), []);
assert.deepEqual(mapToJSON(new Set(items)), items);
assert.deepEqual(mapToJSON(new Map()), []);
assert.deepEqual(mapToJSON(new Map(entries)), entries);
assert.deepEqual(mapToJSON(''), []);
assert.deepEqual(mapToJSON('abc'), ['a', 'b', 'c']);
assert.deepEqual(mapToJSON([]), []);
assert.deepEqual(mapToJSON(items), items);
assert.deepEqual(mapToJSON(entries), entries);
mapToJSON.shim();
assert.deepEqual(new Map(entries).toJSON(), entries);
assert.deepEqual(new Map().toJSON(), []);
Simply clone the repo, npm install
, and run npm test
v2.1.0 - 2020-01-13
define-properties
, tape
, eslint
, semver
; use my personal shared eslint
config. 076e08c
jscs
2ecb006
@es-shims/api
structure d30c7f8
auto-changelog
93b6859
a35ff1e
bd0ac95
es-abstract
6a0bbfa
nsp
, eslint
, es6-shim
04222df
eslint
, @ljharb/eslint-config
, tape
, covert
, es6-shim
, function-bind
; add safe-publish-latest
38683f1
iterate-value
to iterate the Map 3e97fb9
tape
, es6-shim
, jscs
, eslint
, @ljharb/eslint-config
c746483
29edc04
tape
, es6-shim
, jscs
, nsp
, eslint
, @ljharb/eslint-config
, semver
6b796aa
7a17385
define-properties
, es6-shim
, eslint
, semver
5c8eddd
functions-have-names
, has-strict-mode
610bbfd
eclint
instead of editorconfig-tools
98c0e47
io.js
v3.3
, node
v4.1
dd3cbde
jscs
97cc07a
io.js
v2.2
238c168
7ea2fed
npx aud
instead of nsp
or npm audit
with hoops 0292190
funding
field cc19e3c
tape
, eslint
b969c38
io.js
v3.0
871681d
es-abstract
3e90758
tape
a1c095f
62eecc2
es-abstract
09e3916
io.js
v2.4
4431d26
io.js
v2.3
266f6ad
define-properties
721c794
FAQs
ES7 Proposal: Map#toJSON https://github.com/DavidBruant/Map-Set.prototype.toJSON
The npm package map-tojson receives a total of 30 weekly downloads. As such, map-tojson popularity was classified as not popular.
We found that map-tojson demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.