{"name":"delegate-properties","description":"Deep-clone properties from one object to another and make them non-enumerable, or make existing properties on an object non-enumerable.","version":"0.4.0","homepage":"https://github.com/jonschlinkert/delegate-properties","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/delegate-properties.git"},"bugs":{"url":"https://github.com/jonschlinkert/delegate-properties/issues"},"license":"MIT","files":["index.js","LICENSE","README.md"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"define-property":"^0.2.5"},"devDependencies":{"gulp-format-md":"^0.1.10","mocha":"*"},"keywords":["define","define-property","delegate","enumerable","key","non","non-enumerable","object","prop","properties","property","value"],"verb":{"related":{"list":["define-property","delegate-object","forward-object","mixin-deep","mixin-object"]},"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"reflinks":["verb","verb-generate-readme"]},"gitHead":"1c8ea95473fcff6e4bc289f208c5d238d574f767","_id":"delegate-properties@0.4.0","_shasum":"aaf972c33d7a55fd7335fd03134780c32d2f12d9","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"aaf972c33d7a55fd7335fd03134780c32d2f12d9","tarball":"http://registry-npm.ywwl.com/delegate-properties/download/delegate-properties-0.4.0.tgz","integrity":"sha512-2SsDeBs+Ehv3s1URXOxZcssqp9fVo7bUKdSuUhKOVcqvWYH6ABuAyQUa01QBHKK362lsK4H95D9voTAqr4T8jA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFj5CqsIxATDqGJenkGVrQSC84Wt3p6cCboT7HITLstUAiAZo6tLuFisix5XJQHaxvZzTBatfllA1rUjgr3V8KozuA=="}],"size":2819,"noattachment":false,"key":"/delegate-properties/-/delegate-properties-0.4.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/delegate-properties-0.4.0.tgz_1471061506904_0.06703447876498103"},"directories":{},"readme":"# delegate-properties [![NPM version](https://img.shields.io/npm/v/delegate-properties.svg?style=flat)](https://www.npmjs.com/package/delegate-properties) [![NPM downloads](https://img.shields.io/npm/dm/delegate-properties.svg?style=flat)](https://npmjs.org/package/delegate-properties) [![Build Status](https://img.shields.io/travis/jonschlinkert/delegate-properties.svg?style=flat)](https://travis-ci.org/jonschlinkert/delegate-properties)\n\nDeep-clone properties from one object to another and make them non-enumerable, or make existing properties on an object non-enumerable.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save delegate-properties\n```\n\n## Usage\n\n```js\nvar delegate = require('delegate-properties');\ndelegate(receiver, provider, clone);\n```\n\n**Params**\n\n* `receiver`: (**Object**) The object receiving properties\n* `provider`: (**Object**) The object providing properties\n\n## Examples\n\n### copy properties\n\nCopy properties and make them non-enumerable\n\n```js\nvar provider = {\n  upper: function(val) {\n    return val.toUpperCase();\n  },\n  lower: function(val) {\n    return val.toLowerCase();\n  }\n};\n\nvar receiver = {};\n// an existing properties in the `receiver` \n// object would be overwritten\ndelegate(receiver, provider);\n\nreceiver.upper('foo');\nreceiver.lower('BAR');\n\nconsole.log(receiver.upper('foo')); // 'FOO' \nconsole.log(receiver.lower('BAR')); // 'bar'\n\n// copied properties are non-enumerable\nconsole.log(receiver); // {}\nconsole.log(Object.keys(receiver)); // []\n```\n\n### make existing properties non-enumerable\n\n```js\nvar obj = {\n  upper: function(val) {\n    return val.toUpperCase();\n  },\n  lower: function(val) {\n    return val.toLowerCase();\n  }\n};\n\ndelegate(obj);\nconsole.log(obj) // {}\nobj.upper('foo') // 'FOO'\nobj.lower('BAR') // 'bar'\n```\n\n## About\n\n### Related projects\n\n* [define-property](https://www.npmjs.com/package/define-property): Define a non-enumerable property on an object. | [homepage](https://github.com/jonschlinkert/define-property \"Define a non-enumerable property on an object.\")\n* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://github.com/doowb/delegate-object) | [homepage](https://github.com/doowb/delegate-object \"Copy properties from an object to another object, where properties with function values will be invoked in the context of the receiver, and properties with non-function values are just copied.\")\n* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://github.com/doowb/forward-object) | [homepage](https://github.com/doowb/forward-object \"Copy properties from an object to another object, where properties with function values will be invoked in the context of the provider, and properties with non-function values are just copied.\")\n* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep \"Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.\")\n* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://github.com/jonschlinkert/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object \"Mixin the own and inherited properties of other objects onto the first object. Pass an empty object as the first arg to shallow clone.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_\n\nTo generate the readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install -g verb verb-generate-readme && verb\n```\n\n### Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\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 © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/delegate-properties/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on August 13, 2016._","publish_time":1471061508565,"_cnpm_publish_time":1471061508565,"dist-tags":{"latest":"0.4.0"}}