PATH:
usr
/
local
/
lib
/
node_modules
/
bower
/
lib
/
node_modules
/
mout
/
src
/
lang
define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { /** * Clone native types. */ function clone(val){ switch (kindOf(val)) { case 'Object': return cloneObject(val); case 'Array': return cloneArray(val); case 'RegExp': return cloneRegExp(val); case 'Date': return cloneDate(val); default: return val; } } function cloneObject(source) { if (isPlainObject(source)) { return mixIn({}, source); } else { return source; } } function cloneRegExp(r) { var flags = ''; flags += r.multiline ? 'm' : ''; flags += r.global ? 'g' : ''; flags += r.ignoreCase ? 'i' : ''; return new RegExp(r.source, flags); } function cloneDate(date) { return new Date(+date); } function cloneArray(arr) { return arr.slice(); } return clone; });
[-] isBoolean.js
[edit]
[-] isInteger.js
[edit]
[-] isRegExp.js
[edit]
[-] ctorApply.js
[edit]
[-] toString.js
[edit]
[-] toArray.js
[edit]
[-] toNumber.js
[edit]
[-] is.js
[edit]
[+]
..
[-] inheritPrototype.js
[edit]
[-] GLOBAL.js
[edit]
[-] deepClone.js
[edit]
[-] isFinite.js
[edit]
[-] isObject.js
[edit]
[-] isUndefined.js
[edit]
[-] isDate.js
[edit]
[-] isPlainObject.js
[edit]
[-] isArguments.js
[edit]
[-] kindOf.js
[edit]
[-] isPrimitive.js
[edit]
[-] isString.js
[edit]
[-] isNull.js
[edit]
[-] isNumber.js
[edit]
[-] deepEquals.js
[edit]
[-] isNaN.js
[edit]
[-] isnt.js
[edit]
[-] isArray.js
[edit]
[-] isKind.js
[edit]
[-] isEmpty.js
[edit]
[-] defaults.js
[edit]
[-] createObject.js
[edit]
[-] isFunction.js
[edit]
[-] clone.js
[edit]