Rename get to serialize

This commit is contained in:
Mariusz Nowak
2013-07-22 19:15:49 +02:00
parent 7a273cf0a4
commit f955c6ffbd

View File

@@ -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) {