diff --git a/dist/underscore.db.js b/dist/underscore.db.js index 15b619f..9ca6a1f 100644 --- a/dist/underscore.db.js +++ b/dist/underscore.db.js @@ -10,6 +10,8 @@ index.load = function(source) { source = source || 'db'; return JSON.parse(localStorage.getItem(source)); }; + +_.mixin(index); },{"./":2}],2:[function(require,module,exports){ // Set an empty reference to _ var _; diff --git a/dist/underscore.db.min.js b/dist/underscore.db.min.js index f77053f..35bc475 100644 --- a/dist/underscore.db.min.js +++ b/dist/underscore.db.min.js @@ -1,2 +1,2 @@ /*! underscore.db 0.5.0 */ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,c)}function d(a,b){n.each(b,function(b,c){a[c]=b})}function e(a,b){var c=n.indexOf(a,b);-1!=c&&a.splice(c,1)}function f(a,b){return n.find(a,function(a){return a.id===b})}function g(){return c()}function h(a,b){var c=n.clone(b);return c.hasOwnProperty("id")||(c.id=n.createId(a,b)),a.push(c),c}function i(a,b,c){var e=f(a,b);return e&&d(e,c),e}function j(a,b,c){var e=n.where(a,b);return e.forEach(function(a){d(a,c)}),e}function k(a,b){var c=f(a,b);return e(a,c),c}function l(a,b){var c=n.where(a,b);return c.forEach(function(b){e(a,b)}),c}function m(a){n=a}var n;b.exports={set_:m,get:f,createId:g,insert:h,update:i,updateWhere:j,remove:k,removeWhere:l}},{}]},{},[1]); \ No newline at end of file +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,c)}function d(a,b){n.each(b,function(b,c){a[c]=b})}function e(a,b){var c=n.indexOf(a,b);-1!=c&&a.splice(c,1)}function f(a,b){return n.find(a,function(a){return a.id===b})}function g(){return c()}function h(a,b){var c=n.clone(b);return c.hasOwnProperty("id")||(c.id=n.createId(a,b)),a.push(c),c}function i(a,b,c){var e=f(a,b);return e&&d(e,c),e}function j(a,b,c){var e=n.where(a,b);return e.forEach(function(a){d(a,c)}),e}function k(a,b){var c=f(a,b);return e(a,c),c}function l(a,b){var c=n.where(a,b);return c.forEach(function(b){e(a,b)}),c}function m(a){n=a}var n;b.exports={set_:m,get:f,createId:g,insert:h,update:i,updateWhere:j,remove:k,removeWhere:l}},{}]},{},[1]); \ No newline at end of file diff --git a/src/browser.js b/src/browser.js index e35d426..1947de9 100644 --- a/src/browser.js +++ b/src/browser.js @@ -8,4 +8,6 @@ index.save = function(db, destination) { index.load = function(source) { source = source || 'db'; return JSON.parse(localStorage.getItem(source)); -}; \ No newline at end of file +}; + +_.mixin(index); \ No newline at end of file