UNPKG

lodash-contrib

Version:

The brass buckles on lodash's utility belt

139 lines (95 loc) 4.96 kB
<!DOCTYPE html> <html> <head> <title>_.collections.walk.js.md</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <ul id="jump_to"> <li> <a class="large" href="javascript:void(0);">Jump To &hellip;</a> <a class="small" href="javascript:void(0);">+</a> <div id="jump_wrapper"> <div id="jump_page_wrapper"> <div id="jump_page"> <a class="source" href="_.array.builders.js.html"> _.array.builders.js.md </a> <a class="source" href="_.array.selectors.js.html"> _.array.selectors.js.md </a> <a class="source" href="_.collections.walk.js.html"> _.collections.walk.js.md </a> <a class="source" href="_.function.arity.js.html"> _.function.arity.js.md </a> <a class="source" href="_.function.combinators.js.html"> _.function.combinators.js.md </a> <a class="source" href="_.function.iterators.js.html"> _.function.iterators.js.md </a> <a class="source" href="_.function.predicates.js.html"> _.function.predicates.js.md </a> <a class="source" href="_.object.builders.js.html"> _.object.builders.js.md </a> <a class="source" href="_.object.selectors.js.html"> _.object.selectors.js.md </a> <a class="source" href="_.util.existential.js.html"> _.util.existential.js.md </a> <a class="source" href="_.util.operators.js.html"> _.util.operators.js.md </a> <a class="source" href="_.util.strings.js.html"> _.util.strings.js.md </a> <a class="source" href="_.util.trampolines.js.html"> _.util.trampolines.js.md </a> <a class="source" href="index.html"> index.md </a> </div> </div> </li> </ul> <ul class="sections"> <li id="title"> <div class="annotation"> <h1>_.collections.walk.js.md</h1> </div> </li> <li id="section-1"> <div class="annotation"> <div class="pilwrap "> <a class="pilcrow" href="#section-1">&#182;</a> </div> <h3 id="collections-walk">collections.walk</h3> <blockquote> <p>Functions to recursively walk collections which are trees.</p> </blockquote> <p>Documentation should use <a href="https://github.com/jashkenas/journo">Journo</a> formats and standards.</p> </div> <div class="content"><div class='highlight'><pre> _.walk = walk; postorder: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">obj, visitor, context</span>) <span class="hljs-title">preorder</span>: <span class="hljs-title">function</span>(<span class="hljs-params">obj, visitor, context</span>) <span class="hljs-title">walk</span>(<span class="hljs-params">obj, visitor, null, context</span>) <span class="hljs-title">map</span>: <span class="hljs-title">function</span>(<span class="hljs-params">obj, strategy, visitor, context</span>) <span class="hljs-title">pluck</span>: <span class="hljs-title">function</span>(<span class="hljs-params">obj, propertyName</span>) <span class="hljs-title">pluckRec</span>: <span class="hljs-title">function</span>(<span class="hljs-params">obj, propertyName</span>) <span class="hljs-title">_</span>.<span class="hljs-title">walk</span>.<span class="hljs-title">collect</span> = <span class="hljs-title">_</span>.<span class="hljs-title">walk</span>.<span class="hljs-title">map</span>; </span></pre></div></div> </li> </ul> </div> </body> </html>