This list has been computed using a silly tool I developed on a lark called npmcount:
- Search npm for packages belonging to a set of users.
| # A bunch of the stuff above relies on this, especially the aliases. | |
| [user] | |
| # you probably want to change this bit. | |
| name = isaacs | |
| email = i@izs.me | |
| signingkey = 0x6C481CF6 | |
| [alias] | |
| ci = commit | |
| st = status | |
| br = branch |
| var color = require('colors'); | |
| var stdin = process.openStdin() | |
| , slides = { | |
| 1: "\tNode.js" + | |
| "\n\n\t\tJavascript running on the server" + | |
| "\n\n\t\tWritten in C++ (POSIX)" + | |
| "\n\n\t\tWraps V8 JS VM (Google/Chrome)" | |
| , 2: "\tOthers / Evented I/O" + | |
| "\n\n\t\t > Reactor Pattern" + | |
| "\n\n\t\t > EventMachine(Ruby) / Twisted (Python)" + |
| var flatiron = require('flatiron') | |
| , connect = require('connect') | |
| , path = require('path') | |
| , fs = require('fs') | |
| , plates = require('plates') | |
| , director = require('director') | |
| , util = require('util') | |
| , keys = require('./auth_keys') | |
| , passport = require('passport') | |
| , TwitterStrategy = require('passport-twitter').Strategy |
| var http = require('http') | |
| var fork = require('child_process').fork; | |
| function fib(n) { | |
| if (n < 2) { | |
| return 1; | |
| } else { | |
| return fib(n - 2) + fib(n - 1); | |
| } | |
| } |
| /**package | |
| * { "name": "npm-test-single-file" | |
| * , "main": "index.js" | |
| * , "version": "1.2.3" | |
| * , "description":"No package.json in sight!" | |
| * , "dependencies": { "minimatch": "*" } | |
| * } | |
| **/ | |
| module.exports = "I'm just a lonely index, naked as the day I was born." |
| var util = require('util'), | |
| Stream = require('stream'); | |
| var FastJSONStream = exports.FastJSONStream = function (options) { | |
| this.bufferSize = options.bufferSize; | |
| this._buffer = new Buffer(this.bufferSize); | |
| }; | |
| util.inherits(FastJSONStream, Stream); | |
| FastJSONStream.prototype.write = function (chunk) { |
| var request = require('request'); | |
| var BufferedStream = require('morestreams').BufferedStream; | |
| function requestHandler(req, res) { | |
| // immediately pipe the incoming request into a paused bufferedstream. | |
| // if you try to pipe after a nextTick it won't work because data starts | |
| // arriving immediately | |
| var bufferedStream = new BufferedStream | |
| bufferedStream.pause() | |
| req.pipe(bufferedStream) |
This list has been computed using a silly tool I developed on a lark called npmcount:
| 'bar' | |
| { foo: 'bar' } | |
| 'Hello' | |
| 'World' | |
| [ 'Hello', 'World' ] | |
| 1 | |
| 2 | |
| 3 | |
| [ 1, 2, 3 ] | |
| [ [ 'Hello', 'World' ], [ 1, 2, 3 ] ] |
| var STATUS = | |
| { VALUE: 0 // now comes an object, array, string, or whatever else you can imagine | |
| , ARRAY: 1 | |
| , STRING: 2 | |
| , NUMBER: 3 | |
| , TRUE: 4 | |
| , FALSE: 5 | |
| , NULL: 6 | |
| , OBJECT: 7 | |
| } |