DailyJS

AniCollection, SuperFetch

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

libraries animation css node modules http

AniCollection, SuperFetch

Posted by Alex R. Young on .
Featured

libraries animation css node modules http

AniCollection, SuperFetch

Posted by Alex R. Young on .

AniCollection

I usually write CSS animations by failing to remember the syntax and then copy and pasting examples until it works the way I want. In times like that a handy directory of CSS animations is essential. AniCollection (GitHub: anicollection/anicollection, License: MIT) by Dariel Noel is big collection of CSS animations. Each animation has a preview and the associated CSS in an easy copy and pastable format.

AniCollection

The site itself is on GitHub, and the author has built it with Grunt, css-annotation, and js-beautify.

SuperFetch

I actually like the request module's API, but juggling multiple requests can be awkward. SuperFetch (GitHub: luin/superfetch, License: MIT, npm: superfetch) by Zihua Li is a promise-based HTTP API that is built on request:

var fetch = require('superfetch');  
fetch.get('http://example.com').then(function(body) {  
  // when the status code begins with "2", the response body will be returned.
}).catch(function(response) {
  // otherwise, the whole response(including headers) is returned.
});

You can use fetch.get.option to set options, and you can chain calls to option if you like. The request and response objects can be transformed with callbacks, and the author has included unit tests written with Mocha.