Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

absurdum

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

absurdum - npm Package Compare versions

Comparing version 0.61.0 to 0.62.0

docs/objects/mapValues.md

21

dist/absurdum.esm.js

@@ -1513,2 +1513,22 @@ /**

/**
* MapKeys iterates over an object and applies a function to each value
*
* @param {Object} object input object
* @param {Function} func map function
* @returns {Object} object with mutated values
*
* @example
* const result = objects.mapValues({ a: 1, b: 2, c: 3 }, value => `neat_${value}`);
* console.log(result);
* > { a: neat_1, b: neat_2, c: neat_3 }
*/
function mapValues (object, func) {
if (typeof func !== 'function') { return object; }
return Object.entries(object).reduce((acc, [key, value]) => ({
...acc,
[key]: func(value, key, object)
}), {});
}
/**
* Merge recursively merges object properties from all supplied objects with object values

@@ -1633,2 +1653,3 @@ * being merged recursively and other value types overridden when applied from left to right.

mapKeys: mapKeys,
mapValues: mapValues,
merge: merge,

@@ -1635,0 +1656,0 @@ pick: pick,

2

package.json
{
"name": "absurdum",
"version": "0.61.0",
"version": "0.62.0",
"description": "Reductio Ad Absurdum - The Ridiculous Application of Reduce",

@@ -5,0 +5,0 @@ "keywords": [

@@ -144,2 +144,3 @@ [![GitHub Releases](https://img.shields.io/github/release/vanillaes/absurdum.svg)](https://github.com/vanillaes/absurdum/releases)

- [mapKeys][objects.mapKeys]
- [mapValues][objects.mapValues]
- [merge][objects.merge]

@@ -159,2 +160,3 @@ - [pick][objects.pick]

[objects.mapKeys]: ./docs/objects/mapKeys.md
[objects.mapValues]: ./docs/objects/mapValues.md
[objects.merge]: ./docs/objects/merge.md

@@ -161,0 +163,0 @@ [objects.pick]: ./docs/objects/pick.md

@@ -11,4 +11,5 @@ export { at } from "./at.js";

export { mapKeys } from "./mapKeys.js";
export { mapValues } from "./mapValues.js";
export { merge } from "./merge.js";
export { pick } from "./pick.js";
export { values } from "./values.js";

@@ -11,4 +11,5 @@ export { at } from './at.js';

export { mapKeys } from './mapKeys.js';
export { mapValues } from './mapValues.js';
export { merge } from './merge.js';
export { pick } from './pick.js';
export { values } from './values.js';

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc