diff --git a/README.md b/README.md index 5d8e957..575b6ae 100755 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ [![Build Status](https://travis-ci.org/Wizcorp/node-tomes.png)](https://travis-ci.org/Wizcorp/node-tomes) Tomes -========= +===== *Evented Storage Agnostic Data API* +![Tomes Logo](https://raw.github.com/bjornstar/tomes/master/logo/tomes-logo-small.png) + Problem: You've got data and you want to do something whenever it changes. Access and modify your data through the Tomes API and you'll get change events. diff --git a/component.json b/component.json index 555f128..0f673a2 100644 --- a/component.json +++ b/component.json @@ -2,7 +2,7 @@ "name": "tomes", "repo": "bjornstar/tomes", "description": "Evented Storage Agnostic Data API", - "version": "0.0.14", + "version": "0.0.16", "keywords": [ "data", "events" ], "dependencies": { "component/emitter": "*" diff --git a/logo/tomes-logo-big.png b/logo/tomes-logo-big.png new file mode 100755 index 0000000..d23a362 Binary files /dev/null and b/logo/tomes-logo-big.png differ diff --git a/logo/tomes-logo-less-big.png b/logo/tomes-logo-less-big.png new file mode 100755 index 0000000..395ea46 Binary files /dev/null and b/logo/tomes-logo-less-big.png differ diff --git a/logo/tomes-logo-medium.png b/logo/tomes-logo-medium.png new file mode 100755 index 0000000..e515404 Binary files /dev/null and b/logo/tomes-logo-medium.png differ diff --git a/logo/tomes-logo-small.png b/logo/tomes-logo-small.png new file mode 100755 index 0000000..e0935a2 Binary files /dev/null and b/logo/tomes-logo-small.png differ diff --git a/package.json b/package.json index 7d78b9c..020d585 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tomes", "description": "Evented Storage Agnostic Data API", - "version": "0.0.14", + "version": "0.0.16", "author": "Wizcorp, Inc. ", "maintainers": [ { "name": "Bjorn Stromberg", "email": "bstromberg@wizcorp.jp" } diff --git a/scripts/jshint.cfg b/scripts/jshint.cfg index 7203c60..3f7c749 100644 --- a/scripts/jshint.cfg +++ b/scripts/jshint.cfg @@ -26,7 +26,6 @@ // ECMAScript 5. - "es5" : true, // Allow ECMAScript 5 syntax. "strict" : false, // Require `use strict` pragma in every file. "globalstrict" : true, // Allow global "use strict" (also enables 'strict'). diff --git a/test/modules/array.js b/test/modules/array.js index 06c996a..257e397 100755 --- a/test/modules/array.js +++ b/test/modules/array.js @@ -1095,5 +1095,21 @@ exports.testSplice = function (test) { test.strictEqual(JSON.stringify(a), JSON.stringify(b)); + test.done(); +}; + +exports.testSpliceKeys = function (test) { + test.expect(5); + + var a = [ 0, 1, 2, 3, 4, 5 ]; + var b = Tome.conjure(a); + + a.splice(0, 1); + b.splice(0, 1); + + for (var i = 0; i < b.length; i += 1) { + test.strictEqual(i, b[i].getKey()); + } + test.done(); }; \ No newline at end of file diff --git a/tomes.js b/tomes.js index 917522e..17d1bc0 100755 --- a/tomes.js +++ b/tomes.js @@ -1259,6 +1259,7 @@ ArrayTome.prototype.splice = function (spliceIndex, toRemove) { for (i = 0, len = this._arr.length; i < len; i += 1) { this[i] = this._arr[i]; + this[i].__key__ = i; } if (out.length > toAdd.length) {