sha256 stringlengths 64 64 | language stringclasses 25
values | size int32 1 210k | lines int32 1 9.41k | content stringlengths 1 200k |
|---|---|---|---|---|
f19adbb875526fc13b94a2ead755dc80c4c781ec47c8850d67d10645b782b4b0 | JavaScript | 857 | 37 | const spawn = require('child_process').spawn;
module.exports = function (rootPid, callback) {
const pidsOfInterest = new Set([parseInt(rootPid, 10)]);
var output = '';
// *nix
const ps = spawn('ps', ['-A', '-o', 'ppid,pid']);
ps.stdout.on('data', (data) => {
output += data.toString('ascii');
});
ps... |
b59e2ca9dc7f4847096e25b9f9ca070d5f0556612525103767cdb61051e48cb3 | JavaScript | 862 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.inpu... |
e6de14feced39058e7112b33b28e84c94d9982d9f869714263831c6cec5c05e9 | JavaScript | 862 | 25 | describe('toContain', function() {
it('delegates to privateUnderTest.MatchersUtil.contains', function() {
const matchersUtil = {
contains: jasmine.createSpy('delegated-contains').and.returnValue(true)
};
const matcher = privateUnderTest.matchers.toContain(matchersUtil);
const result = matcher.c... |
229237ba8d7d7e8efb8ccb4de51de97a83f43ab88dfa741f3d8d89e1fb9f77c8 | JavaScript | 866 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:f... |
954e75eb633f92df1143ef3a9f199df54c8f42cecd65c00a397aa890099df60b | JavaScript | 866 | 38 | 'use strict';
// We define these manually to ensure they're always copied
// even if they would move up the prototype chain
// https://nodejs.org/api/http.html#http_class_http_incomingmessage
const knownProperties = [
'aborted',
'complete',
'destroy',
'headers',
'httpVersion',
'httpVersionMinor',
'httpVersionMa... |
e5bb297dc8a1329f325c3c1f72abc2fe75774136ed06e403991ddced43d0b45c | JavaScript | 866 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputToo... |
acb9ad3fb6c0fdab643488fcd65feb89333b7e2e425f156b1411c5c9d74ef87c | JavaScript | 868 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"ka... |
f4d8f4f0da873d3ef4467907b17c197e564a63a106c7eb65933b559eaeea3d01 | JavaScript | 868 | 34 | getJasmineRequireObj().toEqual = function(j$, private$) {
'use strict';
/**
* {@link expect} the actual value to be equal to the expected, using deep equality comparison.
* @function
* @name matchers#toEqual
* @since 1.3.0
* @param {Object} expected - Expected value
* @example
* expect(bigObje... |
c69706894ff0a85e5ea5c722a641007ab715e41311c15b1d3eb43343eae0e53a | JavaScript | 871 | 33 | getJasmineRequireObj().toBePending = function(j$, private$) {
'use strict';
/**
* Expect a promise to be pending, i.e. the promise is neither resolved nor rejected.
* @function
* @async
* @name async-matchers#toBePending
* @since 3.6
* @example
* await expectAsync(aPromise).toBePending();
*... |
fa94cca1a5daac2b20be0112b0bbb9d153df0eef77b3728480ab1320760660b4 | JavaScript | 874 | 25 | /**
* @license RequireJS Image Plugin <https://gist.github.com/821476>
* @author Miller Medeiros
* @Modified by Abouzar Kaboudian
* @DATE : Mon 31 Jul 2017 10:18:26 AM EDT
* @PLACE : CHAOS LAB AT GEORGIA INSTITUTE OF TECHNOLOGY
* Released under the MIT License <http://www.opensource.org/licenses/mit-license.... |
d0315ed47bbd7c40d25e0a633ce42b03a12ad2b19bd793516ec1a1d54e2f12bd | JavaScript | 876 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputToo... |
2f98eacfccdce4117cba4ae1a48dafbc6acd477e17ef8f3675c917f8852e5290 | JavaScript | 878 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLon... |
70f6d697eb3a55d36cacb1e31fd476bdbd573559b15e0e435502ba3db2f3c3a5 | JavaScript | 879 | 43 | 'use strict';
const stripAnsi = require('strip-ansi');
const isFullwidthCodePoint = require('is-fullwidth-code-point');
const emojiRegex = require('emoji-regex');
const stringWidth = string => {
string = string.replace(emojiRegex(), ' ');
if (typeof string !== 'string' || string.length === 0) {
return 0;
}
st... |
e14f62a9dd16a6679f0a03cf264b1260ac794ae4ef67f257228a8367c8627386 | JavaScript | 880 | 38 | getJasmineRequireObj().ArrayWithExactContents = function(j$, private$) {
'use strict';
function ArrayWithExactContents(sample) {
this.sample = sample;
}
ArrayWithExactContents.prototype.asymmetricMatch = function(
other,
matchersUtil
) {
if (!Array.isArray(this.sample)) {
throw new Err... |
50465dbef5aee6ce191f5ea515fc5af143e05972778bc56c78ae4b730d8aade8 | JavaScript | 884 | 29 | 'use strict';
{
// Call function fn when the DOM is loaded and ready. If it is already
// loaded, call the function now.
// http://youmightnotneedjquery.com/#ready
function ready(fn) {
if (document.readyState !== 'loading') {
fn();
} else {
document.addEventListen... |
6edce3963588b42e41942900b24218e665b97df0c0b1c74090b2b934fa68ca08 | JavaScript | 885 | 47 | /*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Module dependencies.
*/
var merge = require('utils-merge')
var parseUrl = require('parseurl');
var qs = require('qs');
/**
* @pa... |
74502372f3e457ae4d05546c47b4fd88c8df6ed8eb6166b6feb8bec1798ec6dc | JavaScript | 894 | 52 | 'use strict';
const {PassThrough: PassThroughStream} = require('stream');
module.exports = options => {
options = {...options};
const {array} = options;
let {encoding} = options;
const isBuffer = encoding === 'buffer';
let objectMode = false;
if (array) {
objectMode = !(encoding || isBuffer);
} else {
enc... |
668fe8ee83d5d08ab65db115b9fb0e867730838716693acb612d71a866010015 | JavaScript | 896 | 39 | getJasmineRequireObj().toBe = function(j$, private$) {
'use strict';
/**
* {@link expect} the actual value to be `===` to the expected value.
* @function
* @name matchers#toBe
* @since 1.3.0
* @param {Object} expected - The expected value to compare against.
* @example
* expect(thing).toBe(rea... |
906c6d6a9c214458f7bbf22163fef359984a811e42ad99a66ac4f9c3e6a85d13 | JavaScript | 897 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong... |
0d2cb2017254234c13a7f4db1612cd1ab82f811b0659e57721a7f16141818203 | JavaScript | 900 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e... |
847a442b87984a8263fdfbc0db097c412b8996e37187e4efa7a5199be65869e1 | JavaScript | 900 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input... |
a08c492d82ed2b4bc6da0dece63b062e7e251ee0e04a877160058bd01c87447a | JavaScript | 903 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:fun... |
25cb4b7d3a4b4395055edc809a06c2bd23d4b56d1fcb5984ee835870c23dd1b2 | JavaScript | 904 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLon... |
153453c4d84a3c2f13589c37055a7daff61d48475dcce554f7eedad15fc7b3e5 | JavaScript | 905 | 33 | // Returns a wrapper function that returns a wrapped callback
// The wrapper function should do some stuff, and return a
// presumably different callback function.
// This makes sure that own properties are retained, so that
// decorations and such are not lost along the way.
module.exports = wrappy
function wrappy (fn... |
cf1437a5e4a76d521fac7d4d763c780eb1c3b266e9aaeea67deca555614ce666 | JavaScript | 905 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return... |
52adfef259d4a9dd6689fb26322233e91119319aab0d3202178e899baa763f7d | JavaScript | 907 | 28 | const ParallelRunner = require('jasmine/parallel');
const jasmineCore = require('../lib/jasmine-core.js');
let numWorkers = require('os').cpus().length;
if (process.env['CIRCLECI']) {
// On Circle CI, the above gives the number of CPU cores on the host
// computer, which is unrelated to the resources actually avai... |
53192020ca4b4b32df3e8ad3e351dba4b77993b2d1580525e254ce2e544a25b5 | JavaScript | 909 | 36 | var parse = require('../');
var test = require('tape');
test('nums', function (t) {
var argv = parse([
'-x', '1234',
'-y', '5.67',
'-z', '1e7',
'-w', '10f',
'--hex', '0xdeadbeef',
'789'
]);
t.deepEqual(argv, {
x : 1234,
y : 5.67,
z : 1... |
ce56187b921c2a1c74501e5b32af86ba14ef6c4f2f51eacc37a9cf7c52bdad69 | JavaScript | 915 | 26 | /*========================================================================
* Configure Require.js
*========================================================================
*/
var require = {
/* The following is required
for URL busting and avoiding cache! */
urlArgs: "bust=" + (new Date()).getTime(... |
a2ba868c6ab06a47edd98375f28ba1c3c32247aa98c519e572b09ec181638590 | JavaScript | 918 | 34 | /*******************************
Exp hil
*******************************/
//p5.js preload images
function preload() {
//load images
let num_imgs = exp_config.Condition.num_show_imgs;
for (let i=0; i < num_imgs; ++i) {
Config.Image.arrays_orig[i] = loadImage(STATIC_ROOT +IMAGE_ROOT+PATH_IMG_PRE+list_or... |
89a12379f9ce2fcec2f0943a131a9c6886bcec60a6f8ebf1af9e1b606a4b85ca | JavaScript | 919 | 27 | describe('StringContaining', function() {
it('searches for a provided substring when the expected is a String', function() {
const matcher = new privateUnderTest.StringContaining('foo');
expect(matcher.asymmetricMatch('barfoobaz')).toBe(true);
expect(matcher.asymmetricMatch('barbaz')).toBe(false);
});
... |
526c514f9c6ce59b8438040cf4d083032419b021c1d755a57aba3535a9bd2f47 | JavaScript | 921 | 36 | getJasmineRequireObj().toMatch = function(j$, private$) {
'use strict';
const getErrorMsg = private$.formatErrorMsg(
'<toMatch>',
'expect(<expectation>).toMatch(<string> || <regexp>)'
);
/**
* {@link expect} the actual value to match a regular expression
* @function
* @name matchers#toMatch
... |
22165a232f2e7d376e3b6faf06b8afb303028e53e4eefae4e0ff35a43e81d123 | JavaScript | 922 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:fun... |
1d225a7c8f39c8aa785b38c53d3e7fdde67ff9740360fcf37f80569aeeae5c79 | JavaScript | 924 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:fu... |
6a3d2adab749378ec144173d2eabec83192e3ce71601b66c5055256e0bb0758d | JavaScript | 924 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLo... |
d65ad3cf6ad39c41b98aba063e2ad1ed3c2d2817ab6e2d6f458bcf5ad06b7de8 | JavaScript | 924 | 26 | function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie !== '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i].trim();
// Does this cookie string begin with the name we want?... |
2cf20ac29f60a7f59c51ce14695b7f7324a534be7f9667d996dd1b82dc279059 | JavaScript | 925 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLon... |
94fb2b20e84208b520e817173d9bd132d4b37ecf4eee4ebe4fe083b152a9ece8 | JavaScript | 926 | 41 | getJasmineHtmlRequireObj().HtmlSpecFilterV2 = function() {
class HtmlSpecFilterV2 {
#getFilterParams;
constructor(options) {
this.#getFilterParams = options.filterParams;
}
matches(spec) {
const params = this.#getFilterParams();
if (params.path) {
return this.#matchesPath(... |
06d5b4b94335bab8f776252ffb096b5b2e0c955075c5fa5bbbec71732f774470 | JavaScript | 931 | 38 | getJasmineRequireObj().toHaveClass = function(j$, private$) {
'use strict';
/**
* {@link expect} the actual value to be a DOM element that has the expected class
* @function
* @name matchers#toHaveClass
* @since 3.0.0
* @param {Object} expected - The class name to test for
* @example
* const e... |
f0a4808d04c4d55378751ac096a8376b64b1a704c82584b0ee590212cf413013 | JavaScript | 934 | 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d... |
3db73e347ecbdbafdf8d0db85145c877e133f5372e767360ef90c09f70ac5103 | JavaScript | 935 | 42 | var wrappy = require('wrappy')
module.exports = wrappy(once)
module.exports.strict = wrappy(onceStrict)
once.proto = once(function () {
Object.defineProperty(Function.prototype, 'once', {
value: function () {
return once(this)
},
configurable: true
})
Object.defineProperty(Function.prototype, ... |
c5c18c9955efa57da5cef13a9424d9a38412df0e344f13ad6ad5cbdbd006b3f7 | JavaScript | 935 | 31 | 'use strict';
const decompressResponse = require('decompress-response');
const is = require('@sindresorhus/is');
const mimicResponse = require('mimic-response');
const progress = require('./progress');
module.exports = (response, options, emitter) => {
const downloadBodySize = Number(response.headers['content-length'... |
01a75be8b574bb62f69823a0c97d9c619eb1239b034fd388dd5ec7c2eb9e8af3 | JavaScript | 938 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:fu... |
4a02e633bed50e2a52c22e1901c37032777c8d5c45104f185519a21f1ebc1086 | JavaScript | 939 | 60 | 'use strict';
const pkg = require('../package.json');
const create = require('./create');
const defaults = {
options: {
retry: {
retries: 2,
methods: [
'GET',
'PUT',
'HEAD',
'DELETE',
'OPTIONS',
'TRACE'
],
statusCodes: [
408,
413,
429,
500,
502,
503,
5... |
e5b3c2f7c0a50cfadf4ee89d279162413bd6a5d5adf882e09bb99f4d6ec188a7 | JavaScript | 940 | 34 | const { exec } = require('child_process');
describe('reset', function() {
it('replaces the current env', async function() {
// Do the actual reset call in another process, to avoid clobbering the
// global state of the jasmine we're running in.\
const { exitCode, stdout, stderr } = await runNodeScript(
... |
653fb8e626d5c1d5a74f2a3e4eab2a5b6363229f73c38c6ce52a3bf0a31bfecf | JavaScript | 944 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100... |
8ebae78d8d75951b714acaa3e1a3d7f15b382a92b90c8040423e9866d97f1ad9 | JavaScript | 946 | 44 | var events = require('events');
var debug = require('debug')('nodemon');
var util = require('util');
var Bus = function () {
events.EventEmitter.call(this);
};
util.inherits(Bus, events.EventEmitter);
var bus = new Bus();
// /*
var collected = {};
bus.on('newListener', function (event) {
debug('bus new listener... |
ea012e2989c975ff1c6cf111b30fa6b5d720741c9426e2dfd50507d1a49a8cca | JavaScript | 947 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1... |
3e7aca30dc9e6c82fc40fbc4ac5704a1ca3aeef0d596ed463de5a7ffb5d1a13c | JavaScript | 954 | 64 | var ParallelRunner = require("../index").ParallelRunner
var should = require("should")
describe("When running tasks parallely", function() {
it("", function(done) {
var r = new ParallelRunner()
var list = []
var numCallback = 10
var func = function(i, next) {
setTimeout(function() {
... |
712d3e9d03d2a54ab1f3ffd11f89307cd907f2f2c560bf1bcd434a247770f700 | JavaScript | 957 | 30 | const DelimiterParser = require('@serialport/parser-delimiter')
/**
* A transform stream that emits data after a newline delimiter is received.
* @summary To use the `Readline` parser, provide a delimiter (defaults to `\n`). Data is emitted as string controllable by the `encoding` option (defaults to `utf8`).
* @e... |
65e3d3d44c3b7a9deb274eefc7048634445dea89612b784424dcb9198b4cc923 | JavaScript | 960 | 47 | getJasmineRequireObj().ObjectPath = function(j$, private$) {
'use strict';
class ObjectPath {
constructor(components) {
this.components = components || [];
}
toString() {
if (this.components.length) {
return '$' + this.components.map(formatPropertyAccess).join('');
} else {
... |
e550b2d2ee5720b7b140a73b625d1cef6550152b1edbd7264488c3bd54611b6f | JavaScript | 963 | 36 | 'use strict'
var util = require('util')
var stream = require('readable-stream')
var delegate = require('delegates')
var Tracker = require('./tracker.js')
var TrackerStream = module.exports = function (name, size, options) {
stream.Transform.call(this, options)
this.tracker = new Tracker(name, size)
this.name = n... |
839ea4592bbd471ca1feb6ab2d20daffc9eb76a2f9d49a996a2e10431db48f04 | JavaScript | 965 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}re... |
2478b04fba8e59e105f50fe3b08e5478649d499c65db72ce0ceefcdaeb1956bc | JavaScript | 967 | 38 | getJasmineRequireObj().toHaveClasses = function(j$, private$) {
'use strict';
/**
* {@link expect} the actual value to be a DOM element that has the expected classes
* @function
* @name matchers#toHaveClasses
* @since 5.6.0
* @param {Object} expected - The class names to test for
* @example
* ... |
e59e889479ae93fe8875974056f7628179e58fb20e68a5ed723b88d27d059984 | JavaScript | 968 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,u="Моля въведете с "+e+" по-ма... |
3ff18e96b683d8dfa4e7b884f4f49fc411ab6c2eb69b13cafbaa285429b28965 | JavaScript | 976 | 53 | 'use strict';
const lazy = (mod, fn, id) => mod === undefined ? fn(id) : mod;
module.exports = fn => {
return id => {
let mod;
return function () {
if (arguments.length === 0) {
mod = lazy(mod, fn, id);
return mod;
}
const ret = {};
[].forEach.call(arguments, prop => {
Object.defineProp... |
0393406f4ab568a21485d193bd177cb83e9407f73be9abf5c373e00b63282265 | JavaScript | 977 | 29 | describe('StringMatching', function() {
it('matches a string against a provided regexp', function() {
const matcher = new privateUnderTest.StringMatching(/foo/);
expect(matcher.asymmetricMatch('barfoobaz')).toBe(true);
expect(matcher.asymmetricMatch('barbaz')).toBe(false);
});
it('matches a string a... |
4fe265aea64405259b885c3f7b997190cca4900096a965ddff0332f9bdd39da1 | JavaScript | 978 | 30 | /**
* Persist changelist filters state (collapsed/expanded).
*/
'use strict';
{
// Init filters.
let filters = JSON.parse(sessionStorage.getItem('django.admin.filtersState'));
if (!filters) {
filters = {};
}
Object.entries(filters).forEach(([key, value]) => {
const detailElement ... |
3fd5f504a5b18db2fc71b8bd1ef6f8ef218ed40064ec83c5ed650c475ffbeb84 | JavaScript | 980 | 31 | var parse = require('../');
var test = require('tape');
test('-', function (t) {
t.plan(5);
t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
t.deepEqual(
parse([ '-b', '-' ], { boolean: 'b' }... |
ec410b617c1bd2d212b2ebcbe9ea2bc734ef88c2bea1e752bd9bc4642325a065 | JavaScript | 980 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}re... |
70ac804bdfd763340005a632f4559aba280f37130d02e8de20d9da243845e8c9 | JavaScript | 982 | 19 |
let exp_config = {};
// Experimental Conditions
exp_config.Condition = {};
exp_config.Condition.timePresentation_1 = 0.2; // Stimulus presentation time A
exp_config.Condition.timePresentation_2 = 0.2; // Stimulus presentation time B
exp_config.Condition.timePresentation_3 = 0.2; // Stimulus presentation time X
exp_con... |
0c83d1287c343640ee52d2cd19d4e76197280a2377bacb4763e50c9b0df857fb | JavaScript | 984 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n... |
94658b19fb75d786534b26f065a5c377dbbbdc885705437573163dc4ab7a5c90 | JavaScript | 987 | 35 | (function() {
const path = require('path');
const glob = require('glob');
const jasmineUnderTestRequire = require(path.join(
__dirname,
'../../src/core/requireCore.js'
));
// Individual source files call getJasmineRequireObj. It's normally defined
// by requireCore.js which is concatenated into ja... |
ad2230f44782b74b5aee9542e7e10f21dd1891af205e39c95413ebd5371f11d5 | JavaScript | 989 | 20 |
let demo_Config = {};
// Slider
demo_Config.Slider = {};
demo_Config.Slider.width = Math.round(0.5 * canvas.height);
demo_Config.Slider.height = Math.round(0.02 * canvas.height);
demo_Config.Slider.position = [-demo_Config.Slider.width/2, canvas.center_y - (demo_Config.Slider.height / 2)];
// Slider value text
demo_C... |
04b7b585e056fccea011f300815d9f19afb190b7c88f5bc575aeac8b5dd00ded | JavaScript | 992 | 53 | var pump = require('./index')
var rs = require('fs').createReadStream('/dev/random')
var ws = require('fs').createWriteStream('/dev/null')
var toHex = function () {
var reverse = new (require('stream').Transform)()
reverse._transform = function (chunk, enc, callback) {
reverse.push(chunk.toString('hex'))
... |
0e7f113040c0380731e6b6597a74d7909f4c7a25e3a8909cb06afcd96d95abdc | JavaScript | 998 | 35 | 'use strict'
var validate = require('aproba')
var renderTemplate = require('./render-template.js')
var wideTruncate = require('./wide-truncate')
var stringWidth = require('string-width')
module.exports = function (theme, width, completed) {
validate('ONN', [theme, width, completed])
if (completed < 0) completed = ... |
c7df01b933a5fec628fd6af1b75890e49e0b15f1a65b6b0e060c8b2be099003d | JavaScript | 1,013 | 32 | describe('toBePositiveInfinity', function() {
it("fails for anything that isn't Infinity", function() {
const matcher = privateUnderTest.matchers.toBePositiveInfinity();
let result;
result = matcher.compare(1);
expect(result.pass).toBe(false);
result = matcher.compare(Number.NaN);
expect(res... |
57727793e5bbac68cc9003236488a16b751ec35118b159191bfb3bd1bbcecec7 | JavaScript | 1,014 | 49 | getJasmineRequireObj().Timer = function() {
'use strict';
const defaultNow = (function(Date) {
return function() {
return new Date().getTime();
};
})(Date);
/**
* @class Timer
* @classdesc Tracks elapsed time
* @example
* const timer = new jasmine.Timer();
* timer.start();
* co... |
a4ccae1f8bee3671d9c563feb784cc65c0cf88aa28263035c707ce4e1b014147 | JavaScript | 1,016 | 41 | 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
, '[object Uint8Cla... |
2ad3f6c4da0fef9a169e86d4ad2ec4a7f04e14fcdc30d0edd30c8f9e46c817f4 | JavaScript | 1,017 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapisk... |
3266ea4c5e41a1bc0db27a17c4c7057ca08ea2c4f518e0cfeee4e8e3c19ab0ac | JavaScript | 1,017 | 32 | describe('toBeNegativeInfinity', function() {
it("fails for anything that isn't -Infinity", function() {
const matcher = privateUnderTest.matchers.toBeNegativeInfinity();
let result;
result = matcher.compare(1);
expect(result.pass).toBe(false);
result = matcher.compare(Number.NaN);
expect(re... |
1532eccdcac669e9535bae96579d2efeb4ba1d5d1267143a561a62dad9e00ba3 | JavaScript | 1,018 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","z... |
7ea66413d7bcb6ddab67b3ab0c63e23ac4cd763dd2dabd028db75d55404378c0 | JavaScript | 1,023 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:functio... |
a9f58e84017f49d7c3932d2e46f5dede98b19e38f2c8f0c694d3be586769afb9 | JavaScript | 1,023 | 40 | 'use strict';
const {PassThrough: PassThroughStream} = require('stream');
const zlib = require('zlib');
const mimicResponse = require('mimic-response');
const decompressResponse = response => {
const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
if (!['gzip', 'deflate', 'br'].include... |
202cf63677ddcac13e71d66d2e98c8f07aad10789845ade028e5be755b7abf3a | JavaScript | 1,024 | 35 | /*!
* normalize-path <https://github.com/jonschlinkert/normalize-path>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*/
module.exports = function(path, stripTrailing) {
if (typeof path !== 'string') {
throw new TypeError('expected path to be a string');
}
if (path === '... |
92a2a59c9ea34bab35cf18c3c3b1c9fda22368afd1afe5297c84c0d6e25b5a93 | JavaScript | 1,024 | 48 | getJasmineRequireObj().requireMatchers = function(jRequire, j$, private$) {
'use strict';
const availableMatchers = [
'nothing',
'toBe',
'toBeCloseTo',
'toBeDefined',
'toBeInstanceOf',
'toBeFalse',
'toBeFalsy',
'toBeGreaterThan',
'toBeGreaterThanOrEqual',
'toBeLessThan',
... |
04b8747e7b6bc2dc0dc254288b02e4750395c8d5c77664692f6f29f96e45b038 | JavaScript | 1,028 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:functio... |
701c67a3301b077b1552ddc5d7ebac56b69aaaa4c55321d1a4e4a48078026db9 | JavaScript | 1,032 | 30 | #!/usr/bin/env node
//process.env.DEBUG_NOPT = 1
// my-program.js
var nopt = require("../lib/nopt")
, Stream = require("stream").Stream
, path = require("path")
, knownOpts = { "foo" : [String, null]
, "bar" : [Stream, Number]
, "baz" : path
, "bloo" : [ "big", "m... |
e0469d4b83f6ba764b15f80e1766b75c136fbff68f048f4c050f0b1c7f065f69 | JavaScript | 1,034 | 55 | 'use strict';
const kDone = Symbol('kDone');
const kRun = Symbol('kRun');
/**
* A very simple job queue with adjustable concurrency. Adapted from
* https://github.com/STRML/async-limiter
*/
class Limiter {
/**
* Creates a new `Limiter`.
*
* @param {Number} [concurrency=Infinity] The maximum number of jo... |
3e4ee804766566fbf73ccc314cd3ff1132caa52339acce20b82bbf60b4da2541 | JavaScript | 1,035 | 29 | #!/usr/bin/env node
function main() {
if (process.env.SUPPRESS_SUPPORT || process.env.OPENCOLLECTIVE_HIDE || process.env.CI) {
return;
}
try {
const Configstore = require('configstore');
const pkg = require(__dirname + '/../package.json');
const now = Date.now();
var week = 1000 * 60 * 60 *... |
9d5cbee8050b580d28fc1de92987ee0237cf609415da8dc781920074f278c016 | JavaScript | 1,035 | 39 | 'use strict';
const stringReplaceAll = (string, substring, replacer) => {
let index = string.indexOf(substring);
if (index === -1) {
return string;
}
const substringLength = substring.length;
let endIndex = 0;
let returnValue = '';
do {
returnValue += string.substr(endIndex, index - endIndex) + substring +... |
3d2a71ae70692f8492b3d4dbd2a7560fbba6508c88a11d95d5fa6a450bc25dc0 | JavaScript | 1,038 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximu... |
e6fa54e13cd39a638c9d502b6219813ffe10d4e867fc87155fde9867fa28594c | JavaScript | 1,039 | 42 | getJasmineRequireObj().toBeResolved = function(j$, private$) {
'use strict';
/**
* Expect a promise to be resolved.
* @function
* @async
* @name async-matchers#toBeResolved
* @since 3.1.0
* @example
* await expectAsync(aPromise).toBeResolved();
* @example
* return expectAsync(aPromise).t... |
670576bfe96eb9e4fecd1e8c19f491a68b9bfd7da0e7564cd0a3c2ebd3839180 | JavaScript | 1,040 | 69 | /*!
* methods
* Copyright(c) 2013-2014 TJ Holowaychuk
* Copyright(c) 2015-2016 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Module dependencies.
* @private
*/
var http = require('http');
/**
* Module exports.
* @public
*/
module.exports = getCurrentNodeMethods() || getBasicNodeMethod... |
9d23fb0d80472356bf635b3e4fc46909914c34c930eafc7b8348d7e3653fcf0c | JavaScript | 1,043 | 75 | /*!
* destroy
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var ReadStream = require('fs').ReadStream
var Stream = require('stream')
/**
* Module exports.
* @public
*/
module.exports = destroy
/**
* Destroy a stream.
*
* @param {object} strea... |
07402720253cc048b149dfeb3e82eae84aa1e6b82c3081b36853a8a0657a18ea | JavaScript | 1,044 | 43 | (function() {
'use strict';
const isNode = typeof module !== 'undefined' && module.exports;
const jasmineRequire = getJasmineRequireObj();
function bootJasmine(options) {
const { jasmine, private: private$ } = jasmineRequire.core(jasmineRequire);
const env = jasmine.getEnv(options);
const jasmineI... |
31b584415b4c1e1d82579e0f131d1add740d472164fe7b00597186cf09b2a9d4 | JavaScript | 1,046 | 37 | describe('Timer', function() {
it('reports the time elapsed', function() {
const fakeNow = jasmine.createSpy('fake Date.now');
const timer = new jasmineUnderTest.Timer({ now: fakeNow });
fakeNow.and.returnValue(100);
timer.start();
fakeNow.and.returnValue(200);
expect(timer.elapsed()).toEqu... |
e09e2c66d49abf1af5bd97719a7b9bd89d07d2aaf54bc5a736c4de85f75fab83 | JavaScript | 1,049 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var... |
178d6d43b5fc9be4fcfaef41f8e7c4c26f7ccf5fd8fa803a02e8bd8ec103b541 | JavaScript | 1,056 | 30 | describe('Is', function() {
it('passes for primitives that are ===', function() {
const exactly = new privateUnderTest.Is(17);
expect(exactly.asymmetricMatch(17)).toBeTrue();
});
it('fails for primitives that are not ===', function() {
const exactly = new privateUnderTest.Is(42);
expect(exactly.a... |
380a924e21d99d3599cc9284bce9be675b5d0252e33d65fd8caa589261f43b3a | JavaScript | 1,060 | 33 | 'use strict';
{
const $ = django.jQuery;
$.fn.djangoAdminSelect2 = function() {
$.each(this, function(i, element) {
$(element).select2({
ajax: {
data: (params) => {
return {
term: params.term,
... |
b1a0cf2e4fb676ae5fb4a0af5b5c1d76424e83e99703e194a0f3d53a5499ac86 | JavaScript | 1,074 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return... |
e2a41fad6a88afcd0958cb9f93217ac2d62670d2a116ab7deb2b790e8f9bc90a | JavaScript | 1,075 | 39 | var concatMap = require('../');
var test = require('tape');
test('empty or not', function (t) {
var xs = [ 1, 2, 3, 4, 5, 6 ];
var ixes = [];
var ys = concatMap(xs, function (x, ix) {
ixes.push(ix);
return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
});
t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3... |
90ba524851f721e8aced79870d6d6a733cd3939b293a83e2d04417812a8ba330 | JavaScript | 1,083 | 45 | 'use strict';
if (typeof process === 'undefined' ||
!process.version ||
process.version.indexOf('v0.') === 0 ||
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
module.exports = { nextTick: nextTick };
} else {
module.exports = process
}
function nextTick(fn, arg1, arg... |
c7d8728de9e77358b4a1e62b1541d09d81da917a6fed60fb31217e73d01a4e38 | JavaScript | 1,088 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"ស... |
5c5b008f28d9aa1d6f8c30a30de037b95b50141a20ad0f029d0d79bcd75caa4d | JavaScript | 1,089 | 49 | var parse = require('./parse');
/**
* Converts a string to command line args, in particular
* groups together quoted values.
* This is a utility function to allow calling nodemon as a required
* library, but with the CLI args passed in (instead of an object).
*
* @param {String} string
* @return {Array}
*/
fu... |
ddd2d2536770195059217998ee3a6079f3e3d394222ba53725517bca2da7086d | JavaScript | 1,093 | 38 | getJasmineRequireObj().ArrayContaining = function(j$, private$) {
'use strict';
function ArrayContaining(sample) {
this.sample = sample;
}
ArrayContaining.prototype.asymmetricMatch = function(other, matchersUtil) {
if (!Array.isArray(this.sample)) {
throw new Error(
'You must provide an ... |
16eee98ca6531df335a703ea478ceffb182cc615250e1ea3dd5c91c8ec70de3b | JavaScript | 1,095 | 34 | 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 Uint16Array), 'Ui... |
cf2e02d66c2eca332279570b44f7ead4b32004dd9a5066f11fcae13d09768e14 | JavaScript | 1,100 | 39 | 'use strict';
const {htmlEscape} = require('escape-goat');
module.exports = (template, data) => {
if (typeof template !== 'string') {
throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof template}\``);
}
if (typeof data !== 'object') {
throw new TypeError(`Expected an \`object\` or ... |
69bb31cb9e0f44669ce272c1affd2912123abcdce6bb8c3048f8bfa68ca19679 | JavaScript | 1,105 | 37 | describe('toBeNaN', function() {
it('passes for NaN with a custom .not fail', function() {
const matcher = privateUnderTest.matchers.toBeNaN();
const result = matcher.compare(Number.NaN);
expect(result.pass).toBe(true);
expect(result.message).toEqual('Expected actual not to be NaN.');
});
it('fai... |
3de27f108133a575c0bd8160f7b3b2035dba797af990a102f37c5ee45ef63db3 | JavaScript | 1,106 | 41 | 'use strict';
var isGlob = require('is-glob');
var pathPosixDirname = require('path').posix.dirname;
var isWin32 = require('os').platform() === 'win32';
var slash = '/';
var backslash = /\\/g;
var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
var escaped = /\\([\!\*\?\|\[\]\(\)\{\}... |
0684f629d89c7991a0c61112473dd6d89ffb08562a5b2672a2fd9892d528ff6c | JavaScript | 1,109 | 3 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.