
Security News
pnpm 12’s Rust Rewrite Cuts Install Times by Up to 90%
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.
Utility functions for JavaScript Map — mapValues, filterEntries, merge, invert, and groupBy
Utility functions for JavaScript Map — mapValues, filterEntries, merge, invert, and groupBy
npm install map-extras
import {mapValues, filterEntries, mergeMap, invertMap, groupBy} from 'map-extras';
const prices = new Map([['apple', 1], ['banana', 2], ['cherry', 3]]);
mapValues(prices, value => value * 2);
//=> Map { 'apple' => 2, 'banana' => 4, 'cherry' => 6 }
filterEntries(prices, value => value > 1);
//=> Map { 'banana' => 2, 'cherry' => 3 }
mergeMap(prices, new Map([['date', 4]]));
//=> Map { 'apple' => 1, 'banana' => 2, 'cherry' => 3, 'date' => 4 }
invertMap(prices);
//=> Map { 1 => 'apple', 2 => 'banana', 3 => 'cherry' }
groupBy([1, 2, 3, 4], x => x % 2 === 0 ? 'even' : 'odd');
//=> Map { 'odd' => [1, 3], 'even' => [2, 4] }
Returns a new Map with values transformed by function_(value, key).
Returns a new Map with entries where function_(value, key) is truthy.
Returns a new Map merging all maps. Later maps override earlier ones.
Returns a new Map with keys and values swapped.
Returns a Map where keys are function_(item) results and values are arrays of items.
MIT
FAQs
Utility functions for JavaScript Map — mapValues, filterEntries, merge, invert, and groupBy
We found that map-extras 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.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.

Research
/Security News
Thirteen malicious Packagist themes expose visitors on unpatched iPhones to a WebKit-to-kernel exploit chain that steals device data and wallet seeds.