Underscore Js Preso

Comienza Ya. Es Gratis
ó regístrate con tu dirección de correo electrónico
Underscore Js Preso por Mind Map: Underscore Js Preso

1. Most used

1.1. collection manipulation

1.1.1. map pluck

1.1.2. each

1.1.3. first, rest

1.1.4. reduce

1.1.5. filter 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 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 mixin findById (bm) ensure has keys (bm) find get model by id each check object has keys iterate through params object and create/append els to form debounce fire only after mouseenter/leave output stops arriving

3.1.2. GroupManagement.coffee bind bind widget to function pluck error messages to be joined keys check if hash has values

3.1.3. JobManagement.coffee filter find grid model items from this month any check if grid has data delay for grid refreshing

3.2. FileSystemStorage Tests

3.2.1. reduce calc total zip package size

3.2.2. filter find non-directory zip entries find only file FileEntry

3.2.3. map transform zip entry to extraction deferred

3.2.4. each create & append list items fire a Callbacks msg for each file

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

3.2.6. toArray transform arguments

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

3.2.8. rest slice arguments

3.2.9. union join params for apply

3.3. PresoBuilder

3.3.1. Users/Index.js pluck get error messages find just Ids of selected objects map transform int array to object array with Id prop mixin pickOut (inverse of pick)

3.3.2. Admin/Areas.js bind deferred resolve/reject to dialog confirm/reject x2

3.3.3. presoBuilderNavMenu.coffee each create item for each top level datum create item recursively for each nested datum toggle element visiblity to hide if array passed to add, go through each one iterate through visitor children uniqueId generate cid defaults set default cid chain complex filter and each chain filter filter for items on same level filter for collapsible items other than this one isString check for simple data objects as string isArray check for arrays passed to add (and pass through each)

3.3.4. presoBuilderNavMenu.specs.coffee isUndefined check parameter for get/set function each visit portions or children of node if is array x2 isArray check if node is an array or not isEqual compare complex objects flatten allow for one or many inputs x2 remove empty arrays when each item is an array x2 chain combine mapping and flattening map get list of items with a child for this node any check for children matching search node filter elements associated with one of a given set of model items union join recursive results with these results prepend an array pluck get all children find pick out first parent with a baseUrl

3.3.5. expandomenu.coffee bind 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) 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