Relaxed JSON

a strict superset of JSON, relaxing strictness of valilla JSON. Valid, vanilla JSON will not be changed by RJSON.transform. But there are few additional features helping writing JSON by hand.

Comments are stripped : // foo and /* bar */ →      . Comments are converted into whitespace, so your formatting is preserved.
Trailing comma is allowed : [1, 2, 3, ] → [1, 2, 3]. Works also in objects { “foo”: “bar”, } → { “foo”: “bar” }.
Identifiers are transformed into strings : { foo: bar } → { “foo”: “bar” }.
Single quoted strings are allowed : ‘say “Hello”‘ → “say “Hello””.
More different characters is supported in identifiers: foo-bar → “foo-bar”.


cranium for Node.js – Pincer.io

The amount of data you need to build a good classifier increases with the number of features you have, so out of memory errors become a problem when dealing with thousands of features. For example, Weka fails to perform logistic regression with more than a couple thousand features on a 5mb dataset. Cranium never assumes that your instances can fit in memory, so you can use it on terabytes of data.

Cranium works with node streams, so you have a lot of flexibility with your input. Using streams sacrifies speed for memory efficiency — Cranium uses a constant amount of memory that is typically below 100mb. The speed penalty is significant: Cranium runs about 500x slower than LearnKit. If your dataset can fit in memory, Cranium is probably not right for you.


Schedule.js

A flexible scheduler for tasks, work items, reservations, meetings, etc.
The easiest way to schedule work items with complex dependencies across developers that all have different work schedules. Or reserve elevators in an apartment building. Or schedule the company ping pong tournament. Works in Node and in the browser.

I was getting lots of errors in my Express-based REST API due to invalid Json payloads being posted to my endpoint.
Express just throws an exception, but it doesn’t give you the raw payload to see what is causing the error.
I dug into the source code of the body parser and it revealed this simple trick to get the raw payload in req.rawBody:

<br /> app.use(express.bodyParser({<br /> verify: function(req, res, buf, encoding) {<br /> req.rawBody = buf.toString(encoding);<br /> }<br /> }));<br />