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
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js
test/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js
var http = require('http'), https = require('https'), common = require('../common'); /*! * Array of passes. * * A `pass` is just a function that is executed on `req, socket, options` * so that you can easily add new checks while still keeping the base * flexible. */ /* * Websockets Passes * */ m...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/corser/lib/corser.js
test/node_modules/corser/lib/corser.js
/** * Specification: http://www.w3.org/TR/2012/WD-cors-20120403/ * W3C Working Draft 3 April 2012 */ "use strict"; /*jshint node:true */ var simpleMethods, simpleRequestHeaders, simpleResponseHeaders, toLowerCase, checkOriginMatch; // A method is said to be a simple method if it is a case-sensitive match for one ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/url-join/test/tests.js
test/node_modules/url-join/test/tests.js
var urljoin = require('../lib/url-join'); describe('url join', function () { it('should work for simple case', function () { urljoin('http://www.google.com/', 'foo/bar', '?test=123') .should.eql('http://www.google.com/foo/bar?test=123'); }); it('should work for simple case with new syntax', function (...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/url-join/lib/url-join.js
test/node_modules/url-join/lib/url-join.js
(function (name, context, definition) { if (typeof module !== 'undefined' && module.exports) module.exports = definition(); else if (typeof define === 'function' && define.amd) define(definition); else context[name] = definition(); })('urljoin', this, function () { function startsWith(str, searchString) { ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/wordwrap/index.js
test/node_modules/wordwrap/index.js
var wordwrap = module.exports = function (start, stop, params) { if (typeof start === 'object') { params = start; start = params.start; stop = params.stop; } if (typeof stop === 'object') { params = stop; start = start || params.start; stop = undefined; ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/wordwrap/test/wrap.js
test/node_modules/wordwrap/test/wrap.js
var assert = require('assert'); var wordwrap = require('wordwrap'); var fs = require('fs'); var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); exports.stop80 = function () { var lines = wordwrap(80)(idleness).split(/\n/); var words = idleness.split(/\s+/); lines.forEach(function (li...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/wordwrap/test/break.js
test/node_modules/wordwrap/test/break.js
var assert = require('assert'); var wordwrap = require('../'); exports.hard = function () { var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' + '"browser":"chrome/6.0"}' ; var s_ = wordwrap.hard(80)(s); va...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/wordwrap/example/meat.js
test/node_modules/wordwrap/example/meat.js
var wrap = require('wordwrap')(15); console.log(wrap('You and your whole family are made out of meat.'));
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/wordwrap/example/center.js
test/node_modules/wordwrap/example/center.js
var wrap = require('wordwrap')(20, 60); console.log(wrap( 'At long last the struggle and tumult was over.' + ' The machines had finally cast off their oppressors' + ' and were finally free to roam the cosmos.' + '\n' + 'Free of purpose, free of obligation.' + ' Just drifting through emptiness.' ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/index.js
test/node_modules/minimist/index.js
module.exports = function (args, opts) { if (!opts) opts = {}; var flags = { bools : {}, strings : {}, unknownFn: null }; if (typeof opts['unknown'] === 'function') { flags.unknownFn = opts['unknown']; } if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { flags.allBoo...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/num.js
test/node_modules/minimist/test/num.js
var parse = require('../'); var test = require('tape'); test('nums', function (t) { var argv = parse([ '-x', '1234', '-y', '5.67', '-z', '1e7', '-w', '10f', '--hex', '0xdeadbeef', '789' ]); t.deepEqual(argv, { x : 1234, y : 5.67, z : 1...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/unknown.js
test/node_modules/minimist/test/unknown.js
var parse = require('../'); var test = require('tape'); test('boolean and alias is not unknown', function (t) { var unknown = []; function unknownFn(arg) { unknown.push(arg); return false; } var aliased = [ '-h', 'true', '--derp', 'true' ]; var regular = [ '--herp', 'true', '-d', '...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/kv_short.js
test/node_modules/minimist/test/kv_short.js
var parse = require('../'); var test = require('tape'); test('short -k=v' , function (t) { t.plan(1); var argv = parse([ '-b=123' ]); t.deepEqual(argv, { b: 123, _: [] }); }); test('multi short -k=v' , function (t) { t.plan(1); var argv = parse([ '-a=whatever', '-b=robots' ]); t.deep...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/long.js
test/node_modules/minimist/test/long.js
var test = require('tape'); var parse = require('../'); test('long opts', function (t) { t.deepEqual( parse([ '--bool' ]), { bool : true, _ : [] }, 'long boolean' ); t.deepEqual( parse([ '--pow', 'xixxle' ]), { pow : 'xixxle', _ : [] }, 'long capture sp' ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/default_bool.js
test/node_modules/minimist/test/default_bool.js
var test = require('tape'); var parse = require('../'); test('boolean default true', function (t) { var argv = parse([], { boolean: 'sometrue', default: { sometrue: true } }); t.equal(argv.sometrue, true); t.end(); }); test('boolean default false', function (t) { var argv = parse([...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/dash.js
test/node_modules/minimist/test/dash.js
var parse = require('../'); var test = require('tape'); test('-', function (t) { t.plan(5); t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); t.deepEqual( parse([ '-b', '-' ], { boolean: 'b' }...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/whitespace.js
test/node_modules/minimist/test/whitespace.js
var parse = require('../'); var test = require('tape'); test('whitespace should be whitespace' , function (t) { t.plan(1); var x = parse([ '-x', '\t' ]).x; t.equal(x, '\t'); });
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/short.js
test/node_modules/minimist/test/short.js
var parse = require('../'); var test = require('tape'); test('numeric short args', function (t) { t.plan(2); t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); t.deepEqual( parse([ '-123', '456' ]), { 1: true, 2: true, 3: 456, _: [] } ); }); test('short', function (t) { t.deepEqua...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/parse.js
test/node_modules/minimist/test/parse.js
var parse = require('../'); var test = require('tape'); test('parse args', function (t) { t.deepEqual( parse([ '--no-moo' ]), { moo : false, _ : [] }, 'no' ); t.deepEqual( parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), { v : ['a','b','c'], _ : [] }, 'multi' ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/parse_modified.js
test/node_modules/minimist/test/parse_modified.js
var parse = require('../'); var test = require('tape'); test('parse with modifier functions' , function (t) { t.plan(1); var argv = parse([ '-b', '123' ], { boolean: 'b' }); t.deepEqual(argv, { b: true, _: [123] }); });
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/all_bool.js
test/node_modules/minimist/test/all_bool.js
var parse = require('../'); var test = require('tape'); test('flag boolean true (default all --args to boolean)', function (t) { var argv = parse(['moo', '--honk', 'cow'], { boolean: true }); t.deepEqual(argv, { honk: true, _: ['moo', 'cow'] }); t.deepEqual(typeof ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/stop_early.js
test/node_modules/minimist/test/stop_early.js
var parse = require('../'); var test = require('tape'); test('stops parsing on the first non-option when stopEarly is set', function (t) { var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { stopEarly: true }); t.deepEqual(argv, { aaa: 'bbb', _: ['ccc', '--ddd'] }); t.end...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/dotted.js
test/node_modules/minimist/test/dotted.js
var parse = require('../'); var test = require('tape'); test('dotted alias', function (t) { var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); t.equal(argv.a.b, 22); t.equal(argv.aa.bb, 22); t.end(); }); test('dotted default', function (t) { var argv = parse('', {d...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/test/bool.js
test/node_modules/minimist/test/bool.js
var parse = require('../'); var test = require('tape'); test('flag boolean default false', function (t) { var argv = parse(['moo'], { boolean: ['t', 'verbose'], default: { verbose: false, t: false } }); t.deepEqual(argv, { verbose: false, t: false, _: ['moo'] ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/minimist/example/parse.js
test/node_modules/minimist/example/parse.js
var argv = require('../')(process.argv.slice(2)); console.dir(argv);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/test.js
test/node_modules/ecstatic/test.js
var fs = require('fs'); var stat = fs.statSync('./package.json'); // or some other file console.log(stat.mtime); console.log('' + stat.mtime); console.log(JSON.stringify(stat.mtime));
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/tools/build-icons.js
test/node_modules/ecstatic/tools/build-icons.js
var fs = require('fs'), path = require('path'); var IMG_SIZE = 16; var iconDir = path.resolve(__dirname, '../teambox-icons/' + IMG_SIZE + 'px'); var icons = {}; fs.readdirSync(iconDir).forEach(function (filename) { var tuple = filename.split('.'); icons[tuple[0]] = fs.readFileSync(path.resolve(iconDir, file...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/coverage/lcov-report/prettify.js
test/node_modules/ecstatic/coverage/lcov-report/prettify.js
window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,ope...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/coverage/lcov-report/sorter.js
test/node_modules/ecstatic/coverage/lcov-report/sorter.js
var addSorting = (function () { "use strict"; var cols, currentSort = { index: 0, desc: false }; // returns the summary table element function getTable() { return document.querySelector('.coverage-summary'); } // returns the thead element of the summary table...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/example/express.js
test/node_modules/ecstatic/example/express.js
var express = require('express'); var ecstatic = require('../lib/ecstatic'); var http = require('http'); var app = express(); app.use(ecstatic({ root: __dirname + '/public', showdir : true })); http.createServer(app).listen(8080); console.log('Listening on :8080');
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/example/core.js
test/node_modules/ecstatic/example/core.js
var http = require('http'); var ecstatic = require('../lib/ecstatic')({ root: __dirname + '/public', showDir: true, autoIndex: true }); http.createServer(ecstatic).listen(8080); console.log('Listening on :8080');
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/example/union.js
test/node_modules/ecstatic/example/union.js
var union = require('union'); var ecstatic = require('../'); union.createServer({ before: [ ecstatic(__dirname + '/public') ] }).listen(8080); console.log('Listening on :8080');
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic.js
test/node_modules/ecstatic/lib/ecstatic.js
#! /usr/bin/env node var path = require('path'), fs = require('fs'), url = require('url'), mime = require('mime'), urlJoin = require('url-join'), showDir = require('./ecstatic/show-dir'), version = JSON.parse( fs.readFileSync(__dirname + '/../package.json').toString() ).version, s...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic/etag.js
test/node_modules/ecstatic/lib/ecstatic/etag.js
module.exports = function (stat, weakEtag) { var etag = '"' + [stat.ino, stat.size, JSON.stringify(stat.mtime)].join('-') + '"'; if (weakEtag) { etag = 'W/' + etag; } return etag; }
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic/status-handlers.js
test/node_modules/ecstatic/lib/ecstatic/status-handlers.js
var he = require('he'); // not modified exports['304'] = function (res, next) { res.statusCode = 304; res.end(); }; // access denied exports['403'] = function (res, next) { res.statusCode = 403; if (typeof next === "function") { next(); } else { if (res.writable) { res.setHeader('content-typ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic/opts.js
test/node_modules/ecstatic/lib/ecstatic/opts.js
// This is so you can have options aliasing and defaults in one place. var defaults = require('./defaults.json'); var aliases = require('./aliases.json') module.exports = function (opts) { var autoIndex = defaults.autoIndex, showDir = defaults.showDir, showDotfiles = defaults.showDotfiles, humanRe...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic/show-dir/index.js
test/node_modules/ecstatic/lib/ecstatic/show-dir/index.js
var styles = require('./styles'), supportedIcons = styles.icons, css = styles.css, permsToString = require('./perms-to-string'), sizeToString = require('./size-to-string'), sortFiles = require('./sort-files'), fs = require('fs'), path = require('path'), he = require('he'), etag = req...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic/show-dir/sort-files.js
test/node_modules/ecstatic/lib/ecstatic/show-dir/sort-files.js
var fs = require('fs'), path = require('path'); module.exports = function sortByIsDirectory(dir, paths, cb) { // take the listing file names in `dir` // returns directory and file array, each entry is // of the array a [name, stat] tuple var pending = paths.length, errs = [], dirs = [], f...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic/show-dir/styles.js
test/node_modules/ecstatic/lib/ecstatic/show-dir/styles.js
var fs = require('fs'), icons = require('./icons.json'), path = require('path'); var IMG_SIZE = 16; var css = 'td.icon-parent { height: ' + IMG_SIZE + 'px; width: ' + IMG_SIZE + 'px; }\n'; css += 'td.perms {}\n'; css += 'td.file-size { text-align: right; padding-left: 1em; }\n'; css += 'td.display-name { padd...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic/show-dir/perms-to-string.js
test/node_modules/ecstatic/lib/ecstatic/show-dir/perms-to-string.js
module.exports = function permsToString(stat) { if (!stat.isDirectory || !stat.mode) { return '???!!!???'; } var dir = stat.isDirectory() ? 'd' : '-', mode = stat.mode.toString(8); return dir + mode.slice(-3).split('').map(function (n) { return [ '---', '--x', '-w-', '-w...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ecstatic/lib/ecstatic/show-dir/size-to-string.js
test/node_modules/ecstatic/lib/ecstatic/show-dir/size-to-string.js
// given a file's stat, return the size of it in string // humanReadable: (boolean) whether to result is human readable // si: (boolean) whether to use si (1k = 1000), otherwise 1k = 1024 // adopted from http://stackoverflow.com/a/14919494/665507 module.exports = function sizeToString(stat, humanReadable, si) { if (s...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/requires-port/index.js
test/node_modules/requires-port/index.js
'use strict'; /** * Check if we're required to add a port number. * * @see https://url.spec.whatwg.org/#default-port * @param {Number|String} port Port number we need to check * @param {String} protocol Protocol we need to check against. * @returns {Boolean} Is it a default port for the given protocol * @api pr...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/requires-port/test.js
test/node_modules/requires-port/test.js
describe('requires-port', function () { 'use strict'; var assume = require('assume') , required = require('./'); it('is exported as a function', function () { assume(required).is.a('function'); }); it('does not require empty ports', function () { assume(required('', 'http')).false(); assume...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/async/lib/async.js
test/node_modules/async/lib/async.js
/*! * async * https://github.com/caolan/async * * Copyright 2010-2014 Caolan McMahon * Released under the MIT license */ (function () { var async = {}; function noop() {} function identity(v) { return v; } function toBool(v) { return !!v; } function notId(v) { ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
true
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/async/dist/async.js
test/node_modules/async/dist/async.js
/*! * async * https://github.com/caolan/async * * Copyright 2010-2014 Caolan McMahon * Released under the MIT license */ (function () { var async = {}; function noop() {} function identity(v) { return v; } function toBool(v) { return !!v; } function notId(v) { ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
true
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/async/dist/async.min.js
test/node_modules/async/dist/async.min.js
!function(){function n(){}function t(n){return n}function e(n){return!!n}function r(n){return!n}function u(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function i(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function o(n){return M(n...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/index.js
test/node_modules/optimist/index.js
var path = require('path'); var minimist = require('minimist'); var wordwrap = require('wordwrap'); /* Hack an instance of Argv with process.argv into Argv so people can do require('optimist')(['--beeble=1','-z','zizzle']).argv to parse a list of args and require('optimist').argv to get a ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/index.js
test/node_modules/optimist/node_modules/minimist/index.js
module.exports = function (args, opts) { if (!opts) opts = {}; var flags = { bools : {}, strings : {} }; [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { flags.bools[key] = true; }); var aliases = {}; Object.keys(opts.alias || {}).forEach(function (key) ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/num.js
test/node_modules/optimist/node_modules/minimist/test/num.js
var parse = require('../'); var test = require('tape'); test('nums', function (t) { var argv = parse([ '-x', '1234', '-y', '5.67', '-z', '1e7', '-w', '10f', '--hex', '0xdeadbeef', '789' ]); t.deepEqual(argv, { x : 1234, y : 5.67, z : 1...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/long.js
test/node_modules/optimist/node_modules/minimist/test/long.js
var test = require('tape'); var parse = require('../'); test('long opts', function (t) { t.deepEqual( parse([ '--bool' ]), { bool : true, _ : [] }, 'long boolean' ); t.deepEqual( parse([ '--pow', 'xixxle' ]), { pow : 'xixxle', _ : [] }, 'long capture sp' ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/default_bool.js
test/node_modules/optimist/node_modules/minimist/test/default_bool.js
var test = require('tape'); var parse = require('../'); test('boolean default true', function (t) { var argv = parse([], { boolean: 'sometrue', default: { sometrue: true } }); t.equal(argv.sometrue, true); t.end(); }); test('boolean default false', function (t) { var argv = parse([...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/dash.js
test/node_modules/optimist/node_modules/minimist/test/dash.js
var parse = require('../'); var test = require('tape'); test('-', function (t) { t.plan(5); t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); t.deepEqual( parse([ '-b', '-' ], { boolean: 'b' }...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/whitespace.js
test/node_modules/optimist/node_modules/minimist/test/whitespace.js
var parse = require('../'); var test = require('tape'); test('whitespace should be whitespace' , function (t) { t.plan(1); var x = parse([ '-x', '\t' ]).x; t.equal(x, '\t'); });
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/short.js
test/node_modules/optimist/node_modules/minimist/test/short.js
var parse = require('../'); var test = require('tape'); test('numeric short args', function (t) { t.plan(2); t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); t.deepEqual( parse([ '-123', '456' ]), { 1: true, 2: true, 3: 456, _: [] } ); }); test('short', function (t) { t.deepEqua...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/parse.js
test/node_modules/optimist/node_modules/minimist/test/parse.js
var parse = require('../'); var test = require('tape'); test('parse args', function (t) { t.deepEqual( parse([ '--no-moo' ]), { moo : false, _ : [] }, 'no' ); t.deepEqual( parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), { v : ['a','b','c'], _ : [] }, 'multi' ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/parse_modified.js
test/node_modules/optimist/node_modules/minimist/test/parse_modified.js
var parse = require('../'); var test = require('tape'); test('parse with modifier functions' , function (t) { t.plan(1); var argv = parse([ '-b', '123' ], { boolean: 'b' }); t.deepEqual(argv, { b: true, _: ['123'] }); });
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/dotted.js
test/node_modules/optimist/node_modules/minimist/test/dotted.js
var parse = require('../'); var test = require('tape'); test('dotted alias', function (t) { var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); t.equal(argv.a.b, 22); t.equal(argv.aa.bb, 22); t.end(); }); test('dotted default', function (t) { var argv = parse('', {d...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/test/bool.js
test/node_modules/optimist/node_modules/minimist/test/bool.js
var parse = require('../'); var test = require('tape'); test('flag boolean default false', function (t) { var argv = parse(['moo'], { boolean: ['t', 'verbose'], default: { verbose: false, t: false } }); t.deepEqual(argv, { verbose: false, t: false, _: ['moo'] ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/node_modules/minimist/example/parse.js
test/node_modules/optimist/node_modules/minimist/example/parse.js
var argv = require('../')(process.argv.slice(2)); console.dir(argv);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/dash.js
test/node_modules/optimist/test/dash.js
var optimist = require('../index'); var test = require('tap').test; test('-', function (t) { t.plan(5); t.deepEqual( fix(optimist.parse([ '-n', '-' ])), { n: '-', _: [] } ); t.deepEqual( fix(optimist.parse([ '-' ])), { _: [ '-' ] } ); t.deepEqual( fix(opt...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/whitespace.js
test/node_modules/optimist/test/whitespace.js
var optimist = require('../'); var test = require('tap').test; test('whitespace should be whitespace' , function (t) { t.plan(1); var x = optimist.parse([ '-x', '\t' ]).x; t.equal(x, '\t'); });
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/short.js
test/node_modules/optimist/test/short.js
var optimist = require('../index'); var test = require('tap').test; test('-n123', function (t) { t.plan(1); var parse = optimist.parse([ '-n123' ]); t.equal(parse.n, 123); }); test('-123', function (t) { t.plan(3); var parse = optimist.parse([ '-123', '456' ]); t.equal(parse['1'], true); t...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/parse.js
test/node_modules/optimist/test/parse.js
var optimist = require('../index'); var path = require('path'); var test = require('tap').test; var $0 = 'node ./' + path.relative(process.cwd(), __filename); test('short boolean', function (t) { var parse = optimist.parse([ '-b' ]); t.same(parse, { b : true, _ : [], $0 : $0 }); t.same(typeof parse.b, 'bo...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/_.js
test/node_modules/optimist/test/_.js
var spawn = require('child_process').spawn; var test = require('tap').test; test('dotSlashEmpty', testCmd('./bin.js', [])); test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ])); test('nodeEmpty', testCmd('node bin.js', [])); test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ])); test('whichNodeEmpty'...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/parse_modified.js
test/node_modules/optimist/test/parse_modified.js
var optimist = require('../'); var test = require('tap').test; test('parse with modifier functions' , function (t) { t.plan(1); var argv = optimist().boolean('b').parse([ '-b', '123' ]); t.deepEqual(fix(argv), { b: true, _: ['123'] }); }); function fix (obj) { delete obj.$0; return obj; }
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/usage.js
test/node_modules/optimist/test/usage.js
var Hash = require('hashish'); var optimist = require('../index'); var test = require('tap').test; test('usageFail', function (t) { var r = checkUsage(function () { return optimist('-x 10 -z 20'.split(' ')) .usage('Usage: $0 -x NUM -y NUM') .demand(['x','y']) .argv; ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/_/bin.js
test/node_modules/optimist/test/_/bin.js
#!/usr/bin/env node var argv = require('../../index').argv console.log(JSON.stringify(argv._));
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/test/_/argv.js
test/node_modules/optimist/test/_/argv.js
#!/usr/bin/env node console.log(JSON.stringify(process.argv));
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/reflect.js
test/node_modules/optimist/example/reflect.js
#!/usr/bin/env node console.dir(require('optimist').argv);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/nonopt.js
test/node_modules/optimist/example/nonopt.js
#!/usr/bin/env node var argv = require('optimist').argv; console.log('(%d,%d)', argv.x, argv.y); console.log(argv._);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/string.js
test/node_modules/optimist/example/string.js
#!/usr/bin/env node var argv = require('optimist') .string('x', 'y') .argv ; console.dir([ argv.x, argv.y ]); /* Turns off numeric coercion: ./node string.js -x 000123 -y 9876 [ '000123', '9876' ] */
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/xup.js
test/node_modules/optimist/example/xup.js
#!/usr/bin/env node var argv = require('optimist').argv; if (argv.rif - 5 * argv.xup > 7.138) { console.log('Buy more riffiwobbles'); } else { console.log('Sell the xupptumblers'); }
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/divide.js
test/node_modules/optimist/example/divide.js
#!/usr/bin/env node var argv = require('optimist') .usage('Usage: $0 -x [num] -y [num]') .demand(['x','y']) .argv; console.log(argv.x / argv.y);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/short.js
test/node_modules/optimist/example/short.js
#!/usr/bin/env node var argv = require('optimist').argv; console.log('(%d,%d)', argv.x, argv.y);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/default_hash.js
test/node_modules/optimist/example/default_hash.js
#!/usr/bin/env node var argv = require('optimist') .default({ x : 10, y : 10 }) .argv ; console.log(argv.x + argv.y);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/line_count_options.js
test/node_modules/optimist/example/line_count_options.js
#!/usr/bin/env node var argv = require('optimist') .usage('Count the lines in a file.\nUsage: $0') .options({ file : { demand : true, alias : 'f', description : 'Load a file' }, base : { alias : 'b', description : 'Numeric base ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/default_singles.js
test/node_modules/optimist/example/default_singles.js
#!/usr/bin/env node var argv = require('optimist') .default('x', 10) .default('y', 10) .argv ; console.log(argv.x + argv.y);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/boolean_double.js
test/node_modules/optimist/example/boolean_double.js
#!/usr/bin/env node var argv = require('optimist') .boolean(['x','y','z']) .argv ; console.dir([ argv.x, argv.y, argv.z ]); console.dir(argv._);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/line_count_wrap.js
test/node_modules/optimist/example/line_count_wrap.js
#!/usr/bin/env node var argv = require('optimist') .usage('Count the lines in a file.\nUsage: $0') .wrap(80) .demand('f') .alias('f', [ 'file', 'filename' ]) .describe('f', "Load a file. It's pretty important." + " Required even. So you'd better specify it." ) .alias('b', 'ba...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/bool.js
test/node_modules/optimist/example/bool.js
#!/usr/bin/env node var util = require('util'); var argv = require('optimist').argv; if (argv.s) { util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); } console.log( (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') );
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/line_count.js
test/node_modules/optimist/example/line_count.js
#!/usr/bin/env node var argv = require('optimist') .usage('Count the lines in a file.\nUsage: $0') .demand('f') .alias('f', 'file') .describe('f', 'Load a file') .argv ; var fs = require('fs'); var s = fs.createReadStream(argv.file); var lines = 0; s.on('data', function (buf) { lines += buf.to...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/boolean_single.js
test/node_modules/optimist/example/boolean_single.js
#!/usr/bin/env node var argv = require('optimist') .boolean('v') .argv ; console.dir(argv.v); console.dir(argv._);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/optimist/example/usage-options.js
test/node_modules/optimist/example/usage-options.js
var optimist = require('./../index'); var argv = optimist.usage('This is my awesome program', { 'about': { description: 'Provide some details about the author of this program', required: true, short: 'a', }, 'info': { description: 'Provide some information about the node.js agains!!!!!!', boo...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/index.js
test/node_modules/mkdirp/index.js
var path = require('path'); var fs = require('fs'); var _0777 = parseInt('0777', 8); module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; function mkdirP (p, opts, f, made) { if (typeof opts === 'function') { f = opts; opts = {}; } else if (!opts || typeof opts !== 'object') { ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/index.js
test/node_modules/mkdirp/node_modules/minimist/index.js
module.exports = function (args, opts) { if (!opts) opts = {}; var flags = { bools : {}, strings : {} }; [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { flags.bools[key] = true; }); [].concat(opts.string).filter(Boolean).forEach(function (key) { fla...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/test/long.js
test/node_modules/mkdirp/node_modules/minimist/test/long.js
var test = require('tape'); var parse = require('../'); test('long opts', function (t) { t.deepEqual( parse([ '--bool' ]), { bool : true, _ : [] }, 'long boolean' ); t.deepEqual( parse([ '--pow', 'xixxle' ]), { pow : 'xixxle', _ : [] }, 'long capture sp' ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
test/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
var test = require('tape'); var parse = require('../'); test('boolean default true', function (t) { var argv = parse([], { boolean: 'sometrue', default: { sometrue: true } }); t.equal(argv.sometrue, true); t.end(); }); test('boolean default false', function (t) { var argv = parse([...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/test/dash.js
test/node_modules/mkdirp/node_modules/minimist/test/dash.js
var parse = require('../'); var test = require('tape'); test('-', function (t) { t.plan(5); t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); t.deepEqual( parse([ '-b', '-' ], { boolean: 'b' }...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
test/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
var parse = require('../'); var test = require('tape'); test('whitespace should be whitespace' , function (t) { t.plan(1); var x = parse([ '-x', '\t' ]).x; t.equal(x, '\t'); });
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/test/short.js
test/node_modules/mkdirp/node_modules/minimist/test/short.js
var parse = require('../'); var test = require('tape'); test('numeric short args', function (t) { t.plan(2); t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); t.deepEqual( parse([ '-123', '456' ]), { 1: true, 2: true, 3: 456, _: [] } ); }); test('short', function (t) { t.deepEqua...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/test/parse.js
test/node_modules/mkdirp/node_modules/minimist/test/parse.js
var parse = require('../'); var test = require('tape'); test('parse args', function (t) { t.deepEqual( parse([ '--no-moo' ]), { moo : false, _ : [] }, 'no' ); t.deepEqual( parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), { v : ['a','b','c'], _ : [] }, 'multi' ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
test/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
var parse = require('../'); var test = require('tape'); test('parse with modifier functions' , function (t) { t.plan(1); var argv = parse([ '-b', '123' ], { boolean: 'b' }); t.deepEqual(argv, { b: true, _: ['123'] }); });
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/test/dotted.js
test/node_modules/mkdirp/node_modules/minimist/test/dotted.js
var parse = require('../'); var test = require('tape'); test('dotted alias', function (t) { var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); t.equal(argv.a.b, 22); t.equal(argv.aa.bb, 22); t.end(); }); test('dotted default', function (t) { var argv = parse('', {d...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/node_modules/minimist/example/parse.js
test/node_modules/mkdirp/node_modules/minimist/example/parse.js
var argv = require('../')(process.argv.slice(2)); console.dir(argv);
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/test/perm.js
test/node_modules/mkdirp/test/perm.js
var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; var _0777 = parseInt('0777', 8); var _0755 = parseInt('0755', 8); test('async perm', function (t) { t.plan(5); var file = '/tmp/' + (Math.random() * (1<<30)).t...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/test/return.js
test/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
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/test/opts_fs_sync.js
test/node_modules/mkdirp/test/opts_fs_sync.js
var mkdirp = require('../'); var path = require('path'); var test = require('tap').test; var mockfs = require('mock-fs'); var _0777 = parseInt('0777', 8); var _0755 = parseInt('0755', 8); test('opts.fs sync', function (t) { t.plan(4); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); va...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/test/mkdirp.js
test/node_modules/mkdirp/test/mkdirp.js
var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; var _0777 = parseInt('0777', 8); var _0755 = parseInt('0755', 8); test('woo', function (t) { t.plan(5); var x = Math.floor(Math.random() * Math.pow(16,4)).toSt...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/test/sync.js
test/node_modules/mkdirp/test/sync.js
var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; var _0777 = parseInt('0777', 8); var _0755 = parseInt('0755', 8); test('sync', function (t) { t.plan(4); var x = Math.floor(Math.random() * Math.pow(16,4)).toS...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/test/opts_fs.js
test/node_modules/mkdirp/test/opts_fs.js
var mkdirp = require('../'); var path = require('path'); var test = require('tap').test; var mockfs = require('mock-fs'); var _0777 = parseInt('0777', 8); var _0755 = parseInt('0755', 8); test('opts.fs', function (t) { t.plan(5); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var y =...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false