1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
{"_id":"inspect-property","_rev":"5-cb57af359e51070bd22c44db143157e4","name":"inspect-property","description":"Inspects a Property and returns useful informations about it (e.g. nested properties, function inspection, property descriptor, value, type, constructor)","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.3":{"name":"inspect-property","version":"0.0.3","description":"Inspects a Property and returns useful informations about it (e.g. nested properties, function inspection, property descriptor, value, type, constructor)","main":"lib/inspect-property.js","author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"keywords":["inspect","property","api","methods","properties"],"scripts":{"test":"mocha ./test/main.test.js","test:all":"mocha ./test -b"},"license":"MIT","devDependencies":{"chai":"^3.5.0","mocha":"^3.3.0"},"dependencies":{"for-each-property":"0.0.4","for-each-property-deep":"0.0.3","inspect-function":"^0.2.2"},"gitHead":"5459c720a933b7d59335185c9dfba7918525b7a1","_id":"inspect-property@0.0.3","_npmVersion":"5.0.2","_nodeVersion":"6.9.0","_npmUser":{"name":"diegozoracky","email":"diego.zoracky@gmail.com"},"maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"dist":{"integrity":"sha512-Gnr1bmH6f0fhXc7qHNcO1+tbQsilUWWasu0GTOcNqZ+W/sHgRKZ4cCGUPee1PP1ocqdY2wqaEv1eGQlO1ANjEA==","shasum":"478ab5396e9518a9118d8477fcd7dde72af40730","tarball":"https://registry.npmjs.org/inspect-property/-/inspect-property-0.0.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnzXEKMOWNAFGUUTpgrQdzndPz939SVOEdN0khzz2+vAIgNT3Qjm7OmNDoEbz9xDIYNX2/ePlh/2nMBhaZQM/v+sU="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-property-0.0.3.tgz_1496716982134_0.4136793897487223"},"directories":{}},"0.0.4":{"name":"inspect-property","version":"0.0.4","description":"Inspects a Property and returns useful informations about it (e.g. nested properties, function inspection, property descriptor, value, type, constructor)","main":"lib/inspect-property.js","author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"keywords":["inspect","property","api","methods","properties"],"scripts":{"test":"mocha ./test/main.test.js","test:all":"mocha ./test -b"},"license":"MIT","devDependencies":{"chai":"^3.5.0","mocha":"^3.3.0"},"dependencies":{"for-each-property":"0.0.4","for-each-property-deep":"0.0.3","inspect-function":"^0.2.2"},"gitHead":"f7c6d46c7dfcaf71bcefb54d9f66876631c8432b","_id":"inspect-property@0.0.4","_npmVersion":"5.0.2","_nodeVersion":"6.9.0","_npmUser":{"name":"diegozoracky","email":"diego.zoracky@gmail.com"},"maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"dist":{"integrity":"sha512-dMHnikCNXwHY54uhyPsAHFjh42GU2kd43n3kzioxPqHTSbikBshEv8IaCu2QmdMhdX7Sy8sdtArbASavwXXMIQ==","shasum":"0b87fd2a210a7b5f09f772aa17cac00113d61efa","tarball":"https://registry.npmjs.org/inspect-property/-/inspect-property-0.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE4YfQV9EtoGK/Oo/4UaDrVvRsUhBoEnieLtnDe3ZIUGAiBL2yWCBO++tZnvYIAqkeOPaFdqgnq194YlGjV56Ee89A=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-property-0.0.4.tgz_1496747006597_0.17323148902505636"},"directories":{}},"0.0.5":{"name":"inspect-property","version":"0.0.5","description":"Inspects a Property and returns useful informations about it (e.g. nested properties, function inspection, property descriptor, value, type, constructor)","main":"lib/inspect-property.js","author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"keywords":["inspect","property","api","methods","properties"],"scripts":{"test":"mocha ./test/main.test.js","test:all":"mocha ./test -b"},"license":"MIT","devDependencies":{"chai":"^3.5.0","mocha":"^3.3.0"},"dependencies":{"for-each-property":"0.0.4","for-each-property-deep":"0.0.3","inspect-function":"^0.2.2"},"gitHead":"ebd5ad9a820d78f9e21f347dd3214d27c362210a","_id":"inspect-property@0.0.5","_npmVersion":"5.3.0","_nodeVersion":"6.9.0","_npmUser":{"name":"diegozoracky","email":"diego.zoracky@gmail.com"},"dist":{"integrity":"sha512-L0iUyUAdoZeKwLU7v+TJMBo0oXVTtRkRLH0UTedaEGQXwDHIuoOKr1soy3gZVkhDnmJoC4F38aIo9f140jfnvA==","shasum":"f764ea46f06c829269af8813b4ec518399bec898","tarball":"https://registry.npmjs.org/inspect-property/-/inspect-property-0.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEcXiYkTTbdQXxtsRoXEpSDCzrE5qHFjzc5TCLXw6esAIgNfX9Nyj6J5NywGlc9LxcFCJ1FxKsLdO18r/gkFjQBU4="}]},"maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-property-0.0.5.tgz_1500347512323_0.46427412587217987"},"directories":{}},"0.0.6":{"name":"inspect-property","version":"0.0.6","description":"Inspects a Property and returns useful informations about it (e.g. nested properties, function inspection, property descriptor, value, type, constructor)","main":"lib/inspect-property.js","author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"keywords":["inspect","property","api","methods","properties"],"scripts":{"test":"mocha ./test/main.test.js","test:all":"mocha ./test -b"},"license":"MIT","devDependencies":{"chai":"^3.5.0","mocha":"^3.3.0"},"dependencies":{"for-each-property":"0.0.4","for-each-property-deep":"0.0.3","inspect-function":"^0.3.1"},"gitHead":"afd503e07e7d5677471af5e726b1f481cdefda45","_id":"inspect-property@0.0.6","_npmVersion":"5.3.0","_nodeVersion":"6.9.0","_npmUser":{"name":"diegozoracky","email":"diego.zoracky@gmail.com"},"dist":{"integrity":"sha512-LgjHkRl9W6bj2n+kWrAOgvCYPTYt+LanE4rtd/vKNq6yEb+SvVV7UTLzoSPpDX6/U1cAz7VfqPr+lPAIz7wHaQ==","shasum":"5fce081e408fc9bc948e3cf625b6cdc3aa82eef7","tarball":"https://registry.npmjs.org/inspect-property/-/inspect-property-0.0.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHSvYW99PS9BWKgqNQmpEiVPizTjrBUn2axhdFL0NJcKAiBaOV3oxiLpOekCiY1feZCXq1fve+lh/4T2znHUOfYhWA=="}]},"maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-property-0.0.6.tgz_1503854265945_0.639726126100868"},"directories":{}},"0.0.7":{"name":"inspect-property","version":"0.0.7","description":"Inspects a Property and returns useful informations about it (e.g. nested properties, function inspection, property descriptor, value, type, constructor)","main":"lib/inspect-property.js","author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"keywords":["inspect","property","api","methods","properties"],"scripts":{"test":"mocha ./test/main.test.js","test:all":"mocha ./test -b"},"license":"MIT","devDependencies":{"chai":"^3.5.0","mocha":"^5.2.0"},"dependencies":{"for-each-property":"0.0.4","for-each-property-deep":"0.0.3","inspect-function":"^0.4.0"},"gitHead":"a1f40246c51a02f33d0d545981fac7efa12b5454","_id":"inspect-property@0.0.7","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"diegozoracky","email":"diego.zoracky@gmail.com"},"dist":{"integrity":"sha512-/4hl49odQNw3QSik9F8OsnG8Ms/OEGlZNMxK/wf9z0F1eGSgka4uZtY9DSh1w+iZJi3T6cOnAPsi+EF3VuGZFg==","shasum":"87e3d8c7711782bd36db2d5c2ffb0cacaa562d71","tarball":"https://registry.npmjs.org/inspect-property/-/inspect-property-0.0.7.tgz","fileCount":7,"unpackedSize":12244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbz+uXCRA9TVsSAnZWagAAA60QAI4WXuhrWGiOGT6O4Q2y\n61IO81U9yybcBXIbAaSTwbnxF6tw/gYr7PvV45yjm+jUH501lPwhTnYqaozN\nSw1GhSBEpWYIPohFCsNXA12S3XuQSBZeBjvfs1zvHoay0ur+6jxIJEIsbj/d\noqbxkXv9JhGdmHaiBU/23CYqS5wPniFfO1xmy2TdoAzrCbjWpT9CEUroz6gq\nYIaUOgELBvy8CAoT7kTrORUCygztBKbUTqVmmf+IbBJ+8S3OLfIagpQcvfCR\nMNhe/FRBfxIiDcp+P82/i+KqouSLIthKlOLRTzKnAL/C9vgrDqXf27/laVSb\nvtSEtfARUdgN+Mxh/0jfwNmH2R5CHCKsHqF6YgPG0B+zxhzc7avECE+vzqXH\ndJRlv79cZmWV79MKbl2Gf9l/L8thAxdghK90I71bSzA5CWhtU/IWi6N1Iq1Y\njAwdERAOPLC45khJf9C+oSbZNGq+DDgGJW3p97dJ+EavfSxeMq09eYPFsO1U\n7ZEpfK234irR946aMlTEptmL9Q9Tu76b0ATFjmbmue6S8R6Xjp/Kw5mIj/D2\nf7t0sZwnnku220bjxdjHrhyb8JNsWhYhoAIw7tXbwGG7jOtowYZoE8PzAl+w\nxLUV3f+BD1/zUFRuHEk/WKiQsqoaqhEfutY7LvKOuNqtoz1ozn3+1MqlZd2Y\nr9XJ\r\n=nOry\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3emxbPfAQaiGIZyP38QkWqp+OWc2vcNrBUMWhDRTqigIhAMXfpwkQQ1c3m44KyRRdUMBR5rB2HzQmT4TWrswiy+c4"}]},"maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-property_0.0.7_1540352915932_0.46352355120173216"},"_hasShrinkwrap":false}},"readme":"# inspect-property\n\n[](https://travis-ci.org/DiegoZoracKy/inspect-property) []() []()\n\nInspects a Property and returns useful informations about it (e.g. nested properties, function inspection, property descriptor, value, type, constructor)\n\n## Installation\n\n```bash\nnpm install inspect-property\n```\n\n## Usage\n```javascript\ninspectProperty(o, propertyName, { delimiter = '.', inspectFunction = true, inspectProperties = true, enumerability, inherited} = {} );\n```\n **o**:\n Object || Property || Value to be inspected.\n\n **propertyName**:\n When passing as `inspectProperty(parentObject, 'childPropertyName')`, `propertyDescriptor` will be returned. Note that `childPropertyName` must be a `string`.\n\n **delimiter**\n What will be used as a delimiter for the nested properties at `properties` keys. Default is `','` e.g. `'a.b.c'`\n\n **inspectFunction**\n If functions should be inspected. See [inspect-function](https://github.com/DiegoZoracKy/inspect-function) for details about the function inspection.\n\n**inspectProperties**\nWhen set to false, `properties` will be a simple `{key: value}` object, without any inspection. The default value is `true`, returning `{key: inspectProperty(value)}`.\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 **enumerability**:\n When inspecting nested properties, defines how it should look up regarding `enumerability`.\n The options are:\n * `'enumerable'` *(default)*\n * `'nonenumerable'`\n * `'all'`\n\n **inherited**:\n Determines if it should look up on the prototype chain when inspecting nested properties.\n The options are:\n * `true` *(default)*\n * `false`\n\n## Example\n```javascript\nconst inspectProperty = require('../');\n\nconst data = {\n\ta: {\n\t\tb: {\n\t\t\tc: (z = 'DefaultX', k) => z+k\n\t\t},\n\t\td: 3,\n\t\tf: {\n\t\t\tg: 'h'\n\t\t}\n\t}\n};\n\nconst result = inspectProperty(data);\n\n////////////\n// RESULT //\n////////////\n// Below is a JSON.stringify(result), so functions references are ommitted\n\n{\n \"value\": {\n \"a\": {\n \"b\": {},\n \"d\": 3,\n \"f\": {\n \"g\": \"h\"\n }\n }\n },\n \"type\": \"object\",\n \"constructor\": {\n \"name\": \"Object\"\n },\n \"properties\": {\n \"a\": {\n \"value\": {\n \"b\": {},\n \"d\": 3,\n \"f\": {\n \"g\": \"h\"\n }\n },\n \"type\": \"object\",\n \"constructor\": {\n \"name\": \"Object\"\n },\n \"properties\": {\n \"b\": {},\n \"d\": 3,\n \"f\": {\n \"g\": \"h\"\n },\n \"f.g\": \"h\"\n }\n },\n \"a.b\": {\n \"value\": {},\n \"type\": \"object\",\n \"constructor\": {\n \"name\": \"Object\"\n },\n \"properties\": {}\n },\n \"a.b.c\": {\n \"type\": \"function\",\n \"constructor\": {\n \"name\": \"Function\"\n },\n \"functionInspection\": {\n \"name\": \"c\",\n \"signature\": \"c(z = 'DefaultX', k);\",\n \"parameters\": [\n {\n \"parameter\": \"z\",\n \"defaultValue\": \"DefaultX\",\n \"declaration\": \"z = 'DefaultX'\"\n },\n {\n \"parameter\": \"k\",\n \"declaration\": \"k\"\n }\n ],\n \"parametersNames\": [\n \"z\",\n \"k\"\n ]\n },\n \"properties\": {}\n },\n \"a.d\": {\n \"value\": 3,\n \"type\": \"number\",\n \"constructor\": {\n \"name\": \"Number\"\n }\n },\n \"a.f\": {\n \"value\": {\n \"g\": \"h\"\n },\n \"type\": \"object\",\n \"constructor\": {\n \"name\": \"Object\"\n },\n \"properties\": {\n \"g\": \"h\"\n }\n },\n \"a.f.g\": {\n \"value\": \"h\",\n \"type\": \"string\",\n \"constructor\": {\n \"name\": \"String\"\n }\n }\n }\n}","maintainers":[{"name":"diegozoracky","email":"diego.zoracky@gmail.com"}],"time":{"modified":"2022-05-05T23:54:12.050Z","created":"2017-06-06T02:43:02.659Z","0.0.3":"2017-06-06T02:43:02.659Z","0.0.4":"2017-06-06T11:03:26.719Z","0.0.5":"2017-07-18T03:11:52.494Z","0.0.6":"2017-08-27T17:17:46.048Z","0.0.7":"2018-10-24T03:48:38.585Z"},"keywords":["inspect","property","api","methods","properties"],"author":{"name":"Diego ZoracKy","email":"diego.zoracky@gmail.com","url":"https://github.com/DiegoZoracKy/"},"license":"MIT","readmeFilename":"README.md"} |