Files
Virtual-Box/.npm/_cacache/content-v2/sha512/2e/3e/b061db8afc81117bd1f8dbab3e8b439e3fb29765f514990c82f688e7cec05d86d4bdaeb06590acfae230cfb64562f2550351dfdf2d6bbc50d6abf11b343c
2025-12-02 16:27:21 +00:00

1 line
7.4 KiB
Plaintext

{"_id":"for-each-property-deep","_rev":"3-eb1ae52a64e4d3fc24f0fb5dad961001","name":"for-each-property-deep","description":"Executes a callback for each property found on a object, recursively on nested properties, with options regarding enumerability (enumerable or non-enumerable) and ownership (inherited or only own properties). It excludes built-in properties from Object an","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.2":{"name":"for-each-property-deep","version":"0.0.2","description":"Executes a callback for each property found on a object, recursively on nested properties, with options regarding enumerability (enumerable or non-enumerable) and ownership (inherited or only own properties). It excludes built-in properties from Object an","main":"lib/for-each-property-deep.js","directories":{"test":"test"},"scripts":{"test":"mocha ./test"},"keywords":["recursive","deep","for","each","prop","property","object","function","enumerable","non-enumerable","nonenumerable","inherited","proto","prototype","prototype-chain","class","static"],"author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"license":"MIT","dependencies":{"for-each-property":"0.0.4","get-prototype-chain":"^1.0.1"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.4.2"},"gitHead":"e2bdbb834decaa5203bc302dcf1d0809387ccce7","_id":"for-each-property-deep@0.0.2","_shasum":"ea49adcf9a3a9e164bdc8d5abec0e042de4dbe74","_from":".","_npmVersion":"4.5.0","_nodeVersion":"6.9.0","_npmUser":{"name":"diegozoracky","email":"diego.zoracky@gmail.com"},"maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"dist":{"shasum":"ea49adcf9a3a9e164bdc8d5abec0e042de4dbe74","tarball":"https://registry.npmjs.org/for-each-property-deep/-/for-each-property-deep-0.0.2.tgz","integrity":"sha512-invPz2q0tUsAwJpnr+EJsjnjtWmhS7eOtljywoQmfoMBowxyov8zkmhQPgrlDaLxrD+r/daEFaDPoG5dWDBU8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPf8RAKvnmB0O7qlqt2b12/VJY+IWi7VY5O102ofxcUAIhAOQlHn2ZJ3nCDdnyCeztkMlvWK0MftCm6Wcfhfd9meNh"}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/for-each-property-deep-0.0.2.tgz_1496012673114_0.7296937315259129"}},"0.0.3":{"name":"for-each-property-deep","version":"0.0.3","description":"Executes a callback for each property found on a object, recursively on nested properties, with options regarding enumerability (enumerable or non-enumerable) and ownership (inherited or only own properties). It excludes built-in properties from Object an","main":"lib/for-each-property-deep.js","directories":{"test":"test"},"scripts":{"test":"mocha ./test"},"keywords":["recursive","deep","for","each","prop","property","object","function","enumerable","non-enumerable","nonenumerable","inherited","proto","prototype","prototype-chain","class","static"],"author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"license":"MIT","dependencies":{"for-each-property":"0.0.4"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.4.2"},"gitHead":"4e99a6ff850527deeb44b9591c2e19139fd5e310","_id":"for-each-property-deep@0.0.3","_shasum":"31309a4afc38a9cca06f1b223f53d64a6d083fad","_from":".","_npmVersion":"4.5.0","_nodeVersion":"6.9.0","_npmUser":{"name":"diegozoracky","email":"diego.zoracky@gmail.com"},"maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"dist":{"shasum":"31309a4afc38a9cca06f1b223f53d64a6d083fad","tarball":"https://registry.npmjs.org/for-each-property-deep/-/for-each-property-deep-0.0.3.tgz","integrity":"sha512-qzP8QkODWVVRPpWiBZacSbBl67cTTWoBfxMG0wE46AsS1yl7qv05sGN+dHvD4s4tnvl/goe6Sp4qBI+rlVBgNg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHuti4+1OUVPHHR/FJcTw4AyRbhFQZBCR4PhHvUEpKerAiB52YBj4nNaKzsCfmQ0cptl395bBhfbtFRruf0Y88Vz6g=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/for-each-property-deep-0.0.3.tgz_1496012895630_0.725745256524533"}}},"readme":"# for-each-property-deep\n\n[![Build Status](https://api.travis-ci.org/DiegoZoracKy/for-each-property-deep.svg)](https://travis-ci.org/DiegoZoracKy/for-each-property-deep)\n\nExecutes a callback for each property found on a object, recursively on nested properties, with options regarding **enumerability** (enumerable or non-enumerable) and **ownership** (inherited or only own properties). It excludes built-in properties from Object and Function prototypes by default, and this behaviour can also be configured via options.\n\n## Goal\n\nThe goal is to provide a way to iterate through object's properties with a clean interface regarding **enumerability** and **ownership**, e.g. `{ enumerability: 'enumerable', inherited: true }`. Also, discarding (or not, is an option) the built-in properties that may be found when looking up on the prototype-chain.\n\nThis module is the recursive version, which will traverse object's nested properties, of [for-each-property](https://github.com/DiegoZoracKy/for-each-property).\n\n## Usage\n\n```javascript\n\nconst forEachPropertyDeep = require('for-each-property-deep');\n\nconst object = { a: { b: { c: 'cValue'} } };\nconst callback = (value, key, path, parent, state) => console.log(key, path);\nconst options = {enumerability: 'enumerable', inherited: false};\n\nconst resultState = forEachPropertyDeep(object, callback, options);\n\n// All outputs (console.log) from callback will be:\n// a [ 'a' ]\n// b [ 'a', 'b' ]\n// c [ 'a', 'b', 'c' ]\n```\n **object**:\n Literal object, Object Instance, Class Reference... Any object whose properties can be iterated on.\n\n **callback**:\n Function that will receive `(value, key, path, parent, state)`.\n\n * **value**\n Current property value\n\n * **key**\n Current property name\n\n * **path**\n An array representing the current property path. e.g. from the above example it will be `[ 'a', 'b', 'c' ]` for the `'c'` property\n\n * **parent**\n The parent object of the current property. e.g. from the above example it will be the object `{ c: 'cValue' }` for the `'c'` property\n\n * **state**\n Is an object that will be stateful throughall iterations, and it will be the value returned by calling `forEachPropertyDeep`. It can be useful to handle any data from within the callback function, instead of relying on external variables. e.g., to store and get all the *paths* found.\n\n **options**:\n * **enumerability**:\n The options are: `'enumerable'` *(default)*, `'nonenumerable'` or `'all'`\n\n * **inherited**:\n The options are: `true` *(default)* or `false`\n\n * **excludeBuiltInPropsOf**:\n An array of objects whose prototype properties must be excluded. It defaults to `[Function, Object]`\n\n * **excludeProps**:\n An array properties that must be excluded. The default is `['prototype']`\n\n## Example\n\nTo check an extended example on use cases regarding **enumerability** and **ownership** check [for-each-property#example](https://github.com/DiegoZoracKy/for-each-property#example).","maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"time":{"modified":"2022-06-18T02:54:04.784Z","created":"2017-05-28T23:04:33.230Z","0.0.2":"2017-05-28T23:04:33.230Z","0.0.3":"2017-05-28T23:08:15.732Z"},"keywords":["recursive","deep","for","each","prop","property","object","function","enumerable","non-enumerable","nonenumerable","inherited","proto","prototype","prototype-chain","class","static"],"author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"license":"MIT","readmeFilename":"README.md"}