Leanpub Header

Skip to main content

JavaScript Allongé, the "Six" Edition

Programming from Functions to Classes in ECMAScript 2015

A long pull of functions, combinators, & decorators, written in modern JavaScript.

Free With Membership

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
7,721
Readers
511
Pages
89,473Words
About

About

About the Book

What readers have to say:

“Spent the afternoon reading @raganwald's JavaScript Allongé, the Six Edition. Highly recommended. Let the refactoring begin!”—Marcus Vorwaller 

“I think it’s one of the best tech books I’ve read since Sedgewick’s Algorithms in C.”—Andrey Sidorov

“Your explanation of closures in JavaScript Allongé is the best I've read.”—Emehrkay

“It's a different approach to JavaScript than you'll find in most other places and shines a light on some of the more elegant parts of JavaScript the language.”—@jeremymorrell

“This book is awesome and blowing my mind in a great way.”—Johnathan Mukai
“Enjoying Javascript Allonge... I think it's the best discussion of functional programming in js I've found so far.”—Nicholas Faiz

And listen to the JavaScript Jabber Book Club Podcast about JavaScript Allongé!

“Reading JavaScript Allongé by @raganwald. This book is so good that it's blowing my mind.”—Guillermo Pascual

Share this book

License

Creative Commons Attribution-ShareAlike 3.0 Unported License

Price

Pick Your Price...

With Membership

Free!

$19.99

You pay

$19.99

Author earns

$15.99
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 0)

0
The author will earn $0.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

Reg “raganwald” Braithwaite

When he's not shipping CoffeeScript, JavaScript, Ruby, and Java applications scaling out to millions of users, Reg "Raganwald" Braithwaite creates programming libraries such as Allong.es, Method Combinators, Katy, JQuery Combinators, YouAreDaChef, andand, and others.

He writes primarily about programming. Find out more on his  home page.

Leanpub Podcast

Episode 4

An Interview with Reg “raganwald” Braithwaite

Contents

Table of Contents

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

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub