Options
All
  • Public
  • Public/Protected
  • All
Menu

Module _

TODO:

removed:

  • Removed _.support
  • Removed _.findWhere in favor of _.find with iteratee shorthand
  • Removed _.where in favor of _.filter with iteratee shorthand
  • Removed _.pluck in favor of _.map with iteratee shorthand

renamed:

  • Renamed _.first to _.head
  • Renamed _.indexBy to _.keyBy
  • Renamed _.invoke to _.invokeMap
  • Renamed _.overArgs to _.overArgs
  • Renamed _.padLeft & _.padRight to _.padStart & _.padEnd
  • Renamed _.pairs to _.toPairs
  • Renamed _.rest to _.tail
  • Renamed _.restParam to _.rest
  • Renamed _.sortByOrder to _.orderBy
  • Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd
  • Renamed _.trunc to _.truncate

split:

  • Split _.indexOf & _.lastIndexOf into _.sortedIndexOf & _.sortedLastIndexOf
  • Split _.max & _.min into _.maxBy & _.minBy
  • Split _.omit & _.pick into _.omitBy & _.pickBy
  • Split _.sample into _.sampleSize
  • Split _.sortedIndex into _.sortedIndexBy
  • Split _.sortedLastIndex into _.sortedLastIndexBy
  • Split _.uniq into _.sortedUniq, _.sortedUniqBy, & _.uniqBy

changes:

  • Absorbed _.sortByAll into _.sortBy
  • Changed the category of _.at to “Object”
  • Changed the category of _.bindAll to “Utility”
  • Made _.capitalize uppercase the first character & lowercase the rest
  • Made _.functions return only own method names

added 23 array methods:

  • _.concat
  • _.differenceBy
  • _.differenceWith
  • _.flatMap
  • _.fromPairs
  • _.intersectionBy
  • _.intersectionWith
  • _.join
  • _.pullAll
  • _.pullAllBy
  • _.reverse
  • _.sortedIndexBy
  • _.sortedIndexOf
  • _.sortedLastIndexBy
  • _.sortedLastIndexOf
  • _.sortedUniq
  • _.sortedUniqBy
  • _.unionBy
  • _.unionWith
  • _.uniqBy
  • _.uniqWith
  • _.xorBy
  • _.xorWith

added 18 lang methods:

  • _.cloneDeepWith
  • _.cloneWith
  • _.eq
  • _.isArrayLike
  • _.isArrayLikeObject
  • _.isEqualWith
  • _.isInteger
  • _.isLength
  • _.isMatchWith
  • _.isNil
  • _.isObjectLike
  • _.isSafeInteger
  • _.isSymbol
  • _.toInteger
  • _.toLength
  • _.toNumber
  • _.toSafeInteger
  • _.toString

added 13 object methods:

  • _.assignIn
  • _.assignInWith
  • _.assignWith
  • _.functionsIn
  • _.hasIn
  • _.mergeWith
  • _.omitBy
  • _.pickBy

added 8 string methods:

  • _.lowerCase
  • _.lowerFirst
  • _.upperCase
  • _.upperFirst
  • _.toLower
  • _.toUpper

added 8 utility methods:

  • _.toPath

added 4 math methods:

  • _.maxBy
  • _.mean
  • _.minBy
  • _.sumBy

added 2 function methods:

  • _.flip
  • _.unary

added 2 number methods:

  • _.clamp
  • _.subtract

added collection method:

  • _.sampleSize

Added 3 aliases

  • _.first as an alias of _.head

Removed 17 aliases

  • Removed aliase _.all
  • Removed aliase _.any
  • Removed aliase _.backflow
  • Removed aliase _.callback
  • Removed aliase _.collect
  • Removed aliase _.compose
  • Removed aliase _.contains
  • Removed aliase _.detect
  • Removed aliase _.foldl
  • Removed aliase _.foldr
  • Removed aliase _.include
  • Removed aliase _.inject
  • Removed aliase _.methods
  • Removed aliase _.object
  • Removed aliase _.run
  • Removed aliase _.select
  • Removed aliase _.unique

Other changes

  • Added support for array buffers to _.isEqual
  • Added support for converting iterators to _.toArray
  • Added support for deep paths to _.zipObject
  • Changed UMD to export to window or self when available regardless of other exports
  • Ensured debounce cancel clears args & thisArg references
  • Ensured _.add, _.subtract, & _.sum don’t skip NaN values
  • Ensured _.clone treats generators like functions
  • Ensured _.clone produces clones with the source’s [[Prototype]]
  • Ensured _.defaults assigns properties that shadow Object.prototype
  • Ensured _.defaultsDeep doesn’t merge a string into an array
  • Ensured _.defaultsDeep & _.merge don’t modify sources
  • Ensured _.defaultsDeep works with circular references
  • Ensured _.keys skips “length” on strict mode arguments objects in Safari 9
  • Ensured _.merge doesn’t convert strings to arrays
  • Ensured _.merge merges plain-objects onto non plain-objects
  • Ensured _#plant resets iterator data of cloned sequences
  • Ensured _.random swaps min & max if min is greater than max
  • Ensured _.range preserves the sign of start of -0
  • Ensured _.reduce & _.reduceRight use getIteratee in their array branch
  • Fixed rounding issue with the precision param of _.floor

  • LATER ** Misc:

  • Made _.forEach, _.forIn, _.forOwn, & _.times implicitly end a chain sequence
  • Removed thisArg params from most methods
  • Made “By” methods provide a single param to iteratees
  • Made _.words chainable by default
  • Removed isDeep params from _.clone & _.flatten
  • Removed _.bindAll support for binding all methods when no names are provided
  • Removed func-first param signature from _.before & _.after
  • _.extend as an alias of _.assignIn
  • _.extendWith as an alias of _.assignInWith
  • Added clear method to _.memoize.Cache
  • Added flush method to debounced & throttled functions
  • Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray
  • Enabled _.flow & _.flowRight to accept an array of functions
  • Ensured “Collection” methods treat functions as objects
  • Ensured _.assign, _.defaults, & _.merge coerce object values to objects
  • Ensured _.bindKey bound functions call object[key] when called with the new operator
  • Ensured _.isFunction returns true for generator functions
  • Ensured _.merge assigns typed arrays directly
  • Made _(...) an iterator & iterable
  • Made _.drop, _.take, & right forms coerce n of undefined to 0

Methods:

  • _.concat
  • _.differenceBy
  • _.differenceWith
  • _.flatMap
  • _.fromPairs
  • _.intersectionBy
  • _.intersectionWith
  • _.join
  • _.pullAll
  • _.pullAllBy
  • _.reverse
  • _.sortedLastIndexOf
  • _.unionBy
  • _.unionWith
  • _.uniqWith
  • _.xorBy
  • _.xorWith
  • _.toString

  • _.invoke

  • _.setWith
  • _.toPairs
  • _.toPairsIn
  • _.unset

  • _.replace

  • _.split

  • _.cond

  • _.conforms
  • _.nthArg
  • _.over
  • _.overEvery
  • _.overSome
  • _.rangeRight

  • _.next

Index

Type aliases

PH