itemsholdr
Advanced tools
Comparing version 0.7.6 to 0.7.7
@@ -1,551 +0,1 @@ | ||
define(function() { return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) { | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ i: moduleId, | ||
/******/ l: false, | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Flag the module as loaded | ||
/******/ module.l = true; | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/******/ | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ | ||
/******/ // define getter function for harmony exports | ||
/******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ if(!__webpack_require__.o(exports, name)) { | ||
/******/ Object.defineProperty(exports, name, { | ||
/******/ configurable: false, | ||
/******/ enumerable: true, | ||
/******/ get: getter | ||
/******/ }); | ||
/******/ } | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
/******/ __webpack_require__.n = function(module) { | ||
/******/ var getter = module && module.__esModule ? | ||
/******/ function getDefault() { return module['default']; } : | ||
/******/ function getModuleExports() { return module; }; | ||
/******/ __webpack_require__.d(getter, 'a', getter); | ||
/******/ return getter; | ||
/******/ }; | ||
/******/ | ||
/******/ // Object.prototype.hasOwnProperty.call | ||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; | ||
/******/ | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 2); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Creates a basic implementation of the Storage API. | ||
* | ||
* @returns Basic Storage object. | ||
*/ | ||
exports.createStorage = function () { | ||
var output = { | ||
clear: function () { | ||
for (var i in output) { | ||
if ({}.hasOwnProperty.call(output, i)) { | ||
delete output[i]; | ||
} | ||
} | ||
}, | ||
getItem: function (key) { return output[key]; }, | ||
key: function (index) { return output.keys[index]; }, | ||
get keys() { | ||
return Object.keys(output); | ||
}, | ||
get length() { | ||
return output.keys.length; | ||
}, | ||
removeItem: function (key) { | ||
delete output[key]; | ||
}, | ||
setItem: function (key, value) { | ||
output[key] = value; | ||
}, | ||
}; | ||
return output; | ||
}; | ||
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), | ||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); | ||
/***/ }), | ||
/* 1 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Proliferates all members of the donor to the recipient recursively, as | ||
* a deep copy. | ||
* | ||
* @param recipient An object receiving the donor's members. | ||
* @param donor An object whose members are copied to recipient. | ||
* @param noOverride Whether recipient properties may be overriden (by default, false). | ||
* @returns The recipient, which should have the donor proliferated onto it. | ||
*/ | ||
exports.proliferate = function (recipient, donor, noOverride) { | ||
// For each attribute of the donor: | ||
for (var i in donor) { | ||
if (!donor.hasOwnProperty(i)) { | ||
continue; | ||
} | ||
// If noOverride, don't override already existing properties | ||
if (noOverride && recipient.hasOwnProperty(i)) { | ||
continue; | ||
} | ||
// If it's an object, recurse on a new version of it | ||
var setting = donor[i]; | ||
if (typeof setting === "object") { | ||
if (!recipient.hasOwnProperty(i)) { | ||
recipient[i] = new setting.constructor(); | ||
} | ||
exports.proliferate(recipient[i], setting, noOverride); | ||
} | ||
else { | ||
// Regular primitives are easy to copy otherwise | ||
recipient[i] = setting; | ||
} | ||
} | ||
return recipient; | ||
}; | ||
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), | ||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(0), __webpack_require__(3), __webpack_require__(1)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, createStorage_1, ItemsHoldr_1, proliferate_1) { | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(createStorage_1); | ||
__export(ItemsHoldr_1); | ||
__export(proliferate_1); | ||
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), | ||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); | ||
/***/ }), | ||
/* 3 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(0), __webpack_require__(4)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, createStorage_1, ItemContainer_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Cache-based wrapper around localStorage. | ||
* | ||
* @template TItems Items names linked to their types. | ||
*/ | ||
var ItemsHoldr = /** @class */ (function () { | ||
/** | ||
* Initializes a new instance of the ItemsHoldr class. | ||
* | ||
* @param settings Any optional custom settings. | ||
*/ | ||
function ItemsHoldr(settings) { | ||
if (settings === void 0) { settings = {}; } | ||
this.settings = settings; | ||
this.autoSave = !!settings.autoSave; | ||
this.items = {}; | ||
this.itemKeys = []; | ||
this.prefix = settings.prefix || ""; | ||
this.values = this.settings.values || {}; | ||
if (settings.storage) { | ||
this.storage = settings.storage; | ||
} | ||
else if (typeof localStorage === "undefined") { | ||
this.storage = createStorage_1.createStorage(); | ||
} | ||
else { | ||
this.storage = localStorage; | ||
} | ||
this.containerSettings = { | ||
autoSave: this.autoSave, | ||
defaults: this.settings.defaults || {}, | ||
prefix: this.prefix, | ||
storage: this.storage, | ||
}; | ||
} | ||
Object.defineProperty(ItemsHoldr.prototype, "length", { | ||
/** | ||
* How many items are being stored. | ||
*/ | ||
get: function () { | ||
return this.itemKeys.length; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* Gets the key at an index. | ||
* | ||
* @param index An index for a key. | ||
* @returns The indexed key. | ||
*/ | ||
ItemsHoldr.prototype.key = function (index) { | ||
return this.itemKeys[index]; | ||
}; | ||
/** | ||
* Gets whether autoSave is enabled. | ||
* | ||
* @returns Whether autoSave is enabled. | ||
*/ | ||
ItemsHoldr.prototype.getAutoSave = function () { | ||
return this.autoSave; | ||
}; | ||
/** | ||
* Sets whether autoSave is enabled. | ||
* | ||
* @param autoSave Whether autoSave is enabled. | ||
*/ | ||
ItemsHoldr.prototype.setAutoSave = function (autoSave) { | ||
this.autoSave = autoSave; | ||
}; | ||
/** | ||
* Creates a new item with settings. | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key Unique key to store the item under. | ||
* @param settings Any additional settings for the item. | ||
*/ | ||
ItemsHoldr.prototype.addItem = function (key, settings) { | ||
this.items[key] = new ItemContainer_1.ItemContainer(this.containerSettings, key, settings); | ||
this.itemKeys.push(key); | ||
}; | ||
/** | ||
* Gets the value under a key. | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key The key for a known value. | ||
* @returns The known value of a key, assuming that key exists. | ||
*/ | ||
ItemsHoldr.prototype.getItem = function (key) { | ||
this.checkExistence(key); | ||
return this.items[key].getValue(); | ||
}; | ||
/** | ||
* Clears a value from the listing, and removes its element from the | ||
* container (if they both exist). | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key The key of the element to remove. | ||
*/ | ||
ItemsHoldr.prototype.removeItem = function (key) { | ||
if (!{}.hasOwnProperty.call(this.items, key)) { | ||
return; | ||
} | ||
this.itemKeys.splice(this.itemKeys.indexOf(key), 1); | ||
delete this.items[key]; | ||
this.storage.removeItem("" + this.prefix + key); | ||
if ({}.hasOwnProperty.call(this.values, key)) { | ||
this.addItem(key, this.values[key]); | ||
} | ||
}; | ||
/** | ||
* Sets the value for an item under the given key. | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key Key of an item. | ||
* @param value The new value for the item. | ||
*/ | ||
ItemsHoldr.prototype.setItem = function (key, value) { | ||
this.checkExistence(key); | ||
this.items[key].setValue(value); | ||
}; | ||
/** | ||
* Increases the value of an item as a number or string. | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key Key of an item. | ||
* @param amount Amount to increase by (by default, 1). | ||
*/ | ||
ItemsHoldr.prototype.increase = function (key, amount) { | ||
if (amount === void 0) { amount = 1; } | ||
this.checkExistence(key); | ||
// tslint:disable-next-line restrict-plus-operands | ||
var value = this.items[key].getValue() + amount; | ||
this.items[key].setValue(value); | ||
}; | ||
/** | ||
* Decreases the value of an item as a number | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key Key of an item. | ||
* @param amount Amount to decrease by (by default, 1). | ||
*/ | ||
ItemsHoldr.prototype.decrease = function (key, amount) { | ||
if (amount === void 0) { amount = 1; } | ||
this.checkExistence(key); | ||
var value = this.items[key].getValue() - amount; | ||
this.items[key].setValue(value); | ||
}; | ||
/** | ||
* Toggles whether an item is true or false. | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key Key of an item. | ||
*/ | ||
ItemsHoldr.prototype.toggle = function (key) { | ||
this.checkExistence(key); | ||
var value = this.items[key].getValue() ? false : true; | ||
this.items[key].setValue(value); | ||
}; | ||
/** | ||
* Gets whether an item exists under the key. | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key Key of an item. | ||
* @returns Whether there is a value under that key. | ||
*/ | ||
ItemsHoldr.prototype.hasKey = function (key) { | ||
return {}.hasOwnProperty.call(this.items, key); | ||
}; | ||
/** | ||
* Gets a summary of keys and their values. | ||
* | ||
* @returns A mapping of key to their stored values. | ||
*/ | ||
ItemsHoldr.prototype.exportItems = function () { | ||
var output = {}; | ||
for (var _i = 0, _a = this.itemKeys; _i < _a.length; _i++) { | ||
var itemKey = _a[_i]; | ||
output[itemKey] = this.items[itemKey].getValue(); | ||
} | ||
return output; | ||
}; | ||
/** | ||
* Completely clears all items. | ||
*/ | ||
ItemsHoldr.prototype.clear = function () { | ||
for (var _i = 0, _a = this.itemKeys; _i < _a.length; _i++) { | ||
var key = _a[_i]; | ||
this.storage.removeItem("" + this.prefix + key); | ||
} | ||
this.items = {}; | ||
this.itemKeys = []; | ||
for (var key in this.values) { | ||
if ({}.hasOwnProperty.call(this.values, key)) { | ||
this.addItem(key, this.values[key]); | ||
} | ||
} | ||
}; | ||
/** | ||
* Manually saves an item's value to storage, ignoring autoSave settings. | ||
* | ||
* @template TKey Key name of an item. | ||
* @param key The key of the item to save. | ||
*/ | ||
ItemsHoldr.prototype.saveItem = function (key) { | ||
if (!{}.hasOwnProperty.call(this.items, key)) { | ||
throw new Error("Unknown key given to ItemsHoldr: '" + key + "'."); | ||
} | ||
this.items[key].updateStorage(true); | ||
}; | ||
/** | ||
* Manually saves all items to storage, ignoring autoSave settings. | ||
*/ | ||
ItemsHoldr.prototype.saveAll = function () { | ||
for (var key in this.items) { | ||
this.items[key].updateStorage(true); | ||
} | ||
}; | ||
/** | ||
* Ensures a key exists in values. If it doesn't, and new values are | ||
* allowed, it creates it; otherwise, it throws an Error. | ||
* | ||
* @param key | ||
*/ | ||
ItemsHoldr.prototype.checkExistence = function (key) { | ||
if (!{}.hasOwnProperty.call(this.items, key)) { | ||
this.addItem(key, this.values[key]); | ||
} | ||
}; | ||
return ItemsHoldr; | ||
}()); | ||
exports.ItemsHoldr = ItemsHoldr; | ||
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), | ||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); | ||
/***/ }), | ||
/* 4 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(1)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, proliferate_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Storage container for a single ItemsHoldr value. | ||
*/ | ||
var ItemContainer = /** @class */ (function () { | ||
/** | ||
* Creates a new ItemValue with the given key and settings. Defaults are given | ||
* to the value via proliferate before the settings. | ||
* | ||
* @param itemsHolder The container for this value. | ||
* @param key The key to reference this new ItemValue by. | ||
* @param item Any custom settings for the value. | ||
*/ | ||
function ItemContainer(settings, key, item) { | ||
if (item === void 0) { item = {}; } | ||
this.settings = settings; | ||
proliferate_1.proliferate(this, settings.defaults); | ||
proliferate_1.proliferate(this, item); | ||
this.key = key; | ||
if (!this.hasOwnProperty("value")) { | ||
this.value = this.valueDefault; | ||
} | ||
// If there exists an old version of this property, get it | ||
if ({}.hasOwnProperty.call(settings.storage, settings.prefix + key)) { | ||
this.value = this.retrieveLocalStorage(); | ||
this.update(); | ||
} | ||
else { | ||
// Otherwise save the new version to memory | ||
this.updateStorage(); | ||
} | ||
} | ||
/** | ||
* Gets the stored value. | ||
* | ||
* @returns The value being stored. | ||
*/ | ||
ItemContainer.prototype.getValue = function () { | ||
return this.value; | ||
}; | ||
/** | ||
* Sets the value being stored. | ||
* | ||
* @param value New value to store. | ||
*/ | ||
ItemContainer.prototype.setValue = function (value) { | ||
this.value = value; | ||
this.update(); | ||
}; | ||
/** | ||
* General update Function to be run whenever the internal value is changed. | ||
*/ | ||
ItemContainer.prototype.update = function () { | ||
// Mins and maxes must be obeyed before any other considerations | ||
if (this.hasOwnProperty("minimum") && Number(this.value) <= Number(this.minimum)) { | ||
this.value = this.minimum; | ||
if (this.onMinimum !== undefined) { | ||
this.onMinimum(); | ||
} | ||
} | ||
else if (this.hasOwnProperty("maximum") && Number(this.value) <= Number(this.maximum)) { | ||
this.value = this.maximum; | ||
if (this.onMaximum !== undefined) { | ||
this.onMaximum(); | ||
} | ||
} | ||
if (this.modularity) { | ||
this.checkModularity(); | ||
} | ||
if (this.triggers) { | ||
this.checkTriggers(); | ||
} | ||
this.updateStorage(); | ||
}; | ||
/** | ||
* Stores a ItemValue's value in localStorage under the prefix plus its key. | ||
* | ||
* @param overrideAutoSave Whether the policy on saving should be | ||
* ignored (so saving happens regardless). By | ||
* default, false. | ||
*/ | ||
ItemContainer.prototype.updateStorage = function (overrideAutoSave) { | ||
if (overrideAutoSave || this.settings.autoSave) { | ||
this.settings.storage.setItem(this.settings.prefix + this.key, JSON.stringify(this.value)); | ||
} | ||
}; | ||
/** | ||
* Checks if the current value should trigger a callback, and if so calls it. | ||
*/ | ||
ItemContainer.prototype.checkTriggers = function () { | ||
if (this.triggers.hasOwnProperty(this.value)) { | ||
this.triggers[this.value](this.value); | ||
} | ||
}; | ||
/** | ||
* Checks if the current value is greater than the modularity (assuming | ||
* modular is a non-zero Numbers), and if so, continuously reduces value and | ||
* calls this.onModular. | ||
*/ | ||
ItemContainer.prototype.checkModularity = function () { | ||
if (typeof this.value !== "number" || !this.modularity) { | ||
return; | ||
} | ||
while (this.value >= this.modularity) { | ||
this.value = Math.max(0, this.value - this.modularity); | ||
if (this.onModular) { | ||
this.onModular(); | ||
} | ||
} | ||
}; | ||
/** | ||
* Retrieves a ItemValue's value from localStorage, making sure not to try to | ||
* JSON.parse an undefined or null value. | ||
*/ | ||
ItemContainer.prototype.retrieveLocalStorage = function () { | ||
var value = this.settings.storage.getItem(this.settings.prefix + this.key); | ||
if (value === undefined || value === "undefined") { | ||
return undefined; | ||
} | ||
if (typeof value !== "string") { | ||
return value; | ||
} | ||
return JSON.parse(value); | ||
}; | ||
return ItemContainer; | ||
}()); | ||
exports.ItemContainer = ItemContainer; | ||
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), | ||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); | ||
/***/ }) | ||
/******/ ])});; | ||
define(function(){return function(t){var e={};function i(s){if(e[s])return e[s].exports;var r=e[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=4)}([function(t,e,i){var s;void 0===(s=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.proliferate=function(t,i,s){for(var r in i)if(i.hasOwnProperty(r)&&(!s||!t.hasOwnProperty(r))){var o=i[r];"object"==typeof o?(t.hasOwnProperty(r)||(t[r]=new o.constructor),e.proliferate(t[r],o,s)):t[r]=o}return t}}.apply(e,[i,e]))||(t.exports=s)},function(t,e,i){var s;void 0===(s=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createStorage=function(){var t={clear:function(){for(var e in t)({}).hasOwnProperty.call(t,e)&&delete t[e]},getItem:function(e){return t[e]},key:function(e){return t.keys[e]},get keys(){return Object.keys(t)},get length(){return t.keys.length},removeItem:function(e){delete t[e]},setItem:function(e,i){t[e]=i}};return t}}.apply(e,[i,e]))||(t.exports=s)},function(t,e,i){var s,r;s=[i,e,i(0)],void 0===(r=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e,s){void 0===s&&(s={}),this.settings=t,i.proliferate(this,t.defaults),i.proliferate(this,s),this.key=e,this.hasOwnProperty("value")||(this.value=this.valueDefault),!{}.hasOwnProperty.call(t.storage,t.prefix+e)?this.updateStorage():(this.value=this.retrieveLocalStorage(),this.update())}return t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(t){this.value=t,this.update()},t.prototype.update=function(){this.hasOwnProperty("minimum")&&Number(this.value)<=Number(this.minimum)?(this.value=this.minimum,void 0!==this.onMinimum&&this.onMinimum()):this.hasOwnProperty("maximum")&&Number(this.value)<=Number(this.maximum)&&(this.value=this.maximum,void 0!==this.onMaximum&&this.onMaximum()),this.modularity&&this.checkModularity(),this.triggers&&this.checkTriggers(),this.updateStorage()},t.prototype.updateStorage=function(t){(t||this.settings.autoSave)&&this.settings.storage.setItem(this.settings.prefix+this.key,JSON.stringify(this.value))},t.prototype.checkTriggers=function(){this.triggers.hasOwnProperty(this.value)&&this.triggers[this.value](this.value)},t.prototype.checkModularity=function(){if("number"==typeof this.value&&this.modularity)for(;this.value>=this.modularity;)this.value=Math.max(0,this.value-this.modularity),this.onModular&&this.onModular()},t.prototype.retrieveLocalStorage=function(){var t=this.settings.storage.getItem(this.settings.prefix+this.key);if(void 0!==t&&"undefined"!==t)return"string"!=typeof t?t:JSON.parse(t)},t}();e.ItemContainer=s}.apply(e,s))||(t.exports=r)},function(t,e,i){var s,r;s=[i,e,i(1),i(2)],void 0===(r=function(t,e,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){void 0===t&&(t={}),this.settings=t,this.autoSave=!!t.autoSave,this.items={},this.itemKeys=[],this.prefix=t.prefix||"",this.values=this.settings.values||{},t.storage?this.storage=t.storage:"undefined"==typeof localStorage?this.storage=i.createStorage():this.storage=localStorage,this.containerSettings={autoSave:this.autoSave,defaults:this.settings.defaults||{},prefix:this.prefix,storage:this.storage}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.itemKeys.length},enumerable:!0,configurable:!0}),t.prototype.key=function(t){return this.itemKeys[t]},t.prototype.getAutoSave=function(){return this.autoSave},t.prototype.setAutoSave=function(t){this.autoSave=t},t.prototype.addItem=function(t,e){this.items[t]=new s.ItemContainer(this.containerSettings,t,e),this.itemKeys.push(t)},t.prototype.getItem=function(t){return this.checkExistence(t),this.items[t].getValue()},t.prototype.removeItem=function(t){({}).hasOwnProperty.call(this.items,t)&&(this.itemKeys.splice(this.itemKeys.indexOf(t),1),delete this.items[t],this.storage.removeItem(""+this.prefix+t),{}.hasOwnProperty.call(this.values,t)&&this.addItem(t,this.values[t]))},t.prototype.setItem=function(t,e){this.checkExistence(t),this.items[t].setValue(e)},t.prototype.increase=function(t,e){void 0===e&&(e=1),this.checkExistence(t);var i=this.items[t].getValue()+e;this.items[t].setValue(i)},t.prototype.decrease=function(t,e){void 0===e&&(e=1),this.checkExistence(t);var i=this.items[t].getValue()-e;this.items[t].setValue(i)},t.prototype.toggle=function(t){this.checkExistence(t);var e=!this.items[t].getValue();this.items[t].setValue(e)},t.prototype.hasKey=function(t){return{}.hasOwnProperty.call(this.items,t)},t.prototype.exportItems=function(){for(var t={},e=0,i=this.itemKeys;e<i.length;e++){var s=i[e];t[s]=this.items[s].getValue()}return t},t.prototype.clear=function(){for(var t=0,e=this.itemKeys;t<e.length;t++){var i=e[t];this.storage.removeItem(""+this.prefix+i)}for(var i in this.items={},this.itemKeys=[],this.values)({}).hasOwnProperty.call(this.values,i)&&this.addItem(i,this.values[i])},t.prototype.saveItem=function(t){if(!{}.hasOwnProperty.call(this.items,t))throw new Error("Unknown key given to ItemsHoldr: '"+t+"'.");this.items[t].updateStorage(!0)},t.prototype.saveAll=function(){for(var t in this.items)this.items[t].updateStorage(!0)},t.prototype.checkExistence=function(t){({}).hasOwnProperty.call(this.items,t)||this.addItem(t,this.values[t])},t}();e.ItemsHoldr=r}.apply(e,s))||(t.exports=r)},function(t,e,i){var s,r;s=[i,e,i(1),i(3),i(0)],void 0===(r=function(t,e,i,s,r){"use strict";function o(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,"__esModule",{value:!0}),o(i),o(s),o(r)}.apply(e,s))||(t.exports=r)}])}); |
@@ -1,3 +0,3 @@ | ||
var typedoc = typedoc || {}; | ||
var typedoc = typedoc || {}; | ||
typedoc.search = typedoc.search || {}; | ||
typedoc.search.data = {"kinds":{"1":"External module","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias"},"rows":[{"id":0,"kind":1,"name":"\"createStorage\"","url":"modules/_createstorage_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":64,"name":"createStorage","url":"modules/_createstorage_.html#createstorage","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"createStorage\""},{"id":2,"kind":1,"name":"\"IItemsHoldr\"","url":"modules/_iitemsholdr_.html","classes":"tsd-kind-external-module"},{"id":3,"kind":256,"name":"ITriggers","url":"interfaces/_iitemsholdr_.itriggers.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"IItemsHoldr\""},{"id":4,"kind":256,"name":"IItemValues","url":"interfaces/_iitemsholdr_.iitemvalues.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":5,"kind":256,"name":"IItemSettings","url":"interfaces/_iitemsholdr_.iitemsettings.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":6,"kind":1024,"name":"maximum","url":"interfaces/_iitemsholdr_.iitemsettings.html#maximum","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":7,"kind":1024,"name":"onMaximum","url":"interfaces/_iitemsholdr_.iitemsettings.html#onmaximum","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":8,"kind":1024,"name":"minimum","url":"interfaces/_iitemsholdr_.iitemsettings.html#minimum","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":9,"kind":1024,"name":"onMinimum","url":"interfaces/_iitemsholdr_.iitemsettings.html#onminimum","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":10,"kind":1024,"name":"modularity","url":"interfaces/_iitemsholdr_.iitemsettings.html#modularity","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":11,"kind":1024,"name":"onModular","url":"interfaces/_iitemsholdr_.iitemsettings.html#onmodular","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":12,"kind":1024,"name":"triggers","url":"interfaces/_iitemsholdr_.iitemsettings.html#triggers","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":13,"kind":1024,"name":"valueDefault","url":"interfaces/_iitemsholdr_.iitemsettings.html#valuedefault","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":14,"kind":256,"name":"IItemsHoldrSettings","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":15,"kind":1024,"name":"autoSave","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#autosave","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":16,"kind":1024,"name":"defaults","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#defaults","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":17,"kind":1024,"name":"prefix","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#prefix","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":18,"kind":1024,"name":"storage","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#storage","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":19,"kind":1024,"name":"values","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#values","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":20,"kind":256,"name":"IItemsHoldr","url":"interfaces/_iitemsholdr_.iitemsholdr.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":21,"kind":1024,"name":"length","url":"interfaces/_iitemsholdr_.iitemsholdr.html#length","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":22,"kind":2048,"name":"key","url":"interfaces/_iitemsholdr_.iitemsholdr.html#key","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":23,"kind":2048,"name":"getAutoSave","url":"interfaces/_iitemsholdr_.iitemsholdr.html#getautosave","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":24,"kind":2048,"name":"setAutoSave","url":"interfaces/_iitemsholdr_.iitemsholdr.html#setautosave","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":25,"kind":2048,"name":"addItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#additem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":26,"kind":2048,"name":"getItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#getitem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":27,"kind":2048,"name":"removeItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#removeitem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":28,"kind":2048,"name":"setItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#setitem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":29,"kind":2048,"name":"increase","url":"interfaces/_iitemsholdr_.iitemsholdr.html#increase","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":30,"kind":2048,"name":"decrease","url":"interfaces/_iitemsholdr_.iitemsholdr.html#decrease","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":31,"kind":2048,"name":"toggle","url":"interfaces/_iitemsholdr_.iitemsholdr.html#toggle","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":32,"kind":2048,"name":"hasKey","url":"interfaces/_iitemsholdr_.iitemsholdr.html#haskey","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":33,"kind":2048,"name":"exportItems","url":"interfaces/_iitemsholdr_.iitemsholdr.html#exportitems","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":34,"kind":2048,"name":"clear","url":"interfaces/_iitemsholdr_.iitemsholdr.html#clear","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":35,"kind":2048,"name":"saveItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#saveitem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":36,"kind":2048,"name":"saveAll","url":"interfaces/_iitemsholdr_.iitemsholdr.html#saveall","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":37,"kind":4194304,"name":"IValueCallback","url":"modules/_iitemsholdr_.html#ivaluecallback","classes":"tsd-kind-type-alias tsd-parent-kind-external-module","parent":"\"IItemsHoldr\""},{"id":38,"kind":65536,"name":"__type","url":"modules/_iitemsholdr_.html#ivaluecallback.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"\"IItemsHoldr\".IValueCallback"},{"id":39,"kind":4194304,"name":"IValueTransform","url":"modules/_iitemsholdr_.html#ivaluetransform","classes":"tsd-kind-type-alias tsd-parent-kind-external-module","parent":"\"IItemsHoldr\""},{"id":40,"kind":65536,"name":"__type","url":"modules/_iitemsholdr_.html#ivaluetransform.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-has-type-parameter tsd-is-not-exported","parent":"\"IItemsHoldr\".IValueTransform"},{"id":41,"kind":1,"name":"\"proliferate\"","url":"modules/_proliferate_.html","classes":"tsd-kind-external-module"},{"id":42,"kind":64,"name":"proliferate","url":"modules/_proliferate_.html#proliferate","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"proliferate\""},{"id":43,"kind":1,"name":"\"ItemContainer\"","url":"modules/_itemcontainer_.html","classes":"tsd-kind-external-module"},{"id":44,"kind":256,"name":"IItemContainerSettings","url":"interfaces/_itemcontainer_.iitemcontainersettings.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"ItemContainer\""},{"id":45,"kind":1024,"name":"autoSave","url":"interfaces/_itemcontainer_.iitemcontainersettings.html#autosave","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"ItemContainer\".IItemContainerSettings"},{"id":46,"kind":1024,"name":"defaults","url":"interfaces/_itemcontainer_.iitemcontainersettings.html#defaults","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"ItemContainer\".IItemContainerSettings"},{"id":47,"kind":1024,"name":"prefix","url":"interfaces/_itemcontainer_.iitemcontainersettings.html#prefix","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"ItemContainer\".IItemContainerSettings"},{"id":48,"kind":1024,"name":"storage","url":"interfaces/_itemcontainer_.iitemcontainersettings.html#storage","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"ItemContainer\".IItemContainerSettings"},{"id":49,"kind":128,"name":"ItemContainer","url":"classes/_itemcontainer_.itemcontainer.html","classes":"tsd-kind-class tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"ItemContainer\""},{"id":50,"kind":1024,"name":"settings","url":"classes/_itemcontainer_.itemcontainer.html#settings","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":51,"kind":1024,"name":"key","url":"classes/_itemcontainer_.itemcontainer.html#key","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":52,"kind":1024,"name":"valueDefault","url":"classes/_itemcontainer_.itemcontainer.html#valuedefault","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":53,"kind":1024,"name":"triggers","url":"classes/_itemcontainer_.itemcontainer.html#triggers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":54,"kind":1024,"name":"minimum","url":"classes/_itemcontainer_.itemcontainer.html#minimum","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":55,"kind":1024,"name":"onMinimum","url":"classes/_itemcontainer_.itemcontainer.html#onminimum","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":56,"kind":1024,"name":"maximum","url":"classes/_itemcontainer_.itemcontainer.html#maximum","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":57,"kind":1024,"name":"onMaximum","url":"classes/_itemcontainer_.itemcontainer.html#onmaximum","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":58,"kind":1024,"name":"modularity","url":"classes/_itemcontainer_.itemcontainer.html#modularity","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":59,"kind":1024,"name":"onModular","url":"classes/_itemcontainer_.itemcontainer.html#onmodular","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":60,"kind":1024,"name":"value","url":"classes/_itemcontainer_.itemcontainer.html#value","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":61,"kind":512,"name":"constructor","url":"classes/_itemcontainer_.itemcontainer.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":62,"kind":2048,"name":"getValue","url":"classes/_itemcontainer_.itemcontainer.html#getvalue","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":63,"kind":2048,"name":"setValue","url":"classes/_itemcontainer_.itemcontainer.html#setvalue","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":64,"kind":2048,"name":"update","url":"classes/_itemcontainer_.itemcontainer.html#update","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":65,"kind":2048,"name":"updateStorage","url":"classes/_itemcontainer_.itemcontainer.html#updatestorage","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":66,"kind":2048,"name":"checkTriggers","url":"classes/_itemcontainer_.itemcontainer.html#checktriggers","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":67,"kind":2048,"name":"checkModularity","url":"classes/_itemcontainer_.itemcontainer.html#checkmodularity","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":68,"kind":2048,"name":"retrieveLocalStorage","url":"classes/_itemcontainer_.itemcontainer.html#retrievelocalstorage","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":69,"kind":1,"name":"\"ItemsHoldr\"","url":"modules/_itemsholdr_.html","classes":"tsd-kind-external-module"},{"id":70,"kind":256,"name":"IItems","url":"interfaces/_itemsholdr_.iitems.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ItemsHoldr\""},{"id":71,"kind":128,"name":"ItemsHoldr","url":"classes/_itemsholdr_.itemsholdr.html","classes":"tsd-kind-class tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"ItemsHoldr\""},{"id":72,"kind":1024,"name":"settings","url":"classes/_itemsholdr_.itemsholdr.html#settings","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":73,"kind":1024,"name":"prefix","url":"classes/_itemsholdr_.itemsholdr.html#prefix","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":74,"kind":1024,"name":"storage","url":"classes/_itemsholdr_.itemsholdr.html#storage","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":75,"kind":1024,"name":"values","url":"classes/_itemsholdr_.itemsholdr.html#values","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":76,"kind":1024,"name":"containerSettings","url":"classes/_itemsholdr_.itemsholdr.html#containersettings","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":77,"kind":1024,"name":"autoSave","url":"classes/_itemsholdr_.itemsholdr.html#autosave","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":78,"kind":1024,"name":"itemKeys","url":"classes/_itemsholdr_.itemsholdr.html#itemkeys","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":79,"kind":1024,"name":"items","url":"classes/_itemsholdr_.itemsholdr.html#items","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":80,"kind":512,"name":"constructor","url":"classes/_itemsholdr_.itemsholdr.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":81,"kind":262144,"name":"length","url":"classes/_itemsholdr_.itemsholdr.html#length","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":82,"kind":2048,"name":"key","url":"classes/_itemsholdr_.itemsholdr.html#key","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":83,"kind":2048,"name":"getAutoSave","url":"classes/_itemsholdr_.itemsholdr.html#getautosave","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":84,"kind":2048,"name":"setAutoSave","url":"classes/_itemsholdr_.itemsholdr.html#setautosave","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":85,"kind":2048,"name":"addItem","url":"classes/_itemsholdr_.itemsholdr.html#additem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":86,"kind":2048,"name":"getItem","url":"classes/_itemsholdr_.itemsholdr.html#getitem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":87,"kind":2048,"name":"removeItem","url":"classes/_itemsholdr_.itemsholdr.html#removeitem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":88,"kind":2048,"name":"setItem","url":"classes/_itemsholdr_.itemsholdr.html#setitem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":89,"kind":2048,"name":"increase","url":"classes/_itemsholdr_.itemsholdr.html#increase","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":90,"kind":2048,"name":"decrease","url":"classes/_itemsholdr_.itemsholdr.html#decrease","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":91,"kind":2048,"name":"toggle","url":"classes/_itemsholdr_.itemsholdr.html#toggle","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":92,"kind":2048,"name":"hasKey","url":"classes/_itemsholdr_.itemsholdr.html#haskey","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":93,"kind":2048,"name":"exportItems","url":"classes/_itemsholdr_.itemsholdr.html#exportitems","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":94,"kind":2048,"name":"clear","url":"classes/_itemsholdr_.itemsholdr.html#clear","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":95,"kind":2048,"name":"saveItem","url":"classes/_itemsholdr_.itemsholdr.html#saveitem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":96,"kind":2048,"name":"saveAll","url":"classes/_itemsholdr_.itemsholdr.html#saveall","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":97,"kind":2048,"name":"checkExistence","url":"classes/_itemsholdr_.itemsholdr.html#checkexistence","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":98,"kind":1,"name":"\"fakes\"","url":"modules/_fakes_.html","classes":"tsd-kind-external-module"},{"id":99,"kind":64,"name":"stubItemsHoldr","url":"modules/_fakes_.html#stubitemsholdr","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"fakes\""},{"id":100,"kind":64,"name":"stubItemValueSettings","url":"modules/_fakes_.html#stubitemvaluesettings","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"fakes\""},{"id":101,"kind":1,"name":"\"index\"","url":"modules/_index_.html","classes":"tsd-kind-external-module"},{"id":102,"kind":1,"name":"\"ItemsHoldr.test\"","url":"modules/_itemsholdr_test_.html","classes":"tsd-kind-external-module"},{"id":103,"kind":1,"name":"\"proliferate.test\"","url":"modules/_proliferate_test_.html","classes":"tsd-kind-external-module"}]}; | ||
typedoc.search.data = {"kinds":{"1":"External module","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias"},"rows":[{"id":0,"kind":1,"name":"\"createStorage\"","url":"modules/_createstorage_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":64,"name":"createStorage","url":"modules/_createstorage_.html#createstorage","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"createStorage\""},{"id":2,"kind":1,"name":"\"IItemsHoldr\"","url":"modules/_iitemsholdr_.html","classes":"tsd-kind-external-module"},{"id":3,"kind":256,"name":"ITriggers","url":"interfaces/_iitemsholdr_.itriggers.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"IItemsHoldr\""},{"id":4,"kind":256,"name":"IItemValues","url":"interfaces/_iitemsholdr_.iitemvalues.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":5,"kind":256,"name":"IItemSettings","url":"interfaces/_iitemsholdr_.iitemsettings.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":6,"kind":1024,"name":"maximum","url":"interfaces/_iitemsholdr_.iitemsettings.html#maximum","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":7,"kind":1024,"name":"onMaximum","url":"interfaces/_iitemsholdr_.iitemsettings.html#onmaximum","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":8,"kind":1024,"name":"minimum","url":"interfaces/_iitemsholdr_.iitemsettings.html#minimum","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":9,"kind":1024,"name":"onMinimum","url":"interfaces/_iitemsholdr_.iitemsettings.html#onminimum","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":10,"kind":1024,"name":"modularity","url":"interfaces/_iitemsholdr_.iitemsettings.html#modularity","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":11,"kind":1024,"name":"onModular","url":"interfaces/_iitemsholdr_.iitemsettings.html#onmodular","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":12,"kind":1024,"name":"triggers","url":"interfaces/_iitemsholdr_.iitemsettings.html#triggers","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":13,"kind":1024,"name":"valueDefault","url":"interfaces/_iitemsholdr_.iitemsettings.html#valuedefault","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemSettings"},{"id":14,"kind":256,"name":"IItemsHoldrSettings","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":15,"kind":1024,"name":"autoSave","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#autosave","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":16,"kind":1024,"name":"defaults","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#defaults","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":17,"kind":1024,"name":"prefix","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#prefix","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":18,"kind":1024,"name":"storage","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#storage","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":19,"kind":1024,"name":"values","url":"interfaces/_iitemsholdr_.iitemsholdrsettings.html#values","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldrSettings"},{"id":20,"kind":256,"name":"IItemsHoldr","url":"interfaces/_iitemsholdr_.iitemsholdr.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":21,"kind":1024,"name":"length","url":"interfaces/_iitemsholdr_.iitemsholdr.html#length","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":22,"kind":2048,"name":"key","url":"interfaces/_iitemsholdr_.iitemsholdr.html#key","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":23,"kind":2048,"name":"getAutoSave","url":"interfaces/_iitemsholdr_.iitemsholdr.html#getautosave","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":24,"kind":2048,"name":"setAutoSave","url":"interfaces/_iitemsholdr_.iitemsholdr.html#setautosave","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":25,"kind":2048,"name":"addItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#additem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":26,"kind":2048,"name":"getItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#getitem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":27,"kind":2048,"name":"removeItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#removeitem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":28,"kind":2048,"name":"setItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#setitem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":29,"kind":2048,"name":"increase","url":"interfaces/_iitemsholdr_.iitemsholdr.html#increase","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":30,"kind":2048,"name":"decrease","url":"interfaces/_iitemsholdr_.iitemsholdr.html#decrease","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":31,"kind":2048,"name":"toggle","url":"interfaces/_iitemsholdr_.iitemsholdr.html#toggle","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":32,"kind":2048,"name":"hasKey","url":"interfaces/_iitemsholdr_.iitemsholdr.html#haskey","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":33,"kind":2048,"name":"exportItems","url":"interfaces/_iitemsholdr_.iitemsholdr.html#exportitems","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":34,"kind":2048,"name":"clear","url":"interfaces/_iitemsholdr_.iitemsholdr.html#clear","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":35,"kind":2048,"name":"saveItem","url":"interfaces/_iitemsholdr_.iitemsholdr.html#saveitem","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":36,"kind":2048,"name":"saveAll","url":"interfaces/_iitemsholdr_.iitemsholdr.html#saveall","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IItemsHoldr\".IItemsHoldr"},{"id":37,"kind":4194304,"name":"IValueCallback","url":"modules/_iitemsholdr_.html#ivaluecallback","classes":"tsd-kind-type-alias tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"IItemsHoldr\""},{"id":38,"kind":65536,"name":"__type","url":"modules/_iitemsholdr_.html#ivaluecallback.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"\"IItemsHoldr\".IValueCallback"},{"id":39,"kind":4194304,"name":"IValueTransform","url":"modules/_iitemsholdr_.html#ivaluetransform","classes":"tsd-kind-type-alias tsd-parent-kind-external-module","parent":"\"IItemsHoldr\""},{"id":40,"kind":65536,"name":"__type","url":"modules/_iitemsholdr_.html#ivaluetransform.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-has-type-parameter tsd-is-not-exported","parent":"\"IItemsHoldr\".IValueTransform"},{"id":41,"kind":1,"name":"\"proliferate\"","url":"modules/_proliferate_.html","classes":"tsd-kind-external-module"},{"id":42,"kind":64,"name":"proliferate","url":"modules/_proliferate_.html#proliferate","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"proliferate\""},{"id":43,"kind":1,"name":"\"ItemContainer\"","url":"modules/_itemcontainer_.html","classes":"tsd-kind-external-module"},{"id":44,"kind":256,"name":"IItemContainerSettings","url":"interfaces/_itemcontainer_.iitemcontainersettings.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"ItemContainer\""},{"id":45,"kind":1024,"name":"autoSave","url":"interfaces/_itemcontainer_.iitemcontainersettings.html#autosave","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"ItemContainer\".IItemContainerSettings"},{"id":46,"kind":1024,"name":"defaults","url":"interfaces/_itemcontainer_.iitemcontainersettings.html#defaults","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"ItemContainer\".IItemContainerSettings"},{"id":47,"kind":1024,"name":"prefix","url":"interfaces/_itemcontainer_.iitemcontainersettings.html#prefix","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"ItemContainer\".IItemContainerSettings"},{"id":48,"kind":1024,"name":"storage","url":"interfaces/_itemcontainer_.iitemcontainersettings.html#storage","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"ItemContainer\".IItemContainerSettings"},{"id":49,"kind":128,"name":"ItemContainer","url":"classes/_itemcontainer_.itemcontainer.html","classes":"tsd-kind-class tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"ItemContainer\""},{"id":50,"kind":1024,"name":"settings","url":"classes/_itemcontainer_.itemcontainer.html#settings","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":51,"kind":1024,"name":"key","url":"classes/_itemcontainer_.itemcontainer.html#key","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":52,"kind":1024,"name":"valueDefault","url":"classes/_itemcontainer_.itemcontainer.html#valuedefault","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":53,"kind":1024,"name":"triggers","url":"classes/_itemcontainer_.itemcontainer.html#triggers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":54,"kind":1024,"name":"minimum","url":"classes/_itemcontainer_.itemcontainer.html#minimum","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":55,"kind":1024,"name":"onMinimum","url":"classes/_itemcontainer_.itemcontainer.html#onminimum","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":56,"kind":1024,"name":"maximum","url":"classes/_itemcontainer_.itemcontainer.html#maximum","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":57,"kind":1024,"name":"onMaximum","url":"classes/_itemcontainer_.itemcontainer.html#onmaximum","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":58,"kind":1024,"name":"modularity","url":"classes/_itemcontainer_.itemcontainer.html#modularity","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":59,"kind":1024,"name":"onModular","url":"classes/_itemcontainer_.itemcontainer.html#onmodular","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":60,"kind":1024,"name":"value","url":"classes/_itemcontainer_.itemcontainer.html#value","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":61,"kind":512,"name":"constructor","url":"classes/_itemcontainer_.itemcontainer.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":62,"kind":2048,"name":"getValue","url":"classes/_itemcontainer_.itemcontainer.html#getvalue","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":63,"kind":2048,"name":"setValue","url":"classes/_itemcontainer_.itemcontainer.html#setvalue","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":64,"kind":2048,"name":"update","url":"classes/_itemcontainer_.itemcontainer.html#update","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":65,"kind":2048,"name":"updateStorage","url":"classes/_itemcontainer_.itemcontainer.html#updatestorage","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemContainer\".ItemContainer"},{"id":66,"kind":2048,"name":"checkTriggers","url":"classes/_itemcontainer_.itemcontainer.html#checktriggers","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":67,"kind":2048,"name":"checkModularity","url":"classes/_itemcontainer_.itemcontainer.html#checkmodularity","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":68,"kind":2048,"name":"retrieveLocalStorage","url":"classes/_itemcontainer_.itemcontainer.html#retrievelocalstorage","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"ItemContainer\".ItemContainer"},{"id":69,"kind":1,"name":"\"ItemsHoldr\"","url":"modules/_itemsholdr_.html","classes":"tsd-kind-external-module"},{"id":70,"kind":256,"name":"IItems","url":"interfaces/_itemsholdr_.iitems.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"ItemsHoldr\""},{"id":71,"kind":128,"name":"ItemsHoldr","url":"classes/_itemsholdr_.itemsholdr.html","classes":"tsd-kind-class tsd-parent-kind-external-module tsd-has-type-parameter","parent":"\"ItemsHoldr\""},{"id":72,"kind":1024,"name":"settings","url":"classes/_itemsholdr_.itemsholdr.html#settings","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":73,"kind":1024,"name":"prefix","url":"classes/_itemsholdr_.itemsholdr.html#prefix","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":74,"kind":1024,"name":"storage","url":"classes/_itemsholdr_.itemsholdr.html#storage","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":75,"kind":1024,"name":"values","url":"classes/_itemsholdr_.itemsholdr.html#values","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":76,"kind":1024,"name":"containerSettings","url":"classes/_itemsholdr_.itemsholdr.html#containersettings","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":77,"kind":1024,"name":"autoSave","url":"classes/_itemsholdr_.itemsholdr.html#autosave","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":78,"kind":1024,"name":"itemKeys","url":"classes/_itemsholdr_.itemsholdr.html#itemkeys","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":79,"kind":1024,"name":"items","url":"classes/_itemsholdr_.itemsholdr.html#items","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":80,"kind":512,"name":"constructor","url":"classes/_itemsholdr_.itemsholdr.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":81,"kind":262144,"name":"length","url":"classes/_itemsholdr_.itemsholdr.html#length","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":82,"kind":2048,"name":"key","url":"classes/_itemsholdr_.itemsholdr.html#key","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":83,"kind":2048,"name":"getAutoSave","url":"classes/_itemsholdr_.itemsholdr.html#getautosave","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":84,"kind":2048,"name":"setAutoSave","url":"classes/_itemsholdr_.itemsholdr.html#setautosave","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":85,"kind":2048,"name":"addItem","url":"classes/_itemsholdr_.itemsholdr.html#additem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":86,"kind":2048,"name":"getItem","url":"classes/_itemsholdr_.itemsholdr.html#getitem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":87,"kind":2048,"name":"removeItem","url":"classes/_itemsholdr_.itemsholdr.html#removeitem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":88,"kind":2048,"name":"setItem","url":"classes/_itemsholdr_.itemsholdr.html#setitem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":89,"kind":2048,"name":"increase","url":"classes/_itemsholdr_.itemsholdr.html#increase","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":90,"kind":2048,"name":"decrease","url":"classes/_itemsholdr_.itemsholdr.html#decrease","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":91,"kind":2048,"name":"toggle","url":"classes/_itemsholdr_.itemsholdr.html#toggle","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":92,"kind":2048,"name":"hasKey","url":"classes/_itemsholdr_.itemsholdr.html#haskey","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":93,"kind":2048,"name":"exportItems","url":"classes/_itemsholdr_.itemsholdr.html#exportitems","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":94,"kind":2048,"name":"clear","url":"classes/_itemsholdr_.itemsholdr.html#clear","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":95,"kind":2048,"name":"saveItem","url":"classes/_itemsholdr_.itemsholdr.html#saveitem","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":96,"kind":2048,"name":"saveAll","url":"classes/_itemsholdr_.itemsholdr.html#saveall","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":97,"kind":2048,"name":"checkExistence","url":"classes/_itemsholdr_.itemsholdr.html#checkexistence","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"ItemsHoldr\".ItemsHoldr"},{"id":98,"kind":1,"name":"\"fakes\"","url":"modules/_fakes_.html","classes":"tsd-kind-external-module"},{"id":99,"kind":64,"name":"stubItemsHoldr","url":"modules/_fakes_.html#stubitemsholdr","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"fakes\""},{"id":100,"kind":64,"name":"stubItemValueSettings","url":"modules/_fakes_.html#stubitemvaluesettings","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"fakes\""},{"id":101,"kind":1,"name":"\"index\"","url":"modules/_index_.html","classes":"tsd-kind-external-module"},{"id":102,"kind":1,"name":"\"ItemsHoldr.test\"","url":"modules/_itemsholdr_test_.html","classes":"tsd-kind-external-module"},{"id":103,"kind":1,"name":"\"proliferate.test\"","url":"modules/_proliferate_test_.html","classes":"tsd-kind-external-module"}]}; |
@@ -14,26 +14,28 @@ { | ||
"devDependencies": { | ||
"@types/chai": "^4.1.2", | ||
"@types/lodash": "^4.14.99", | ||
"@types/lolex": "^2.1.1", | ||
"@types/mocha": "^2.2.48", | ||
"@types/sinon": "^4.1.3", | ||
"@types/sinon-chai": "^2.7.29", | ||
"@types/chai": "^4.1.3", | ||
"@types/lodash": "^4.14.109", | ||
"@types/lolex": "^2.1.2", | ||
"@types/mocha": "^5.2.1", | ||
"@types/sinon": "^5.0.1", | ||
"@types/sinon-chai": "^2.7.32", | ||
"chai": "^4.1.2", | ||
"concurrently": "^3.5.1", | ||
"glob": "^7.1.2", | ||
"lolex": "^2.3.2", | ||
"istanbul": "^0.4.5", | ||
"lolex": "^2.7.0", | ||
"mkdirp": "^0.5.1", | ||
"mocha": "^5.0.0", | ||
"mocha-headless-chrome": "^1.8.2", | ||
"mocha": "^5.2.0", | ||
"mocha-headless-chrome": "^2.0.0", | ||
"requirejs": "^2.3.5", | ||
"run-for-every-file": "^1.1.0", | ||
"shenanigans-manager": "^0.2.23", | ||
"sinon": "^4.2.2", | ||
"sinon-chai": "^2.14.0", | ||
"tslint": "5.9.1", | ||
"tsutils": "^2.21.0", | ||
"typedoc": "^0.10.0", | ||
"typescript": "^2.7.1", | ||
"shenanigans-manager": "^0.2.31", | ||
"sinon": "^5.1.0", | ||
"sinon-chai": "^3.1.0", | ||
"tslint": "5.10.0", | ||
"tsutils": "^2.27.1", | ||
"typedoc": "^0.11.1", | ||
"typescript": "^2.9.1", | ||
"watch": "^1.0.2", | ||
"webpack": "^3.10.0" | ||
"webpack": "^4.11.1", | ||
"webpack-cli": "^3.0.3" | ||
}, | ||
@@ -52,5 +54,6 @@ "license": "MIT", | ||
"init": "npm install && npm run setup && npm run verify", | ||
"setup": "npm run setup:copy && npm run setup:package && npm run setup:readme", | ||
"setup": "npm run setup:dirs && npm run setup:copy && npm run setup:package && npm run setup:readme", | ||
"setup:copy": "npm run setup:copy:default", | ||
"setup:copy:default": "run-for-every-file --dot --src \"node_modules/shenanigans-manager/setup/default/\" --file \"**/*\" --run \"mustache package.json {{src-file}} {{file}}\" --dest \".\" --only-files", | ||
"setup:dirs": "shenanigans-manager ensure-dirs-exist", | ||
"setup:package": "shenanigans-manager hydrate-package-json", | ||
@@ -62,2 +65,7 @@ "setup:readme": "shenanigans-manager hydrate-readme", | ||
"test": "npm run test:setup && npm run test:run", | ||
"test:coverage": "npm run test:coverage:generate-html && npm run test:coverage:instrument && npm run test:coverage:run && npm run test:coverage:report", | ||
"test:coverage:generate-html": "shenanigans-manager generate-test-html --source instrumented", | ||
"test:coverage:instrument": "istanbul instrument src -o instrumented", | ||
"test:coverage:report": "istanbul report html", | ||
"test:coverage:run": "mocha-headless-chrome --coverage coverage.json --file test/index.instrumented.html", | ||
"test:run": "mocha-headless-chrome --file test/index.html", | ||
@@ -71,2 +79,3 @@ "test:setup": "npm run test:setup:dir && npm run test:setup:copy && npm run test:setup:html && npm run test:setup:tsc", | ||
"verify": "npm run src && npm run test && npm run dist && npm run docs", | ||
"verify:coverage": "npm run src && npm run test:setup && npm run test:coverage && npm run dist && npm run docs", | ||
"watch": "concurrently \"tsc -p . -w\" --raw \"chokidar src/**/*.test.t* --command \"\"npm run test:setup:html\"\" --silent\" --raw" | ||
@@ -78,3 +87,3 @@ }, | ||
"types": "./src/index.d.ts", | ||
"version": "0.7.6" | ||
"version": "0.7.7" | ||
} |
@@ -1,2 +0,2 @@ | ||
<!-- {{Top}} --> | ||
<!-- Top --> | ||
# ItemsHoldr | ||
@@ -8,3 +8,3 @@ [![Greenkeeper badge](https://badges.greenkeeper.io/FullScreenShenanigans/ItemsHoldr.svg)](https://greenkeeper.io/) | ||
Cache-based wrapper around localStorage. | ||
<!-- {{/Top}} --> | ||
<!-- /Top --> | ||
@@ -520,3 +520,3 @@ ItemsHoldr instances intentionally implement the DOM `Storage` interface _(except for the hacky string- and number-based indexing)_. | ||
<!-- {{Development}} --> | ||
<!-- Development --> | ||
## Development | ||
@@ -547,3 +547,3 @@ | ||
### Running Tests | ||
#### Running Tests | ||
@@ -554,6 +554,9 @@ ```shell | ||
Test files are alongside source files under `src/` and named `*.test.ts?`. | ||
Tests are written in [Mocha](https://github.com/mochajs/mocha) and [Chai](https://github.com/chaijs/chai). | ||
Their files are written using alongside source files under `src/` and named `*.test.ts?`. | ||
Whenever you add, remove, or rename a `*.test.t*` file under `src/`, `watch` will re-run `npm run test:setup` to regenerate the list of static test files in `test/index.html`. | ||
You can open that file in a browser to debug through the tests. | ||
`npm run test:run` will run that setup and execute tests using [Puppeteer](https://github.com/GoogleChrome/puppeteer). | ||
<!-- {{/Development}} --> | ||
<!-- Maps --> | ||
<!-- /Maps --> | ||
<!-- /Development --> |
@@ -208,2 +208,6 @@ /** | ||
saveAll(): void; | ||
/** | ||
* Manually resets all items to their storage defaults. | ||
*/ | ||
resetAll(): void; | ||
} |
@@ -240,2 +240,7 @@ /** | ||
saveAll(): void; | ||
/** | ||
* Manually resets all items to their storage defaults. | ||
*/ | ||
resetAll(): void; | ||
} |
@@ -108,3 +108,3 @@ import { IItemSettings } from "./IItemsHoldr"; | ||
*/ | ||
private checkTriggers(); | ||
private checkTriggers; | ||
/** | ||
@@ -115,3 +115,3 @@ * Checks if the current value is greater than the modularity (assuming | ||
*/ | ||
private checkModularity(); | ||
private checkModularity; | ||
/** | ||
@@ -121,3 +121,3 @@ * Retrieves a ItemValue's value from localStorage, making sure not to try to | ||
*/ | ||
private retrieveLocalStorage(); | ||
private retrieveLocalStorage; | ||
} |
@@ -41,3 +41,3 @@ import { IItemSettings, ITriggers } from "./IItemsHoldr"; | ||
*/ | ||
private readonly key: string; | ||
private readonly key: number | string | symbol; | ||
@@ -98,3 +98,3 @@ /** | ||
*/ | ||
public constructor(settings: IItemContainerSettings, key: string, item: IItemSettings<TItem> = {}) { | ||
public constructor(settings: IItemContainerSettings, key: number | string | symbol, item: IItemSettings<TItem> = {}) { | ||
this.settings = settings; | ||
@@ -112,3 +112,3 @@ | ||
// If there exists an old version of this property, get it | ||
if ({}.hasOwnProperty.call(settings.storage, settings.prefix + key)) { | ||
if ({}.hasOwnProperty.call(settings.storage, `${settings.prefix}${key}`)) { | ||
this.value = this.retrieveLocalStorage(); | ||
@@ -178,3 +178,3 @@ this.update(); | ||
if (overrideAutoSave || this.settings.autoSave) { | ||
this.settings.storage.setItem(this.settings.prefix + this.key, JSON.stringify(this.value)); | ||
this.settings.storage.setItem(`${this.settings.prefix}${this.key}`, JSON.stringify(this.value)); | ||
} | ||
@@ -215,3 +215,3 @@ } | ||
private retrieveLocalStorage(): any { | ||
const value: any = this.settings.storage.getItem(this.settings.prefix + this.key); | ||
const value: any = this.settings.storage.getItem(`${this.settings.prefix}${this.key}`); | ||
@@ -218,0 +218,0 @@ if (value === undefined || value === "undefined") { |
@@ -154,2 +154,6 @@ import { IItemSettings, IItemsHoldr, IItemsHoldrSettings } from "./IItemsHoldr"; | ||
/** | ||
* Manually resets all items to their storage defaults. | ||
*/ | ||
resetAll(): void; | ||
/** | ||
* Ensures a key exists in values. If it doesn't, and new values are | ||
@@ -160,3 +164,3 @@ * allowed, it creates it; otherwise, it throws an Error. | ||
*/ | ||
private checkExistence(key); | ||
private checkExistence; | ||
} |
@@ -26,3 +26,3 @@ define(["require", "exports", "./createStorage", "./ItemContainer"], function (require, exports, createStorage_1, ItemContainer_1) { | ||
} | ||
else if (typeof localStorage === "undefined") { | ||
else if (typeof localStorage === "undefined") { // tslint:disable-line strict-type-predicates | ||
this.storage = createStorage_1.createStorage(); | ||
@@ -224,2 +224,9 @@ } | ||
/** | ||
* Manually resets all items to their storage defaults. | ||
*/ | ||
ItemsHoldr.prototype.resetAll = function () { | ||
this.items = {}; | ||
this.itemKeys = []; | ||
}; | ||
/** | ||
* Ensures a key exists in values. If it doesn't, and new values are | ||
@@ -226,0 +233,0 @@ * allowed, it creates it; otherwise, it throws an Error. |
@@ -295,2 +295,10 @@ import { createStorage } from "./createStorage"; | ||
/** | ||
* Manually resets all items to their storage defaults. | ||
*/ | ||
public resetAll(): void { | ||
this.items = {}; | ||
this.itemKeys = []; | ||
} | ||
/** | ||
* Ensures a key exists in values. If it doesn't, and new values are | ||
@@ -301,3 +309,3 @@ * allowed, it creates it; otherwise, it throws an Error. | ||
*/ | ||
private checkExistence(key: string): void { | ||
private checkExistence(key: keyof TItems): void { | ||
if (!{}.hasOwnProperty.call(this.items, key)) { | ||
@@ -304,0 +312,0 @@ this.addItem(key, this.values[key]); |
@@ -12,6 +12,2 @@ const glob = require("glob"); | ||
name: package.shenanigans.name, | ||
sources: [ | ||
"./**/*.js", | ||
"!./**/*.test.js", | ||
] | ||
} | ||
@@ -48,2 +44,3 @@ ] | ||
externals, | ||
mode: "production", | ||
output: { | ||
@@ -53,3 +50,6 @@ filename: "[name].js", | ||
path: path.join(__dirname, "dist"), | ||
}, | ||
performance: { | ||
hints: false | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
966887
81
3758
559
26