Lo-Dash essentials implement fast, lean, and readable code effectively with Lo-Dash

If you are a curious JavaScript developer interested simultaneously in tweaking the efficiency of your code, as well as improving the conciseness of it, and maintaining the readability of it, then this is the book for you. Ideally, the book is intended for readers already working on JavaScript proje...

Descripción completa

Detalles Bibliográficos
Otros Autores: Boduch, Adam, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England : Packt Publishing 2015.
Edición:1st edition
Colección:Community experience distilled.
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629242706719
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Working with Array and Collections; The difference between arrays and collections; Iterating over collections; Sorting data; Using sortBy(); Maintaining the sort order; Searching for data; Filtering collections; Finding items in collections; Slicing collections into smaller pieces; First and last collection portions; Splitting collections into chunks; Building unique arrays; Transforming collections; Grouping collection items; Counting collection items
  • Flattening and compactingValidating some or all items; Unions, intersections, and differences; Summary; Chapter 2: Working with Objects; Determining an object type; Type coercion; Managing function arguments; Arithmetic; Callable objects; Assigning and accessing properties; Extending objects; Defaults for new objects; Finding keys and values; Iterating over objects; Basic For Each; Including inherited properties; Keys and values; Calling methods; Getting results; Finding methods; Transforming objects; Using pairs; Picking and omitting properties; Inverting keys and values
  • Creating and cloning objectsCreating objects; Cloning objects; Summary; Chapter 3: Working with Functions; Binding function contexts; Changing the this keyword; Binding methods; Dynamic methods; Decorating functions; Partials; Function decorators; Function constraints; Limiting call counts; Caching values; Timed execution; Delaying function calls; Deferring function calls; Throttling function calls; Debouncing function calls; Composing and currying functions; Composing functions; Currying functions; Summary; Chapter 4: Transformations Using Map/Reduce; Plucking values; Mapping collections
  • Including and excluding propertiesPerforming calculations; Calling functions; Filtering and mapping; Mapping objects; Working with keys; Calling methods; Mapping key-value pairs; Reducing collections; Summing values; Filtering and reducing; Min, max, and average operations; Reducing objects; Reducing keys; Object accumulators; Binding contexts; Map/reduce patterns; Generic callback functions; Map/reduce chains; Summary; Chapter 5: Assembling Chains; Creating Lo-Dash wrappers; Chained calls; Wrapping values; Explicit and implicit chaining; Building filters; Multiple filter() calls
  • Combining filter() with where()Dropping and taking collection items; Rejecting items; Using initial() and rest(); Testing truth conditions; Testing if a collection contains an item; Everything or anything is true; Counting items; Using length and size(); Grouping using countBy(); Reducing collections; Transformations; Building groups, unions, and unique values; Plucking values; Creating arrays using without(); Finding the min and max values; Finding the index; Using difference() and xor(); Intermediary results; Tapping into chains; Injecting values; Keys and values; Filtered keys and values
  • Omitting and picking properties