Underscore Js Preso

Kom i gang. Det er Gratis
eller tilmeld med din email adresse
Underscore Js Preso af Mind Map: Underscore Js Preso

1. Real project uses

1.1. BillManager

1.1.1. BillManager.coffee

1.1.1.1. mixin

1.1.1.1.1. findById (bm)

1.1.1.1.2. ensure has keys (bm)

1.1.1.2. find

1.1.1.2.1. get model by id

1.1.1.3. each

1.1.1.3.1. check object has keys

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

1.1.1.4. debounce

1.1.1.4.1. fire only after mouseenter/leave output stops arriving

1.1.2. GroupManagement.coffee

1.1.2.1. bind

1.1.2.1.1. bind widget to function

1.1.2.2. pluck

1.1.2.2.1. error messages to be joined

1.1.2.3. keys

1.1.2.3.1. check if hash has values

1.1.3. JobManagement.coffee

1.1.3.1. filter

1.1.3.1.1. find grid model items from this month

1.1.3.2. any

1.1.3.2.1. check if grid has data

1.1.3.3. delay

1.1.3.3.1. for grid refreshing

1.2. FileSystemStorage Tests

1.2.1. reduce

1.2.1.1. calc total zip package size

1.2.2. filter

1.2.2.1. find non-directory zip entries

1.2.2.2. find only file FileEntry

1.2.3. map

1.2.3.1. transform zip entry to extraction deferred

1.2.4. each

1.2.4.1. create & append list items

1.2.4.2. fire a Callbacks msg for each file

1.2.5. pick

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

1.2.6. toArray

1.2.6.1. transform arguments

1.2.7. isFunction

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

1.2.8. rest

1.2.8.1. slice arguments

1.2.9. union

1.2.9.1. join params for apply

1.3. PresoBuilder

1.3.1. Users/Index.js

1.3.1.1. pluck

1.3.1.1.1. get error messages

1.3.1.1.2. find just Ids of selected objects

1.3.1.2. map

1.3.1.2.1. transform int array to object array with Id prop

1.3.1.3. mixin

1.3.1.3.1. pickOut (inverse of pick)

1.3.2. Admin/Areas.js

1.3.2.1. bind

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

1.3.3. presoBuilderNavMenu.coffee

1.3.3.1. each

1.3.3.1.1. create item for each top level datum

1.3.3.1.2. create item recursively for each nested datum

1.3.3.1.3. toggle element visiblity to hide

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

1.3.3.1.5. iterate through visitor children

1.3.3.2. uniqueId

1.3.3.2.1. generate cid

1.3.3.3. defaults

1.3.3.3.1. set default cid

1.3.3.4. chain

1.3.3.4.1. complex filter and each chain

1.3.3.5. filter

1.3.3.5.1. filter for items on same level

1.3.3.5.2. filter for collapsible items other than this one

1.3.3.6. isString

1.3.3.6.1. check for simple data objects as string

1.3.3.7. isArray

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

1.3.4. presoBuilderNavMenu.specs.coffee

1.3.4.1. isUndefined

1.3.4.1.1. check parameter for get/set function

1.3.4.2. each

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

1.3.4.3. isArray

1.3.4.3.1. check if node is an array or not

1.3.4.4. isEqual

1.3.4.4.1. compare complex objects

1.3.4.5. flatten

1.3.4.5.1. allow for one or many inputs x2

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

1.3.4.6. chain

1.3.4.6.1. combine mapping and flattening

1.3.4.7. map

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

1.3.4.8. any

1.3.4.8.1. check for children matching search node

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

1.3.4.9. union

1.3.4.9.1. join recursive results with these results

1.3.4.9.2. prepend an array

1.3.4.10. pluck

1.3.4.10.1. get all children

1.3.4.11. find

1.3.4.11.1. pick out first parent with a baseUrl

1.3.5. expandomenu.coffee

1.3.5.1. bind

1.3.5.1.1. bind a setTimeout method

2. patterns

2.1. allow one or many inputs

2.1.1. flatten

2.1.2. each

2.2. visit

2.2.1. each

2.2.2. isArray

2.3. visit and collect

2.3.1. union recursive

2.4. domain specific methods

2.4.1. mixin (findById)

2.4.1.1. findById

2.5. wait on mouse input

2.5.1. debounce

2.6. bind widget to function

2.6.1. bind

2.6.2. bind

2.7. chain

2.7.1. filter items from this month

2.7.2. pluck their children

2.7.3. compact away nulls

2.7.4. flatten

2.8. convert array to deferred

2.8.1. map

2.8.2. side note on apply and $.when

2.9. pick out sub-object

2.9.1. pick

2.10. slice arguments

2.10.1. rest

2.11. clientId

2.11.1. uniqueCid

2.11.2. tree navigation

2.12. find parent in heirarchy

3. Structure

3.1. 10

3.1.1. Intro self

3.1.2. intro underscore

3.1.3. presentation structure

3.2. 20

3.2.1. collection manipulation

3.2.2. object helpers

3.3. 30

3.3.1. function helpers

3.3.2. convenience

3.3.3. functional

3.4. 40

3.4.1. filter chain

3.5. 50

3.5.1. mixin findById

3.5.2. bind jq ui widget

3.6. 60

3.6.1. allow one or many inputs

3.6.2. tree navigation

4. Most used

4.1. collection manipulation

4.1.1. map

4.1.1.1. pluck

4.1.2. each

4.1.3. first, rest

4.1.4. reduce

4.1.5. filter

4.1.5.1. find

4.1.6. union

4.1.7. flatten

4.1.8. compact

4.2. object helpers

4.2.1. pick

4.2.2. keys/values

4.2.3. map (on hashes)

4.2.4. isFunction / isObject / isArray

4.2.5. isEqual

4.3. function helpers

4.3.1. bind

4.4. functional

4.4.1. memoize

4.4.2. throttle

4.4.3. debounce

4.5. convenience

4.5.1. chain

4.5.1.1. value

4.5.2. mixin

4.5.3. uniqueId

5. seems useful

5.1. collection manipulation

5.1.1. any/all

5.1.2. unique

5.2. object helpers

5.2.1. defaults / extend / clone

5.3. function helpers

5.3.1. invoke / invokeAll / result

5.3.2. bindAll

5.3.3. defer

5.4. functional

5.4.1. compose / wrap

5.4.2. once

5.5. convenience

5.5.1. escape

5.5.2. templating