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.62.1 to 0.63.0

docs/objects/forIn.md

36

dist/absurdum.esm.js

@@ -1360,2 +1360,37 @@ /**

/**
* forIn Iterates over own and inherited enumerable string keyed properties of an object and invokes
* iteratee for each property. The iteratee is invoked with three arguments: (value, key, object)
*
* @param {Object} object input object
* @param {Function} func function invoked per iteration
* @returns {Object} original object
*
* @example
* const Obj_A = function () {
* this.a = 5;
* this.b = 10;
* }
* Obj_A.prototype.c = 15;
* const result = objects.forIn(new Obj_A, (v, k, o) => console.log(v));
* console.log(result);
* // 5
* // 10
* // 15
* > { a: 5, b: 10 }
*/
function forIn (object, func) {
const local = Object.entries(object);
const objProto = Object.getPrototypeOf(object);
const proto = objProto ? Object.entries(objProto) : [];
const entries = new Set([...local, ...proto]);
[...entries].reduce((_, [key, value]) => {
func(value, key, object);
return null;
}, null);
return object;
}
/**
* Has, creates an array of values corresponding to paths of the object

@@ -1648,2 +1683,3 @@ *

findKey: findKey,
forIn: forIn,
has: has,

@@ -1650,0 +1686,0 @@ get: get,

2

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

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

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

- [findKey][objects.findKey]
- [forIn][objects.forIn]
- [has][objects.has]

@@ -154,2 +155,3 @@ - [get][objects.get]

[objects.findKey]: ./docs/objects/findKey.md
[objects.forIn]: ./docs/objects/forIn.md
[objects.has]: ./docs/objects/has.md

@@ -156,0 +158,0 @@ [objects.get]: ./docs/objects/get.md

@@ -5,2 +5,3 @@ export { at } from "./at.js";

export { findKey } from "./findKey.js";
export { forIn } from "./forIn.js";
export { has } from "./has.js";

@@ -7,0 +8,0 @@ export { get } from "./get.js";

@@ -5,2 +5,3 @@ export { at } from './at.js';

export { findKey } from './findKey.js';
export { forIn } from './forIn.js';
export { has } from './has.js';

@@ -7,0 +8,0 @@ export { get } from './get.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