Describe consturctor calling without "new"

This commit is contained in:
Anatoliy Chakkaev 2012-01-09 17:02:11 +04:00
parent 0d2b14e2bc
commit ae41cd697a
1 changed files with 4 additions and 0 deletions

View File

@ -52,6 +52,10 @@ user.save(function (err) {
post.save(console.log);
});
// or just call it as function (with the same result):
var user = User();
user.save(...);
// Common API methods
// just instantiate model