Skip to content

Instantly share code, notes, and snippets.

var mongoose = require('mongoose');
mongoose.connect('localhost', 'testing_invalidate');
var schema = new mongoose.Schema({
name: { type: String, required: true },
pass: { type: String, required: true },
});
schema.methods.setPassword = function setPassword (pwd, confirm) {
if (pwd === confirm) {
@Jxck
Jxck / paralell.js
Created January 30, 2011 07:13 — forked from yssk22/paralell.js
/***
* @function make the parallel request filters and finish with the last filter.
*
* @example
*
* misc.parallel(
* func1, func2, func3, func4
* );
*
* func1 ---+