ФорумПрограммированиеJavaScript → Для любителей underscore.js - посмотрите библиотеку lodash

Для любителей underscore.js - посмотрите библиотеку lodash

  • adw0rd

    Сообщения: 22959 Репутация: N Группа: в ухо

    Spritz 20 февраля 2015 г. 20:20

    lodash [lodash.com]

    Features not in Underscore

    • ~100% code coverage
    • Follows semantic versioning for releases
    • Lazily evaluated chaining
    • _(…) supports implicit chaining
    • _.ary & _.rearg to change function argument limits & order
    • _.at for cherry-picking collection values
    • _.attempt to execute functions which may error without a try-catch
    • _.before to complement _.after
    • _.bindKey for binding “lazy” defined methods
    • _.chunk for splitting an array into chunks of a given size
    • _.clone supports shallow cloning of Date & RegExp objects
    • _.cloneDeep for deep cloning arrays & objects
    • _.create for easier object inheritance
    • _.curry & _.curryRight for creating curried functions
    • _.debounce & _.throttle are cancelable & accept options for more control
    • _.fill to fill arrays with values
    • _.findIndex & _.findKey for finding indexes & keys
    • _.flow to complement _.flowRight (a.k.a _.compose)
    • _.forEach supports exiting early
    • _.forIn for iterating all enumerable properties
    • _.forOwn for iterating own properties
    • _.includes accepts a fromIndex
    • _.isError to check for error objects
    • _.isNative to check for native functions
    • _.isPlainObject & _.toPlainObject to check for & convert to Object objects
    • _.isTypedArray to check for typed arrays
    • _.keysIn & _.valuesIn for getting keys & values of all enumerable properties
    • _.mapValues for mapping values to an object
    • _.matches supports deep object comparisons
    • _.matchesProperty to complement _.matches & _.property
    • _.merge for a deep _.extend
    • _.parseInt for consistent cross-environment behavior
    • _.propertyOf to complement _.property
    • _.pull, _.pullAt, & _.remove for mutating arrays
    • _.random supports returning floating-point numbers
    • _.runInContext for collisionless mixins & easier mocking
    • _.slice for creating subsets of array-like values
    • _.sortByAll for sorting by multiple properties
    • _.spread for creating a function to spread an array of arguments to another
    • _.support for flagging environment features
    • _.template supports “imports” options & ES template delimiters
    • _.transform as a powerful alternative to _.reduce for transforming objects
    • _.xor to complement _.difference, _.intersection, & _.union
    • _.bind, _.curry, _.partial, & more support customizable argument placeholders
    • _.capitalize, _.trim, & more string methods
    • _.clone, _.isEqual, & more accept callbacks
    • _.dropWhile, _.takeWhile, & more to complement _.first, _.initial, _.last, & _.rest
    • _.findLast, _.findLastIndex, & more right-associative methods
    • _.includes, _.toArray, & more accept strings
    • _#thru to pass values thru a chain sequence
    • _#commit & _#plant for working with chain sequences
    https://smappi.org/ - платформа по созданию API на все случаи жизни
  • phpdude

    Сообщения: 26646 Репутация: N Группа: в ухо

    Spritz 20 февраля 2015 г. 20:39, спустя 18 минут 27 секунд

    норм!

    Сапожник без сапог
  • Sinkler

    Сообщения: 7958 Репутация: N Группа: в ухо

    Spritz 20 февраля 2015 г. 20:43, спустя 4 минуты 3 секунды

    да вроде он уже довольно-таки популяризирован

  • AlexB

    Сообщения: 4306 Репутация: N Группа: в ухо

    Spritz 20 февраля 2015 г. 20:44, спустя 50 секунд

    Так чем конкретно лучше?

Пожалуйста, авторизуйтесь, чтобы написать комментарий!