{"_id":"taffydb","_rev":"334836","name":"taffydb","description":"TaffyDB is an opensouce library that brings database features into your JavaScript applications.","dist-tags":{"jsdoc-961":"2.6.2","latest":"2.7.3"},"maintainers":[{"name":"biastoact","email":"ian@bodytitle.com"},{"name":"chambery","email":"todd.chambery@gmail.com"},{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},{"name":"mikem","email":"mike.mikowski@gmail.com"}],"time":{"modified":"2021-06-08T13:15:16.000Z","created":"2011-11-06T16:55:30.152Z","2.7.3":"2016-09-18T17:48:14.430Z","2.6.2":"2016-09-02T16:06:12.792Z","2.7.2":"2013-03-15T04:28:37.330Z","0.0.1":"2011-11-06T16:55:30.152Z"},"users":{"ghettovoice":true,"wstowersguestdna":true,"josecage":true,"heartnett":true,"thonatos":true,"icodeforcookies":true,"oleg_tsyba":true},"author":{"name":"Ian Smith"},"repository":{"type":"git","url":"git://github.com/typicaljoe/taffydb.git"},"versions":{"2.7.3":{"name":"taffydb","version":"2.7.3","description":"TaffyDB is an opensouce library that brings database features into your JavaScript applications.","keywords":["database","browser","json","collection","records","node","nodejs"],"main":"taffy.js","scripts":{"test":"nodeunit test/t.js"},"repository":{"type":"git","url":"git://github.com/typicaljoe/taffydb.git"},"author":{"name":"Ian Smith"},"contributors":[{"name":"Ian Smith"},{"name":"Todd Chambery","email":"todd.chambery@gmail.com"},{"name":"Daniel Ruf","email":"kontakt@daniel-ruf.de"},{"name":"Michael Mikowski","email":"mike.mikowski@gmail.com"},{"name":"Matthew Chase Whittemore","email":"mcwhittemore@gmail.com"}],"license":"BSD-2-Clause","bugs":{"url":"https://github.com/typicaljoe/taffydb/issues"},"homepage":"http://www.taffydb.com","dependencies":{},"devDependencies":{"jslint":"^0.9.3","nodeunit":"^0.9.1","nodeunit-b":"^4.0.0","node-inspector":"^0.12.5","uglifyjs":"^2.4.10"},"gitHead":"c88fd85462f4aa495064f39c4dd7af3131304151","_id":"taffydb@2.7.3","_shasum":"2ad37169629498fca5bc84243096d3cde0ec3a34","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"mikem","email":"mike.mikowski@gmail.com"},"dist":{"shasum":"2ad37169629498fca5bc84243096d3cde0ec3a34","size":24660,"noattachment":false,"key":"/taffydb/-/taffydb-2.7.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/taffydb/download/taffydb-2.7.3.tgz"},"maintainers":[{"name":"biastoact","email":"ian@bodytitle.com"},{"name":"chambery","email":"todd.chambery@gmail.com"},{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},{"name":"mikem","email":"mike.mikowski@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/taffydb-2.7.3.tgz_1474220891179_0.23429885576479137"},"directories":{},"publish_time":1474220894430,"_cnpm_publish_time":1474220894430,"_hasShrinkwrap":false},"2.6.2":{"author":{"name":"Ian Smith"},"contributors":[{"name":"Ian Smith"},{"name":"Todd Chambery","email":"todd.chambery@gmail.com"},{"name":"Daniel Ruf","email":"kontakt@daniel-ruf.de"},{"name":"Michael Mikowski","email":"mmikowski@snaplogic.com"},{"name":"Matthew Chase Whittemore","email":"mcwhittemore@gmail.com"}],"name":"taffydb","main":"./taffy","description":"TaffyDB is an opensouce library that brings database features into your JavaScript applications.","version":"2.6.2","homepage":"http://taffydb.com/","repository":{"type":"git","url":"git://github.com/typicaljoe/taffydb.git"},"dependencies":{},"devDependencies":{},"maintainers":[{"name":"biastoact","email":"ian@bodytitle.com"},{"name":"chambery","email":"todd.chambery@gmail.com"},{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},{"name":"mikem","email":"mike.mikowski@gmail.com"}],"gitHead":"f8c22bc79a7a24a3943247f9000f7b98e72a40dd","bugs":{"url":"https://github.com/typicaljoe/taffydb/issues"},"_id":"taffydb@2.6.2","scripts":{},"_shasum":"7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268","_from":".","_npmVersion":"2.15.3","_nodeVersion":"4.2.2","_npmUser":{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},"dist":{"shasum":"7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268","size":15171,"noattachment":false,"key":"/taffydb/-/taffydb-2.6.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/taffydb/download/taffydb-2.6.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/taffydb-2.6.2.tgz_1472832370547_0.01977554289624095"},"directories":{},"publish_time":1472832372792,"_cnpm_publish_time":1472832372792,"_hasShrinkwrap":false},"2.7.2":{"author":{"name":"Ian Smith"},"contributors":[{"name":"Ian Smith"},{"name":"Todd Chambery","email":"todd.chambery@gmail.com"},{"name":"Daniel Ruf","email":"kontakt@daniel-ruf.de"},{"name":"Michael Mikowski","email":"mmikowski@snaplogic.com"},{"name":"Matthew Chase Whittemore","email":"mcwhittemore@gmail.com"}],"name":"taffydb","main":"./taffy","description":"TaffyDB is an opensouce library that brings database features into your JavaScript applications.","version":"2.7.2","homepage":"http://taffydb.com/","repository":{"type":"git","url":"git://github.com/typicaljoe/taffydb.git"},"dependencies":{},"devDependencies":{},"readmeFilename":"README.md","_id":"taffydb@2.7.2","dist":{"shasum":"7bf8106a5c1a48251b3e3bc0a0e1732489fd0dc8","size":23918,"noattachment":false,"key":"/taffydb/-/taffydb-2.7.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/taffydb/download/taffydb-2.7.2.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},"maintainers":[{"name":"biastoact","email":"ian@bodytitle.com"},{"name":"chambery","email":"todd.chambery@gmail.com"},{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},{"name":"mikem","email":"mike.mikowski@gmail.com"}],"directories":{},"publish_time":1363321717330,"_cnpm_publish_time":1363321717330,"_hasShrinkwrap":false},"0.0.1":{"author":{"name":"Ian Smith"},"name":"taffydb","description":"TaffyDB is an opensouce library that brings database features into your JavaScript applications.","version":"0.0.1","directories":{"lib":"./lib"},"homepage":"http://taffydb.com/","repository":{"type":"git","url":"git://github.com/typicaljoe/taffydb.git"},"engines":{"node":"~0.4.12"},"dependencies":{},"devDependencies":{},"main":"index.js","_npmUser":{"name":"chambery","email":"todd.chambery@gmail.com"},"_id":"taffydb@0.0.1","_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"0f8ef45574f54ac34ad99deb9ee803fc1413c55b","size":30720,"noattachment":false,"key":"/taffydb/-/taffydb-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/taffydb/download/taffydb-0.0.1.tgz"},"maintainers":[{"name":"biastoact","email":"ian@bodytitle.com"},{"name":"chambery","email":"todd.chambery@gmail.com"},{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},{"name":"mikem","email":"mike.mikowski@gmail.com"}],"publish_time":1320598530152,"_cnpm_publish_time":1320598530152,"_hasShrinkwrap":false}},"readme":"# TaffyDB (taffy.js)\n\nTaffyDB is an open source JavaScript library that provides powerful\nin-memory database capabilities to both browser and server applications.\n\n## Introduction\n\nHave you ever noticed how JavaScript object literals look a lot like\nrecords? And that if you wrap a group of them up in an array you have\nsomething that looks a lot like a database table?  We did too. \nWe created TaffyDB easily and efficiently manipulate these 'tables'  \nwith a uniform and familiar SQL-like interface.\n\nWe use TaffyDB instead of ad-hoc data manipulation routines throughout \nour applications. This reduces development time, improves performance,\nsimplifies maintenance, *and* increases quality.\n\nPlease see the [official website](http://www.taffydb.com) for more \ncomplete documentation.\n\n## What makes it sticky\n\n - Extremely fast\n - Powerful JavaScript-centric data selection engine\n - SQL inspired features such as insert, update, unique, count, and more\n - Robust cross browser support \n - Easily extended with your own functions\n - Compatible with any DOM library (jQuery, YUI, Dojo, etc)\n\nTaffyDB is compatible with all modern browsers: IE9+, FF3+, Safari 5+, \nand Chrome 1.0+.  It also works in NodeJS 0.10+.\n\n## Create a DB\nJust pass in a JSON array:\n\n```js\nvar product_db = TAFFY([\n  { \"item\"  : 1,\n    \"name\"  : \"Blue Ray Player\",\n    \"price\" : 99.99\n  },\n  { \"item\"  : 2,\n    \"name\"  : \"3D TV\",\n    \"price\" : 1799.99\n  }\n]);\n```\n\n## Example queries\n\n```js\n// where item is equal to 1\nvar item1 = products({item:1});\n\n// where price is less than 100\nvar lowPricedItems = products({price:{lt:100}});\n\n// where name is like \"Blue Ray\"\nvar blueRayPlayers = products({name:{like:\"Blue Ray\"}});\n\n// get first record\nproducts().first();\n\n// get last record\nproducts().last();\n```\n\n## Example record manipulation\n\n```js\n// update the price of the Blue Ray Player to 89.99\nproducts({item:1}).update({price:89.99});\n\n// loop over the records and call a function\nproducts().each(function (r) {alert(r.name)});\n\n// sort the records by price descending\nproducts.sort(\"price desc\");\n\n// select only the item names into an array\nproducts().select(\"name\"); // returns [\"3D TV\",\"Blue Ray Player\"]\n\n// Inject values from a record into a string template.\n// Row value will be set to \"<tr><td>3D TV</td><td>17999.99</td></tr>\"\nvar row = products({item:2})\n  .supplant(\"<tr><td>{name}</td><td>{price}</td></tr>\");\n```\n\n## Use it in Node.JS\nNode is easy to use in Node.JS.  Simply install using `npm` and `require` the\npackage:\n\n```js\n$ npm install --production taffy\n\n# and then in your code\nTAFFY = require( 'taffy' ).taffy;\n```\n\nThe automated regression test file `nodeunit_suite.js` is an excellent\nexample.\n\n## Help improve taffydb\n\nTaffyDB has been used and refined for years for numerous production tools and\ncommercial products.  It is therefore is quite stable and reliable.  However,\nwe want expand our regression test coverage so we can easily improve the code\nwith the confidence that we are unlikely to break exising capabilities.\n\n### Getting started with development\n\nRun the `install_dev.sh` script to install development utilities such as `jslint`,\n`nodeunit`, and `uglifyjs` to the `bin` directory.\n\n```js\n./install_dev.sh\n```\n\n\n### Running regression tests\nRunning the nodeunit regression test suite is simple:\n\n```js\ncd taffydb\n./install_dev.sh # as above\n\nbin/nodeunit ./nodeunit_suite.js\n```\n\nPlease do not send a pull request unless your changes have passed these\ntests.  We check, you know :)\n\n### Adding to regression tests\nWe wish to substantially expand the number of tests, and your\nhelp is welcome!  The code, `nodeunit_suite.js`, should be easy to adjust.\nPull requests that include regression test inclusions are very much\nappreciated.  Alternately, if you just send along a test scenario, we'd be\nhappy to include it in the suite, time permitting.\n\n## Documentation, support, updates\nView more docs and examples, get support, and get notified of updates:\n\nWeb: http://taffydb.com\nTwitter: http://twitter.com/biastoact \n\n## Software License Agreement (BSD License)\nCopyright (c)\nAll rights reserved.\n\n\nRedistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following condition is met:\n\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_attachments":{},"homepage":"http://www.taffydb.com","bugs":{"url":"https://github.com/typicaljoe/taffydb/issues"},"license":"BSD-2-Clause"}