NPM Everywhere

Azer Koçulu / @azerbike

November 2013 


What is NPM?

It hosts JavaScript libraries, with versions.



It was built for NodeJS, which implements CommonJS modules

It grew  really fast...

Prolific library authors
 followed and recommended Unix Philosopy

"Do one thing well." 

"Compose larger units out of smaller, independent units of functionality."

From @SubStack's JingJS 2013 slides  

NPM works for front-end development, too. You can Browserify any NodeJS library.


The question: why would npm matter for front-end?

I'll answer this with a story from long time ago.

once upon a time ago

english-time was written to be used by a cron-job alternative:


Example .jobs file

A similar tool, run-after was written, based on same library:

Since english-time is just a JS library,
why not to use it in front-end, too?

Here is an example: play radio paradise, and define schedules with english-time:


How about implementing this? 30 lines of JavaScript

NPM contains tons of projects written for only front-end:

The NPM ecosystem itself is an alternative for all frameworks and big libraries such as jQuery and Underscore.

and there are still handy modules to for DOM programming:

Besides of  reusing libraries by others, NPM gives a productive and safe way to split the internal code into small pieces


will be calling another another module

All modules document their internal and external dependencies.

It's viable for keeping the code modularized enough.

small things are easy to design and share

...and easy to document & test

Most projects in NPM has its own README with well formatted description, manual, examples, and list of caveats if there is.

and of course, tests...

Tons of testing tools exist in NPM, some of those help us test cross-platform JavaScript

Prova is one of them. It simplifies running tests, a lot. both NodeJS and browsers


This is a lot of small projects

...waiting for a developer to compose them, into a big software.

NPM is like flying around the planet like a bird, when using a framework is like driving a big truck in restricted roads


You can find this slides at

NPM Everywhere

By Azer Koçulu

NPM Everywhere

  • 14,265
Loading comments...

More from Azer Koçulu