This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_assign(_) { | |
var x = foo(_); | |
x.a = foo(x, _); | |
x.a.b = foo(x.a, _); | |
x['x']['y'] = foo(x.a, _); | |
( x || y)['x'] = foo(_); | |
} | |
// compile by stormjs ================> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var console = console || require('console'); | |
function foo(n){ | |
this.name = n; | |
} | |
foo.prototype.toString = function(){ return this.name }; | |
console.log(new foo('key') === 'key'); // false | |
console.log(null === undefined); // false | |
console.log(new foo('key') == 'key'); // true | |
console.log(null == undefined); // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
smtpd.js is SMTP server written for node.js | |
MIT License | |
*/ | |
var tcp = require('tcp'); | |
var sys = require('sys'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var DEBUG=false, | |
NEVER_READ='hello'; | |
(function() { | |
if(DEBUG){ | |
console.log('Hello world'); | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'), | |
mongoose = require('mongoose'), | |
app; | |
app = module.exports = express.createServer(); | |
app.configure(function() { | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'jade'); | |
app.use(express.bodyParser()); | |
app.use(express.methodOverride()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
TARGET_DIR=/tmp/abs | |
TARGET= | |
S_ARG= | |
sync= | |
C_ARG= | |
F_ARG= | |
PAC_F_ARG= | |
COWER=`which cower` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculates the hash/checksum of a string. Default algorithm is MD5. | |
* | |
* @param {String} str | |
* @param {String} algorithm | |
* @return {String} checksum | |
* @api public | |
*/ | |
exports.hash = function (str, algorithm) { | |
if (algorithm === 'crc32') { |
NewerOlder