pax_global_header00006660000000000000000000000064122527640560014523gustar00rootroot0000000000000052 comment=c206b8b7e52238f47a14022e94f231d79dc1ac3b merge-descriptors-0.0.2/000077500000000000000000000000001225276405600151605ustar00rootroot00000000000000merge-descriptors-0.0.2/.gitignore000066400000000000000000000011201225276405600171420ustar00rootroot00000000000000# Compiled source # ################### *.com *.class *.dll *.exe *.o *.so # Packages # ############ # it's better to unpack these files and commit the raw source # git has its own built in compression methods *.7z *.dmg *.gz *.iso *.jar *.rar *.tar *.zip # Logs and databases # ###################### *.log *.sql *.sqlite # OS generated files # ###################### .DS_Store* ehthumbs.db Icon? Thumbs.db # Node.js # ########### lib-cov *.seed *.log *.csv *.dat *.out *.pid *.gz pids logs results node_modules npm-debug.log # Components # ############## /build /components /vendorsmerge-descriptors-0.0.2/README.md000066400000000000000000000027501225276405600164430ustar00rootroot00000000000000# Merge Descriptors [![Build Status](https://travis-ci.org/component/merge-descriptors.png)](https://travis-ci.org/component/merge-descriptors) Merge objects using descriptors. ```js var thing = { get name() { return 'jon' } } var animal = { } merge(animal, thing) animal.name === 'jon' ``` ## API ### merge(destination, source) Overwrites `destination`'s descriptors with `source`'s. ## License The MIT License (MIT) Copyright (c) 2013 Jonathan Ong me@jongleberry.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.merge-descriptors-0.0.2/component.json000066400000000000000000000003131225276405600200520ustar00rootroot00000000000000{ "name": "merge-descriptors", "description": "Merge objects using descriptors", "version": "0.0.2", "scripts": [ "index.js" ], "repo": "component/merge-descriptors", "license": "MIT" }merge-descriptors-0.0.2/index.js000066400000000000000000000003531225276405600166260ustar00rootroot00000000000000module.exports = function (dest, src) { Object.getOwnPropertyNames(src).forEach(function (name) { var descriptor = Object.getOwnPropertyDescriptor(src, name) Object.defineProperty(dest, name, descriptor) }) return dest }merge-descriptors-0.0.2/package.json000066400000000000000000000010651225276405600174500ustar00rootroot00000000000000{ "name": "merge-descriptors", "description": "Merge objects using descriptors", "version": "0.0.2", "author": { "name": "Jonathan Ong", "email": "me@jongleberry.com", "url": "http://jongleberry.com", "twitter": "https://twitter.com/jongleberry" }, "license": "MIT", "repository": { "type": "git", "url": "https://github.com/component/merge-descriptors.git" }, "bugs": { "mail": "me@jongleberry.com", "url": "https://github.com/component/merge-descriptors/issues" }, "scripts": { "test": "make test;" } }