mirror of
https://github.com/BreizhHardware/memoizee.git
synced 2026-03-18 21:40:27 +01:00
Rename get to serialize
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
var CustomError = require('es5-ext/lib/Error/custom')
|
||||
, hasListeners = require('event-emitter/lib/has-listeners')
|
||||
|
||||
, getId0 = function () { return ''; }
|
||||
, getId1 = function (args) { return args[0]; }
|
||||
, serialize0 = function () { return ''; }
|
||||
, serialize1 = function (args) { return args[0]; }
|
||||
|
||||
, apply = Function.prototype.apply, call = Function.prototype.call;
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = require('./_base')(function (conf, length) {
|
||||
, hitListeners, initListeners, purgeListeners;
|
||||
|
||||
if (length === 1) {
|
||||
get = conf.get = getId1;
|
||||
get = conf.get = serialize1;
|
||||
} else if (length === false) {
|
||||
get = conf.get = function (args, length) {
|
||||
var id = '', i;
|
||||
@@ -36,7 +36,7 @@ module.exports = require('./_base')(function (conf, length) {
|
||||
return id;
|
||||
};
|
||||
} else {
|
||||
get = conf.get = getId0;
|
||||
get = conf.get = serialize0;
|
||||
}
|
||||
|
||||
conf.memoized = (length === 1) ? function (id) {
|
||||
|
||||
Reference in New Issue
Block a user