{"bugs":{"url":"https://github.com/doug-martin/object-extended/issues"},"dist":{"shasum":"738ac1f7552b8649f2d86e7e74b4f04b8980a470","tarball":"https://registry.npmjs.org/object-extended/-/object-extended-0.0.6.tgz","integrity":"sha512-sPikzJvws+2sqhKdl0gvFgcUREeo7JRSMXNMJ0aXAyFF/gUl1UMGHf26CFnkooOquN3cUvOvsNgxEWmib+dB7w==","signatures":[{"sig":"MEQCIEf3HNilA2zaqi8oY8WCZrWD+W8ZlVYDJ0Ucab+l52zfAiAri9mFMWWnFQRk+Z9GYdNv3TPVXa37NA/eZ/FwQB94pw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","name":"object-extended","_from":".","author":{"name":"Doug Martin"},"readme":"[![Build Status](https://travis-ci.org/doug-martin/object-extended.png?branch=master)](https://travis-ci.org/doug-martin/object-extended)\n\n[![browser support](https://ci.testling.com/doug-martin/object-extended.png)](https://ci.testling.com/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**`hash.omit`**\n\n\nReturns a new hash that is the with the given keys omitted.\n\n```javascript\nvar myObj = {a : \"b\", c : \"d\", e : \"f\"};\nobj(myObj).omit(\"e\"); //{a : \"b\", c : \"d\"}\nobj(myObj).omit([\"c\", \"e\"]); //{a : \"b\"}\n\nobj.hash.omit(myObj, \"e\"); //{a : \"b\", c : \"d\"}\nobj.hash.omit(myObj, [\"c\", \"e\"]); //{a : \"b\"}\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```","license":"MIT","scripts":{"test":"it -r dot"},"_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"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"]},"repository":{"url":"git:git@github.com:doug-martin/object-extended.git","type":"git"},"_npmVersion":"1.2.23","description":"Additional object extensions with a chainable api","maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","array-extended":"0.0.4"},"readmeFilename":"README.md","devDependencies":{"it":"~0.2.0","grunt":"~0.4.1","grunt-it":"~0.3.1","grunt-contrib-jshint":"~0.4.0","grunt-contrib-uglify":"~0.2.0"},"_id":"object-extended@0.0.6","version":"0.0.6"}