Mongoose 1.0, Chrome WebGL, it-is

2011-02-04 00:00:00 +0000 by Alex R. Young

Mongoose 1.0

Mongoose 1.0 has been finally released by Guillermo Rauch, Nathan White, and Brian Noguchi. I've been
watching their 1.0 branch for a while because the API looks improved
over the older versions. Incidentally, the older API is what we've used
for my Nodepad tutorials, so at some point I'll update Nodepad to
Mongoose 1.0.

There's now a generic Schema class:

var Comments = new Schema({
    title     : String
  , body      : String
  , date      : Date

They've also added middleware, which is a very interesting feature for
reducing nested callbacks. Middleware is defined on the
Schema objects like this:

schema.pre('save', function (next) {
    // something goes wrong
    next(new Error('something went wrong'));

// later...

myModel.save(function (err) {
  // err can come from a middleware

If you want to read more, there's some nice documentation available for
Mongoose on mongoosejs.com.

Chrome WebGL

Until now, Chrome had nascent support for WebGL which was enabled with a
command line flag. Version 9 now includes it by default, and Google's

about the update includes a link to some interesting WebGL


Dominic Tarr said he got tired of typing should all the time, so he
made it-is. It's a very terse
assertion library, which supports expressions like these:


it({a:1, b: 3})
    a: it.typeof('number').notEqual(3)
  , b: it.equal(3)

It looks like Dominic is aiming to support Node with this library, so it
might currently be more useful for server-side testing rather than
client side. You should be able to get it with: npm install