Files
izyim-mockapi/node_modules/lowdb/dist/lowdb.min.js
T
2018-08-09 11:15:09 +08:00

2 lines
2.4 KiB
JavaScript

/*! lowdb v0.15.5 */
var low=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=5)}([function(t,e,r){"use strict";var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(4),i=r(3),u=r(2),a=function(t,e,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=a.storage,f=void 0===c?u:c,s=a.format,l=void 0===s?{}:s;return t.source=r,t.storage=n({},i,t.source&&f),t.read=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,n=t.storage.read(e,l.deserialize);return o(n)?n.then(t.plant):t.plant(n)},t.write=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,n=(arguments.length<=1?0:arguments.length-1)?arguments.length<=1?void 0:arguments[1]:t.getState(),i=t.storage.write(e,t.getState(),l.serialize);return o(i)?i.then(function(){return n}):n},t.plant=function(r){return t[e]=r,t},t.getState=function(){return t[e]},t.setState=function(e){return t.plant(e),t.write()},t.read()};t.exports={init:a}},function(t,e){t.exports=_},function(t,e,r){"use strict";t.exports={read:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.parse,r=localStorage.getItem(t);return r?e(r):(localStorage.setItem(t,"{}"),{})},write:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON.stringify;localStorage.setItem(t,r(e))}}},function(t,e,r){"use strict";t.exports={read:function(){return{}},write:function(){return{}}}},function(t,e){function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then}t.exports=r},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.runInContext(),i=r.chain({});return i._=r,r.prototype.write=r.wrap(r.prototype.value,function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=e.apply(this);return i.write(r,n)}),o.init(i,"__wrapped__",t,e)}}]);