UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

126 lines (125 loc) 6.39 kB
{ "_args": [ [ { "raw": "is-data-descriptor@^0.1.4", "scope": null, "escapedName": "is-data-descriptor", "name": "is-data-descriptor", "rawSpec": "^0.1.4", "spec": ">=0.1.4 <0.2.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/is-descriptor" ] ], "_from": "is-data-descriptor@>=0.1.4 <0.2.0", "_id": "is-data-descriptor@0.1.4", "_inCache": true, "_location": "/is-data-descriptor", "_nodeVersion": "5.0.0", "_npmUser": { "name": "jonschlinkert", "email": "github@sellside.com" }, "_npmVersion": "3.3.6", "_phantomChildren": { "is-buffer": "1.1.6" }, "_requested": { "raw": "is-data-descriptor@^0.1.4", "scope": null, "escapedName": "is-data-descriptor", "name": "is-data-descriptor", "rawSpec": "^0.1.4", "spec": ">=0.1.4 <0.2.0", "type": "range" }, "_requiredBy": [ "/is-descriptor" ], "_resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "_shasum": "0b5ee648388e2c860282e793f1856fec3f301b56", "_shrinkwrap": null, "_spec": "is-data-descriptor@^0.1.4", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/is-descriptor", "author": { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" }, "bugs": { "url": "https://github.com/jonschlinkert/is-data-descriptor/issues" }, "dependencies": { "kind-of": "^3.0.2" }, "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", "devDependencies": { "mocha": "*", "should": "*" }, "directories": {}, "dist": { "shasum": "0b5ee648388e2c860282e793f1856fec3f301b56", "tarball": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz" }, "engines": { "node": ">=0.10.0" }, "files": [ "index.js" ], "gitHead": "e6317dbcb27a95281a60120bac83f5938dda4e2c", "homepage": "https://github.com/jonschlinkert/is-data-descriptor", "keywords": [ "accessor", "check", "data", "descriptor", "get", "getter", "is", "keys", "object", "properties", "property", "set", "setter", "type", "valid", "value" ], "license": "MIT", "main": "index.js", "maintainers": [ { "name": "jonschlinkert", "email": "github@sellside.com" } ], "name": "is-data-descriptor", "optionalDependencies": {}, "readme": "# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg)](https://www.npmjs.com/package/is-data-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-data-descriptor)\n\n> Returns true if a value has the characteristics of a valid JavaScript data descriptor.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm i is-data-descriptor --save\n```\n\n## Usage\n\n```js\nvar isDataDesc = require('is-data-descriptor');\n```\n\n## Examples\n\n`true` when the descriptor has valid properties with valid values.\n\n```js\n// `value` can be anything\nisDataDesc({value: 'foo'})\nisDataDesc({value: function() {}})\nisDataDesc({value: true})\n//=> true\n```\n\n`false` when not an object\n\n```js\nisDataDesc('a')\n//=> false\nisDataDesc(null)\n//=> false\nisDataDesc([])\n//=> false\n```\n\n`false` when the object has invalid properties\n\n```js\nisDataDesc({value: 'foo', bar: 'baz'})\n//=> false\nisDataDesc({value: 'foo', bar: 'baz'})\n//=> false\nisDataDesc({value: 'foo', get: function(){}})\n//=> false\nisDataDesc({get: function(){}, value: 'foo'})\n//=> false\n```\n\n`false` when a value is not the correct type\n\n```js\nisDataDesc({value: 'foo', enumerable: 'foo'})\n//=> false\nisDataDesc({value: 'foo', configurable: 'foo'})\n//=> false\nisDataDesc({value: 'foo', writable: 'foo'})\n//=> false\n```\n\n## Valid properties\n\nThe only valid data descriptor properties are the following:\n\n* `configurable` (required)\n* `enumerable` (required)\n* `value` (optional)\n* `writable` (optional)\n\nTo be a valid data descriptor, either `value` or `writable` must be defined.\n\n**Invalid properties**\n\nA descriptor may have additional _invalid_ properties (an error will **not** be thrown).\n\n```js\nvar foo = {};\n\nObject.defineProperty(foo, 'bar', {\n enumerable: true,\n whatever: 'blah', // invalid, but doesn't cause an error\n get: function() {\n return 'baz';\n }\n});\n\nconsole.log(foo.bar);\n//=> 'baz'\n```\n\n## Related projects\n\n* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor)\n* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor)\n* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject)\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-data-descriptor/issues/new).\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/jonschlinkert/is-data-descriptor.git" }, "scripts": { "test": "mocha" }, "verb": { "related": { "list": [ "is-accessor-descriptor", "is-data-descriptor", "is-descriptor", "isobject" ] }, "plugins": [ "gulp-format-md" ] }, "version": "0.1.4" }