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
var parse = require('../');
var test = require('tape');
test('whitespace should be whitespace' , function (t) {
t.plan(1);
var x = parse([ '-x', '\t' ]).x;
t.equal(x, '\t');
});
``` | /content/code_sandbox/node_modules/minimist/test/whitespace.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 58 |
```javascript
var parse = require('../');
var test = require('tape');
test('numeric short args', function (t) {
t.plan(2);
t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
t.deepEqual(
parse([ '-123', '456' ]),
{ 1: true, 2: true, 3: 456, _: [] }
);
});
test('short', function (t) {
... | /content/code_sandbox/node_modules/minimist/test/short.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 475 |
```javascript
var parse = require('../');
var test = require('tape');
test('boolean and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = [ '-h', 'true', '--derp', 'true' ];
var regular = [ '--herp', '... | /content/code_sandbox/node_modules/minimist/test/unknown.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 712 |
```javascript
var parse = require('../');
var test = require('tape');
test('short -k=v' , function (t) {
t.plan(1);
var argv = parse([ '-b=123' ]);
t.deepEqual(argv, { b: 123, _: [] });
});
test('multi short -k=v' , function (t) {
t.plan(1);
var argv = parse([ '-a=whatever', '-b=robots' ... | /content/code_sandbox/node_modules/minimist/test/kv_short.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 119 |
```javascript
var parse = require('../');
var test = require('tape');
test('dotted alias', function (t) {
var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
t.equal(argv.a.b, 22);
t.equal(argv.aa.bb, 22);
t.end();
});
test('dotted default', function (t) {
var argv ... | /content/code_sandbox/node_modules/minimist/test/dotted.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 194 |
```javascript
var toString = Object.prototype.toString
var isModern = (
typeof Buffer.alloc === 'function' &&
typeof Buffer.allocUnsafe === 'function' &&
typeof Buffer.from === 'function'
)
function isArrayBuffer (input) {
return toString.call(input).slice(8, -1) === 'ArrayBuffer'
}
function fromArrayBuffer ... | /content/code_sandbox/node_modules/buffer-from/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 397 |
```javascript
module.exports = isTypedArray
isTypedArray.strict = isStrictTypedArray
isTypedArray.loose = isLooseTypedArray
var toString = Object.prototype.toString
var names = {
'[object Int8Array]': true
, '[object Int16Array]': true
, '[object Int32Array]': true
, '[object Uint8Array]': true
, '[o... | /content/code_sandbox/node_modules/is-typedarray/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 278 |
```javascript
var test = require('tape')
var ista = require('./')
test('strict', function(t) {
t.ok(ista.strict(new Int8Array), 'Int8Array')
t.ok(ista.strict(new Int16Array), 'Int16Array')
t.ok(ista.strict(new Int32Array), 'Int32Array')
t.ok(ista.strict(new Uint8Array), 'Uint8Array')
t.ok(ista.strict(new Uin... | /content/code_sandbox/node_modules/is-typedarray/test.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 354 |
```javascript
var Ajv = require('ajv')
var HARError = require('./error')
var schemas = require('har-schema')
var ajv
function createAjvInstance () {
var ajv = new Ajv({
allErrors: true
})
ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))
ajv.addSchema(schemas)
return ajv
}
function ... | /content/code_sandbox/node_modules/har-validator/lib/async.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 571 |
```javascript
function HARError (errors) {
var message = 'validation failed'
this.name = 'HARError'
this.message = message
this.errors = errors
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor)
} else {
this.stack = (new Error(message)).stack
}
... | /content/code_sandbox/node_modules/har-validator/lib/error.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 92 |
```javascript
var Ajv = require('ajv')
var HARError = require('./error')
var schemas = require('har-schema')
var ajv
function createAjvInstance () {
var ajv = new Ajv({
allErrors: true
})
ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))
ajv.addSchema(schemas)
return ajv
}
function ... | /content/code_sandbox/node_modules/har-validator/lib/promise.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 488 |
```javascript
"use strict";
/**
* If only a single value is specified (from each category: day, month, year), the
* function returns a true value only on days that match that specification. If
* both values are specified, the result is true between those times, including
* bounds.
*
* Even though the examples don... | /content/code_sandbox/node_modules/pac-resolver/dist/dateRange.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 714 |
```javascript
/*!
* jQuery JavaScript Library v2.2.0
* path_to_url
*
* Includes Sizzle.js
* path_to_url
*
* Released under the MIT license
* path_to_url
*
* Date: 2016-01-08T20:02Z
*/
(function( global, factory ) {
// moduleelectronjquery
factory(global);
// if ( typeof module === "object" && typeof mod... | /content/code_sandbox/static/libs/jquery/jquery.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 70,815 |
```javascript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const url_1 = require("url");
const degenerator_1 = require("degenerator");
/**
* Built-in PAC functions.
*/
const dateRange_1 = __importDefault(requir... | /content/code_sandbox/node_modules/pac-resolver/dist/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 999 |
```javascript
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfil... | /content/code_sandbox/node_modules/pac-resolver/dist/dnsResolve.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 379 |
```javascript
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfil... | /content/code_sandbox/node_modules/pac-resolver/dist/myIpAddress.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 549 |
```javascript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Returns the number (integer) of DNS domain levels (number of dots) in the
* hostname.
*
* Examples:
*
* ``` js
* dnsDomainLevels("www")
* // returns 0.
* dnsDomainLevels("www.netscape.com")
* // returns 2.
* ... | /content/code_sandbox/node_modules/pac-resolver/dist/dnsDomainLevels.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 169 |
```javascript
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfil... | /content/code_sandbox/node_modules/pac-resolver/dist/isResolvable.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 320 |
```javascript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isGMT = exports.dnsLookup = void 0;
const dns_1 = require("dns");
function dnsLookup(host, opts) {
return new Promise((resolve, reject) => {
(0, dns_1.lookup)(host, opts, (err, res) => {
if (err) {... | /content/code_sandbox/node_modules/pac-resolver/dist/util.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 138 |
```javascript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Returns true iff the domain of hostname matches.
*
* Examples:
*
* ``` js
* dnsDomainIs("www.netscape.com", ".netscape.com")
* // is true.
*
* dnsDomainIs("www", ".netscape.com")
* // is false.
*
* dnsDomain... | /content/code_sandbox/node_modules/pac-resolver/dist/dnsDomainIs.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 200 |
```javascript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("./util");
const weekdays = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
/**
* Only the first parameter is mandatory. Either the second, the third, or both
* may be left out.
*
* If only one param... | /content/code_sandbox/node_modules/pac-resolver/dist/weekdayRange.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 741 |
```javascript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Is true if the hostname matches exactly the specified hostname, or if there is
* no domain name part in the hostname, but the unqualified hostname matches.
*
* Examples:
*
* ``` js
* localHostOrDomainIs("www.netscape... | /content/code_sandbox/node_modules/pac-resolver/dist/localHostOrDomainIs.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 315 |
```javascript
"use strict";
/**
* True iff there is no domain name in the hostname (no dots).
*
* Examples:
*
* ``` js
* isPlainHostName("www")
* // is true.
*
* isPlainHostName("www.netscape.com")
* // is false.
* ```
*
* @param {String} host The hostname from the URL (excluding port number).
* @retu... | /content/code_sandbox/node_modules/pac-resolver/dist/isPlainHostName.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 130 |
```javascript
"use strict";
/**
* Module dependencies.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, r... | /content/code_sandbox/node_modules/pac-resolver/dist/isInNet.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 560 |
```javascript
"use strict";
/**
* Returns true if the string matches the specified shell
* expression.
*
* Actually, currently the patterns are shell expressions,
* not regular expressions.
*
* Examples:
*
* ``` js
* shExpMatch("path_to_url", "*\/ari/*")
* // is true.
*
* shExpMatch("path_to_url", "*\/ar... | /content/code_sandbox/node_modules/pac-resolver/dist/shExpMatch.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 268 |
```javascript
"use strict";
/**
* True during (or between) the specified time(s).
*
* Even though the examples don't show it, this parameter may be present in
* each of the different parameter profiles, always as the last parameter.
*
*
* Examples:
*
* ``` js
* timerange(12)
* true from noon to 1pm.
*
* ti... | /content/code_sandbox/node_modules/pac-resolver/dist/timeRange.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 918 |
```javascript
var Base62 = (function (my) {
my.chars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q... | /content/code_sandbox/node_modules/base62/base62.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 360 |
```javascript
var assert = require('assert')
var Base62 = require('../base62')
describe("encode", function() {
it("should encode a number to a Base62 string", function() {
assert.equal(Base62.encode(999), 'g7')
});
});
describe("decode", function() {
it("should decode a number from a Base62 string", functio... | /content/code_sandbox/node_modules/base62/test/test.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 95 |
```javascript
/*!
* depd
*/
/**
* Module dependencies.
*/
var relative = require('path').relative
/**
* Module exports.
*/
module.exports = depd
/**
* Get the path to base files on.
*/
var basePath = process.cwd()
/**
* Determine if namespace is contained in the string.
*/
function containsNamespace (... | /content/code_sandbox/node_modules/depd/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,833 |
```javascript
/*!
* depd
*/
'use strict'
/**
* Module exports.
* @public
*/
module.exports = depd
/**
* Create deprecate for namespace in caller.
*/
function depd (namespace) {
if (!namespace) {
throw new TypeError('argument namespace is required')
}
function deprecate (message) {
// no-op in... | /content/code_sandbox/node_modules/depd/lib/browser/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 356 |
```javascript
/*
* lib/jsprim.js: utilities for primitive JavaScript types
*/
var mod_assert = require('assert-plus');
var mod_util = require('util');
var mod_extsprintf = require('extsprintf');
var mod_verror = require('verror');
var mod_jsonschema = require('json-schema');
/*
* Public interface
*/
exports.deep... | /content/code_sandbox/node_modules/jsprim/lib/jsprim.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 4,900 |
```javascript
// populates missing values
module.exports = function(dst, src) {
Object.keys(src).forEach(function(prop)
{
dst[prop] = dst[prop] || src[prop];
});
return dst;
};
``` | /content/code_sandbox/node_modules/form-data/lib/populate.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 46 |
```javascript
/* eslint-env browser */
module.exports = typeof self == 'object' ? self.FormData : window.FormData;
``` | /content/code_sandbox/node_modules/form-data/lib/browser.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 24 |
```javascript
/* jshint node:true */
var path = require('path');
var saucelabsBrowsers = require(path.resolve('test', 'saucelabs-browsers.js'));
var sourceFiles = [
'Gruntfile.js',
'src/*.js',
'src/**/*.js',
'test/**/test.*.js'
];
module.exports = exports = function(grunt) {
'use strict';
var... | /content/code_sandbox/node_modules/localforage/Gruntfile.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,778 |
```javascript
var CombinedStream = require('combined-stream');
var util = require('util');
var path = require('path');
var http = require('http');
var https = require('https');
var parseUrl = require('url').parse;
var fs = require('fs');
var mime = require('mime-types');
var asynckit = require('asynckit');
var populate... | /content/code_sandbox/node_modules/form-data/lib/form_data.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,839 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage Custom Driver Tests!</title>
<link rel="stylesheet" href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/mocha.js"></script>
<... | /content/code_sandbox/node_modules/localforage/test/test.customdriver.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 193 |
```javascript
/* global beforeEach:true */
this.mocha.setup('bdd');
beforeEach(function(done) {
var previousDriver = localforage.driver();
function rerequirelocalforage() {
// The API method stubs inserted by callWhenReady must be tested before
// they are replaced by the driver, which happens... | /content/code_sandbox/node_modules/localforage/test/test.callwhenready.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 285 |
```javascript
/* global navigator:true, window:true, Modernizr:true, describe:true, expect:true, it:true, xit:true, before:true, beforeEach:true, after:true*/
var DRIVERS = [
localforage.INDEXEDDB,
localforage.LOCALSTORAGE,
localforage.WEBSQL
];
DRIVERS.forEach(function(driverName) {
if ((!Modernizr.in... | /content/code_sandbox/node_modules/localforage/test/test.serviceworkers.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 715 |
```javascript
(function() {
'use strict';
var dummyStorage = {};
// Config the localStorage backend, using options set in the config.
function _initStorage(options) {
var self = this;
var dbInfo = {};
if (options) {
for (var i in options) {
... | /content/code_sandbox/node_modules/localforage/test/dummyStorageDriver.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,681 |
```javascript
// Run before window.onload to make sure the specs have access to describe()
// and other mocha methods. All feels very hacky though :-/
this.mocha.setup('bdd');
function runTests() {
var runner = this.mocha.run();
var failedTests = [];
runner.on('end', function(){
window.mochaResul... | /content/code_sandbox/node_modules/localforage/test/runner.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 425 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage WebPack Tests!</title>
<link rel="stylesheet" href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/mocha.js"></script>
<script... | /content/code_sandbox/node_modules/localforage/test/test.webpack.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 258 |
```javascript
/*globals importScripts:true, self:true */
importScripts("/dist/localforage.js");
self.addEventListener('message', function(e) {
function handleError(e) {
self.postMessage({
error: JSON.stringify(e),
body: e,
fail: true
});
}
localforage.se... | /content/code_sandbox/node_modules/localforage/test/webworker-client.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 131 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage Tests!</title>
<link rel="stylesheet" href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/mocha.js"></script>
<script src="/b... | /content/code_sandbox/node_modules/localforage/test/test.nodriver.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 285 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage Tests!</title>
<link rel="stylesheet" href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/mocha.js"></script>
<script src="/b... | /content/code_sandbox/node_modules/localforage/test/test.faultydriver.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 247 |
```javascript
/* global before:true, beforeEach:true, describe:true, expect:true, it:true, Modernizr:true */
var DRIVERS = [
localforage.INDEXEDDB,
localforage.LOCALSTORAGE,
localforage.WEBSQL
];
DRIVERS.forEach(function(driverName) {
if ((!localforage.supports(localforage.INDEXEDDB) &&
driver... | /content/code_sandbox/node_modules/localforage/test/test.webworkers.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 412 |
```javascript
/* global before:true, beforeEach:true, describe:true, expect:true, it:true */
// kinda lame to define this twice, but it seems require() isn't available here
function createBlob(parts, properties) {
/* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */
parts = parts || [];
... | /content/code_sandbox/node_modules/localforage/test/test.datatypes.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 4,530 |
```javascript
// if (typeof Promise === 'undefined') {
// require('../bower_components/es6-promise/promise');
// }
// require localforage as defined in package.json
window.localforage = require('../');
// require('script!../'); // optionally use webpack/script-loader
``` | /content/code_sandbox/node_modules/localforage/test/runner.webpack.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 59 |
```javascript
// if (typeof Promise === 'undefined') {
// require('../bower_components/es6-promise/promise');
// }
// require localforage as defined in package.json
window.localforage = require('../');
``` | /content/code_sandbox/node_modules/localforage/test/runner.browserify.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 45 |
```javascript
/*jshint node:true */
var SAUCELAB_BROWSERS = [
{
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 7',
version: '34',
},
{
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Windows 7',
version: '28',
},
{... | /content/code_sandbox/node_modules/localforage/test/saucelabs-browsers.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 328 |
```javascript
/* global beforeEach:true, describe:true, expect:true, it:true */
describe('Driver API', function() {
'use strict';
beforeEach(function(done) {
if (localforage.supports(localforage.INDEXEDDB)) {
localforage.setDriver(localforage.INDEXEDDB, function() {
done();
... | /content/code_sandbox/node_modules/localforage/test/test.drivers.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,484 |
```javascript
/* global describe:true, expect:true, it:true */
describe('When Driver Fails to Initialize', function() {
'use strict';
var FAULTYDRIVERS = [
localforage.WEBSQL
];
FAULTYDRIVERS.forEach(function(driverName) {
it('fails to setDriver ' + driverName + ' [callback]', function... | /content/code_sandbox/node_modules/localforage/test/test.faultydriver.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 215 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage (minified) Tests!</title>
<link rel="stylesheet" type="text/css"
href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/moc... | /content/code_sandbox/node_modules/localforage/test/test.min.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 266 |
```javascript
/* global describe:true, expect:true, it:true, Modernizr:true */
describe('When No Drivers Are Available', function() {
'use strict';
var DRIVERS = [
localforage.INDEXEDDB,
localforage.LOCALSTORAGE,
localforage.WEBSQL
];
it('agrees with Modernizr on storage driver... | /content/code_sandbox/node_modules/localforage/test/test.nodriver.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 642 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage Tests!</title>
<link rel="stylesheet" href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/mocha.js"></script>
<script src="/b... | /content/code_sandbox/node_modules/localforage/test/test.main.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 269 |
```javascript
/* global before:true, after:true, describe:true, expect:true, it:true */
describe('Inside iFrames', function() {
'use strict';
before(function() {
var iFrame = window.document.createElement('iframe');
iFrame.name = 'iframe';
iFrame.id = 'iframe';
// TODO: Get this... | /content/code_sandbox/node_modules/localforage/test/test.iframes.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 222 |
```javascript
/*globals importScripts:true, self:true */
importScripts("/dist/localforage.js");
self.onmessage = function(messageEvent) {
return localforage
.setDriver(messageEvent.data.driver)
.then(function() {
return localforage.setItem('service worker', messageEvent.data.value);
... | /content/code_sandbox/node_modules/localforage/test/serviceworker-client.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 218 |
```javascript
/* global before:true, beforeEach:true, describe:true, expect:true, it:true */
describe('Config API', function() {
'use strict';
var DRIVERS = [
localforage.INDEXEDDB,
localforage.LOCALSTORAGE,
localforage.WEBSQL
];
var supportedDrivers = [];
before(function()... | /content/code_sandbox/node_modules/localforage/test/test.config.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,784 |
```javascript
/* global describe:true, expect:true, it:true, dummyStorageDriver:true */
describe('When Custom Drivers are used', function() {
'use strict';
var errorMessage = 'Custom driver not compliant; see ' +
'path_to_url#definedriver';
var nameErrorMessage = function(driverName) ... | /content/code_sandbox/node_modules/localforage/test/test.customdriver.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,247 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage callWhenReady Tests!</title>
<link rel="stylesheet" href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/mocha.js"></script>
<... | /content/code_sandbox/node_modules/localforage/test/test.callwhenready.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 281 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage Browserify Tests!</title>
<link rel="stylesheet" href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/mocha.js"></script>
<scr... | /content/code_sandbox/node_modules/localforage/test/test.browserify.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 258 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Sub iFrame Test</title>
</head>
<body>
<div id="my-text"></div>
<script src="/dist/localforage.js"></script>
<script>localforage.setItem('my cool key',
'I have been set').then(function() {
... | /content/code_sandbox/node_modules/localforage/test/test.iframecontents.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 126 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>localForage require.js Tests!</title>
<link rel="stylesheet" href="/bower_components/mocha/mocha.css">
<script src="/bower_components/assert/assert.js"></script>
<script src="/bower_components/mocha/mocha.js"></script>
<scr... | /content/code_sandbox/node_modules/localforage/test/test.require.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 179 |
```javascript
import isIndexedDBValid from './utils/isIndexedDBValid';
import isWebSQLValid from './utils/isWebSQLValid';
import isLocalStorageValid from './utils/isLocalStorageValid';
import idbDriver from './drivers/indexeddb';
import websqlDriver from './drivers/websql';
import localstorageDriver from './drivers/loc... | /content/code_sandbox/node_modules/localforage/src/localforage.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,503 |
```javascript
/* global after:true, afterEach:true, before:true, beforeEach:true, describe:true, expect:true, it:true, Promise:true */
var DRIVERS = [
localforage.INDEXEDDB,
localforage.LOCALSTORAGE,
localforage.WEBSQL
];
var driverApiMethods = [
'getItem',
'setItem',
'clear',
'length',
... | /content/code_sandbox/node_modules/localforage/test/test.api.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 8,171 |
```javascript
import createBlob from '../utils/createBlob';
import idb from '../utils/idb';
import Promise from '../utils/promise';
import executeCallback from '../utils/executeCallback';
// Some code originally from async_storage.js in
// [Gaia](path_to_url
var DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-s... | /content/code_sandbox/node_modules/localforage/src/drivers/indexeddb.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 4,381 |
```javascript
// If IndexedDB isn't available, we'll fall back to localStorage.
// Note that this will have considerable performance and storage
// side-effects (all data will be serialized on save and only data that
// can be converted to a string via `JSON.stringify()` will be saved).
import serializer from '../util... | /content/code_sandbox/node_modules/localforage/src/drivers/localstorage.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,741 |
```javascript
import createBlob from './createBlob';
// Sadly, the best way to save binary data in WebSQL/localStorage is serializing
// it to Base64, so this is how we store it to prevent very strange errors with less
// verbose ways of binary <-> string data storage.
var BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcde... | /content/code_sandbox/node_modules/localforage/src/utils/serializer.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,029 |
```javascript
// Abstracts constructing a Blob object, so it also works in older
// browsers that don't support the native Blob constructor. (i.e.
// old QtWebKit versions, at least).
// Abstracts constructing a Blob object, so it also works in older
// browsers that don't support the native Blob constructor. (i.e.
// ... | /content/code_sandbox/node_modules/localforage/src/utils/createBlob.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 251 |
```javascript
function executeCallback(promise, callback) {
if (callback) {
promise.then(function(result) {
callback(null, result);
}, function(error) {
callback(error);
});
}
}
export default executeCallback;
``` | /content/code_sandbox/node_modules/localforage/src/utils/executeCallback.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 49 |
```javascript
function executeTwoCallbacks(promise, callback, errorCallback) {
if (typeof callback === 'function') {
promise.then(callback);
}
if (typeof errorCallback === 'function') {
promise.catch(errorCallback);
}
}
export default executeTwoCallbacks;
``` | /content/code_sandbox/node_modules/localforage/src/utils/executeTwoCallbacks.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 55 |
```javascript
function isLocalStorageValid() {
try {
return typeof localStorage !== 'undefined' &&
('setItem' in localStorage) &&
localStorage.setItem;
} catch (e) {
return false;
}
}
export default isLocalStorageValid;
``` | /content/code_sandbox/node_modules/localforage/src/utils/isLocalStorageValid.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 51 |
```javascript
import serializer from '../utils/serializer';
import Promise from '../utils/promise';
import executeCallback from '../utils/executeCallback';
/*
* Includes code from:
*
* base64-arraybuffer
* path_to_url
*
*/
// Open the WebSQL database (automatically creates one if one didn't
// previously exist),... | /content/code_sandbox/node_modules/localforage/src/drivers/websql.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 2,187 |
```javascript
// This is CommonJS because lie is an external dependency, so Rollup
// can just ignore it.
if (typeof Promise === 'undefined' && typeof require !== 'undefined') {
require('lie/polyfill');
}
export default Promise;
``` | /content/code_sandbox/node_modules/localforage/src/utils/promise.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 52 |
```javascript
function getIDB() {
/* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */
if (typeof indexedDB !== 'undefined') {
return indexedDB;
}
if (typeof webkitIndexedDB !== 'undefined') {
return webkitIndexedDB;
}
if (typeof mozIndexedDB !== 'undefined'... | /content/code_sandbox/node_modules/localforage/src/utils/idb.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 142 |
```javascript
function isWebSQLValid() {
return typeof openDatabase === 'function';
}
export default isWebSQLValid;
``` | /content/code_sandbox/node_modules/localforage/src/utils/isWebSQLValid.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 25 |
```javascript
import idb from './idb';
function isIndexedDBValid() {
try {
// Initialize IndexedDB; fall back to vendor-prefixed versions
// if needed.
if (!idb) {
return false;
}
// We mimic PouchDB here; just UA test for Safari (which, as of
// iOS 8/Yo... | /content/code_sandbox/node_modules/localforage/src/utils/isIndexedDBValid.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 312 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf8" />
<title>localForage no available driver example</title>
</head>
<body>
<script>
try {
window.indexedDB.open = null;
} catch (e) { }
try {
window.localStorage.setItem = null;
} catch (e) { }
try {... | /content/code_sandbox/node_modules/localforage/examples/no-driver.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 282 |
```javascript
requirejs.config({
paths: {
localforage: './../dist/localforage'
}
});
define(['localforage'], function(lf) {
lf.ready(function() {
var key = 'STORE_KEY';
var value = 'What we save offline';
var UNKNOWN_KEY = 'unknown_key';
lf.setItem(key, value, functi... | /content/code_sandbox/node_modules/localforage/examples/main.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 227 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf8" />
<title>require.js localForage example</title>
</head>
<body>
<script src="../bower_components/requirejs/require.js" data-main="main.js"></script>
</body>
</html>
``` | /content/code_sandbox/node_modules/localforage/examples/require.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 70 |
```html
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024);
var msg;
db.transaction(function (tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS LOGSSS (id unique, log)');
tx.executeSql('INSERT INTO LOGSSS (id, log) VALUES (1, "foobar")');
t... | /content/code_sandbox/node_modules/localforage/examples/websql-foo.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 301 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf8" />
<title>Simple localForage example</title>
</head>
<body>
<script src="../dist/localforage.js"></script>
<script>
// Forcing localstorage here. Feel free to switch to other drivers :)
localforage.setDriver(localforage.LOCALST... | /content/code_sandbox/node_modules/localforage/examples/index.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 260 |
```javascript
/** vim: et:ts=4:sw=4:sts=4
* Available via the MIT or new BSD license.
* see: path_to_url for details
*/
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with requirejs.exec()/transpiler plugins that may not be strict.
/*jslint regexp: true, nomen: true, sloppy: true ... | /content/code_sandbox/node_modules/localforage/examples/require.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 14,840 |
```javascript
/*!
localForage -- Offline Storage, Improved
Version 1.4.2
path_to_url
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof g... | /content/code_sandbox/node_modules/localforage/dist/localforage.nopromises.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 14,122 |
```javascript
/*!
localForage -- Offline Storage, Improved
Version 1.4.2
path_to_url
*/
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global... | /content/code_sandbox/node_modules/localforage/dist/localforage.nopromises.min.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 6,468 |
```javascript
/*!
localForage -- Offline Storage, Improved
Version 1.4.2
path_to_url
*/
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global... | /content/code_sandbox/node_modules/localforage/dist/localforage.min.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 7,649 |
```javascript
/*!
localForage -- Offline Storage, Improved
Version 1.4.2
path_to_url
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof g... | /content/code_sandbox/node_modules/localforage/dist/localforage.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 16,168 |
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>localForage</title>
<!-- Flatdoc -->
<script src="scripts/jquery.min.js"></script>
<script src="scripts/legacy.js"></scri... | /content/code_sandbox/node_modules/localforage/docs/index.html | html | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 495 |
```javascript
(function($) {
var $window = $(window);
var $document = $(document);
/*
* Scrollspy.
*/
$document.on('flatdoc:ready', function() {
$("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) {
if (pid) {
$("[href='#"+pid+"']").removeClass('active');
}
... | /content/code_sandbox/node_modules/localforage/docs/theme/script.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,447 |
```css
@font-face {
font-family: 'icomoon';
src: url("../fonts/icomoon.eot");
src: url("../fonts/icomoon.eot?#iefix") format("embedded-opentype"),
url("../fonts/icomoon.ttf") format("truetype"),
url("../fonts/icomoon.woff") format("woff"),
url("../fonts/icomoon.svg#icomoon") format("svg");
... | /content/code_sandbox/node_modules/localforage/docs/theme/localforage.css | css | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 594 |
```javascript
/*!
localForage -- Offline Storage, Improved
Version 1.4.0
path_to_url
*/
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global... | /content/code_sandbox/node_modules/localforage/docs/localforage.min.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 7,777 |
```css
/*
Please don't edit this file directly.
Instead, edit the stylus (.styl) files and compile it to CSS on your machine.
*/
/* your_sha256_hash------------
* Fonts
*/
@import url("//fonts.googleapis.com/css?family=Montserrat:700|Open+Sans:300");
/* your_sha256_hash------------
* Base
*/
html,
body,
div,
span... | /content/code_sandbox/node_modules/localforage/docs/theme/style.css | css | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 5,795 |
```javascript
/*!
* Flatdoc - (c) 2013, 2014 Rico Sta. Cruz
* path_to_url
* @license MIT
*/
(function($) {
var exports = this;
var marked;
/**
* Basic Flatdoc module.
*
* The main entry point is `Flatdoc.run()`, which invokes the [Runner].
*
* Flatdoc.run({
* fetcher: Flatdoc.gi... | /content/code_sandbox/node_modules/localforage/docs/scripts/flatdoc.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 10,919 |
```javascript
/*!
Support JS for legacy browsers.
Includes:
HTML5 Shiv
@afarkas @jdalton @jon_neal @rem
path_to_url
matchMedia() polyfill
(c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license
Respond.js
min/max-width media query polyfill
(c) Scott Jehl. MIT/GPLv2 Lic.
... | /content/code_sandbox/node_modules/localforage/docs/scripts/legacy.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 3,579 |
```javascript
'use strict';
var utils = require('./utils');
var has = Object.prototype.hasOwnProperty;
var defaults = {
allowDots: false,
allowPrototypes: false,
arrayLimit: 20,
decoder: utils.decode,
delimiter: '&',
depth: 5,
parameterLimit: 1000,
plainObjects: false,
strictNullH... | /content/code_sandbox/node_modules/qs/lib/parse.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,348 |
```javascript
'use strict';
var stringify = require('./stringify');
var parse = require('./parse');
var formats = require('./formats');
module.exports = {
formats: formats,
parse: parse,
stringify: stringify
};
``` | /content/code_sandbox/node_modules/qs/lib/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 46 |
```javascript
'use strict';
var has = Object.prototype.hasOwnProperty;
var hexTable = (function () {
var array = [];
for (var i = 0; i < 256; ++i) {
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
}
return array;
}());
var compactQueue = function compactQueue(queue) {... | /content/code_sandbox/node_modules/qs/lib/utils.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,470 |
```javascript
'use strict';
var replace = String.prototype.replace;
var percentTwenties = /%20/g;
module.exports = {
'default': 'RFC3986',
formatters: {
RFC1738: function (value) {
return replace.call(value, percentTwenties, '+');
},
RFC3986: function (value) {
... | /content/code_sandbox/node_modules/qs/lib/formats.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 102 |
```javascript
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=functi... | /content/code_sandbox/node_modules/localforage/docs/scripts/jquery.min.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 31,072 |
```javascript
'use strict';
var utils = require('./utils');
var formats = require('./formats');
var arrayPrefixGenerators = {
brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
return prefix + '[]';
},
indices: function indices(prefix, key) { // eslint-disable-line fun... | /content/code_sandbox/node_modules/qs/lib/stringify.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 1,349 |
```javascript
'use strict';
require('./parse');
require('./stringify');
require('./utils');
``` | /content/code_sandbox/node_modules/qs/test/index.js | javascript | 2016-03-11T09:28:00 | 2024-08-16T17:55:54 | antSword | AntSwordProject/antSword | 3,579 | 17 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.