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/mkdirp/test/chmod.js | test/node_modules/mkdirp/test/chmod.js | var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var _0777 = parseInt('0777', 8);
var _0755 = parseInt('0755', 8);
var _0744 = parseInt('0744', 8);
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Mat... | 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/clobber.js | test/node_modules/mkdirp/test/clobber.js | var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var _0755 = parseInt('0755', 8);
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... | 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/rel.js | test/node_modules/mkdirp/test/rel.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('rel', 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/root.js | test/node_modules/mkdirp/test/root.js | var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var _0755 = parseInt('0755', 8);
test('root', function (t) {
// '/' on unix, 'c:/' on windows.
var file = path.resolve('/');
mkdirp(file, _0755, function (err) {
if (err) throw err
... | 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_sync.js | test/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 | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mkdirp/test/umask.js | test/node_modules/mkdirp/test/umask.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('implicit mode from umask', function (t) {
t.plan(5);
var x = Math.floor(Math.random() *... | 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/race.js | test/node_modules/mkdirp/test/race.js | var mkdirp = require('../').mkdirp;
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('race', function (t) {
t.plan(10);
var ps = [ '', 'tmp' ];
for (var i = ... | 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_sync.js | test/node_modules/mkdirp/test/perm_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 perm', function (t) {
t.plan(4);
var file = '/tmp/' + (Math.random() * (1<<30)).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/mkdirp/test/umask_sync.js | test/node_modules/mkdirp/test/umask_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('umask sync modes', function (t) {
t.plan(4);
var x = Math.floor(Math.random() * Math.po... | 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/bin/cmd.js | test/node_modules/mkdirp/bin/cmd.js | #!/usr/bin/env node
var mkdirp = require('../');
var minimist = require('minimist');
var fs = require('fs');
var argv = minimist(process.argv.slice(2), {
alias: { m: 'mode', h: 'help' },
string: [ 'mode' ]
});
if (argv.help) {
fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
return;... | 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/examples/pow.js | test/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 | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/eventemitter3/index.js | test/node_modules/eventemitter3/index.js | 'use strict';
var has = Object.prototype.hasOwnProperty;
//
// We store our EE objects in a plain object whose properties are event names.
// If `Object.create(null)` is not supported we prefix the event names with a
// `~` to make sure that the built-in object properties are not overridden or
// used as an attack ve... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mime/cli.js | test/node_modules/mime/cli.js | #!/usr/bin/env node
var mime = require('./mime.js');
var file = process.argv[2];
var type = mime.lookup(file);
process.stdout.write(type + '\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/mime/mime.js | test/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 | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mime/src/test.js | test/node_modules/mime/src/test.js | /**
* Usage: node test.js
*/
var mime = require('../mime');
var assert = require('assert');
var path = require('path');
//
// Test mime lookups
//
assert.equal('text/plain', mime.lookup('text.txt')); // normal file
assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase
assert.equal('text/plain',... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/mime/src/build.js | test/node_modules/mime/src/build.js | #!/usr/bin/env node
'use strict';
const fs = require('fs');
const path = require('path');
const mimeScore = require('mime-score');
let db = require('mime-db');
let chalk = require('chalk');
const STANDARD_FACET_SCORE = 900;
const byExtension = {};
// Clear out any conflict extensions in mime-db
for (let type in 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/colors/safe.js | test/node_modules/colors/safe.js | //
// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype
//
// var colors = require('colors/safe);
// colors.red("foo")
//
//
var colors = require('./lib/colors');
module['exports'] = colors; | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/tests/safe-test.js | test/node_modules/colors/tests/safe-test.js | var assert = require('assert'),
colors = require('../safe');
var s = 'string';
function a(s, code) {
return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m';
}
function aE(s, color, code) {
assert.equal(colors[color](s), a(s, code));
assert.equal(colors.strip(s), s);
}
function h(s, color) {
return '<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/colors/tests/basic-test.js | test/node_modules/colors/tests/basic-test.js | var assert = require('assert'),
colors = require('../lib/index');
var s = 'string';
function a(s, code) {
return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m';
}
function aE(s, color, code) {
assert.equal(s[color], a(s, code));
assert.equal(colors[color](s), a(s, code));
assert.equal(s[color], colors[... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/examples/normal-usage.js | test/node_modules/colors/examples/normal-usage.js | var colors = require('../lib/index');
console.log("First some yellow text".yellow);
console.log("Underline that text".yellow.underline);
console.log("Make it bold and red".red.bold);
console.log(("Double Raindows All Day Long").rainbow)
console.log("Drop the bass".trap)
console.log("DROP THE RAINBOW BASS".trap.ra... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/examples/safe-string.js | test/node_modules/colors/examples/safe-string.js | var colors = require('../safe');
console.log(colors.yellow("First some yellow text"));
console.log(colors.yellow.underline("Underline that text"));
console.log(colors.red.bold("Make it bold and red"));
console.log(colors.rainbow("Double Raindows All Day Long"))
console.log(colors.trap("Drop the bass"))
console.lo... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/themes/generic-logging.js | test/node_modules/colors/themes/generic-logging.js | module['exports'] = {
silly: 'rainbow',
input: 'grey',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
data: 'grey',
help: 'cyan',
warn: 'yellow',
debug: 'blue',
error: 'red'
}; | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/extendStringPrototype.js | test/node_modules/colors/lib/extendStringPrototype.js | var colors = require('./colors'),
styles = require('./styles');
module['exports'] = function () {
//
// Extends prototype of native string object to allow for "foo".red syntax
//
var addProperty = function (color, func) {
String.prototype.__defineGetter__(color, func);
};
var sequencer = 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/colors/lib/colors.js | test/node_modules/colors/lib/colors.js | /*
The MIT License (MIT)
Original Library
- Copyright (c) Marak Squires
Additional functionality
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Softwa... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/index.js | test/node_modules/colors/lib/index.js | var colors = require('./colors');
module['exports'] = colors;
// Remark: By default, colors will add style properties to String.prototype
//
// If you don't wish to extend String.prototype you can do this instead and native String will not be touched
//
// var colors = require('colors/safe);
// colors.red("foo")
/... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/styles.js | test/node_modules/colors/lib/styles.js | /*
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation ... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/custom/zalgo.js | test/node_modules/colors/lib/custom/zalgo.js | // please no
module['exports'] = function zalgo(text, options) {
text = text || " he is here ";
var soul = {
"up" : [
'̍', '̎', '̄', '̅',
'̿', '̑', '̆', '̐',
'͒', '͗', '͑', '̇',
'̈', '̊', '͂', '̓',
'̈', '͊', '͋', '͌',
'̃', '̂', '̌', '͐',
'̀', '́', '̋', '̏',
'̒... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/custom/trap.js | test/node_modules/colors/lib/custom/trap.js | module['exports'] = function runTheTrap (text, options) {
var result = "";
text = text || "Run the trap, drop the bass";
text = text.split('');
var trap = {
a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"],
b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"],
c: ... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/system/supports-colors.js | test/node_modules/colors/lib/system/supports-colors.js | /*
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation ... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/maps/zebra.js | test/node_modules/colors/lib/maps/zebra.js | var colors = require('../colors');
module['exports'] = function (letter, i, exploded) {
return i % 2 === 0 ? letter : colors.inverse(letter);
}; | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/maps/rainbow.js | test/node_modules/colors/lib/maps/rainbow.js | var colors = require('../colors');
module['exports'] = (function () {
var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
return function (letter, i, exploded) {
if (letter === " ") {
return letter;
} else {
return colors[rainbowColors[i++ % rainbowColors.length]](let... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/maps/america.js | test/node_modules/colors/lib/maps/america.js | var colors = require('../colors');
module['exports'] = (function() {
return function (letter, i, exploded) {
if(letter === " ") return letter;
switch(i%3) {
case 0: return colors.red(letter);
case 1: return colors.white(letter)
case 2: return colors.blue(letter)
}
}
})(); | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/colors/lib/maps/random.js | test/node_modules/colors/lib/maps/random.js | var colors = require('../colors');
module['exports'] = (function () {
var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
return function(letter, i, exploded) {
return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.le... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/status-code-test.js | test/node_modules/union/test/status-code-test.js | var assert = require('assert'),
request = require('request'),
vows = require('vows'),
union = require('../');
vows.describe('union/status-code').addBatch({
'When using `union`': {
'with a server setting `res.statusCode`': {
topic: function () {
var server = union.createServer({
... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/streaming-test.js | test/node_modules/union/test/streaming-test.js | var assert = require('assert'),
fs = require('fs'),
path = require('path'),
request = require('request'),
vows = require('vows'),
union = require('../');
vows.describe('union/streaming').addBatch({
'When using `union`': {
'a simple union server': {
topic: function () {
var self ... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/double-write-test.js | test/node_modules/union/test/double-write-test.js | /*
* simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var assert = require('assert'),
fs = require('fs'),
path = require('path'),
request = require('request'),
vows = require('vows'),
... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/body-parser-test.js | test/node_modules/union/test/body-parser-test.js | /*
* simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var assert = require('assert'),
connect = require('connect'),
request = require('request'),
vows = require('vows'),
union = require... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/after-test.js | test/node_modules/union/test/after-test.js | var assert = require('assert'),
vows = require('vows'),
request = require('request'),
union = require('../');
function stream_callback(cb) {
return function () {
var stream = new union.ResponseStream();
stream.once("pipe", function (req) {
return cb ? cb(null,req) : 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/union/test/header-test.js | test/node_modules/union/test/header-test.js | var assert = require('assert'),
request = require('request'),
vows = require('vows'),
union = require('../');
vows.describe('union/header').addBatch({
'When using `union`': {
'with a server that responds with a header': {
topic: function () {
var callback = this.callback;
var se... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/prop-test.js | test/node_modules/union/test/prop-test.js | var assert = require('assert'),
request = require('request'),
vows = require('vows'),
union = require('../');
vows.describe('union/properties').addBatch({
'When using `union`': {
'with a server that responds to requests': {
topic: function () {
var callback = this.callback;
var ... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/simple-test.js | test/node_modules/union/test/simple-test.js | /*
* simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var assert = require('assert'),
fs = require('fs'),
path = require('path'),
spawn = require('child_process').spawn,
request = requi... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/ecstatic-test.js | test/node_modules/union/test/ecstatic-test.js | /*
* simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var assert = require('assert'),
ecstatic = require('ecstatic')(__dirname + '/fixtures/static'),
request = require('request'),
vows = re... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/helpers/index.js | test/node_modules/union/test/helpers/index.js | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false | |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/helpers/macros.js | test/node_modules/union/test/helpers/macros.js | /*
* macros.js: Simple test macros
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var assert = require('assert');
var macros = exports;
macros.assertValidResponse = function (err, res) {
assert.isTrue(!err);
assert.equal(res.statusCode, 200);
};
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/test/fixtures/index.js | test/node_modules/union/test/fixtures/index.js | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false | |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/examples/socketio/server.js | test/node_modules/union/examples/socketio/server.js | var fs = require('fs'),
union = require('union');
var server = union.createServer({
before: [
function (req, res) {
fs.readFile(__dirname + '/index.html',
function (err, data) {
if (err) {
res.writeHead(500);
return res.end('Error loading index.html');
}
res.writeHead(200);
res.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/union/examples/after/index.js | test/node_modules/union/examples/after/index.js | var fs = require('fs'),
path = require('path'),
union = require('../../lib');
var server = union.createServer({
before: [ function (req,res) {
if (req.url === "/foo") {
res.text(201, "foo");
}
} ],
after: [
function LoggerStream() {
var stream = new union.ResponseStream();
... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/examples/simple/spdy.js | test/node_modules/union/examples/simple/spdy.js | // In order to run this example you need to
// generate local ssl certificate
var union = require('../../lib'),
director = require('director');
var router = new director.http.Router();
var server = union.createServer({
before: [
function (req, res) {
var found = router.dispatch(req, res);
if (!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/union/examples/simple/simple.js | test/node_modules/union/examples/simple/simple.js | var fs = require('fs'),
path = require('path'),
union = require('../../lib'),
director = require('director'),
favicon = require('./middleware/favicon');
var router = new director.http.Router();
var server = union.createServer({
before: [
favicon(path.join(__dirname, 'favicon.png')),
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/union/examples/simple/middleware/gzip-decode.js | test/node_modules/union/examples/simple/middleware/gzip-decode.js | var spawn = require('child_process').spawn,
util = require('util'),
RequestStream = require('../../lib').RequestStream;
var GzipDecode = module.exports = function GzipDecoder(options) {
RequestStream.call(this, options);
this.on('pipe', this.decode);
}
util.inherits(GzipDecode, RequestStream);
GzipDecod... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/examples/simple/middleware/gzip-encode.js | test/node_modules/union/examples/simple/middleware/gzip-encode.js | var spawn = require('child_process').spawn,
util = require('util'),
ResponseStream = require('../../lib').ResponseStream;
/**
* Accepts a writable stream, i.e. fs.WriteStream, and returns a StreamStack
* whose 'write()' calls are transparently sent to a 'gzip' process before
* being written to the targe... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/examples/simple/middleware/favicon.js | test/node_modules/union/examples/simple/middleware/favicon.js |
/*!
* Connect - favicon
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 TJ Holowaychuk
* MIT Licensed
*/
/**
* Module dependencies.
*/
var crypto = require('crypto')
, fs = require('fs');
/**
* Favicon cache.
*/
var icon;
/**
* Return md5 hash of the given string and optional encoding,
* defaulti... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/lib/core.js | test/node_modules/union/lib/core.js | /*
* core.js: Core functionality for the Flatiron HTTP (with SPDY support) plugin.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var http = require('http'),
https = require('https'),
fs = require('fs'),
stream = require('stream'),
HttpStream = require('./http-stream'),
R... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/lib/buffered-stream.js | test/node_modules/union/lib/buffered-stream.js | /*
* buffered-stream.js: A simple(r) Stream which is partially buffered into memory.
*
* (C) 2010, Mikeal Rogers
*
* Adapted for Flatiron
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var events = require('events'),
fs = require('fs'),
stream = require('stream'),
util = require... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/lib/http-stream.js | test/node_modules/union/lib/http-stream.js | /*
* http-stream.js: Idomatic buffered stream which pipes additional HTTP information.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var url = require('url'),
util = require('util'),
qs = require('qs'),
BufferedStream = require('./buffered-stream');
var HttpStream = module.expo... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/lib/index.js | test/node_modules/union/lib/index.js | /*
* index.js: Top-level plugin exposing HTTP features in flatiron
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var union = exports;
//
// Expose version information
//
exports.version = require('../package.json').version;
//
// Expose core union components
//
union.BufferedStream = requ... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/lib/response-stream.js | test/node_modules/union/lib/response-stream.js | /*
* response-stream.js: A Stream focused on writing any relevant information to
* a raw http.ServerResponse object.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var util = require('util'),
HttpStream = require('./http-stream');
var STATUS_CODES = require('http').STATUS_CODES;
//
//... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/lib/request-stream.js | test/node_modules/union/lib/request-stream.js | /*
* http-stream.js: Idomatic buffered stream which pipes additional HTTP information.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var url = require('url'),
util = require('util'),
qs = require('qs'),
HttpStream = require('./http-stream');
var RequestStream = module.exports =... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/union/lib/routing-stream.js | test/node_modules/union/lib/routing-stream.js | /*
* routing-stream.js: A Stream focused on connecting an arbitrary RequestStream and
* ResponseStream through a given Router.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var util = require('util'),
union = require('./index'),
RequestStream = require('./request-stream'),
Resp... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/debug/karma.conf.js | test/node_modules/debug/karma.conf.js | // Karma configuration
// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/k... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/debug/node.js | test/node_modules/debug/node.js | module.exports = require('./src/node');
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/debug/src/index.js | test/node_modules/debug/src/index.js | /**
* Detect Electron renderer process, which is node, but we should
* treat as a browser.
*/
if (typeof process !== 'undefined' && process.type === 'renderer') {
module.exports = require('./browser.js');
} else {
module.exports = require('./node.js');
}
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/debug/src/browser.js | test/node_modules/debug/src/browser.js | /**
* This is the web browser implementation of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = require('./debug');
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = 'undefined' != typeof chrom... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/debug/src/inspector-log.js | test/node_modules/debug/src/inspector-log.js | module.exports = inspectorLog;
// black hole
const nullStream = new (require('stream').Writable)();
nullStream._write = () => {};
/**
* Outputs a `console.log()` to the Node.js Inspector console *only*.
*/
function inspectorLog() {
const stdout = console._stdout;
console._stdout = nullStream;
console.log.appl... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/debug/src/node.js | test/node_modules/debug/src/node.js | /**
* Module dependencies.
*/
var tty = require('tty');
var util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = require('./debug');
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save ... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/debug/src/debug.js | test/node_modules/debug/src/debug.js |
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
exports.enab... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/qs/index.js | test/node_modules/qs/index.js | module.exports = require('./lib/');
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/qs/test/parse.js | test/node_modules/qs/test/parse.js | /* eslint no-extend-native:0 */
// Load modules
var Code = require('code');
var Lab = require('lab');
var Qs = require('../');
// Declare internals
var internals = {};
// Test shortcuts
var lab = exports.lab = Lab.script();
var expect = Code.expect;
var describe = lab.experiment;
var it = lab.test;
describe('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/qs/test/stringify.js | test/node_modules/qs/test/stringify.js | /* eslint no-extend-native:0 */
// Load modules
var Code = require('code');
var Lab = require('lab');
var Qs = require('../');
// Declare internals
var internals = {};
// Test shortcuts
var lab = exports.lab = Lab.script();
var expect = Code.expect;
var describe = lab.experiment;
var it = lab.test;
describe('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/qs/lib/index.js | test/node_modules/qs/lib/index.js | // Load modules
var Stringify = require('./stringify');
var Parse = require('./parse');
// Declare internals
var internals = {};
module.exports = {
stringify: Stringify,
parse: 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/qs/lib/parse.js | test/node_modules/qs/lib/parse.js | // Load modules
var Utils = require('./utils');
// Declare internals
var internals = {
delimiter: '&',
depth: 5,
arrayLimit: 20,
parameterLimit: 1000
};
internals.parseValues = function (str, options) {
var obj = {};
var parts = str.split(options.delimiter, options.parameterLimit === Infi... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/qs/lib/stringify.js | test/node_modules/qs/lib/stringify.js | // Load modules
var Utils = require('./utils');
// Declare internals
var internals = {
delimiter: '&',
indices: true
};
internals.stringify = function (obj, prefix, options) {
if (Utils.isBuffer(obj)) {
obj = obj.toString();
}
else if (obj instanceof Date) {
obj = obj.toISOStr... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/qs/lib/utils.js | test/node_modules/qs/lib/utils.js | // Load modules
// Declare internals
var internals = {};
exports.arrayToObject = function (source) {
var obj = {};
for (var i = 0, il = source.length; i < il; ++i) {
if (typeof source[i] !== 'undefined') {
obj[i] = source[i];
}
}
return obj;
};
exports.merge = funct... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/server.js | test/sanity/server.js | const http = require('http');
const url = require('url');
const fs = require('fs');
const path = require('path');
let svr = http.createServer(function (req, res) {
console.log(`${req.method} ${req.url}`);
if (req.url === '/redirectme.html') {
let port = svr.address().port;
res.writeHead(308, { 'Location':... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/webview-cdt-ext/core.js | test/sanity/webview-cdt-ext/core.js | var webview = document.createElement('webview')
var devtools = document.createElement('webview')
webview.setAttribute('style', 'height:300px;width:100%;position:absolute')
devtools.setAttribute('style', 'height:300px;width:100%;position:absolute;top:300px')
devtools.setAttribute('partition', 'trusted')
var container ... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/webview-cdt-ext/index.js | test/sanity/webview-cdt-ext/index.js | global.contentDocument = document
require('./core.js')
if (nw.App.argv.indexOf('inspect') !== -1) {
nw.Window.open('about:blank', {
"show": false,
"width": 799,
"height": 799,
}, (inspectWin) => {
inspectWin.maximize()
inspectWin.window.location = "chrome://inspect/#devices"
inspectWin.show... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/webview-cdt-ext/extensions/devtools.js | test/sanity/webview-cdt-ext/extensions/devtools.js | // 添加appdata pannel
chrome.devtools.panels.create("custom",
"",
"custom.html",
function(panel) {
//console.log(panel)
}
)
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue7197-load/nw-main.js | test/sanity/issue7197-load/nw-main.js | /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ re... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue7197-load/js/app.6d98adfb.js | test/sanity/issue7197-load/js/app.6d98adfb.js | /******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/
/******/ // add "moreModules" to the modu... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | true |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue7197-load/js/chunk-vendors.6e82bc79.js | test/sanity/issue7197-load/js/chunk-vendors.6e82bc79.js | (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-vendors"],{
/***/ "0273":
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("c1b2");
var definePropertyModule = __webpack_require__("4180");
var createPropertyDescriptor = __webpack_require__("2c6c");
mo... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | true |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/worker-require-module/worker.js | test/sanity/worker-require-module/worker.js | try {
postMessage(require('test'));
} catch (e) {
postMessage(e.message);
} | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/worker-require-module/node_modules/test/index.js | test/sanity/worker-require-module/node_modules/test/index.js | module.exports = 'success'; | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue6056-spawn-crash/dbcontrol.js | test/sanity/issue6056-spawn-crash/dbcontrol.js | // Program: 5DBat - by BlatSoft
// 04/2017 version: 0.1.0
// dbcontrol.js
// This file used to control all database functions
// - Called from end of start.html/running.html
"use strict";
var dblite = require('dblite');
var dbPath = 'dogs.db';
// ********************** Define SQLite bin path ****************... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue6056-spawn-crash/node_modules/dblite/build/dblite.node.js | test/sanity/issue6056-spawn-crash/node_modules/dblite/build/dblite.node.js | /*!
Copyright (C) 2013 by WebReflection
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribut... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/webview-node-remote/background.js | test/sanity/webview-node-remote/background.js | chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('window.html', {
'outerBounds': {
'width': 800,
'height': 600,
'minWidth': 320,
'minHeight': 320
}
});
});
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/webview-localres-neg/local.js | test/sanity/webview-localres-neg/local.js | var var_in_local_js = 'hello';
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue4357-buffer-crash/index.js | test/sanity/issue4357-buffer-crash/index.js | var data = "mYXG4kDyw2MBJpJEEREXc/fgJ0Iwc5v0LzC9aRYY+EY3oi6C7yTZG0V4hxJnibQr\r\nP94VID3RAlUI2vVCZy3u8NBJZuA0CAZYWwejN925Qs2PgtokK0gls3G1AL9TynzE\r\nlBWoqNuAR3gu39b90Nx16CzAQKuVGobDwHn48ofknUZGPwmzaDbMejJdLvwaOUEv\r\nXhxVpA9+JM5GtD44VKoPn4cg7cySgi+64Gmk6RPMFqo7d1GjvAA+C6RfcBT2msDt\r\n6ehGIPk9neuS7ihudr1JqfyhTxtahFRqdh1E... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | true |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue7305-nwfaketop-cookie/server.js | test/sanity/issue7305-nwfaketop-cookie/server.js | const https = require('https');
const fs = require('fs');
const options = {
key: fs.readFileSync('key.pem'),
cert: fs.readFileSync('cert.pem')
};
function setHeaders(res) {
res.writeHead(200, [
['Content-type', "text/html"],
['Set-Cookie', 'same-site-cookie=foo; path=/test_cookie; SameSite=Lax; Secure'... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/worker-sharedworker/sharedworker.js | test/sanity/worker-sharedworker/sharedworker.js | onconnect = function(e) {
var port = e.ports[0];
try{
var fs = require('fs');
port.postMessage('success');
} catch (e) {
port.postMessage(e.message);
}
}
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/worker-nwbin/mytest.js | test/sanity/worker-nwbin/mytest.js | function mytest(a) {
return a * 42;
}
mytest(10);
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/worker-nwbin/worker.js | test/sanity/worker-nwbin/worker.js | self.onmessage = function(e) {
var ab = e.data;
try {
importNWBin(ab);
postMessage(mytest(20));
} catch (e) {
postMessage(e.message);
}
} | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/worker-process-stdout/worker.js | test/sanity/worker-process-stdout/worker.js | // access process.stdout once in worker
console.log(process.stdout);
close(); | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue7294-navigation/main.js | test/sanity/issue7294-navigation/main.js | nw.Window.open('index.html', {}, function(win) {
win.on('navigation', function (frame, url, policy) {
console.log("navigation called: " + url);
policy.ignore();
win.window.document.querySelector('#result').innerHTML = 'success: ' + url;
});
});
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/webview-localres/local.js | test/sanity/webview-localres/local.js | document.querySelector('#result').innerHTML = 'success';
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue5730-add-node-in-permissions/jquery.min.js | test/sanity/issue5730-add-node-in-permissions/jquery.min.js | /*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof windo... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | true |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue5730-add-node-in-permissions/main.js | test/sanity/issue5730-add-node-in-permissions/main.js |
var wv = document.querySelector('webview');
document.getElementById("request1").innerHTML = JSON.stringify(wv.request);
setTimeout(function(){
document.getElementById("request2").innerHTML = JSON.stringify(wv.request);
}, 500);
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue5730-add-node-in-permissions/background.js | test/sanity/issue5730-add-node-in-permissions/background.js | chrome.app.runtime.onLaunched.addListener(function(launchData) {
chrome.app.window.create(
'index.html',
{
id: 'mainWindow',
bounds: {width: 800, height: 500}
}
);
});
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue5943-mac-dblite-module-with-node8-crash/dbcontrol.js | test/sanity/issue5943-mac-dblite-module-with-node8-crash/dbcontrol.js | // Program: 5DBat - by BlatSoft
// 04/2017 version: 0.1.0
// dbcontrol.js
// This file used to control all database functions
// - Called from end of start.html/running.html
"use strict";
var dblite = require('dblite');
var dbPath = 'dogs.db';
// ********************** Define SQLite bin path ****************... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue7306-loaded/main.js | test/sanity/issue7306-loaded/main.js | nw.Window.open('test.html', {}, function(win) {
win.on("loaded", function() {
win.window.document.querySelector("#result").innerText += "NW.js loaded event\n";
});
});
| javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
nwjs/nw.js | https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/sanity/issue5355-cookie-lost-remote-page/main.js | test/sanity/issue5355-cookie-lost-remote-page/main.js | (function(){
const http = require('http');
let id = 1;
nw.Window.open(`http://localhost:${nw.App.manifest.port}/`, (w)=>{
//w.showDevTools();
//w.closeDevTools();
});
// Create an HTTP server
let srv = http.createServer( (req, res) => {
let headers = {'Content-Type': 'text/html'};
let cookies = req.headers['c... | javascript | MIT | 90c8693ed8bcaf5f41db42eec810e56de36516b3 | 2026-01-04T14:59:04.900678Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.