
Research
5 Malicious Chrome Extensions Enable Session Hijacking in Enterprise HR and ERP Systems
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.
map.prototype.getorinsertcomputed
Advanced tools
ES Proposal spec-compliant shim for Map.prototype.getOrInsertComputed
An ESnext spec-compliant Map.prototype.getOrInsertComputed shim/polyfill/replacement that works as far down as ES3.
This package implements the es-shim API v3 interface. It works in an ES3-supported environment and complies with the proposed spec.
npm install --save map.prototype.getorinsertcomputed
var getOrInsertComputed = require('map.prototype.getorinsertcomputed');
var assert = require('assert');
var map = new Map();
var key = {};
var value = {};
assert.equal(map.has(key), false);
assert.equal(getOrInsertComputed(map, key, () => value), value);
assert.equal(map.has(key), true);
var getPolyfill = require('map.prototype.getorinsertcomputed/polyfill');
var shim = require('map.prototype.getorinsertcomputed/shim');
var assert = require('assert');
/* when Map.prototype.getOrInsertComputed is not present */
delete Map.prototype.getOrInsertComputed;
var shimmed = shim();
assert.equal(shimmed, getPolyfill());
var map = new Map();
var key = {};
var value = {};
assert.equal(map.has(key), false);
assert.equal(map.getOrInsertComputed(key, () => value), value);
assert.equal(map.has(key), true);
var shim = require('map.prototype.getorinsertcomputed/shim');
var assert = require('assert');
/* when Map.prototype.getOrInsertComputed is present */
var shimmed = shim();
assert.equal(shimmed, Map.prototype.getOrInsertComputed);
var map = new Map();
var key = {};
var value = {};
assert.equal(map.has(key), false);
assert.equal(map.getOrInsertComputed(key, () => value), value);
assert.equal(map.has(key), true);
Simply clone the repo, npm install, and run npm test
FAQs
ES Proposal spec-compliant shim for Map.prototype.getOrInsertComputed
We found that map.prototype.getorinsertcomputed demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.