{"_id":"extended","_rev":"30138","name":"extended","description":"Library for combining multiple libraries into one","dist-tags":{"latest":"0.0.6"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"time":{"modified":"2021-06-03T10:04:48.000Z","created":"2013-01-16T21:24:38.272Z","0.0.6":"2014-04-01T18:00:48.768Z","0.0.5":"2013-06-05T05:41:12.808Z","0.0.4":"2013-04-16T15:57:30.343Z","0.0.3":"2013-01-22T06:16:44.186Z","0.0.2":"2013-01-17T04:03:35.237Z","0.0.1":"2013-01-16T21:24:38.272Z"},"users":{"rocket0191":true},"author":{"name":"Doug Martin"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/extended.git"},"versions":{"0.0.6":{"name":"extended","version":"0.0.6","description":"Library for combining multiple libraries into one","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/extended.git"},"keywords":["String","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/8..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extender":"~0.0.5"},"devDependencies":{"it":"~0.2.0","grunt":"~0.4.1","grunt-it":"~0.3.0","is-extended":"0.0.1","grunt-contrib-uglify":"~0.2.0","grunt-contrib-jshint":"~0.4.3"},"bugs":{"url":"https://github.com/doug-martin/extended/issues"},"homepage":"https://github.com/doug-martin/extended","_id":"extended@0.0.6","dist":{"shasum":"7fb8bf7b9dae397586e48570acfd642c78e50669","size":37498,"noattachment":false,"key":"/extended/-/extended-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/extended/download/extended-0.0.6.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1396375248768,"_cnpm_publish_time":1396375248768,"_hasShrinkwrap":false},"0.0.5":{"name":"extended","version":"0.0.5","description":"Library for combining multiple libraries into one","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/extended.git"},"keywords":["String","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":{"extender":"~0.0.5","grunt":"~0.4.1"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.0","is-extended":"0.0.1","grunt-contrib-uglify":"~0.2.0","grunt-contrib-jshint":"~0.4.3"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/doug-martin/extended/issues"},"_id":"extended@0.0.5","dist":{"shasum":"e59ee60331cfa4e10e65b6081bbf03d49ac147f3","size":31277,"noattachment":false,"key":"/extended/-/extended-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/extended/download/extended-0.0.5.tgz"},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1370410872808,"_cnpm_publish_time":1370410872808,"_hasShrinkwrap":false},"0.0.4":{"name":"extended","version":"0.0.4","description":"Library for combining multiple libraries into one","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/extended.git"},"keywords":["String","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":{"extender":"~0.0.5","grunt":"~0.4.1"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.0","is-extended":"0.0.1","grunt-contrib-uglify":"~0.2.0","grunt-contrib-jshint":"~0.4.3"},"readmeFilename":"README.md","_id":"extended@0.0.4","dist":{"shasum":"7fdff05382723a94329f08c283fc022b61142cfc","size":31186,"noattachment":false,"key":"/extended/-/extended-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/extended/download/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":1366127850343,"_cnpm_publish_time":1366127850343,"_hasShrinkwrap":false},"0.0.3":{"name":"extended","version":"0.0.3","description":"Additional string extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/extended.git"},"keywords":["String","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":{"extender":"~0.0.5"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.2.0","is-extended":"0.0.1"},"readmeFilename":"README.md","_id":"extended@0.0.3","dist":{"shasum":"88eae26708dde43667a11eaafc89cd701769802d","size":28097,"noattachment":false,"key":"/extended/-/extended-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/extended/download/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":1358835404186,"_cnpm_publish_time":1358835404186,"_hasShrinkwrap":false},"0.0.2":{"name":"extended","version":"0.0.2","description":"Additional string extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/extended.git"},"keywords":["String","extender","utilities"],"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extender":"0.0.4"},"devDependencies":{"it":"~0.1.0","grunt-it":"~0.2.0","is-extended":"0.0.1"},"readmeFilename":"README.md","_id":"extended@0.0.2","dist":{"shasum":"4de8bd66a2485bffd71c038d32e8de7f23bae09a","size":25244,"noattachment":false,"key":"/extended/-/extended-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/extended/download/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":1358395415237,"_cnpm_publish_time":1358395415237,"_hasShrinkwrap":false},"0.0.1":{"name":"extended","version":"0.0.1","description":"Additional string extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/extended.git"},"keywords":["String","extender","utilities"],"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extender":"0.0.4"},"devDependencies":{"it":"~0.1.0","grunt-it":"~0.2.0","is-extended":"0.0.1"},"readmeFilename":"README.md","_id":"extended@0.0.1","dist":{"shasum":"1c251bba88ef80384b06a0a188f4abe6e05f6c9c","size":15625,"noattachment":false,"key":"/extended/-/extended-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/extended/download/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":1358371478272,"_cnpm_publish_time":1358371478272,"_hasShrinkwrap":false}},"readme":"[![Build Status](https://travis-ci.org/doug-martin/extended.png?branch=master)](https://travis-ci.org/doug-martin/extended)\n\n[![browser support](https://ci.testling.com/doug-martin/extended.png)](https://ci.testling.com/doug-martin/extended)\n\n# extended\n\n`extended` is a wrapper than sits on top of [`extender`](https://github.com/doug-martin/extender) than allows you to combine multiple libraries into a single API.\n\nThis allows you create a feature rich API that only includes the functionality that you wish to have.\n\nExtended is also browser friendly so you can create a utility library that is reusable on both in node and the browser.\n\n## Why?\n\nOften times I end up using quite a few libraries in a single node project, `extended` allows you to seamlessly integrate libraries into a single interface.\n\nYou also get the added benefit of replacing libraries without having to change you code every place that they were required.\n\n\n## Installation\n\n```\nnpm install extended\n```\n\nOr [download the source](https://raw.github.com/doug-martin/extended/master/index.js) ([minified](https://raw.github.com/doug-martin/extended/master/extended.min.js))\n\n## Usage\n\n\n**`register`**\n\nThe register method allows you to register a library with extended.\n\nThe following example makes use of\n\n* [`array-extended`](https://github.com/doug-martin/array-extended)\n* [`string-extended`](https://github.com/doug-martin/string-extended)\n* [`date-extended`](https://github.com/doug-martin/date-extended)\n* [`function-extended`](https://github.com/doug-martin/function-extended)\n* [`is-extended`](https://github.com/doug-martin/is-extended)\n* [`object-extended`](https://github.com/doug-martin/object-extended)\n* [`promise-extended`](https://github.com/doug-martin/promise-extended)\n\n\n**Notice** how all the APIs are completely integrated together, so you can use the chaining API from each registered library in a single unified interface.\n\n```javascript\n\nvar _ = extended()\n            .register(require(\"array-extended\"))\n            .register(require(\"string-extended\"))\n            .register(require(\"date-extended\"))\n            .register(require(\"function-extended\"))\n            .register(require(\"is-extended\"))\n            .register(require(\"object-extended\"))\n            .register(require(\"promise-extended\"));\n\n//now use your API!\n\n//from is-extended\n_.isArray([]); //true\n\n//from string-extended\n_.format(\"{first} {last}\", {first : \"Bob\", last : \"yukon\"});\n\n//combination of object-extended, array-extended, and string-extended\n_({hello : \"hello\", world: \"world\"}).keys().map(function(key, index){\n    return _.format(\"%d key is %s\", index + 1, key);\n}).value().join(\";\"); //\"1 key is hello; 2 key is world\"\n\n\n```\n\nIf you want to namespace you API you can provide an alias.\n\n\n\n```javascript\n\nvar _ = extended()\n            .register(\"array\", require(\"array-extended\"))\n            .register(\"string\", require(\"string-extended\"))\n            .register(\"date\", require(\"date-extended\"))\n            .register(\"fn\", require(\"function-extended\"))\n            .register(\"is\", require(\"is-extended\"))\n            .register(\"obj\", require(\"object-extended\"))\n            .register(\"promise\", require(\"promise-extended\"));\n\n//now use your API!\n\n//from is-extended\n_.is.isArray([]); //true\n\n//from string-extended\n_.string.format(\"{first} {last}\", {first : \"Bob\", last : \"yukon\"});\n\n```\n\n### Integration with other libraries.\n\nYou can also integrate other libraries by just mixing in their functions.\n\nSuppose you dont want to use `promise-extended` but instead `Q`.\n\n```javascript\nvar _ = extended()\n            .register(require(\"array-extended\"))\n            .register(require(\"string-extended\"))\n            .register(require(\"date-extended\"))\n            .register(require(\"function-extended\"))\n            .register(require(\"is-extended\"))\n            .register(require(\"object-extended\"))\n            .register(require(\"q\"));\n\n_.resolve(\"hello\").then(function(hello){\n    console.log(\"hello\");\n})\n```\n\nOr maybe you want to continue to use `underscore` with added functionality.\n\n```javascript\n\n//lets create a library with _, promises and an inheritance library.\nvar _ = extended()\n            .register(require(\"_\"))\n            .register(require(\"is-extended\"))\n            .register(require(\"promise-extended\"))\n            .register(require(\"declare.js\"));\n\nvar Person = _.declare({\n    constructor: function(firstName, lastName){\n        this.firstName = firstName;\n        this.lastName = lastName;\n    }\n});\n\nvar\n\n```\n\n\n\n\n\n\n","_attachments":{},"homepage":"https://github.com/doug-martin/extended","bugs":{"url":"https://github.com/doug-martin/extended/issues"},"license":"MIT"}