Make _.extend and alias of _.assign and make _.assign iterate only own enumerable source props to align with ES6.

Former-commit-id: 37ba7c3066c1ea70210346a9bf598e8587e907db
This commit is contained in:
John-David Dalton
2012-11-11 15:52:43 -08:00
parent ec6a709393
commit 797a87ca26
4 changed files with 91 additions and 93 deletions

View File

@@ -18,11 +18,11 @@
var aliasToRealMap = {
'all': 'every',
'any': 'some',
'assign': 'extend',
'collect': 'map',
'detect': 'find',
'drop': 'rest',
'each': 'forEach',
'extend': 'assign',
'foldl': 'reduce',
'foldr': 'reduceRight',
'head': 'first',
@@ -37,9 +37,9 @@
/** Used to associate real names with their aliases */
var realToAliasMap = {
'assign': ['extend'],
'contains': ['include'],
'every': ['all'],
'extend': ['assign'],
'filter': ['select'],
'find': ['detect'],
'first': ['head', 'take'],
@@ -242,7 +242,6 @@
/** List of methods used by Underscore */
var underscoreMethods = _.without.apply(_, [allMethods].concat([
'assign',
'forIn',
'forOwn',
'isPlainObject',