A quick look at the new bundler.
Do not think every callbacks is sync or async.
Incremental lint, Prettier, immutable rules.
How to distribute a tree-shaken library for your tree-shaken apps using Rollup.
How to update the code comments during program execution.
Simple example showing automated client code change when module API changes.
Links to projects mentioned during BuzzJS presentation.
Links to additional information included in my OSCON 2016 presentation.
Test function for purity using isolated v8 execution context.
Once you have a Promise instance the action has already started. Task instance does not run until someone calls .fork()
How to use ES6 and target older NodeJS platforms without mangling the code to the lowest common denominator
My build process that can precisely target any Nodejs environment using Rollup, ES6 Feature tests and Babel.
Single function modules, flat libraries and applications.
How to build and distribute libraries via NPM using WebPack bundler.
Generate the initial HTML markup from web app at build time to avoid blank screen.
Remove the empty page flicker on web application startup.
My collection of personal CLI apps to speed up NodeJS development.
How to pass logic instead of data in functional programming.
The most interesting presentations I have seen last month.
How to deploy your own server to receive real time crash data.
Modify the function's variables after the function executed.
Remove unnecessary code while preserving the same code semantics.
How to wrap functions that depend on the environment for clean unit testing.
Eval is limited in its power plus the only time I found `this` variable useful.
Change live Angular application plus unit test private code from Node.
Instead of returning an error code or value, return a Promise.
How to load and use ES2015 in the Chrome DevTools console without any 3rd party extensions.
How to always load a 3rd party library in DevTools console
Use Mocha and the package script commands to quickly start unit testing CommonJS code.
How to store multiple values in a promise chain using an object.
How to design a simple to use and powerful library API.
Companion notes to the "Self-improving software" presentation
Compromise functions private to closures via partially applied references.
Bind some properties in the options object.
Grab a subset of a complex object using functional-extract utility.
Adding new features to an existing function via lifting.
Replace if conditions with functors and applicatives.
Create and destroy an Express.js server in each unit test.
How to avoid creeping lexical scope in asynchronous code.
Simplify middleware using higher-order functions.
Trying a tiny Node / browser NoSQL database with a clean API.
Count a specific word in a text file using streams and reactive programming.
Implementing every other array method using reduce.
How to run ES6 (EcmaScript2015) code using 6to5 transpiler.
A use case where point-free event callback does not work well.
Convert NodeJS EventEmitter emit to a promise-returning method.
Use script tag attributes to pass config values.
How to find the first item after the second number in an array.
Profiling and speeding up a function using Chrome and v8-natives.
Ignoring some arguments and partial binding for methods calls.
A common feature implemented in object-oriented and functional styles.
Find bottlenecks in live web application using Chrome DevTools code snippets.
Thunkifying is currying, argument reordering and middleware stacks.
User acceptance testing with code coverage information using was-tested.
You should use iterator methods for clarity and fewer side effects.
Test live application by mocking responses without modifying code or installing plugins.
Which keys are expensive in a collection of objects?
Feeding fake variables to a function taken out of its lexical scope.
Plus easy promise chaining using Ramda.
Implementing Todo list with Undo using immutable data structure.
Eliminate variables and functions via flexible selective application.
Functor + Applicative = Applier
Functor Promise together with Maybe applicative.
Test function for purity using lexical scope and runtime context.
Prepare for future async data flow by wrapping primitives in promises.
Check if your current module breaks other modules before publishing.
An experiment in offloading AngularJs dirty checking and model updates to a separate browser thread.
Run useful code fragments on-demand to analyze website performance.
A function can configure itself via options argument to keep API clean and simple.
Selective argument binding using lodash, ramda and heroin
Avoid using `this` keyword in the API object revealed from a module.
Debugging unit tests run by Karma using Chrome DevTools.
Iterating over objects using lodash functions.
Clear and easy to read defensive programming with check-types.js and check-more-types.js
Grunt plugins for tightening a project - linting, complexity, todos, etc.
Writing a functional adaptor makes a nice interview question.
Run unit tests in production environment using lazy-test
An argument for trying Ramda if you love _
Easily test code in private closures using test-mole.
Asynchronous processing using ES6 generators.
Promise chain looks like a railroad with two tracks.
Example refactoring a block of code containing OR condition
Pick QUnit/gt if you need TDD, use Mocha if you want BDD, and Ava if preparing for the future.
We use assertions in our unit tests instead of built-in matchers.
Single method working as both getter and setter
Same simple problem solved in different programming styles.
Use lazy and helpful assertions instead of Jasmine matchers in the unit tests.
Current level of ES6 in various tools.
Another set of examples using generators.
Explanation of closures via lexical scope
One can easily apply too much or wrong type of curry.
You can quickly verify complex logic if you use structured JSON logging.
An example adding a flexible timeout method to promises
Extend promises returned by $q with timeout method
We can extend objects built from JSON strings by pointing to a different prototype object.
Make constructor functions work without "new" keyword in callbacks.
Combining functions into custom iterator callbacks and using _ will be easier if you put callback function first and data second.
Playing with ES6 generators in Node.
Flexible assertions without performance penalty.
Experiments with thread-local storage in Node.
How to avoid having to bind functions to contexts.
Finding the size of the memory allocated for the stack.
Comparing 3rd party assertion libraries expect.js, should.js, etc.
Simplify on deman resource loading with promises.
How to bind any argument by name
Use .done() at the end of your Q promise chains to throw any unhandled exception.
Tiny library functional-pipeline composes functions in left to right order.
How to test promise-returning code.
How to spy on methods using sinon.js
Test D3 drawing code without running a browser for speed.
Making my own clone of the popular browser game.
Examples of using lodash, angular, check-types, ramda assertions
AngularJS relies on closures rather than modules, removing need to bind a context.
Remove unit testing coverage from the collected data.
Create and use objects without any prototype.
Example Angular application fetching more data on scroll.
Catch all possible errors using both global and angular error hooks.
How to connect promises into single sequence.
You can easily perform CLI end to end testing by checking the exit codes.
Example refactoring a block of code containing AND condition
EcmaScript6 generator that does nothing
Handling the errors in the promise chain.
How to test Connect or Express middleware functions.
Log loaded files, add code coverage and extra features on the fly.
Extend simple feature with little functional decorators.
Advanced examples removing promise boilerplate code.
How to avoid unnecessary promise boilerplate code.
An example of a weird browser behavior traced back to the minification step.
Using different linting settings depending on the code age
unary, once, time, fluent and tap
iit, xit, ddescribe, xdescribe
Adapting signatures and preserving context in iterators.
Measuring and increasing number of jshint settings.
Detect some code problems using static analysis.