text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```javascript
// Generated by CoffeeScript 1.12.7
(function() {
var XMLStringifier,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
hasProp = {}.hasOwnProperty;
module.exports = XMLStringifier = (function() {
function XMLStringifier(options) {
this.assertLegalNam... | /content/code_sandbox/node_modules/xmlbuilder/lib/XMLStringifier.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,937 |
```javascript
// Generated by CoffeeScript 1.12.7
(function() {
"use strict";
exports.stripBOM = function(str) {
if (str[0] === '\uFEFF') {
return str.substring(1);
} else {
return str;
}
};
}).call(this);
``` | /content/code_sandbox/node_modules/xml2js/lib/bom.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 68 |
```javascript
// Generated by CoffeeScript 1.12.7
(function() {
"use strict";
var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA,
hasProp = {}.hasOwnProperty;
builder = require('xmlbuilder');
defaults = require('./defaults').defaults;
requiresCDATA = function(entry) {
return typeof entry ... | /content/code_sandbox/node_modules/xml2js/lib/builder.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 939 |
```javascript
// Generated by CoffeeScript 1.12.7
(function() {
"use strict";
var builder, defaults, parser, processors,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.p... | /content/code_sandbox/node_modules/xml2js/lib/xml2js.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 226 |
```javascript
// Generated by CoffeeScript 1.12.7
(function() {
"use strict";
var prefixMatch;
prefixMatch = new RegExp(/(?!xmlns)^.*:/);
exports.normalize = function(str) {
return str.toLowerCase();
};
exports.firstCharLowerCase = function(str) {
return str.charAt(0).toLowerCase() + str.slice(1)... | /content/code_sandbox/node_modules/xml2js/lib/processors.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 192 |
```javascript
// Generated by CoffeeScript 1.12.7
(function() {
exports.defaults = {
"0.1": {
explicitCharkey: false,
trim: true,
normalize: true,
normalizeTags: false,
attrkey: "@",
charkey: "#",
explicitArray: false,
ignoreAttrs: false,
mergeAttrs: false,
... | /content/code_sandbox/node_modules/xml2js/lib/defaults.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 426 |
```javascript
'use strict'
module.exports = clone
var getPrototypeOf = Object.getPrototypeOf || function (obj) {
return obj.__proto__
}
function clone (obj) {
if (obj === null || typeof obj !== 'object')
return obj
if (obj instanceof Object)
var copy = { __proto__: getPrototypeOf(obj) }
else
var... | /content/code_sandbox/node_modules/graceful-fs/clone.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 115 |
```javascript
// Generated by CoffeeScript 1.12.7
(function() {
"use strict";
var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (has... | /content/code_sandbox/node_modules/xml2js/lib/parser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,890 |
```javascript
var Stream = require('stream').Stream
module.exports = legacy
function legacy (fs) {
return {
ReadStream: ReadStream,
WriteStream: WriteStream
}
function ReadStream (path, options) {
if (!(this instanceof ReadStream)) return new ReadStream(path, options);
Stream.call(this);
... | /content/code_sandbox/node_modules/graceful-fs/legacy-streams.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 673 |
```javascript
var fs = require('fs')
var polyfills = require('./polyfills.js')
var legacy = require('./legacy-streams.js')
var clone = require('./clone.js')
var util = require('util')
/* istanbul ignore next - node 0.x polyfill */
var gracefulQueue
var previousSymbol
/* istanbul ignore else - node 0.x polyfill */
if... | /content/code_sandbox/node_modules/graceful-fs/graceful-fs.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 3,334 |
```javascript
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
options: {},
default: {
files: {
src: ['gruntfile.js', 'src/**/*.js', '!src/libs/jsbn.js']
}
},
libs: {
files: {
... | /content/code_sandbox/node_modules/node-rsa/gruntfile.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 174 |
```javascript
var constants = require('constants')
var origCwd = process.cwd
var cwd = null
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
process.cwd = function() {
if (!cwd)
cwd = origCwd.call(process)
return cwd
}
try {
process.cwd()
} catch (er) {}
// This check is needed until no... | /content/code_sandbox/node_modules/graceful-fs/polyfills.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,754 |
```javascript
/*
* Utils functions
*
*/
var crypt = require('crypto');
/**
* Break string str each maxLen symbols
* @param str
* @param maxLen
* @returns {string}
*/
module.exports.linebrk = function (str, maxLen) {
var res = '';
var i = 0;
while (i + maxLen < str.length) {
res += str.subs... | /content/code_sandbox/node_modules/node-rsa/src/utils.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 664 |
```javascript
/*!
* RSA library for Node.js
*
* Author: rzcoder
*/
var constants = require('constants');
var rsa = require('./libs/rsa.js');
var crypt = require('crypto');
var ber = require('asn1').Ber;
var _ = require('./utils')._;
var utils = require('./utils');
var schemes = require('./schemes/schemes.js');
var... | /content/code_sandbox/node_modules/node-rsa/src/NodeRSA.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 3,062 |
```javascript
/*
* RSA Encryption / Decryption with PKCS1 v2 Padding.
*
* All Rights Reserved.
*
* 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
* with... | /content/code_sandbox/node_modules/node-rsa/src/libs/rsa.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,414 |
```javascript
/**
* PKCS_OAEP signature scheme
*/
var BigInteger = require('../libs/jsbn');
var crypt = require('crypto');
module.exports = {
isEncryption: true,
isSignature: false
};
module.exports.digestLength = {
md4: 16,
md5: 16,
ripemd160: 20,
rmd160: 20,
sha1: 20,
sha224: 28,
... | /content/code_sandbox/node_modules/node-rsa/src/schemes/oaep.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,613 |
```javascript
/**
* PSS signature scheme
*/
var BigInteger = require('../libs/jsbn');
var crypt = require('crypto');
module.exports = {
isEncryption: false,
isSignature: true
};
var DEFAULT_HASH_FUNCTION = 'sha1';
var DEFAULT_SALT_LENGTH = 20;
module.exports.makeScheme = function (key, options) {
var ... | /content/code_sandbox/node_modules/node-rsa/src/schemes/pss.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,734 |
```javascript
module.exports = {
pkcs1: require('./pkcs1'),
pkcs1_oaep: require('./oaep'),
pss: require('./pss'),
/**
* Check if scheme has padding methods
* @param scheme {string}
* @returns {Boolean}
*/
isEncryption: function (scheme) {
return module.exports[scheme] &&... | /content/code_sandbox/node_modules/node-rsa/src/schemes/schemes.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 151 |
```javascript
/**
* PKCS1 padding and signature scheme
*/
var BigInteger = require('../libs/jsbn');
var crypt = require('crypto');
var constants = require('constants');
var SIGN_INFO_HEAD = {
md2: Buffer.from('3020300c06082a864886f70d020205000410', 'hex'),
md5: Buffer.from('3020300c06082a864886f70d0205050004... | /content/code_sandbox/node_modules/node-rsa/src/schemes/pkcs1.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,991 |
```javascript
var crypto = require('crypto');
var constants = require('constants');
var schemes = require('../schemes/schemes.js');
module.exports = function (keyPair, options) {
var pkcs1Scheme = schemes.pkcs1.makeScheme(keyPair, options);
return {
encrypt: function (buffer, usePrivate) {
... | /content/code_sandbox/node_modules/node-rsa/src/encryptEngines/io.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 515 |
```javascript
var BigInteger = require('../libs/jsbn.js');
var schemes = require('../schemes/schemes.js');
module.exports = function (keyPair, options) {
var pkcs1Scheme = schemes.pkcs1.makeScheme(keyPair, options);
return {
encrypt: function (buffer, usePrivate) {
var m, c;
if... | /content/code_sandbox/node_modules/node-rsa/src/encryptEngines/js.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 281 |
```javascript
var crypt = require('crypto');
module.exports = {
getEngine: function (keyPair, options) {
var engine = require('./js.js');
if (options.environment === 'node') {
if (typeof crypt.publicEncrypt === 'function' && typeof crypt.privateDecrypt === 'function') {
... | /content/code_sandbox/node_modules/node-rsa/src/encryptEngines/encryptEngines.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 123 |
```javascript
/*
* Basic JavaScript BN library - subset useful for RSA encryption.
*
* All Rights Reserved.
*
* 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, incl... | /content/code_sandbox/node_modules/node-rsa/src/libs/jsbn.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 14,063 |
```javascript
var crypto = require('crypto');
var constants = require('constants');
var schemes = require('../schemes/schemes.js');
module.exports = function (keyPair, options) {
var jsEngine = require('./js.js')(keyPair, options);
var pkcs1Scheme = schemes.pkcs1.makeScheme(keyPair, options);
return {
... | /content/code_sandbox/node_modules/node-rsa/src/encryptEngines/node12.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 402 |
```javascript
var _ = require('../utils')._;
var utils = require('../utils');
module.exports = {
privateExport: function (key, options) {
return {
n: key.n.toBuffer(),
e: key.e,
d: key.d.toBuffer(),
p: key.p.toBuffer(),
q: key.q.toBuffer(),
... | /content/code_sandbox/node_modules/node-rsa/src/formats/components.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 412 |
```javascript
var _ = require('../utils')._;
function formatParse(format) {
format = format.split('-');
var keyType = 'private';
var keyOpt = {type: 'default'};
for (var i = 1; i < format.length; i++) {
if (format[i]) {
switch (format[i]) {
case 'public':
... | /content/code_sandbox/node_modules/node-rsa/src/formats/formats.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 636 |
```javascript
var ber = require('asn1').Ber;
var _ = require('../utils')._;
var utils = require('../utils');
const PRIVATE_OPENING_BOUNDARY = '-----BEGIN RSA PRIVATE KEY-----';
const PRIVATE_CLOSING_BOUNDARY = '-----END RSA PRIVATE KEY-----';
const PUBLIC_OPENING_BOUNDARY = '-----BEGIN RSA PUBLIC KEY-----';
const PUB... | /content/code_sandbox/node_modules/node-rsa/src/formats/pkcs1.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,227 |
```javascript
module.exports.BinarySearchTree = require('./lib/bst');
module.exports.AVLTree = require('./lib/avltree');
``` | /content/code_sandbox/node_modules/binary-search-tree/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 26 |
```javascript
var ber = require('asn1').Ber;
var _ = require('../utils')._;
var PUBLIC_RSA_OID = '1.2.840.113549.1.1.1';
var utils = require('../utils');
const PRIVATE_OPENING_BOUNDARY = '-----BEGIN PRIVATE KEY-----';
const PRIVATE_CLOSING_BOUNDARY = '-----END PRIVATE KEY-----';
const PUBLIC_OPENING_BOUNDARY = '-----... | /content/code_sandbox/node_modules/node-rsa/src/formats/pkcs8.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,520 |
```javascript
/**
* Return an array with the numbers from 0 to n-1, in a random order
*/
function getRandomArray (n) {
var res, next;
if (n === 0) { return []; }
if (n === 1) { return [0]; }
res = getRandomArray(n - 1);
next = Math.floor(Math.random() * n);
res.splice(next, 0, n - 1); // Add n-1 at a ... | /content/code_sandbox/node_modules/binary-search-tree/lib/customUtils.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 277 |
```javascript
/**
* Simple binary search tree
*/
var customUtils = require('./customUtils');
/**
* Constructor
* @param {Object} options Optional
* @param {Boolean} options.unique Whether to enforce a 'unique' constraint on the key or not
* @param {Key} options.key Initialize this BST's key with key
* @p... | /content/code_sandbox/node_modules/binary-search-tree/lib/bst.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 3,490 |
```javascript
/**
* Self-balancing binary search tree using the AVL implementation
*/
var BinarySearchTree = require('./bst')
, customUtils = require('./customUtils')
, util = require('util')
, _ = require('underscore')
;
/**
* Constructor
* We can't use a direct pointer to the root node (as in the simple... | /content/code_sandbox/node_modules/binary-search-tree/lib/avltree.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 3,272 |
```javascript
var should = require('chai').should()
, assert = require('chai').assert
, BinarySearchTree = require('../index').BinarySearchTree
, _ = require('underscore')
, customUtils = require('../lib/customUtils')
;
describe('Binary search tree', function () {
it('Upon creation, left, right are null,... | /content/code_sandbox/node_modules/binary-search-tree/test/bst.test.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 8,721 |
```javascript
var v1 = require('./v1');
var v4 = require('./v4');
var uuid = v4;
uuid.v1 = v1;
uuid.v4 = v4;
module.exports = uuid;
``` | /content/code_sandbox/node_modules/uuid/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 44 |
```javascript
var rng = require('./lib/rng');
var bytesToUuid = require('./lib/bytesToUuid');
function v4(options, buf, offset) {
var i = buf && offset || 0;
if (typeof(options) == 'string') {
buf = options === 'binary' ? new Array(16) : null;
options = null;
}
options = options || {};
var rnds = o... | /content/code_sandbox/node_modules/uuid/v4.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 239 |
```javascript
var v35 = require('./lib/v35.js');
var md5 = require('./lib/md5');
module.exports = v35('v3', 0x30, md5);
``` | /content/code_sandbox/node_modules/uuid/v3.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 39 |
```javascript
var v35 = require('./lib/v35.js');
var sha1 = require('./lib/sha1');
module.exports = v35('v5', 0x50, sha1);
``` | /content/code_sandbox/node_modules/uuid/v5.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 40 |
```javascript
var rng = require('./lib/rng');
var bytesToUuid = require('./lib/bytesToUuid');
// **`v1()` - Generate time-based UUID**
//
// Inspired by path_to_url
// and path_to_url
var _nodeId;
var _clockseq;
// Previous uuid creation time
var _lastMSecs = 0;
var _lastNSecs = 0;
// See path_to_url for API detail... | /content/code_sandbox/node_modules/uuid/v1.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,099 |
```javascript
// Adapted from Chris Veness' SHA1 code at
// path_to_url
'use strict';
function f(s, x, y, z) {
switch (s) {
case 0: return (x & y) ^ (~x & z);
case 1: return x ^ y ^ z;
case 2: return (x & y) ^ (x & z) ^ (y & z);
case 3: return x ^ y ^ z;
}
}
function ROTL(x, n) {
return (x << n)... | /content/code_sandbox/node_modules/uuid/lib/sha1-browser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,083 |
```javascript
var should = require('chai').should()
, assert = require('chai').assert
, AVLTree = require('../index').AVLTree
, _ = require('underscore')
, customUtils = require('../lib/customUtils')
;
describe('AVL tree', function () {
describe('Sanity checks', function () {
it('Checking that all n... | /content/code_sandbox/node_modules/binary-search-tree/test/avltree.test.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 9,673 |
```javascript
var bytesToUuid = require('./bytesToUuid');
function uuidToBytes(uuid) {
// Note: We assume we're being passed a valid uuid string
var bytes = [];
uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) {
bytes.push(parseInt(hex, 16));
});
return bytes;
}
function stringToBytes(str) {
str = unesc... | /content/code_sandbox/node_modules/uuid/lib/v35.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 485 |
```javascript
'use strict';
var crypto = require('crypto');
function sha1(bytes) {
if (typeof Buffer.from === 'function') {
// Modern Buffer API
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
} else ... | /content/code_sandbox/node_modules/uuid/lib/sha1.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 149 |
```javascript
// Unique ID creation requires a high quality random # generator. In the
// browser this is a little complicated due to unknown quality of Math.random()
// and inconsistent support for the `crypto` API. We do the best we can via
// feature-detection
// getRandomValues needs to be invoked in a context w... | /content/code_sandbox/node_modules/uuid/lib/rng-browser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 352 |
```javascript
/**
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
*/
var byteToHex = [];
for (var i = 0; i < 256; ++i) {
byteToHex[i] = (i + 0x100).toString(16).substr(1);
}
function bytesToUuid(buf, offset) {
var i = offset || 0;
var bth = byteToHex... | /content/code_sandbox/node_modules/uuid/lib/bytesToUuid.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 270 |
```javascript
// Unique ID creation requires a high quality random # generator. In node.js
// this is pretty straight-forward - we use the crypto API.
var crypto = require('crypto');
module.exports = function nodeRNG() {
return crypto.randomBytes(16);
};
``` | /content/code_sandbox/node_modules/uuid/lib/rng.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 56 |
```javascript
'use strict';
var crypto = require('crypto');
function md5(bytes) {
if (typeof Buffer.from === 'function') {
// Modern Buffer API
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
} else {... | /content/code_sandbox/node_modules/uuid/lib/md5.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 149 |
```javascript
var parse = require('acorn').parse;
var isArray = require('isarray');
var objectKeys = require('object-keys');
var forEach = require('foreach');
module.exports = function (src, opts, fn) {
if (typeof opts === 'function') {
fn = opts;
opts = {};
}
if (src && typeof src === 'obj... | /content/code_sandbox/node_modules/falafel/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 503 |
```javascript
/*
* Browser-compatible JavaScript MD5
*
* Modification of JavaScript MD5
* path_to_url
*
* path_to_url
*
* path_to_url
*
* Based on
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Other contributors: Greg Holt, Andrew Kep... | /content/code_sandbox/node_modules/uuid/lib/md5-browser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,945 |
```javascript
var falafel = require('../');
var src = 'console.log(beep "boop", "BOOP");';
function isKeyword (id) {
if (id === 'beep') return true;
}
var output = falafel(src, { isKeyword: isKeyword }, function (node) {
if (node.type === 'UnaryExpression'
&& node.operator === 'beep') {
node.updat... | /content/code_sandbox/node_modules/falafel/example/keyword.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 113 |
```javascript
var falafel = require('../');
var src = '(' + function () {
var xs = [ 1, 2, [ 3, 4 ] ];
var ys = [ 5, 6 ];
console.dir([ xs, ys ]);
} + ')()';
var output = falafel(src, function (node) {
if (node.type === 'ArrayExpression') {
node.update('fn(' + node.source() + ')');
}
});
c... | /content/code_sandbox/node_modules/falafel/example/array.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 104 |
```markdown
# falafel
Transform the [ast](path_to_url on a
recursive walk.
[;
var vm = require('vm');
var termExps = [
'Identifier',
'CallExpression',
'BinaryExpression',
'UpdateExpression',
'UnaryExpression'
].reduce(function (acc, key) { acc[key] = true; return acc }, {});
function terminated (node) {
for (var p = node; p.pa... | /content/code_sandbox/node_modules/falafel/example/prompt.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 305 |
```javascript
var falafel = require('../');
var test = require('tape');
test('array', function (t) {
t.plan(5);
var src = '(function () {'
+ 'var xs = [ 1, 2, [ 3, 4 ] ];'
+ 'var ys = [ 5, 6 ];'
+ 'g([ xs, ys ]);'
+ '})()';
var pending = 0;
var output = falafel(src... | /content/code_sandbox/node_modules/falafel/test/async.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 317 |
```javascript
var falafel = require('../');
var test = require('tape');
test('for loop', function (t) {
t.plan(7);
var src = '(function () {'
+ 'var sum = 0;'
+ 'for (var i = 0; i < 10; i++)'
+ 'sum += i;'
+ 'if (true)'
+ 'for (var i = 0; i < 10; i++)'
... | /content/code_sandbox/node_modules/falafel/test/for.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 248 |
```javascript
var falafel = require('../');
var test = require('tape');
test('inspect', function (t) {
t.plan(6);
var src = '(function () {'
+ 'var xs = [ 1, 2, [ 3, 4 ] ];'
+ 'var ys = [ 5, 6 ];'
+ 'g([ xs, ys ]);'
+ '})()';
var output = falafel(src, function (node) {... | /content/code_sandbox/node_modules/falafel/test/inspect.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 281 |
```javascript
var falafel = require('../');
var test = require('tape');
test('array', function (t) {
t.plan(5);
var src = '(' + function () {
var xs = [ 1, 2, [ 3, 4 ] ];
var ys = [ 5, 6 ];
g([ xs, ys ]);
} + ')()';
var output = falafel(src, function (node) {
i... | /content/code_sandbox/node_modules/falafel/test/array.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 263 |
```javascript
var falafel = require('../');
var test = require('tape');
test('parent', function (t) {
t.plan(5);
var src = '(function () {'
+ 'var xs = [ 1, 2, 3 ];'
+ 'fn(ys);'
+ '})()';
var output = falafel(src, function (node) {
if (node.type === 'ArrayExpression') ... | /content/code_sandbox/node_modules/falafel/test/parent.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 244 |
```javascript
var falafel = require('../');
var acorn = require('acorn-jsx');
var test = require('tape');
test('custom parser', function (t) {
var src = '(function() { var f = {a: "b"}; var a = <div {...f} className="test"></div>; })()';
var nodeTypes = [
'Identifier',
'Identifier',
'Literal',
'P... | /content/code_sandbox/node_modules/falafel/test/custom-parser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 266 |
```javascript
var falafel = require('../');
var test = require('tape');
test('generators', function (t) {
t.plan(1);
var src = 'console.log((function * () { yield 3 })().next().value)';
var output = falafel(src, { ecmaVersion: 6 }, function (node) {
if (node.type === 'Literal') {
n... | /content/code_sandbox/node_modules/falafel/test/es6.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 124 |
```javascript
var path = require('path');
for (var i = 2; i < process.argv.length; i++) {
require(path.resolve(process.cwd(), process.argv[i]));
}
``` | /content/code_sandbox/node_modules/falafel/test/bin/run.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 37 |
```javascript
var falafel = require('../');
var test = require('tape');
test('first opts arg', function (t) {
t.plan(5);
var src = '(function () {'
+ 'var xs = [ 1, 2, [ 3, 4 ] ];'
+ 'var ys = [ 5, 6 ];'
+ 'g([ xs, ys ]);'
+ '})()';
var output = falafel({ source: src }... | /content/code_sandbox/node_modules/falafel/test/opts.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,059 |
```javascript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const events_1 = require("events");
const debug_1 = __importDefault(require("debug"));
const promisify_1 = __importDefault(require("./promisify"));
const... | /content/code_sandbox/node_modules/agent-base/dist/src/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,586 |
```javascript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function promisify(fn) {
return function (req, opts) {
return new Promise((resolve, reject) => {
fn.call(this, req, opts, (err, rtn) => {
if (err) {
reject(err);
... | /content/code_sandbox/node_modules/agent-base/dist/src/promisify.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 100 |
```javascript
if (parseInt(process.versions.node.split('.')[0]) < 6) throw new Error('vm2 requires Node.js version 6 or newer.');
module.exports = require('./lib/main');
``` | /content/code_sandbox/node_modules/vm2/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 39 |
```javascript
module.exports = {
env: {
es6: true,
node: true
},
extends: [
'integromat'
],
parserOptions: {
'ecmaVersion': 2017,
'ecmaFeatures': {
'globalReturn': true
}
},
globals: {
},
rules: {
}
};
``` | /content/code_sandbox/node_modules/vm2/.eslintrc.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 83 |
```javascript
'use strict';
const pa = require('path');
const {NodeVM, VMError} = require('../');
if (process.argv[2]) {
const path = pa.resolve(process.argv[2]);
console.log(`\x1B[90m[vm] creating VM for ${path}\x1B[39m`);
const started = Date.now();
try {
NodeVM.file(path, {
verbose: true,
require: {... | /content/code_sandbox/node_modules/vm2/lib/cli.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 261 |
```javascript
'use strict';
const {Script} = require('vm');
const {
lookupCompiler,
removeShebang
} = require('./compiler');
const {
transformer
} = require('./transformer');
const objectDefineProperties = Object.defineProperties;
const MODULE_PREFIX = '(function (exports, require, module, __filename, __dirname) ... | /content/code_sandbox/node_modules/vm2/lib/script.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,580 |
```javascript
'use strict';
/**
* This callback will be called to resolve a module if it couldn't be found.
*
* @callback resolveCallback
* @param {string} moduleName - Name of the module used to resolve.
* @param {string} dirname - Name of the current directory.
* @return {(string|undefined)} The file or direct... | /content/code_sandbox/node_modules/vm2/lib/nodevm.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 4,342 |
```javascript
'use strict';
/**
* __ ___ ____ _ _ ___ _ _ ____
* \ \ / / \ | _ \| \ | |_ _| \ | |/ ___|
* \ \ /\ / / _ \ | |_) | \| || || \| | | _
* \ V V / ___ \| _ <| |\ || || |\ | |_| |
* \_/\_/_/ \_\_| \_\_| \_|___|_| \_|\____|
*
* This file is critical for vm2. It impl... | /content/code_sandbox/node_modules/vm2/lib/bridge.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 7,725 |
```javascript
//
// 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,
// distribute, sublic... | /content/code_sandbox/node_modules/vm2/lib/events.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 6,672 |
```javascript
'use strict';
/**
* This callback will be called to transform a script to JavaScript.
*
* @callback compileCallback
* @param {string} code - Script code to transform to JavaScript.
* @param {string} filename - Filename of this script.
* @return {string} JavaScript code that represents the script co... | /content/code_sandbox/node_modules/vm2/lib/vm.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 3,847 |
```javascript
'use strict';
const {
VMError
} = require('./bridge');
let cacheCoffeeScriptCompiler;
/**
* Returns the cached coffee script compiler or loads it
* if it is not found in the cache.
*
* @private
* @return {compileCallback} The coffee script compiler.
* @throws {VMError} If the coffee-script modul... | /content/code_sandbox/node_modules/vm2/lib/compiler.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 553 |
```javascript
'use strict';
const {
VMError
} = require('./bridge');
const {
VMScript
} = require('./script');
const {
VM
} = require('./vm');
const {
NodeVM
} = require('./nodevm');
exports.VMError = VMError;
exports.VMScript = VMScript;
exports.NodeVM = NodeVM;
exports.VM = VM;
``` | /content/code_sandbox/node_modules/vm2/lib/main.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 81 |
```javascript
const {Parser: AcornParser, isNewLine: acornIsNewLine, getLineInfo: acornGetLineInfo} = require('acorn');
const {full: acornWalkFull} = require('acorn-walk');
const INTERNAL_STATE_NAME = 'VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL';
function assertType(node, type) {
if (!node) throw new Error(... | /content/code_sandbox/node_modules/vm2/lib/transformer.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,524 |
```javascript
/* global host, data, VMError */
'use strict';
const LocalError = Error;
const LocalTypeError = TypeError;
const LocalWeakMap = WeakMap;
const {
apply: localReflectApply,
defineProperty: localReflectDefineProperty
} = Reflect;
const {
set: localWeakMapSet,
get: localWeakMapGet
} = LocalWeakMap.pro... | /content/code_sandbox/node_modules/vm2/lib/setup-node-sandbox.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,900 |
```javascript
/* global host, bridge, data, context */
'use strict';
const {
Object: localObject,
Array: localArray,
Error: LocalError,
Reflect: localReflect,
Proxy: LocalProxy,
WeakMap: LocalWeakMap,
Function: localFunction,
Promise: localPromise,
eval: localEval
} = global;
const {
freeze: localObjectFre... | /content/code_sandbox/node_modules/vm2/lib/setup-sandbox.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 3,031 |
```javascript
'use strict';
// Translate the old options to the new Resolver functionality.
const fs = require('fs');
const pa = require('path');
const nmod = require('module');
const {EventEmitter} = require('events');
const util = require('util');
const {
Resolver,
DefaultResolver
} = require('./resolver');
cons... | /content/code_sandbox/node_modules/vm2/lib/resolver-compat.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,813 |
```javascript
'use strict';
// The Resolver is currently experimental and might be exposed to users in the future.
const pa = require('path');
const fs = require('fs');
const {
VMError
} = require('./bridge');
const { VMScript } = require('./script');
// This should match. Note that '\', '%' are invalid characters... | /content/code_sandbox/node_modules/vm2/lib/resolver.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 9,397 |
```javascript
'use strict';
var path = require('path');
var fs = require('fs');
var acorn = require('./acorn.js');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.... | /content/code_sandbox/node_modules/vm2/node_modules/acorn/dist/bin.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 906 |
```javascript
// Underscore.js 1.4.4
// path_to_url
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on the ser... | /content/code_sandbox/node_modules/underscore/underscore.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 10,405 |
```javascript
module.exports = require('./underscore');
``` | /content/code_sandbox/node_modules/underscore/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 8 |
```javascript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.acorn = {}));
})(this,... | /content/code_sandbox/node_modules/vm2/node_modules/acorn/dist/acorn.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 60,612 |
```javascript
(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=functi... | /content/code_sandbox/node_modules/underscore/underscore-min.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 4,601 |
```javascript
var Writable = require('readable-stream').Writable
var inherits = require('inherits')
var bufferFrom = require('buffer-from')
if (typeof Uint8Array === 'undefined') {
var U8 = require('typedarray').Uint8Array
} else {
var U8 = Uint8Array
}
function ConcatStream(opts, cb) {
if (!(this instanceof Co... | /content/code_sandbox/node_modules/concat-stream/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,026 |
```javascript
var assert = require('tap');
var t = require('./lib/util');
assert.equal(t.isArray([]), true);
assert.equal(t.isArray({}), false);
assert.equal(t.isBoolean(null), false);
assert.equal(t.isBoolean(true), true);
assert.equal(t.isBoolean(false), true);
assert.equal(t.isNull(null), true);
assert.equal(t.i... | /content/code_sandbox/node_modules/core-util-is/test.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 484 |
```javascript
//
// 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,
// distribute, sublic... | /content/code_sandbox/node_modules/core-util-is/lib/util.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 660 |
```javascript
'use strict'
module.exports = Yallist
Yallist.Node = Node
Yallist.create = Yallist
function Yallist (list) {
var self = this
if (!(self instanceof Yallist)) {
self = new Yallist()
}
self.tail = null
self.head = null
self.length = 0
if (list && typeof list.forEach === 'function') {
... | /content/code_sandbox/node_modules/yallist/yallist.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,526 |
```javascript
var IncomingForm = require('./incoming_form').IncomingForm;
IncomingForm.IncomingForm = IncomingForm;
module.exports = IncomingForm;
``` | /content/code_sandbox/node_modules/formidable/lib/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 28 |
```javascript
var Buffer = require('buffer').Buffer,
s = 0,
S =
{ PARSER_UNINITIALIZED: s++,
START: s++,
START_BOUNDARY: s++,
HEADER_FIELD_START: s++,
HEADER_FIELD: s++,
HEADER_VALUE_START: s++,
HEADER_VALUE: s++,
HEADER_VALUE_ALMOST_DONE: s++,
HEADERS_ALMOST_... | /content/code_sandbox/node_modules/formidable/lib/multipart_parser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,131 |
```javascript
if (global.GENTLY) require = GENTLY.hijack(require);
var Buffer = require('buffer').Buffer;
function JSONParser(parent) {
this.parent = parent;
this.chunks = [];
this.bytesWritten = 0;
}
exports.JSONParser = JSONParser;
JSONParser.prototype.write = function(buffer) {
this.bytesWritten += buffer... | /content/code_sandbox/node_modules/formidable/lib/json_parser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 164 |
```javascript
var EventEmitter = require('events').EventEmitter
, util = require('util');
function OctetParser(options){
if(!(this instanceof OctetParser)) return new OctetParser(options);
EventEmitter.call(this);
}
util.inherits(OctetParser, EventEmitter);
exports.OctetParser = OctetParser;
OctetParser.prototyp... | /content/code_sandbox/node_modules/formidable/lib/octet_parser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 104 |
```javascript
if (global.GENTLY) require = GENTLY.hijack(require);
var util = require('util'),
fs = require('fs'),
EventEmitter = require('events').EventEmitter,
crypto = require('crypto');
function File(properties) {
EventEmitter.call(this);
this.size = 0;
this.path = null;
this.name = null;
t... | /content/code_sandbox/node_modules/formidable/lib/file.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 422 |
```javascript
if (global.GENTLY) require = GENTLY.hijack(require);
var crypto = require('crypto');
var fs = require('fs');
var util = require('util'),
path = require('path'),
File = require('./file'),
MultipartParser = require('./multipart_parser').MultipartParser,
QuerystringParser = require('./querys... | /content/code_sandbox/node_modules/formidable/lib/incoming_form.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 3,486 |
```javascript
if (global.GENTLY) require = GENTLY.hijack(require);
// This is a buffering parser, not quite as nice as the multipart one.
// If I find time I'll rewrite this to be fully streaming as well
var querystring = require('querystring');
function QuerystringParser(maxKeys) {
this.maxKeys = maxKeys;
this.b... | /content/code_sandbox/node_modules/formidable/lib/querystring_parser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 176 |
```html
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="viewport" content="width=device-width" />
<link rel="canonical" href="path_to_url" />
<link rel="shortcut icon" href="favicon.ico" typ... | /content/code_sandbox/node_modules/underscore/index.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 26,089 |
```javascript
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 !== 'objec... | /content/code_sandbox/node_modules/mkdirp/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 683 |
```markdown
# mkdirp
Like `mkdir -p`, but in node.js!
[;
mkdirp('/tmp/foo/bar/baz', function (err) {
if (err) console.error(err)
else console.log('pow!')
});
```
Output
```
pow!
```
And now /tmp/foo/bar/baz exists, ... | /content/code_sandbox/node_modules/mkdirp/readme.markdown | markdown | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 521 |
```javascript
/**
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
/*global exports:true*/
/**
* Desugars ES6 Arrow functions to ES3 function expressions.
* If the function contains `this` e... | /content/code_sandbox/node_modules/jstransform/visitors/es6-arrow-function-visitors.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 695 |
```javascript
/**
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
/*jslint node:true*/
/**
* @typechecks
*/
'use strict';
var Syntax = require('esprima-fb').Syntax;
var utils = require('..... | /content/code_sandbox/node_modules/jstransform/visitors/es6-template-visitors.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 975 |
```javascript
/**
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
/*jslint node: true*/
/**
* Desugars ES6 Object Literal short notations into ES3 full notation.
*
* // Easier return value... | /content/code_sandbox/node_modules/jstransform/visitors/es6-object-short-notation-visitors.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 258 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.