English 中文(简体)
Lodash - Util
  • 时间:2024-12-22

Lodash - Util


Previous Page Next Page  

Lodash has many easy to use Utipty methods. This chapter discusses them in detail.

Lodash provides various Utipty methods as psted below −

Sr.No. Method & Syntax
1

cond

_.cond(pairs)

2

conforms

_.conforms(source)

3

constant

_.constant(value)

4

defaultTo

_.defaultTo(value, defaultValue)

5

flow

_.flow([funcs])

6

flowRight

_.flowRight([funcs])

7

identity

_.identity(value)

8

iteratee

_.iteratee([func=_.identity])

9

matches

_.matches(source)

10

matchesProperty

_.matchesProperty(path, srcValue)

11

method

_.method(path, [args])

12

methodOf

_.methodOf(object, [args])

13

mixin

_.mixin([object=lodash], source, [options={}])

14

noConfpct

_.noConfpct()

15

noop

_.noop()

16

nthArg

_.nthArg([n=0])

17

over

_.over([iteratees=[_.identity]])

18

overEvery

_.overEvery([predicates=[_.identity]])

19

overSome

_.overSome([predicates=[_.identity]])

20

property

_.property(path)

21

propertyOf

_.propertyOf(object)

22

range

_.range([start=0], end, [step=1])

23

rangeRight

_.rangeRight([start=0], end, [step=1])

24

runInContext

_.runInContext([context=root])

25

stubArray

_.stubArray()

26

stubFalse

_.stubFalse()

27

stubObject

_.stubObject()

28

stubString

_.stubString()

29

stubTrue

_.stubTrue()

30

times

_.times(n, [iteratee=_.identity])

31

toPath

_.toPath(value)

32

uniqueId

_.uniqueId([prefix= ])

Advertisements