Skip to content

Instantly share code, notes, and snippets.

@Unitecho
Unitecho / exported.js
Created January 30, 2013 05:18
Node : Module creation without arguments
var EventEmitter = require('events').EventEmitter;
module.exports = new EventEmitter();
setTimeout(function() {
module.exports.emit('ready');
}, 1000);
@Unitecho
Unitecho / index.js
Created January 30, 2013 04:42
Node : Importing submodules from a folder
root.js
/**
* You just have to require the folder where the index.js file is in
*/
var index = require('./models');
console.log(index);
---------
models/index.js
@Unitecho
Unitecho / Storage.js
Created January 30, 2013 03:41
Node : Debug message format
var debug = require('debug')('carcass:Factory:Storage');
@Unitecho
Unitecho / google_reader.js
Last active December 11, 2015 20:48 — forked from dongyuwei/node-reader.js
Node : Google Reader API client.js
/*
This library was developed by Will Honey.
It is licensed under the GPLv3 Open Source License
This library requires the underscore library found at http://documentcloud.github.com/underscore/
This library requires the underscore string library found at http://edtsech.github.com/underscore.string/
This library requires the support of localStorage. Updates could be easily made to change that.
*/
/* jslint adsafe: false, devel: true, regexp: true, browser: true, vars: true, nomen: true, maxerr: 50, indent: 4 */