Underscore Js Preso

Get Started. It's Free
or sign up with your email address
Rocket clouds
Underscore Js Preso by Mind Map: Underscore Js Preso

1. Most used

1.1. collection manipulation

1.1.1. map

1.1.1.1. pluck

1.1.2. each

1.1.3. first, rest

1.1.4. reduce

1.1.5. filter

1.1.5.1. find

1.1.6. union

1.1.7. flatten

1.1.8. compact

1.2. object helpers

1.2.1. pick

1.2.2. keys/values

1.2.3. map (on hashes)

1.2.4. isFunction / isObject / isArray

1.2.5. isEqual

1.3. function helpers

1.3.1. bind

1.4. functional

1.4.1. memoize

1.4.2. throttle

1.4.3. debounce

1.5. convenience

1.5.1. chain

1.5.1.1. value

1.5.2. mixin

1.5.3. uniqueId

2. seems useful

2.1. collection manipulation

2.1.1. any/all

2.1.2. unique

2.2. object helpers

2.2.1. defaults / extend / clone

2.3. function helpers

2.3.1. invoke / invokeAll / result

2.3.2. bindAll

2.3.3. defer

2.4. functional

2.4.1. compose / wrap

2.4.2. once

2.5. convenience

2.5.1. escape

2.5.2. templating

3. Real project uses

3.1. BillManager

3.1.1. BillManager.coffee

3.1.1.1. mixin

3.1.1.1.1. findById (bm)

3.1.1.1.2. ensure has keys (bm)

3.1.1.2. find

3.1.1.2.1. get model by id

3.1.1.3. each

3.1.1.3.1. check object has keys

3.1.1.3.2. iterate through params object and create/append els to form

3.1.1.4. debounce

3.1.1.4.1. fire only after mouseenter/leave output stops arriving

3.1.2. GroupManagement.coffee

3.1.2.1. bind

3.1.2.1.1. bind widget to function

3.1.2.2. pluck

3.1.2.2.1. error messages to be joined

3.1.2.3. keys

3.1.2.3.1. check if hash has values

3.1.3. JobManagement.coffee

3.1.3.1. filter

3.1.3.1.1. find grid model items from this month

3.1.3.2. any

3.1.3.2.1. check if grid has data

3.1.3.3. delay

3.1.3.3.1. for grid refreshing

3.2. FileSystemStorage Tests

3.2.1. reduce

3.2.1.1. calc total zip package size

3.2.2. filter

3.2.2.1. find non-directory zip entries

3.2.2.2. find only file FileEntry

3.2.3. map

3.2.3.1. transform zip entry to extraction deferred

3.2.4. each

3.2.4.1. create & append list items

3.2.4.2. fire a Callbacks msg for each file

3.2.5. pick

3.2.5.1. pick out just the name and type of a fileentry to make sure no reference sticks around x3

3.2.6. toArray

3.2.6.1. transform arguments

3.2.7. isFunction

3.2.7.1. provide defr overload where first param can be context or function with default context

3.2.8. rest

3.2.8.1. slice arguments

3.2.9. union

3.2.9.1. join params for apply

3.3. PresoBuilder

3.3.1. Users/Index.js

3.3.1.1. pluck

3.3.1.1.1. get error messages

3.3.1.1.2. find just Ids of selected objects

3.3.1.2. map

3.3.1.2.1. transform int array to object array with Id prop

3.3.1.3. mixin

3.3.1.3.1. pickOut (inverse of pick)

3.3.2. Admin/Areas.js

3.3.2.1. bind

3.3.2.1.1. deferred resolve/reject to dialog confirm/reject x2

3.3.3. presoBuilderNavMenu.coffee

3.3.3.1. each

3.3.3.1.1. create item for each top level datum

3.3.3.1.2. create item recursively for each nested datum

3.3.3.1.3. toggle element visiblity to hide

3.3.3.1.4. if array passed to add, go through each one

3.3.3.1.5. iterate through visitor children

3.3.3.2. uniqueId

3.3.3.2.1. generate cid

3.3.3.3. defaults

3.3.3.3.1. set default cid

3.3.3.4. chain

3.3.3.4.1. complex filter and each chain

3.3.3.5. filter

3.3.3.5.1. filter for items on same level

3.3.3.5.2. filter for collapsible items other than this one

3.3.3.6. isString

3.3.3.6.1. check for simple data objects as string

3.3.3.7. isArray

3.3.3.7.1. check for arrays passed to add (and pass through each)

3.3.4. presoBuilderNavMenu.specs.coffee

3.3.4.1. isUndefined

3.3.4.1.1. check parameter for get/set function

3.3.4.2. each

3.3.4.2.1. visit portions or children of node if is array x2

3.3.4.3. isArray

3.3.4.3.1. check if node is an array or not

3.3.4.4. isEqual

3.3.4.4.1. compare complex objects

3.3.4.5. flatten

3.3.4.5.1. allow for one or many inputs x2

3.3.4.5.2. remove empty arrays when each item is an array x2

3.3.4.6. chain

3.3.4.6.1. combine mapping and flattening

3.3.4.7. map

3.3.4.7.1. get list of items with a child for this node

3.3.4.8. any

3.3.4.8.1. check for children matching search node

3.3.4.8.2. filter elements associated with one of a given set of model items

3.3.4.9. union

3.3.4.9.1. join recursive results with these results

3.3.4.9.2. prepend an array

3.3.4.10. pluck

3.3.4.10.1. get all children

3.3.4.11. find

3.3.4.11.1. pick out first parent with a baseUrl

3.3.5. expandomenu.coffee

3.3.5.1. bind

3.3.5.1.1. bind a setTimeout method

4. patterns

4.1. allow one or many inputs

4.1.1. flatten

4.1.2. each

4.2. visit

4.2.1. each

4.2.2. isArray

4.3. visit and collect

4.3.1. union recursive

4.4. domain specific methods

4.4.1. mixin (findById)

4.4.1.1. findById

4.5. wait on mouse input

4.5.1. debounce

4.6. bind widget to function

4.6.1. bind

4.6.2. bind

4.7. chain

4.7.1. filter items from this month

4.7.2. pluck their children

4.7.3. compact away nulls

4.7.4. flatten

4.8. convert array to deferred

4.8.1. map

4.8.2. side note on apply and $.when

4.9. pick out sub-object

4.9.1. pick

4.10. slice arguments

4.10.1. rest

4.11. clientId

4.11.1. uniqueCid

4.11.2. tree navigation

4.12. find parent in heirarchy

5. Structure

5.1. 10

5.1.1. Intro self

5.1.2. intro underscore

5.1.3. presentation structure

5.2. 20

5.2.1. collection manipulation

5.2.2. object helpers

5.3. 30

5.3.1. function helpers

5.3.2. convenience

5.3.3. functional

5.4. 40

5.4.1. filter chain

5.5. 50

5.5.1. mixin findById

5.5.2. bind jq ui widget

5.6. 60

5.6.1. allow one or many inputs

5.6.2. tree navigation