crutch

A (terrible) way to use Chronic in Node.

npm install crutch
2 downloads in the last month

Crutch is a (terrible) way to use Chronic in NodeJS applications.

In a nutshell

var parse = require('crutch').parse

parse( 'next tuesday at 2pm', function( err, date, str ){

  if (err) throw err;

  console.log( 'Javascript date object: ', date );

  console.log( 'Chronic actually said: ', str );

})

Getting Crutch

Install via npm, thusly:

npm install crutch

Why would you do this?

Honestly, because missing Chronic is keeping me from building shit in Node.

What about (insert JS date-parsing library)?

I didn't find one I considered "robust enough" when I looked.

"Crutch" is exactly that: something to lean on until it's no longer useful. I hope that's soon.

Can I use it in production?

I might, but you probably wouldn't want to.

How does it work?

It spawns a ruby process, then uses JSON-RPC's ugly cousin to coax magic of Chronic#parse.

Who are you?

Send your hate-mail to: Kieran Huggins, partner at Refactory in Toronto, Canada.

npm loves you