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.46.0 to 0.47.0

docs/objects/invert.md

20

dist/absurdum.esm.js

@@ -1182,2 +1182,21 @@ /**

/**
* Create a new object with key-value pairs inverted, in the case of duplicate values the latter value
* will overwrite the previous value.
*
* @param {object} object input string
* @returns {object} returns an object with key-value pairs inverted
*
* @example
* const result = Objects.invert({ a: 1, b: 2, c: 1 });
* console.log(result);
* > { '1': 'c', '2': 'b' }
*/
function invert (object) {
return Object.entries(object).reduce((acc, curr) => {
acc[curr[1]] = curr[0];
return acc;
}, {});
}
/**
* Keys is an alias for Object.keys returns an array of all keys in an object

@@ -1203,2 +1222,3 @@ *

include: include,
invert: invert,
keys: keys

@@ -1205,0 +1225,0 @@ });

2

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

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

[![GitHub Releases](https://img.shields.io/github/release/vanillaes/absurdum.svg)](https://github.com/vanillaes/absurdum/releases)
[![NPM Releases](https://img.shields.io/npm/v/absurdum.svg)](https://www.npmjs.com/package/absurdum)
[![MIT Licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/vanillaes/absurdum/master/LICENSE)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/vanillaes/absurdum/master/LICENSE)
[![Latest Status](https://github.com/vanillaes/absurdum/workflows/Latest/badge.svg)](https://github.com/vanillaes/absurdum/actions)

@@ -117,2 +117,3 @@ [![Release Status](https://github.com/vanillaes/absurdum/workflows/Release/badge.svg)](https://github.com/vanillaes/absurdum/actions)

- [include][objects.include]
- [invert][objects.invert]
- [keys][objects.keys]

@@ -122,2 +123,3 @@

[objects.include]: ./docs/objects/include.md
[objects.invert]: ./docs/objects/invert.md
[objects.keys]: ./docs/objects/keys.md

@@ -124,0 +126,0 @@

export { exclude } from "./exclude.js";
export { include } from "./include.js";
export { invert } from "./invert.js";
export { keys } from "./keys.js";
export { exclude } from './exclude.js';
export { include } from './include.js';
export { invert } from './invert.js';
export { keys } from './keys.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