3.6.1 • Published 7 years ago

min-util v3.6.1

Weekly downloads
17,123
License
ISC
Repository
github
Last release
7 years ago

min-util

Build status NPM version Downloads Dependency Status

A minimalist JavaScript Util library with a largely Lodash-compatible API.

Installation

npm i min-util

Usage

var _ = require('min-util')

Inspired by lodash and underscore

Very Small Size

min-util (~4kb gzipped)

Lodash is ~24kb gzipped

Try in Browser

Try in console, exports as _

Check Unit Tests

Api

Array like

  • _.each -> forEach
  • _.map
  • _.filter
  • _.some
  • _.every
  • _.reduce
  • _.reject
  • _.invoke
  • _.findIndex
  • _.find
  • _.slice
  • _.indexOf
  • _.includes
  • _.uniq
  • _.uniqBy
  • _.flatten
  • _.union
  • _.sample
  • _.sampleSize
  • _.shuffle
  • _.difference
  • _.without
  • _.rest
  • _.compact
  • _.size
  • _.first
  • _.last
  • _.groupBy
  • _.partition
  • _.range
  • _.pullAt
  • _.remove
  • _.fill
  • _.nth

Object

  • _.keys
  • _.forIn
  • _.extend
  • _.defaults
  • _.values
  • _.pick
  • _.functions
  • _.only
  • _.mapKeys
  • _.mapObject
  • _.create
  • _.has
  • _.get
  • _.set
  • _.isMatch
  • _.toPlainObject
  • _.size
  • _.invert

Function

  • _.bind
  • _.once
  • _.memoize
  • _.throttle
  • _.debounce
  • _.delay
  • _.after
  • _.before
  • _.curry
  • _.wrap
  • _.negate

String

  • _.trim
  • _.split
  • _.indexOf
  • _.slice
  • _.toLower
  • _.toUpper
  • _.toString
  • _.camelCase
  • _.capitalize
  • _.upperFirst
  • _.lowerFirst
  • _.includes
  • _.size
  • _.startsWith
  • _.endsWith
  • _.repeat
  • _.padLeft
  • _.padRight
  • _.template not support templateSettings

Utility

  • _.noop
  • _.now
  • _.chain
  • _.value
  • _.constant
  • _.identity
  • _.mixin
  • _.inherits
  • _.random
  • _.uniqueId

Lang

  • _.isString
  • _.isArray
  • _.isArrayLike
  • _.isBoolean
  • _.isElement
  • _.isEmpty
  • _.isFunction
  • _.isInteger
  • _.isNaN
  • _.isNumber
  • _.isObject
  • _.isPlainObject
  • _.isRegExp
  • _.isUndefined

More Check

_.is equals min-is

assert(_.is.arraylike({0: 'foo', length: 1}))

Platform Support

  • all browsers even IE6+
  • node.js

License

License

3.6.1

7 years ago

3.6.0

7 years ago

3.5.0

7 years ago

3.4.0

7 years ago

3.3.1

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.0

8 years ago

2.3.0

8 years ago

2.2.0

8 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.10.1

9 years ago

1.10.0

9 years ago

1.9.1

9 years ago

1.9.0

9 years ago

1.8.7

9 years ago

1.8.6

9 years ago

1.8.3

10 years ago

1.8.2

10 years ago

1.8.1

10 years ago

1.8.0

10 years ago

1.7.6

10 years ago

1.7.5

10 years ago

1.7.4

10 years ago

1.7.3

10 years ago

1.7.2

10 years ago

1.7.1

10 years ago

1.7.0

10 years ago

1.6.13

10 years ago

1.6.11

10 years ago

1.6.10

10 years ago

1.6.8

10 years ago

1.6.7

10 years ago

1.6.6

10 years ago

1.6.3

10 years ago

1.6.2

10 years ago

1.6.1

10 years ago

1.6.0

10 years ago

1.5.1

10 years ago

1.5.0

10 years ago

1.4.3

10 years ago

1.4.2

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.3

10 years ago

1.3.2

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.11

10 years ago

1.2.10

10 years ago

1.2.9

10 years ago

1.2.8

10 years ago

1.2.7

10 years ago

1.2.6

10 years ago

1.2.5

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago