JavaScript Allongé, the "Six" Edition
A Pull of the Lever: Prefaces
- About JavaScript Allongé
- What JavaScript Allongé is. And isn’t.
- Foreword to the “Six” edition
- Forewords to the First Edition
Prelude: Values and Expressions over Coffee
- values are expressions
- values and identity
A Rich Aroma: Basic Numbers
The first sip: Basic Functions
- As Little As Possible About Functions, But No Less
- Ah. I’d Like to Have an Argument, Please.10
- Closures and Scope
- That Constant Coffee Craving
- Naming Functions
- Combinators and Function Decorators
- Building Blocks
- Magic Names
- Summary
Recipes with Basic Functions
- Partial Application
- Unary
- Tap
- Maybe
- Once
- Left-Variadic Functions
- Compose and Pipeline
Picking the Bean: Choice and Truthiness
Composing and Decomposing Data
- Arrays and Destructuring Arguments
- Self-Similarity
- Tail Calls (and Default Arguments)
- Garbage, Garbage Everywhere
- Plain Old JavaScript Objects
- Mutation
- Reassignment
- Copy on Write
- Tortoises, Hares, and Teleporting Turtles
- Functional Iterators
- Making Data Out Of Functions
Recipes with Data
- mapWith
- Flip
- Object.assign
- Why?
A Warm Cup: Basic Strings and Quasi-Literals
Stir the Allongé: Objects and State
- Encapsulating State with Closures
- Composition and Extension
- This and That
- What Context Applies When We Call a Function?
- Method Decorators
- Summary
Recipes with Objects, Mutations, and State
- Memoize
- getWith
- pluckWith
- Deep Mapping
The Coffee Factory: “Object-Oriented Programming”
Served by the Pot: Collections
- Iteration and Iterables
- Generating Iterables
- Lazy and Eager Collections
- Interlude: The Carpenter Interviews for a Job
- Interactive Generators
- Basic Operations on Iterables
A Coffeehouse: Symbols
Life on the Plantation: Metaobjects
- Why Metaobjects?
- Mixins, Forwarding, and Delegation
- Later Binding
- Delegation via Prototypes
- Shared Prototypes
Decaffeinated: Impostors
Finish the Cup: Constructors and Classes
- Constructors and
new - Why Classes in JavaScript?
- Classes with
class - Object Methods
- Why Not Classes?
- Summary
Recipes with Constructors and Classes
- Bound
- Send
- Invoke
- Fluent
Colourful Mugs: Symmetry, Colour, and Charm
Con Panna: Composing Class Behaviour
- Extending Classes with Mixins
- Functional Mixins
- Emulating Multiple Inheritance
- Preventing Property Conflicts
- Reducing Coupling
More Decorators
- Stateful Method Decorators
- Class Decorators beyond ES6/ECMAScript 2015
- Method Decorators beyond ES6/ECMAScript 2015
- Lightweight Traits
More Decorator Recipes
- After Method Advice
- Before Method Advice
- Provided and Unless
- Method Advice
Closing Time at the Coffeeshop: Final Remarks
The Golden Crema: Appendices and Afterwords
- How to run the examples
- Thanks!
- Reading JavaScript Allongé on Kindle
- Copyright Notice
- About The Author