repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursorstream.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursorstream.js | var timers = require('timers');
// Set processor, setImmediate if 0.10 otherwise nextTick
var processor = timers.setImmediate ? timers.setImmediate : process.nextTick;
/**
* Module dependecies.
*/
var Stream = require('stream').Stream;
/**
* CursorStream
*
* Returns a stream interface for the **cursor**.
*
* ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/index.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/index.js | try {
exports.BSONPure = require('bson').BSONPure;
exports.BSONNative = require('bson').BSONNative;
} catch(err) {
// do nothing
}
[ 'commands/base_command'
, 'admin'
, 'collection'
, 'connection/read_preference'
, 'connection/connection'
, 'connection/server'
, 'connection/mongos'
, 'connection/re... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection.js | /**
* Module dependencies.
* @ignore
*/
var InsertCommand = require('./commands/insert_command').InsertCommand
, QueryCommand = require('./commands/query_command').QueryCommand
, DeleteCommand = require('./commands/delete_command').DeleteCommand
, UpdateCommand = require('./commands/update_command').UpdateComm... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | true |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/admin.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/admin.js | /*!
* Module dependencies.
*/
var Collection = require('./collection').Collection,
Cursor = require('./cursor').Cursor,
DbCommand = require('./commands/db_command').DbCommand,
utils = require('./utils');
/**
* Allows the user to access the admin functionality of MongoDB
*
* @class Represents the Admin... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js | var QueryCommand = require('./commands/query_command').QueryCommand,
GetMoreCommand = require('./commands/get_more_command').GetMoreCommand,
KillCursorCommand = require('./commands/kill_cursor_command').KillCursorCommand,
Long = require('bson').Long,
ReadPreference = require('./connection/read_preference').Read... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | true |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js | /**
* Module dependencies.
* @ignore
*/
var QueryCommand = require('./commands/query_command').QueryCommand,
DbCommand = require('./commands/db_command').DbCommand,
MongoReply = require('./responses/mongo_reply').MongoReply,
Admin = require('./admin').Admin,
Collection = require('./collection').Collection,
... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | true |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/mongo_client.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/mongo_client.js | var Db = require('./db').Db;
/**
* Create a new MongoClient instance.
*
* Options
* - **w**, {Number/String, > -1 || 'majority' || tag name} the write concern for the operation where < 1 is no acknowlegement of write and w >= 1, w = 'majority' or tag acknowledges the write
* - **wtimeout**, {Number, 0} set the ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/utils.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/utils.js | /**
* Sort functions, Normalize and prepare sort parameters
*/
var formatSortValue = exports.formatSortValue = function(sortDirection) {
var value = ("" + sortDirection).toLowerCase();
switch (value) {
case 'ascending':
case 'asc':
case '1':
return 1;
case 'descending':
case 'desc':
... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/get_more_command.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/get_more_command.js | var BaseCommand = require('./base_command').BaseCommand,
inherits = require('util').inherits,
binaryutils = require('../utils');
/**
Get More Document Command
**/
var GetMoreCommand = exports.GetMoreCommand = function(db, collectionName, numberToReturn, cursorId) {
BaseCommand.call(this);
this.collectionNam... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/update_command.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/update_command.js | var BaseCommand = require('./base_command').BaseCommand,
inherits = require('util').inherits;
/**
Update Document Command
**/
var UpdateCommand = exports.UpdateCommand = function(db, collectionName, spec, document, options) {
BaseCommand.call(this);
var object = spec;
if(Buffer.isBuffer(object)) {
var o... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/query_command.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/query_command.js | var BaseCommand = require('./base_command').BaseCommand,
inherits = require('util').inherits;
/**
Insert Document Command
**/
var QueryCommand = exports.QueryCommand = function(db, collectionName, queryOptions, numberToSkip, numberToReturn, query, returnFieldSelector, options) {
BaseCommand.call(this);
// Val... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/insert_command.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/insert_command.js | var BaseCommand = require('./base_command').BaseCommand,
inherits = require('util').inherits;
/**
Insert Document Command
**/
var InsertCommand = exports.InsertCommand = function(db, collectionName, checkKeys, options) {
BaseCommand.call(this);
this.collectionName = collectionName;
this.documents = [];
th... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/db_command.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/db_command.js | var QueryCommand = require('./query_command').QueryCommand,
InsertCommand = require('./insert_command').InsertCommand,
inherits = require('util').inherits,
utils = require('../utils'),
crypto = require('crypto');
/**
Db Command
**/
var DbCommand = exports.DbCommand = function(dbInstance, collectionName, quer... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/base_command.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/base_command.js | /**
Base object used for common functionality
**/
var BaseCommand = exports.BaseCommand = function BaseCommand() {
};
var id = 1;
BaseCommand.prototype.getRequestId = function getRequestId() {
if (!this.requestId) this.requestId = id++;
return this.requestId;
};
BaseCommand.prototype.setMongosReadPreference = f... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/kill_cursor_command.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/kill_cursor_command.js | var BaseCommand = require('./base_command').BaseCommand,
inherits = require('util').inherits,
binaryutils = require('../utils');
/**
Insert Document Command
**/
var KillCursorCommand = exports.KillCursorCommand = function(db, cursorIds) {
BaseCommand.call(this);
this.cursorIds = cursorIds;
this.db = db;
}... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/delete_command.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/delete_command.js | var BaseCommand = require('./base_command').BaseCommand,
inherits = require('util').inherits;
/**
Insert Document Command
**/
var DeleteCommand = exports.DeleteCommand = function(db, collectionName, selector, flags) {
BaseCommand.call(this);
// Validate correctness off the selector
var object = selector;
... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/repl_set.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/repl_set.js | var Connection = require('./connection').Connection,
ReadPreference = require('./read_preference').ReadPreference,
DbCommand = require('../commands/db_command').DbCommand,
MongoReply = require('../responses/mongo_reply').MongoReply,
debug = require('util').debug,
inherits = require('util').inherits,
inspe... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | true |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js | var EventEmitter = require('events').EventEmitter
, inherits = require('util').inherits;
/**
* Internal class for callback storage
* @ignore
*/
var CallbackStore = function() {
// Make class an event emitter
EventEmitter.call(this);
// Add a info about call variable
this._notReplied = {};
}
/**
* @ignor... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/url_parser.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/url_parser.js | var fs = require('fs'),
ReadPreference = require('./read_preference').ReadPreference;
exports.parse = function(url, options) {
// Ensure we have a default options object if none set
options = options || {};
// Variables
var connection_part = '';
var auth_part = '';
var query_string_part = '';
var dbNam... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_utils.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_utils.js | exports.setIntegerParameter = function(object, field, defaultValue) {
if(object[field] == null) {
object[field] = defaultValue;
} else if(typeof object[field] !== "number" && object[field] !== parseInt(object[field], 10)) {
throw "object field [" + field + "] must be a numeric integer value, attempted to se... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js | var utils = require('./connection_utils'),
inherits = require('util').inherits,
net = require('net'),
timers = require('timers'),
EventEmitter = require('events').EventEmitter,
inherits = require('util').inherits,
MongoReply = require("../responses/mongo_reply").MongoReply,
Connection = require("./connect... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js | var utils = require('./connection_utils'),
inherits = require('util').inherits,
net = require('net'),
EventEmitter = require('events').EventEmitter,
inherits = require('util').inherits,
binaryutils = require('../utils'),
tls = require('tls');
var Connection = exports.Connection = function(id, socketOptions... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/mongos.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/mongos.js | var ReadPreference = require('./read_preference').ReadPreference
, Base = require('./base').Base
, inherits = require('util').inherits;
/**
* Mongos constructor provides a connection to a mongos proxy including failover to additional servers
*
* Options
* - **socketOptions** {Object, default:null}, an object ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/read_preference.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/read_preference.js | /**
* A class representation of the Read Preference.
*
* Read Preferences
* - **ReadPreference.PRIMARY**, Read from primary only. All operations produce an error (throw an exception where applicable) if primary is unavailable. Cannot be combined with tags (This is the default.).
* - **ReadPreference.PRIMARY_PREF... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js | var Connection = require('./connection').Connection,
ReadPreference = require('./read_preference').ReadPreference,
DbCommand = require('../commands/db_command').DbCommand,
MongoReply = require('../responses/mongo_reply').MongoReply,
ConnectionPool = require('./connection_pool').ConnectionPool,
EventEmitter = ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | true |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/strategies/statistics_strategy.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/strategies/statistics_strategy.js | // The Statistics strategy uses the measure of each end-start time for each
// query executed against the db to calculate the mean, variance and standard deviation
// and pick the server which the lowest mean and deviation
var StatisticsStrategy = exports.StatisticsStrategy = function(replicaset) {
this.replicaset = ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/strategies/ping_strategy.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/strategies/ping_strategy.js | var Server = require("../server").Server
, format = require('util').format;
// The ping strategy uses pings each server and records the
// elapsed time for the server so it can pick a server based on lowest
// return time for the db command {ping:true}
var PingStrategy = exports.PingStrategy = function(replicaset, s... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/grid.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/grid.js | var GridStore = require('./gridstore').GridStore,
ObjectID = require('bson').ObjectID;
/**
* A class representation of a simple Grid interface.
*
* @class Represents the Grid.
* @param {Db} db A database instance to interact with.
* @param {String} [fsName] optional different root collection for GridFS.
* @ret... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/chunk.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/chunk.js | var Binary = require('bson').Binary,
ObjectID = require('bson').ObjectID;
/**
* Class for representing a single chunk in GridFS.
*
* @class
*
* @param file {GridStore} The {@link GridStore} object holding this chunk.
* @param mongoObject {object} The mongo object representation of this chunk.
*
* @throws Err... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/gridstore.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/gridstore.js | /**
* @fileOverview GridFS is a tool for MongoDB to store files to the database.
* Because of the restrictions of the object size the database can hold, a
* facility to split a file into several chunks is needed. The {@link GridStore}
* class offers a simplified api to interact with files while managing the
* chun... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | true |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/readstream.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/readstream.js | var Stream = require('stream').Stream,
timers = require('timers'),
util = require('util');
// Set processor, setImmediate if 0.10 otherwise nextTick
var processor = timers.setImmediate ? timers.setImmediate : process.nextTick;
processor = process.nextTick
/**
* ReadStream
*
* Returns a stream interface for the... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js | challenge4/start/node_modules/mongoose/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js | var Long = require('bson').Long
, timers = require('timers');
// Set processor, setImmediate if 0.10 otherwise nextTick
var processor = timers.setImmediate ? timers.setImmediate : process.nextTick;
processor = process.nextTick
/**
Reply message from mongo db
**/
var MongoReply = exports.MongoReply = function() {
... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/muri/index.js | challenge4/start/node_modules/mongoose/node_modules/muri/index.js | module.exports = exports = require('./lib');
| javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/muri/test/index.js | challenge4/start/node_modules/mongoose/node_modules/muri/test/index.js |
var muri = require('../')
var assert = require('assert')
describe('muri', function(){
it('must begin with mongodb://', function(done){
assert.throws(function () {
muri('localhost:27017');
}, /Invalid mongodb uri/);
assert.doesNotThrow(function () {
muri('mongodb://localhost:27017');
})
... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/muri/lib/index.js | challenge4/start/node_modules/mongoose/node_modules/muri/lib/index.js | // muri
/**
* MongoDB URI parser as described here:
* http://www.mongodb.org/display/DOCS/Connections
*/
/**
* Module dependencies
*/
var qs = require('querystring');
/**
* Defaults
*/
const DEFAULT_PORT = 27017;
const DEFAULT_DB = 'test';
const ADMIN_DB = 'admin';
/**
* Muri
*/
module.exports = exports... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/hooks/test.js | challenge4/start/node_modules/mongoose/node_modules/hooks/test.js | var hooks = require('./hooks')
, should = require('should')
, assert = require('assert')
, _ = require('underscore');
// TODO Add in test for making sure all pres get called if pre is defined directly on an instance.
// TODO Test for calling `done` twice or `next` twice in the same function counts only once
modu... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/hooks/hooks.alt.js | challenge4/start/node_modules/mongoose/node_modules/hooks/hooks.alt.js | /**
* Hooks are useful if we want to add a method that automatically has `pre` and `post` hooks.
* For example, it would be convenient to have `pre` and `post` hooks for `save`.
* _.extend(Model, mixins.hooks);
* Model.hook('save', function () {
* console.log('saving');
* });
* Model.pre('save', function (next,... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/hooks/hooks.js | challenge4/start/node_modules/mongoose/node_modules/hooks/hooks.js | // TODO Add in pre and post skipping options
module.exports = {
/**
* Declares a new hook to which you can add pres and posts
* @param {String} name of the function
* @param {Function} the method
* @param {Function} the error handler callback
*/
hook: function (name, fn, errorCb) {
if (argume... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpath/index.js | challenge4/start/node_modules/mongoose/node_modules/mpath/index.js | module.exports = exports = require('./lib');
| javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpath/test/index.js | challenge4/start/node_modules/mongoose/node_modules/mpath/test/index.js |
/**
* Test dependencies.
*/
var mpath = require('../')
var assert = require('assert')
/**
* logging helper
*/
function log (o) {
console.log();
console.log(require('util').inspect(o, false, 1000));
}
/**
* special path for override tests
*/
var special = '_doc';
/**
* Tests
*/
describe('mpath', func... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | true |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpath/lib/index.js | challenge4/start/node_modules/mongoose/node_modules/mpath/lib/index.js |
/**
* Returns the value of object `o` at the given `path`.
*
* ####Example:
*
* var obj = {
* comments: [
* { title: 'exciting!', _doc: { title: 'great!' }}
* , { title: 'number dos' }
* ]
* }
*
* mpath.get('comments.0.title', o) // 'exciting!'
* ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpromise/index.js | challenge4/start/node_modules/mongoose/node_modules/mpromise/index.js | module.exports = exports = require('./lib/promise');
| javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpromise/node_modules/sliced/index.js | challenge4/start/node_modules/mongoose/node_modules/mpromise/node_modules/sliced/index.js | module.exports = exports = require('./lib/sliced');
| javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpromise/node_modules/sliced/bench.js | challenge4/start/node_modules/mongoose/node_modules/mpromise/node_modules/sliced/bench.js |
var sliced = require('./')
var Bench = require('benchmark');
var s = new Bench.Suite;
var slice = [].slice;
s.add('Array.prototype.slice.call', function () {
Array.prototype.slice.call(arguments);
}).add('[].slice.call', function () {
[].slice.call(arguments);
}).add('cached slice.call', function () {
slice.cal... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpromise/node_modules/sliced/test/index.js | challenge4/start/node_modules/mongoose/node_modules/mpromise/node_modules/sliced/test/index.js |
var sliced = require('../')
var assert = require('assert')
describe('sliced', function(){
it('exports a function', function(){
assert.equal('function', typeof sliced);
})
describe('with 1 arg', function(){
it('returns an array of the arg', function(){
var o = [3, "4", {}];
var r = sliced(o);... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpromise/node_modules/sliced/lib/sliced.js | challenge4/start/node_modules/mongoose/node_modules/mpromise/node_modules/sliced/lib/sliced.js |
/**
* An Array.prototype.slice.call(arguments) alternative
*
* @param {Object} args something with a length
* @param {Number} slice
* @param {Number} sliceEnd
* @api public
*/
module.exports = function () {
var args = arguments[0];
var slice = arguments[1];
var sliceEnd = arguments[2];
var ret = [];
... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpromise/test/promises-A.js | challenge4/start/node_modules/mongoose/node_modules/mpromise/test/promises-A.js |
/**
* Module dependencies.
*/
var assert = require('assert')
var Promise = require('../lib/promise');
var aplus = require('promises-aplus-tests');
// tests
var adapter = {};
adapter.fulfilled = function (value) {
var p = new Promise;
p.fulfill(value);
return p;
};
adapter.rejected = function (reason) {
va... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpromise/test/promise.test.js | challenge4/start/node_modules/mongoose/node_modules/mpromise/test/promise.test.js |
/**
* Module dependencies.
*/
var assert = require('assert')
var Promise = require('../lib/promise');
/**
* Test.
*/
describe('promise', function(){
it('events fire right after fulfill()', function(done){
var promise = new Promise()
, called = 0;
promise.on('fulfill', function (a, b) {
as... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/node_modules/mpromise/lib/promise.js | challenge4/start/node_modules/mongoose/node_modules/mpromise/lib/promise.js |
/*!
* Module dependencies.
*/
var slice = require('sliced');
var EventEmitter = require('events').EventEmitter;
/**
* Promise constructor.
*
* _NOTE: The success and failure event names can be overridden by setting `Promise.SUCCESS` and `Promise.FAILURE` respectively._
*
* @param {Function} back a function th... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/population-plain-objects.js | challenge4/start/node_modules/mongoose/examples/population-plain-objects.js |
var mongoose = require('mongoose')
var Schema = mongoose.Schema;
console.log('Running mongoose version %s', mongoose.version);
/**
* Console schema
*/
var consoleSchema = Schema({
name: String
, manufacturer: String
, released: Date
})
var Console = mongoose.model('Console', consoleSchema);
/**
* Game s... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/population-basic.js | challenge4/start/node_modules/mongoose/examples/population-basic.js |
var mongoose = require('mongoose')
var Schema = mongoose.Schema;
console.log('Running mongoose version %s', mongoose.version);
/**
* Console schema
*/
var consoleSchema = Schema({
name: String
, manufacturer: String
, released: Date
})
var Console = mongoose.model('Console', consoleSchema);
/**
* Game s... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/population-across-three-collections.js | challenge4/start/node_modules/mongoose/examples/population-across-three-collections.js |
var assert = require('assert')
var mongoose = require('../');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Types.ObjectId;
/**
* Connect to the db
*/
var dbname = 'testing_populateAdInfinitum_' + require('../lib/utils').random()
mongoose.connect('localhost', dbname);
mongoose.connection.on('error', functi... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/population-of-multiple-existing-docs.js | challenge4/start/node_modules/mongoose/examples/population-of-multiple-existing-docs.js |
var mongoose = require('mongoose')
var Schema = mongoose.Schema;
console.log('Running mongoose version %s', mongoose.version);
/**
* Console schema
*/
var consoleSchema = Schema({
name: String
, manufacturer: String
, released: Date
})
var Console = mongoose.model('Console', consoleSchema);
/**
* Game s... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/schema.js | challenge4/start/node_modules/mongoose/examples/schema.js |
/**
* Module dependencies.
*/
var mongoose = require('mongoose')
, Schema = mongoose.Schema;
/**
* Schema definition
*/
// recursive embedded-document schema
var Comment = new Schema();
Comment.add({
title : { type: String, index: true }
, date : Date
, body : String
, comments : [C... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/population-options.js | challenge4/start/node_modules/mongoose/examples/population-options.js |
var mongoose = require('mongoose')
var Schema = mongoose.Schema;
console.log('Running mongoose version %s', mongoose.version);
/**
* Console schema
*/
var consoleSchema = Schema({
name: String
, manufacturer: String
, released: Date
})
var Console = mongoose.model('Console', consoleSchema);
/**
* Game s... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/population-of-existing-doc.js | challenge4/start/node_modules/mongoose/examples/population-of-existing-doc.js |
var mongoose = require('mongoose')
var Schema = mongoose.Schema;
console.log('Running mongoose version %s', mongoose.version);
/**
* Console schema
*/
var consoleSchema = Schema({
name: String
, manufacturer: String
, released: Date
})
var Console = mongoose.model('Console', consoleSchema);
/**
* Game s... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/doc-methods.js | challenge4/start/node_modules/mongoose/examples/doc-methods.js |
var mongoose = require('mongoose')
var Schema = mongoose.Schema;
console.log('Running mongoose version %s', mongoose.version);
/**
* Schema
*/
var CharacterSchema = Schema({
name: { type: String, required: true }
, health: { type: Number, min: 0, max: 100 }
})
/**
* Methods
*/
CharacterSchema.methods.at... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/index.js |
module.exports = process.env.EXPRESS_COV
? require('./lib-cov/express')
: require('./lib/express'); | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/test.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/test.js |
/**
* Module dependencies.
*/
var express = require('./')
, app = express()
var users = ['foo', 'bar', 'baz'];
app.use(express.bodyParser());
app.get('/api/users', function(req, res){
res.send(users);
});
app.del('/api/users', function(req, res){
users = [];
res.send(200);
});
app.post('/api/users', fu... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/client.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/client.js |
var http = require('http');
var times = 50;
while (times--) {
var req = http.request({
port: 3000
, method: 'POST'
, headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
});
req.on('response', function(res){
console.log(res.statusCode);
});
var n = 500000;
while (n--) {
... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/range-parser/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/range-parser/index.js |
/**
* Parse "Range" header `str` relative to the given file `size`.
*
* @param {Number} size
* @param {String} str
* @return {Array}
* @api public
*/
module.exports = function(size, str){
var valid = true;
var i = str.indexOf('=');
if (-1 == i) return -2;
var arr = str.slice(i + 1).split(',').map(fun... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/methods/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/methods/index.js |
module.exports = [
'get'
, 'post'
, 'put'
, 'head'
, 'delete'
, 'options'
, 'trace'
, 'copy'
, 'lock'
, 'mkcol'
, 'move'
, 'propfind'
, 'proppatch'
, 'unlock'
, 'report'
, 'mkactivity'
, 'checkout'
, 'merge'
, 'm-search'
, 'notify'
, 'subscribe'
, 'unsubscribe'
, 'patch'... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/cookie/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/cookie/index.js |
/// Serialize the a name value pair into a cookie string suitable for
/// http headers. An optional options object specified cookie parameters
///
/// serialize('foo', 'bar', { httpOnly: true })
/// => "foo=bar; httpOnly"
///
/// @param {String} name
/// @param {String} val
/// @param {Object} options
/// @return {S... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/cookie/test/parse.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/cookie/test/parse.js |
var assert = require('assert');
var cookie = require('..');
suite('parse');
test('basic', function() {
assert.deepEqual({ foo: 'bar' }, cookie.parse('foo=bar'));
assert.deepEqual({ foo: '123' }, cookie.parse('foo=123'));
});
test('ignore spaces', function() {
assert.deepEqual({ FOO: 'bar', baz: 'raz' }... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/cookie/test/serialize.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/cookie/test/serialize.js | // builtin
var assert = require('assert');
var cookie = require('..');
suite('serialize');
test('basic', function() {
assert.equal('foo=bar', cookie.serialize('foo', 'bar'));
assert.equal('foo=bar%20baz', cookie.serialize('foo', 'bar baz'));
});
test('path', function() {
assert.equal('foo=bar; Path=/', ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/buffer-crc32/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/buffer-crc32/index.js | var Buffer = require('buffer').Buffer;
var CRC_TABLE = [
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
0x1adad47d, ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js | var crc32 = require('..');
var test = require('tap').test;
test('simple crc32 is no problem', function (t) {
var input = Buffer('hey sup bros');
var expected = Buffer([0x47, 0xfa, 0x55, 0x70]);
t.same(crc32(input), expected);
t.end();
});
test('another simple one', function (t) {
var input = Buffer('IEND');... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/fresh/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/fresh/index.js |
/**
* Expose `fresh()`.
*/
module.exports = fresh;
/**
* Check freshness of `req` and `res` headers.
*
* When the cache is "fresh" __true__ is returned,
* otherwise __false__ is returned to indicate that
* the cache is now stale.
*
* @param {Object} req
* @param {Object} res
* @return {Boolean}
* @api pu... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/cookie-signature/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/cookie-signature/index.js |
/**
* Module dependencies.
*/
var crypto = require('crypto');
/**
* Sign the given `val` with `secret`.
*
* @param {String} val
* @param {String} secret
* @return {String}
* @api private
*/
exports.sign = function(val, secret){
if ('string' != typeof val) throw new TypeError('cookie required');
if ('st... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/index.js | var path = require('path');
var fs = require('fs');
module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
function mkdirP (p, mode, f, made) {
if (typeof mode === 'function' || mode === undefined) {
f = mode;
mode = 0777 & (~process.umask());
}
if (!made) made = null;
var cb = f ||... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/perm.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/perm.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('async perm', function (t) {
t.plan(2);
var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
mkdirp(file, 0755, function (err) {
if (err) t.fail(err);
else path... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/return.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/return.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('return value', function (t) {
t.plan(4);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/mkdirp.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/mkdirp.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('woo', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Mat... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/sync.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/sync.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('sync', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Ma... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/chmod.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/chmod.js | var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.push(dir);
}
var file = ps.join('/');
test('chmod-pre', functio... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/clobber.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/clobber.js | var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.push(dir);
}
var file = ps.join('/');
// a file in the way
var ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/rel.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/rel.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('rel', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Mat... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/root.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/root.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('root', function (t) {
// '/' on unix, 'c:/' on windows.
var file = path.resolve('/');
mkdirp(file, 0755, function (err) {
if (err) throw err
fs.stat(file, function (er, st... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/return_sync.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/return_sync.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('return value', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/umask.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/umask.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('implicit mode from umask', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
v... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/race.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/race.js | var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('race', function (t) {
t.plan(4);
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.pu... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/perm_sync.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/perm_sync.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('sync perm', function (t) {
t.plan(2);
var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
mkdirp.sync(file, 0755);
path.exists(file, function (ex) {
if ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/umask_sync.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/test/umask_sync.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('umask sync modes', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = M... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/examples/pow.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/mkdirp/examples/pow.js | var mkdirp = require('mkdirp');
mkdirp('/tmp/foo/bar/baz', function (err) {
if (err) console.error(err)
else console.log('pow!')
});
| javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/commander/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/commander/index.js |
module.exports = require('./lib/commander'); | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/commander/lib/commander.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/commander/lib/commander.js |
/*!
* commander
* Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var EventEmitter = require('events').EventEmitter
, path = require('path')
, tty = require('tty')
, basename = path.basename;
/**
* Expose the root command.
*/
exports = module.expo... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/index.js |
module.exports = require('./lib/send'); | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/node_modules/mime/mime.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/node_modules/mime/mime.js | var path = require('path');
var fs = require('fs');
function Mime() {
// Map of extension -> mime type
this.types = Object.create(null);
// Map of mime type -> extension
this.extensions = Object.create(null);
}
/**
* Define mimetype -> extension mappings. Each key is a mime-type that maps
* to an array of... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/node_modules/mime/test.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/node_modules/mime/test.js | /**
* Usage: node test.js
*/
var mime = require('./mime');
var assert = require('assert');
function eq(a, b) {
console.log('Test: ' + a + ' === ' + b);
assert.strictEqual.apply(null, arguments);
}
console.log(Object.keys(mime.extensions).length + ' types');
console.log(Object.keys(mime.types).length + ' extens... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/lib/send.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/lib/send.js |
/**
* Module dependencies.
*/
var debug = require('debug')('send')
, parseRange = require('range-parser')
, Stream = require('stream')
, mime = require('mime')
, fresh = require('fresh')
, path = require('path')
, http = require('http')
, fs = require('fs')
, basename = path.basename
, normalize =... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/lib/utils.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/send/lib/utils.js |
/**
* Return an ETag in the form of `"<size>-<mtime>"`
* from the given `stat`.
*
* @param {Object} stat
* @return {String}
* @api private
*/
exports.etag = function(stat) {
return '"' + stat.size + '-' + Number(stat.mtime) + '"';
};
/**
* decodeURIComponent.
*
* Allows V8 to only deoptimize this fn inst... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/index.js | if ('undefined' == typeof window) {
module.exports = require('./lib/debug');
} else {
module.exports = require('./debug');
}
| javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/debug.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/debug.js |
/**
* Expose `debug()` as the module.
*/
module.exports = debug;
/**
* Create a debugger with the given `name`.
*
* @param {String} name
* @return {Type}
* @api public
*/
function debug(name) {
if (!debug.enabled(name)) return function(){};
return function(fmt){
var curr = new Date;
var ms = cu... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/example/wildcards.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/example/wildcards.js |
var debug = {
foo: require('../')('test:foo'),
bar: require('../')('test:bar'),
baz: require('../')('test:baz')
};
debug.foo('foo')
debug.bar('bar')
debug.baz('baz') | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/example/app.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/example/app.js |
var debug = require('../')('http')
, http = require('http')
, name = 'My App';
// fake app
debug('booting %s', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
res.end('hello\n');
}).listen(3000, function(){
debug('listening');
});
// fake worker of some kind
require('./wo... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/example/worker.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/example/worker.js |
// DEBUG=* node example/worker
// DEBUG=worker:* node example/worker
// DEBUG=worker:a node example/worker
// DEBUG=worker:b node example/worker
var a = require('../')('worker:a')
, b = require('../')('worker:b');
function work() {
a('doing lots of uninteresting work');
setTimeout(work, Math.random() * 1000);
... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/lib/debug.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/debug/lib/debug.js | /**
* Module dependencies.
*/
var tty = require('tty');
/**
* Expose `debug()` as the module.
*/
module.exports = debug;
/**
* Enabled debuggers.
*/
var names = []
, skips = [];
(process.env.DEBUG || '')
.split(/[\s,]+/)
.forEach(function(name){
name = name.replace('*', '.*?');
if (name[0] ===... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/connect/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/connect/index.js |
module.exports = process.env.CONNECT_COV
? require('./lib-cov/connect')
: require('./lib/connect'); | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/connect/test.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/connect/test.js |
var connect = require('./');
var app = connect();
app.use(connect.logger('dev'));
app.use(connect.bodyParser());
app.use(function(req, res, next){
if (req.checkContinue) {
res.writeContinue();
}
res.end('hello');
});
var server = app.listen(3000);
server.on('checkContinue', function(req, res){
req.chec... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
kwhinnery/node-workshop | https://github.com/kwhinnery/node-workshop/blob/594bfc6bebf38d34a36b797e48f6f6d4600da5e4/challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/connect/node_modules/buffer-crc32/index.js | challenge4/start/node_modules/mongoose/examples/connection-sharing/node_modules/express/node_modules/connect/node_modules/buffer-crc32/index.js | var Buffer = require('buffer').Buffer;
var CRC_TABLE = [
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
0x1adad47d, ... | javascript | MIT | 594bfc6bebf38d34a36b797e48f6f6d4600da5e4 | 2026-01-05T03:35:40.007163Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.