{"_id":"object-extended","_rev":"3219608","name":"object-extended","description":"Additional object extensions with a chainable api","dist-tags":{"latest":"0.0.7"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"time":{"modified":"2024-03-21T07:21:27.000Z","created":"2013-01-16T21:25:23.315Z","0.0.7":"2013-06-06T21:58:05.240Z","0.0.6":"2013-06-05T05:40:12.533Z","0.0.5":"2013-04-16T16:14:33.636Z","0.0.4":"2013-04-07T03:46:39.005Z","0.0.3":"2013-01-22T07:50:52.219Z","0.0.2":"2013-01-17T04:15:21.184Z","0.0.1":"2013-01-16T21:25:23.315Z"},"users":{},"author":{"name":"Doug Martin"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/object-extended.git"},"versions":{"0.0.7":{"name":"object-extended","version":"0.0.7","description":"Additional object extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/object-extended.git"},"keywords":["Object","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/6..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","array-extended":"~0.0.4"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.1","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/doug-martin/object-extended/issues"},"_id":"object-extended@0.0.7","dist":{"shasum":"84fd23f56b15582aeb3e88b05cb55d2432d68a33","size":6971,"noattachment":false,"key":"/object-extended/-/object-extended-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-extended/download/object-extended-0.0.7.tgz"},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1370555885240,"_hasShrinkwrap":false,"_cnpm_publish_time":1370555885240,"_cnpmcore_publish_time":"2021-12-16T11:26:24.815Z"},"0.0.6":{"name":"object-extended","version":"0.0.6","description":"Additional object extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/object-extended.git"},"keywords":["Object","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/6..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","array-extended":"0.0.4"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.1","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/doug-martin/object-extended/issues"},"_id":"object-extended@0.0.6","dist":{"shasum":"738ac1f7552b8649f2d86e7e74b4f04b8980a470","size":6958,"noattachment":false,"key":"/object-extended/-/object-extended-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-extended/download/object-extended-0.0.6.tgz"},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1370410812533,"_hasShrinkwrap":false,"_cnpm_publish_time":1370410812533,"_cnpmcore_publish_time":"2021-12-16T11:26:25.032Z"},"0.0.5":{"name":"object-extended","version":"0.0.5","description":"Additional object extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/object-extended.git"},"keywords":["Object","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/6..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","array-extended":"0.0.4"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.1","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.0"},"readmeFilename":"README.md","_id":"object-extended@0.0.5","dist":{"shasum":"13618e6c42cacc7e1aabf165d9ec0d8d2574475c","size":6692,"noattachment":false,"key":"/object-extended/-/object-extended-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-extended/download/object-extended-0.0.5.tgz"},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1366128873636,"_hasShrinkwrap":false,"_cnpm_publish_time":1366128873636,"_cnpmcore_publish_time":"2021-12-16T11:26:25.267Z"},"0.0.4":{"name":"object-extended","version":"0.0.4","description":"Additional object extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/object-extended.git"},"keywords":["Object","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/6..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","array-extended":"0.0.4"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.1","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.0"},"readmeFilename":"README.md","_id":"object-extended@0.0.4","dist":{"shasum":"7ae7be2dd19e68de27d5f0435eb9da7ac48c4782","size":6670,"noattachment":false,"key":"/object-extended/-/object-extended-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-extended/download/object-extended-0.0.4.tgz"},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1365306399005,"_hasShrinkwrap":false,"_cnpm_publish_time":1365306399005,"_cnpmcore_publish_time":"2021-12-16T11:26:25.459Z"},"0.0.3":{"name":"object-extended","version":"0.0.3","description":"Additional object extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/object-extended.git"},"keywords":["Object","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":{"ie":[6,7,8,9],"chrome":[4,23,"canary"],"firefox":[3,3.5,3.6,4,17,"nightly"],"opera":[10,10.5,11,11.5,11.6,12,"next"],"safari":["5.0.1",5.1]}},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.2.1"},"readmeFilename":"README.md","_id":"object-extended@0.0.3","dist":{"shasum":"8fdb814fd9872187b64f8a489d926057bff29217","size":6300,"noattachment":false,"key":"/object-extended/-/object-extended-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-extended/download/object-extended-0.0.3.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1358841052219,"_hasShrinkwrap":false,"_cnpm_publish_time":1358841052219,"_cnpmcore_publish_time":"2021-12-16T11:26:25.693Z"},"0.0.2":{"name":"object-extended","version":"0.0.2","description":"Additional object extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/object-extended.git"},"keywords":["Object","extender","utilities"],"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"0.0.2","is-extended":"0.0.2"},"devDependencies":{"it":"~0.1.0","grunt-it":"~0.2.1"},"readmeFilename":"README.md","_id":"object-extended@0.0.2","dist":{"shasum":"38169c57eaa40223868d5f75e35c86dce70a6601","size":6070,"noattachment":false,"key":"/object-extended/-/object-extended-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-extended/download/object-extended-0.0.2.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1358396121184,"_hasShrinkwrap":false,"_cnpm_publish_time":1358396121184,"_cnpmcore_publish_time":"2021-12-16T11:26:25.893Z"},"0.0.1":{"name":"object-extended","version":"0.0.1","description":"Additional object extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/object-extended.git"},"keywords":["Object","extender","utilities"],"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extender":"0.0.4","is-extended":"0.0.1"},"devDependencies":{"it":"~0.1.0","grunt-it":"~0.3.0"},"readmeFilename":"README.md","_id":"object-extended@0.0.1","dist":{"shasum":"a79afdbce2c595f220f24c6a5fb5ae004e0ab4a2","size":6094,"noattachment":false,"key":"/object-extended/-/object-extended-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-extended/download/object-extended-0.0.1.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1358371523315,"_hasShrinkwrap":false,"_cnpm_publish_time":1358371523315,"_cnpmcore_publish_time":"2021-12-16T11:26:26.151Z"}},"readme":"[![build status](https://secure.travis-ci.org/doug-martin/object-extended.png)](http://travis-ci.org/doug-martin/object-extended)\n\n# object-extended\n\n`object-extended` is a Javascript library that can be used standalone or incorporated into [`extended`](https://github.com/doug-martin/extended)\n\n```javascript\nvar obj = require(\"object-extended\");\n```\n\nOr\n\n```javascript\nvar myextended = require(\"extended\")\n\t.register(require(\"object-extended\"));\n```\n\n## Installation\n\n```\nnpm install object-extended\n```\n\nOr [download the source](https://raw.github.com/doug-martin/object-extended/master/index.js) ([minified](https://raw.github.com/doug-martin/object-extended/master/object-extended.min.js))\n\n## Usage\n\n**`merge`**\n\nmerges the properties of one object into another.\n\n**Note** This method changes the original object.\n\n```javascript\n\nobj.merge({}, {a : \"a\"}, {b : \"b\"}, {c : \"c\"}); //{a : \"a\", b : \"b\", c : \"c\"});\n\n```\n\n**`extend`**\n\nMerges properties into a function prototype or delegates to `merge`.\n\n```\nvar MyObj = function () {\n};\nMyObj.prototype.test = true;\nobject.extend(MyObj, {test2: false, test3: \"hello\", test4: \"world\"});\n\nvar myOjb = new MyObj();\nmyObj.test2; //false\nmyObj.test3; //\"hello\"\nmyObj.test4; //\"world\"\n```\n\n**`deepMerge`**\n\nMerges objects together only overriding properties that are different.\n\n**Note**: this function takes a variable number of objects to merge\n\n```javascript\nvar myObj = {my : {cool : {property1 : 1, property2 : 2}}};\nobj.deepMerge(myObj, {my : {cool : {property3 : 3}}});\n\nmyObj.my.cool.property1; // 1\nmyObj.my.cool.property2; // 2\nmyObj.my.cool.property3; // 3\n\n```\n\nOr\n\n```javacript\nvar myObj = {my : {cool : {property1 : 1, property2 : 2}}};\nobj(myObj).deepMerge({my : {cool : {property3 : 3}}});\n\nmyObj.my.cool.property1; // 1\nmyObj.my.cool.property2; // 2\nmyObj.my.cool.property3; // 3\n```\n\n\n**`hash.forEach`**\n\nLoops through each k/v in a hash.\n\n```javascript\nvar myObj = {a : \"b\", c : \"d\", e : \"f\"};\nobj(myObj).forEach(function(value, key){\n    console.log(value, key);\n});\n\nobj.hash.forEach(myObj, function(value, key){\n   console.log(value, key);\n});\n```\n\n**`hash.filter`**\n\n\nFilters out key/value pairs in an object.\nFilters out key/value pairs that return a falsey value from the iterator.\n\n```javascript\nvar myObj = {a : \"b\", c : \"d\", e : \"f\"};\nobj(myObj).filter(function(value, key){\n    return value == \"b\" || key === \"e\";\n}); //{a : \"b\", e : \"f\"};\n\nobj.hash.filter(myObj, function(value, key){\n   return value == \"b\" || key === \"e\";\n}); //{a : \"b\", e : \"f\"};\n\n```\n\n\n**`hash.values`**\n\nReturns the values of a hash.\n\n```javascript\nvar myObj = {a : \"b\", c : \"d\", e : \"f\"};\nobj(myObj).values(); //[\"b\", \"d\", \"f\"]\n\nobj.values(myObj); //[\"b\", \"d\", \"f\"]\n\n```\n\n**`hash.keys`**\nReturns the keys of a hash.\n\n```javascript\nvar myObj = {a : \"b\", c : \"d\", e : \"f\"};\nobj(myObj).keys(); //[\"a\", \"c\", \"e\"]\n\nobj.keys(myObj); //[\"b\", \"d\", \"f\"]\n\n```\n\n**`hash.invert`**\n\n\nReturns a new hash that is the invert of the hash.\n\n```javascript\nvar myObj = {a : \"b\", c : \"d\", e : \"f\"};\nobj(myObj).invert(); //{b : \"a\", d : \"c\", f : \"e\"}\n\nobj.hash.invert(myObj); //{b : \"a\", d : \"c\", f : \"e\"}\n```\n\n\n**`hash.toArray`**\n\nConverts a hash to an array.\n\n```javascript\nvar myObj = {a : \"b\", c : \"d\", e : \"f\"};\nobj(myObj).toArray(); //[[\"a\", \"b\"], [\"c\", \"d\"], [\"e\", \"f\"]]\n\nobj.hash.toArray(myObj); //[[\"a\", \"b\"], [\"c\", \"d\"], [\"e\", \"f\"]]\n```","_attachments":{},"readmeFilename":"README.md","bugs":{"url":"https://github.com/doug-martin/object-extended/issues"},"license":"MIT"}