JavaScript Allongé, the "Six" Edition

A Pull of the Lever: Prefaces

  1. About JavaScript Allongé
  2. What JavaScript Allongé is. And isn’t.
  3. Foreword to the “Six” edition
  4. Forewords to the First Edition

Prelude: Values and Expressions over Coffee

  1. values are expressions
  2. values and identity

A Rich Aroma: Basic Numbers

The first sip: Basic Functions

  1. As Little As Possible About Functions, But No Less
  2. Ah. I’d Like to Have an Argument, Please.10
  3. Closures and Scope
  4. That Constant Coffee Craving
  5. Naming Functions
  6. Combinators and Function Decorators
  7. Building Blocks
  8. Magic Names
  9. Summary

Recipes with Basic Functions

  1. Partial Application
  2. Unary
  3. Tap
  4. Maybe
  5. Once
  6. Left-Variadic Functions
  7. Compose and Pipeline

Picking the Bean: Choice and Truthiness

Composing and Decomposing Data

  1. Arrays and Destructuring Arguments
  2. Self-Similarity
  3. Tail Calls (and Default Arguments)
  4. Garbage, Garbage Everywhere
  5. Plain Old JavaScript Objects
  6. Mutation
  7. Reassignment
  8. Copy on Write
  9. Tortoises, Hares, and Teleporting Turtles
  10. Functional Iterators
  11. Making Data Out Of Functions

Recipes with Data

  1. mapWith
  2. Flip
  3. Object.assign
  4. Why?

A Warm Cup: Basic Strings and Quasi-Literals

Stir the Allongé: Objects and State

  1. Encapsulating State with Closures
  2. Composition and Extension
  3. This and That
  4. What Context Applies When We Call a Function?
  5. Method Decorators
  6. Summary

Recipes with Objects, Mutations, and State

  1. Memoize
  2. getWith
  3. pluckWith
  4. Deep Mapping

The Coffee Factory: “Object-Oriented Programming”

Served by the Pot: Collections

  1. Iteration and Iterables
  2. Generating Iterables
  3. Lazy and Eager Collections
  4. Interlude: The Carpenter Interviews for a Job
  5. Interactive Generators
  6. Basic Operations on Iterables

A Coffeehouse: Symbols

Life on the Plantation: Metaobjects

  1. Why Metaobjects?
  2. Mixins, Forwarding, and Delegation
  3. Later Binding
  4. Delegation via Prototypes
  5. Shared Prototypes

Decaffeinated: Impostors

Finish the Cup: Constructors and Classes

  1. Constructors and new
  2. Why Classes in JavaScript?
  3. Classes with class
  4. Object Methods
  5. Why Not Classes?
  6. Summary

Recipes with Constructors and Classes

  1. Bound
  2. Send
  3. Invoke
  4. Fluent

Colourful Mugs: Symmetry, Colour, and Charm

Con Panna: Composing Class Behaviour

  1. Extending Classes with Mixins
  2. Functional Mixins
  3. Emulating Multiple Inheritance
  4. Preventing Property Conflicts
  5. Reducing Coupling

More Decorators

  1. Stateful Method Decorators
  2. Class Decorators beyond ES6/ECMAScript 2015
  3. Method Decorators beyond ES6/ECMAScript 2015
  4. Lightweight Traits

More Decorator Recipes

  1. After Method Advice
  2. Before Method Advice
  3. Provided and Unless
  4. Method Advice

Closing Time at the Coffeeshop: Final Remarks

The Golden Crema: Appendices and Afterwords

  1. How to run the examples
  2. Thanks!
  3. Reading JavaScript Allongé on Kindle
  4. Copyright Notice
  5. About The Author