repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
remarkjs/remark-breaks | https://github.com/remarkjs/remark-breaks/blob/71f4ff3ca9f08b685dccf2fdb9882d8bbaea3388/index.js | index.js | export {default} from './lib/index.js'
| javascript | MIT | 71f4ff3ca9f08b685dccf2fdb9882d8bbaea3388 | 2026-01-05T03:42:54.860891Z | false |
remarkjs/remark-breaks | https://github.com/remarkjs/remark-breaks/blob/71f4ff3ca9f08b685dccf2fdb9882d8bbaea3388/test.js | test.js | import assert from 'node:assert/strict'
import test from 'node:test'
import rehypeStringify from 'rehype-stringify'
import remarkBreaks from 'remark-breaks'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import {unified} from 'unified'
test('remarkBreaks', async function (t) {
await ... | javascript | MIT | 71f4ff3ca9f08b685dccf2fdb9882d8bbaea3388 | 2026-01-05T03:42:54.860891Z | false |
remarkjs/remark-breaks | https://github.com/remarkjs/remark-breaks/blob/71f4ff3ca9f08b685dccf2fdb9882d8bbaea3388/lib/index.js | lib/index.js | /**
* @typedef {import('mdast').Root} Root
*/
import {newlineToBreak} from 'mdast-util-newline-to-break'
/**
* Support hard breaks without needing spaces or escapes (turns enters into
* `<br>`s).
*
* @returns
* Transform.
*/
export default function remarkBreaks() {
/**
* Transform.
*
* @param {Ro... | javascript | MIT | 71f4ff3ca9f08b685dccf2fdb9882d8bbaea3388 | 2026-01-05T03:42:54.860891Z | false |
lmgonzalves/loading-buttons | https://github.com/lmgonzalves/loading-buttons/blob/99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91/js/demo.js | js/demo.js | (function(){
function clean(button, value){
loading.infinite = false;
button.innerHTML = button.querySelector('span').innerHTML;
classie.remove(button, current);
classie.add(button, value);
current = value;
var newButton = button.cloneNode(true);
button.paren... | javascript | MIT | 99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91 | 2026-01-05T03:42:58.666779Z | false |
lmgonzalves/loading-buttons | https://github.com/lmgonzalves/loading-buttons/blob/99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91/js/demo-functions.js | js/demo-functions.js | function circularLoading(){
var button = document.querySelector('.loading-button'),
options = {
svg: '#circular-loading',
paths: [
{selector: '.outer-path', animation: outerAnimation},
{selector: '.inner-path', animation: innerAnimation}
]
... | javascript | MIT | 99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91 | 2026-01-05T03:42:58.666779Z | false |
lmgonzalves/loading-buttons | https://github.com/lmgonzalves/loading-buttons/blob/99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91/js/classie.js | js/classie.js | /*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
* classie.remove( elem, 'my-unwanted-class' )
* classie.toggle( elem, 'my-class' )
*/
/*jshint browser: true, strict: true, undef: true */
/*... | javascript | MIT | 99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91 | 2026-01-05T03:42:58.666779Z | false |
lmgonzalves/loading-buttons | https://github.com/lmgonzalves/loading-buttons/blob/99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91/js/segment.js | js/segment.js | /**
* segment - A little JavaScript class (without dependencies) to draw and animate SVG path strokes
* @version v1.0
* @link https://github.com/lmgonzalves/segment
* @license MIT
*/
(function(){
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window... | javascript | MIT | 99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91 | 2026-01-05T03:42:58.666779Z | false |
lmgonzalves/loading-buttons | https://github.com/lmgonzalves/loading-buttons/blob/99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91/js/loading-button.js | js/loading-button.js | function LoadingButton(el, options){
this.el = el;
this.options = options;
this.init();
}
LoadingButton.prototype = {
// Initialize everything
init: function(){
this.infinite = true;
this.succeed = false;
this.initDOM();
this.initSegments();
this.initEvents()... | javascript | MIT | 99fb44d1c173b3b051b4599c8e4f7bdd1d4dbf91 | 2026-01-05T03:42:58.666779Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/heads.js | integration-tests/heads.js | var heads = require("robohydra").heads,
RoboHydraHeadStatic = heads.RoboHydraHeadStatic,
RoboHydraHead = heads.RoboHydraHead;
var passString = '\u001b[32mPASS\u001b[39m\n',
failString = '\u001b[31mFAIL\u001b[39m\n';
module.exports.passHead = new RoboHydraHeadStatic({
path: '/foo',
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/robohydra/plugins/empty/index.js | integration-tests/robohydra/plugins/empty/index.js | module.exports.getBodyParts = function() {
return {
heads: []
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/robohydra/plugins/fail/index.js | integration-tests/robohydra/plugins/fail/index.js | var failHead = require("../../../heads").failHead;
module.exports.getBodyParts = function() {
return {
heads: [
failHead
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/robohydra/plugins/pass/index.js | integration-tests/robohydra/plugins/pass/index.js | var passHead = require("../../../heads").passHead;
module.exports.getBodyParts = function() {
return {
heads: [
passHead
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/robohydra/plugins/default-success/index.js | integration-tests/robohydra/plugins/default-success/index.js | var varHeadForConf = require("../../../heads").varHeadForConf;
module.exports.getBodyParts = function(conf) {
if (conf.result === undefined) {
conf.result = 'pass';
}
return {
heads: [
varHeadForConf(conf)
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/robohydra/plugins/precedence/index.js | integration-tests/robohydra/plugins/precedence/index.js | var failHead = require("../../../heads").failHead;
module.exports.getBodyParts = function() {
return {
heads: [
failHead
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/robohydra/plugins/vars/index.js | integration-tests/robohydra/plugins/vars/index.js | var varHeadForConf = require("../../../heads").varHeadForConf;
module.exports.getBodyParts = function(conf) {
return {
heads: [
varHeadForConf(conf)
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/robohydra/bad-priority-plugins/precedence/index.js | integration-tests/robohydra/bad-priority-plugins/precedence/index.js | var failHead = require("../../../heads").failHead;
module.exports.getBodyParts = function() {
return {
heads: [
failHead
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/integration-tests/robohydra/priority-plugins/precedence/index.js | integration-tests/robohydra/priority-plugins/precedence/index.js | var passHead = require("../../../heads").passHead;
module.exports.getBodyParts = function() {
return {
heads: [
passHead
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/websockethead-test.js | test/websockethead-test.js | /*global describe, it*/
var mocha = require("mocha");
var chai = require("chai"),
expect = chai.expect;
var utils = require("../lib/utils"),
Request = utils.Request;
var helpers = require("./helpers"),
checkWebSocketRouting = helpers.checkWebSocketRouting,
simpleWsReq = helper... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/adminhead-test.js | test/adminhead-test.js | /*global describe, it*/
var mocha = require("mocha");
var expect = require("chai").expect;
var RoboHydra = require("../lib/RoboHydra");
var utils = require("../lib/utils"),
Request = utils.Request,
Response = utils.Response;
var heads = require("../lib/heads"),
RoboHydraHeadStatic = heads.... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins-test.js | test/plugins-test.js | /*global describe, it*/
var mocha = require("mocha");
var chai = require("chai"),
expect = chai.expect;
var proxyCacheUtils = require("../plugins/proxy-cache/utils.js");
describe("Proxy-cache plugin", function() {
"use strict";
it("makes good cache paths for simple URLs", function() {
var expecte... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/head-test.js | test/head-test.js | /*global describe, it*/
var mocha = require("mocha");
var chai = require("chai"),
expect = chai.expect;
var zlib = require("zlib"),
fs = require("fs");
var helpers = require("./helpers"),
checkRouting = helpers.checkRouting,
withResponse = helpers.withResponse,
fakeFs ... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | true |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/robohydra-test.js | test/robohydra-test.js | /*global require, describe, it, before, Buffer */
var mocha = require("mocha");
var chai = require("chai"),
expect = chai.expect;
var deepEql = require("deep-eql");
var path = require("path");
var RoboHydra = require("../lib/RoboHydra");
var utils = require("../lib/utils"),
Request = utils.Reques... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | true |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/buster.js | test/buster.js | var config = module.exports;
config.Main = {
rootPath: "../",
environment: "node",
sources: [
"lib/*/*.js"
],
tests: [
"test/*-test.js"
]
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/helpers.js | test/helpers.js | var path = require("path");
var mocha = require("mocha");
var chai = require("chai"),
expect = chai.expect;
var deepEql = require("deep-eql");
var RoboHydraHead = require("../lib/heads").RoboHydraHead;
var utils = require("../lib/utils"),
Request = utils.Request,
Response = utils.Response;
(function ... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/robohydrasummoner-test.js | test/robohydrasummoner-test.js | /*global require, describe, it*/
var path = require('path');
var mocha = require("mocha");
var chai = require("chai"),
expect = chai.expect;
var RoboHydraSummoner = require('../lib/robohydrasummoner').RoboHydraSummoner;
var Request = require("../lib/utils").Request;
var exceptions = require('../lib/exceptions'),... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/opt/project/robohydra-plugins/definedtwice/index.js | test/plugin-fs/opt/project/robohydra-plugins/definedtwice/index.js | var RoboHydraHeadStatic = require("../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function(conf) {
return {
heads: [
new RoboHydraHeadStatic({
name: conf.path,
path: '/.*',
content: '/opt/project version'
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/opt/robohydra/plugins/definedtwice/index.js | test/plugin-fs/opt/robohydra/plugins/definedtwice/index.js | var RoboHydraHeadStatic = require("../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function(conf) {
return {
heads: [
new RoboHydraHeadStatic({
name: conf.path,
path: '/.*',
content: '/opt version'
})
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/opt/robohydra/plugins/customloadpath/index.js | test/plugin-fs/opt/robohydra/plugins/customloadpath/index.js | var RoboHydraHeadStatic = require("../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function(conf) {
return {
heads: [
new RoboHydraHeadStatic({
name: conf.path,
path: '/.*',
content: 'custom plugin in /opt'
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/usr/share/robohydra/plugins/url-query-authenticator/index.js | test/plugin-fs/usr/share/robohydra/plugins/url-query-authenticator/index.js | var RoboHydraHeadStatic = require("../../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function(conf) {
"use strict";
return {
heads: [
new RoboHydraHeadStatic({
content: "Default head for simple authenticator plugin"
})
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/usr/share/robohydra/plugins/simple-authenticator/index.js | test/plugin-fs/usr/share/robohydra/plugins/simple-authenticator/index.js | var RoboHydraHeadStatic = require("../../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function(conf) {
"use strict";
return {
heads: [
new RoboHydraHeadStatic({
content: "Default head for simple authenticator plugin"
})
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/usr/share/robohydra/plugins/definedtwice/index.js | test/plugin-fs/usr/share/robohydra/plugins/definedtwice/index.js | var RoboHydraHeadStatic = require("robohydra").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {
heads: [
new RoboHydraHeadStatic({
path: '/.*',
content: '/usr version'
})
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/usr/share/robohydra/plugins/wrong-fixed-picker/index.js | test/plugin-fs/usr/share/robohydra/plugins/wrong-fixed-picker/index.js | var RoboHydraHeadStatic = require("../../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
"use strict";
return {
heads: [
new RoboHydraHeadStatic({
content: "Default content"
})
]
};
};
exports.getSummonerT... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/usr/share/robohydra/plugins/right-robohydra-test/index.js | test/plugin-fs/usr/share/robohydra/plugins/right-robohydra-test/index.js | var RoboHydraHeadStatic = require("../../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
"use strict";
return {
heads: [
new RoboHydraHeadStatic({
content: "Default content"
})
],
scenarios: {
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/usr/share/robohydra/plugins/simple/index.js | test/plugin-fs/usr/share/robohydra/plugins/simple/index.js | var RoboHydraHeadStatic = require("../../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function(conf) {
"use strict";
return {
heads: [
new RoboHydraHeadStatic({
name: conf.path,
path: '/.*',
content: 'Simple ... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugin-fs/usr/local/share/robohydra/plugins/definedtwice/index.js | test/plugin-fs/usr/local/share/robohydra/plugins/definedtwice/index.js | var RoboHydraHeadStatic = require("../../../../../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function(conf) {
return {
heads: [
new RoboHydraHeadStatic({
name: conf.path,
path: '/.*',
content: '/usr/local version'
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-headless/index.js | test/plugins/external-scenarios-headless/index.js | var RoboHydraHeadStatic = require("../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-headless/scenarios/secondTest.js | test/plugins/external-scenarios-headless/scenarios/secondTest.js | var RoboHydraHeadStatic = require("../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {
heads: [
new RoboHydraHeadStatic({
path: '/.*',
content: "Second external test"
})
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-headless/scenarios/firstTest.js | test/plugins/external-scenarios-headless/scenarios/firstTest.js | var RoboHydraHeadStatic = require("../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {
heads: [
new RoboHydraHeadStatic({
path: '/.*',
content: "First external test"
})
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-simple/index.js | test/plugins/external-scenarios-simple/index.js | var RoboHydraHeadStatic = require("../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
"use strict";
return {
heads: [
new RoboHydraHeadStatic({
path: '/.*',
content: "External tests"
})
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-simple/scenarios/firstScenario.js | test/plugins/external-scenarios-simple/scenarios/firstScenario.js | var RoboHydraHeadStatic = require("../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {
instructions: "This is an external test. It doesn't do much, really",
heads: [
new RoboHydraHeadStatic({
path: '/.*',
con... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-conflicting-names/index.js | test/plugins/external-scenarios-conflicting-names/index.js | var RoboHydraHeadStatic = require("../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
"use strict";
return {
heads: [
new RoboHydraHeadStatic({
path: '/.*',
content: "Internal and external tests"
})
],
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-conflicting-names/scenarios/duplicateTestName.js | test/plugins/external-scenarios-conflicting-names/scenarios/duplicateTestName.js | var RoboHydraHeadStatic = require("../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {
heads: [
new RoboHydraHeadStatic({
path: '/test',
content: "External test"
})
]
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/simple-fixtures/index.js | test/plugins/simple-fixtures/index.js | var RoboHydraHead = require("../../../lib/exports").heads.RoboHydraHead;
exports.getBodyParts = function(conf, modules) {
var fixtures = modules.fixtures;
return {
heads: [
new RoboHydraHead({
path: '/fixtures/:fixtureid',
handler: function(req, res) {
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/simple-fixtures/scenarios/fixtureLoader.js | test/plugins/simple-fixtures/scenarios/fixtureLoader.js | var RoboHydraHead = require("../../../../lib/exports").heads.RoboHydraHead;
exports.getBodyParts = function(conf, modules) {
var fixtures = modules.fixtures;
return {
heads: [
new RoboHydraHead({
path: '/external-test-fixture',
handler: function(req, res) {
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-mixed/index.js | test/plugins/external-scenarios-mixed/index.js | var RoboHydraHeadStatic = require("../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
"use strict";
return {
heads: [
new RoboHydraHeadStatic({
path: '/.*',
content: "Internal and external tests"
})
],
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/plugins/external-scenarios-mixed/scenarios/external.js | test/plugins/external-scenarios-mixed/scenarios/external.js | var RoboHydraHeadStatic = require("../../../../lib/exports").heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {
instructions: "This is an external test. It doesn't do much, really",
heads: [
new RoboHydraHeadStatic({
path: '/.*',
con... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/fixture-module-fs/usr/local/share/robohydra/plugins/simple-fixtures/index.js | test/fixture-module-fs/usr/local/share/robohydra/plugins/simple-fixtures/index.js | var RoboHydraHead = require("robohydra").heads.RoboHydraHead;
exports.getBodyParts = function(conf, modules) {
var fixtures = modules.fixtures;
return {
heads: [
new RoboHydraHead({
path: '/fixtures/:fixtureid',
handler: function(req, res) {
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/test/fixture-module-fs/usr/local/share/robohydra/plugins/simple-fixtures/tests/fixtureLoader.js | test/fixture-module-fs/usr/local/share/robohydra/plugins/simple-fixtures/tests/fixtureLoader.js | var RoboHydraHead = require("robohydra").heads.RoboHydraHead;
exports.getBodyParts = function(conf, modules) {
var fixtures = modules.fixtures;
return {
heads: [
new RoboHydraHead({
path: '/external-test-fixture',
handler: function(req, res) {
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/plugins/logger/index.js | plugins/logger/index.js | var zlib = require('zlib'),
fs = require('fs');
var robohydra = require('robohydra'),
RoboHydraHead = robohydra.heads.RoboHydraHead,
Request = robohydra.Request,
Response = robohydra.Response;
function printResponseBody(logFileFd, responseBody) {
"use strict";
var bodyString ... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/plugins/proxy-cache/index.js | plugins/proxy-cache/index.js | var fs = require("fs"),
path = require("path");
var robohydra = require("robohydra"),
Response = robohydra.Response,
proxyRequest = robohydra.proxyRequest,
heads = robohydra.heads,
RoboHydraHead = heads.RoboHydraHead;
var cacheFileForUrl = require("./utils").cacheFileForUrl;
fun... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/plugins/proxy-cache/utils.js | plugins/proxy-cache/utils.js | var path = require("path");
function cacheFileForUrl(urlPath, cacheDir) {
var basename = urlPath.replace(new RegExp("^/"), "").split('/').
map(function(dir) { return encodeURIComponent(dir); }).
join('/');
// Add trailing slash so that the / of the site is inside the
// cache directory
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/plugins/no-caching/index.js | plugins/no-caching/index.js | var robohydra = require('robohydra'),
RoboHydraHead = robohydra.heads.RoboHydraHead;
function getBodyParts(config) {
"use strict";
var noCachingPath = config.nocachingpath || '/.*';
return {heads: [new RoboHydraHead({
path: noCachingPath,
handler: function(req, res, ne... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/plugins/frontend-dev-proxy/index.js | plugins/frontend-dev-proxy/index.js | var heads = require("robohydra").heads,
RoboHydraHeadProxy = heads.RoboHydraHeadProxy,
RoboHydraHeadFilesystem = heads.RoboHydraHeadFilesystem;
// Configuration variables:
// * urlpath: comma-separated list of url paths to serve locally.
// * localdir: comma-separated list of local direc... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/plugins/cors/index.js | plugins/cors/index.js | var robohydra = require("robohydra"),
Response = robohydra.Response,
heads = robohydra.heads,
RoboHydraHead = heads.RoboHydraHead;
exports.getBodyParts = function(conf) {
var corsUrlPath = conf.corsurlpath || conf.corsUrlPath || '/.*';
conf.robohydra.registerDynamicHead(new RoboHy... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/plugins/replayer/index.js | plugins/replayer/index.js | var fs = require('fs'),
path = require('path'),
ejs = require('ejs');
var robohydra = require('robohydra'),
RoboHydraHead = robohydra.heads.RoboHydraHead,
RoboHydraHeadProxy = robohydra.heads.RoboHydraHeadProxy,
Response = robohydra.Response;
function templateData(templat... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/plugins/delayer/index.js | plugins/delayer/index.js | var robohydra = require("robohydra"),
heads = robohydra.heads,
RoboHydraHead = heads.RoboHydraHead;
exports.getBodyParts = function(conf) {
"use strict";
var delayMilliseconds = conf.delaymillis || 2000,
delayPath = conf.delaypath || '/.*',
delayDisabled = !!conf.delaydisab... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/bin/robohydra.js | bin/robohydra.js | #!/usr/bin/env node
/*global require, process, console, JSON*/
/*
* Module dependencies.
*/
var fs = require("fs"),
commander = require("commander");
var robohydra = require("robohydra"),
createRoboHydraServer = robohydra.createRoboHydraServer,
resolveConfig = robohydra.resolveConfig;
(function () {
"use s... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/cors/cors.js | examples/cors/cors.js | window.addEventListener("load", function() {
var getReq = new XMLHttpRequest();
getReq.onload = function() {
var testGetDiv = document.getElementById("test-get");
testGetDiv.textContent = this.responseText;
};
getReq.open("GET", "http://localhost:3000/get");
getReq.send();
var p... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/cors/cors-example/index.js | examples/cors/cors-example/index.js | var heads = require("robohydra").heads,
RoboHydraHead = heads.RoboHydraHead,
RoboHydraHeadStatic = heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {
heads: [
new RoboHydraHeadStatic({
path: "/get",
contentType: "t... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/advanced-matching/index.js | examples/plugins/advanced-matching/index.js | var heads = require("robohydra").heads,
RoboHydraHead = heads.RoboHydraHead,
RoboHydraHeadStatic = heads.RoboHydraHeadStatic;
exports.getBodyParts = function() {
return {
heads: [
new RoboHydraHeadStatic({
path: '/test',
hostname: 'exa... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/simple-summoner/index.js | examples/plugins/simple-summoner/index.js | exports.getBodyParts = function() {
return {};
};
exports.getSummonerTraits = function() {
return {
hydraPicker: function(req) {
return req.queryParams.user || "anonymous";
}
};
};
| javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/custom-types/index.js | examples/plugins/custom-types/index.js | var util = require("util");
var robohydra = require("robohydra"),
roboHydraHeadType = robohydra.roboHydraHeadType,
heads = robohydra.heads,
InvalidRoboHydraHeadException = robohydra.InvalidRoboHydraHeadException;
var RoboHydraHeadLogin = roboHydraHead... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/websockets-proxy/index.js | examples/plugins/websockets-proxy/index.js | var path = require("path");
var heads = require("robohydra").heads,
RoboHydraHeadFilesystem = heads.RoboHydraHeadFilesystem,
RoboHydraWebSocketHeadProxy = heads.RoboHydraWebSocketHeadProxy;
module.exports.getBodyParts = function() {
return {
heads: [
new RoboHy... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/basic-scenario/index.js | examples/plugins/basic-scenario/index.js | var heads = require('robohydra').heads,
RoboHydraHeadStatic = heads.RoboHydraHeadStatic,
RoboHydraHead = heads.RoboHydraHead;
exports.getBodyParts = function(config, modules) {
"use strict";
var assert = modules.assert;
return {
scenarios: {
"simple, assert... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/simple-filtering/index.js | examples/plugins/simple-filtering/index.js | var heads = require('robohydra').heads,
RoboHydraHeadProxy = heads.RoboHydraHeadProxy,
RoboHydraHeadFilter = heads.RoboHydraHeadFilter;
exports.getBodyParts = function() {
"use strict";
return {
heads: [
new RoboHydraHeadFilter({
// path: '/.*', ... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/websockets/index.js | examples/plugins/websockets/index.js | var path = require("path");
var heads = require("robohydra").heads,
RoboHydraHead = heads.RoboHydraHead,
RoboHydraWebSocketHead = heads.RoboHydraWebSocketHead,
RoboHydraHeadFilesystem = heads.RoboHydraHeadFilesystem;
module.exports.getBodyParts = function() {
var socket;
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/delayed-proxy/index.js | examples/plugins/delayed-proxy/index.js | var heads = require('robohydra').heads,
RoboHydraHead = heads.RoboHydraHead,
RoboHydraHeadProxy = heads.RoboHydraHeadProxy;
exports.getBodyParts = function(config) {
"use strict";
var delay = 1000;
var proxyTo = config.proxyto || 'http://robohydra.org';
return {
head... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/simple-i18n/index.js | examples/plugins/simple-i18n/index.js | var robohydra = require('robohydra'),
heads = robohydra.heads,
RoboHydraHead = heads.RoboHydraHead,
RoboHydraHeadFilesystem = heads.RoboHydraHeadFilesystem,
Response = robohydra.Response;
function languageBasedUrlDispatcher(langs, req, res, next)... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/simple-streaming/index.js | examples/plugins/simple-streaming/index.js | var robohydra = require('robohydra'),
RoboHydraHead = robohydra.heads.RoboHydraHead,
Response = robohydra.Response;
exports.getBodyParts = function() {
"use strict";
return {
heads: [
new RoboHydraHead({
name: 'exponentialWait',
path: '/.*',... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/external-scenarios/index.js | examples/plugins/external-scenarios/index.js | var heads = require("robohydra").heads,
RoboHydraHead = heads.RoboHydraHead,
RoboHydraHeadStatic = heads.RoboHydraHeadStatic;
exports.getBodyParts = function(conf, modules) {
var fixtures = modules.fixtures;
return {
heads: [
new RoboHydraHeadStatic({
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/external-scenarios/scenarios/externalScenarioExample.js | examples/plugins/external-scenarios/scenarios/externalScenarioExample.js | var RoboHydraHead = require("robohydra").heads.RoboHydraHead;
exports.getBodyParts = function(conf, modules) {
var fixtures = modules.fixtures;
return {
heads: [
new RoboHydraHead({
path: '/.*',
handler: function(req, res) {
res.headers['... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/examples/plugins/request-finder/index.js | examples/plugins/request-finder/index.js | var heads = require('robohydra').heads,
RoboHydraHeadWatchdog = heads.RoboHydraHeadWatchdog,
RoboHydraHeadProxy = heads.RoboHydraHeadProxy;
exports.getBodyParts = function(config) {
"use strict";
var searchTerm = config.searchTerm || 'linux';
return {
heads: [
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/RoboHydra.js | lib/RoboHydra.js | var fs = require('fs'),
path = require('path'),
assert = require('assert');
var utils = require('./utils.js'),
extendObject = utils.extendObject,
deprecationWarning = utils.deprecationWarning;
var exceptions = require('./exceptions.js'),
RoboHydraException = exceptio... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/heads.js | lib/heads.js | var fs = require('fs'),
path = require('path'),
mime = require('mime'),
http = require('http'),
https = require('https'),
url = require('url'),
zlib = require('zlib'),
util = require('util'),
/*jshint -W079*/
WebSocket = require('ws');
var utils = require('./ut... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/robohydraserver.js | lib/robohydraserver.js | var http = require('http'),
https = require('https'),
/*jshint -W079*/
WebSocketServer = require('ws').Server,
fs = require('fs');
var utils = require("../lib/utils"),
Request = utils.Request,
Response = utils.Response,
stringForLog = utils.stringForLog;
var RoboHydraSumm... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/exports.js | lib/exports.js | var RoboHydra = require("./RoboHydra");
var heads = require("./heads");
var utils = require('./utils'),
serveStaticFile = utils.serveStaticFile,
proxyRequest = utils.proxyRequest,
stringForLog = utils.stringForLog,
resolveConfig = utils.resolveConfig,
Request ... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/bufferParser.js | lib/bufferParser.js | 'use strict';
var qs = require('qs');
var PARSING_STRATEGIES = {
"application/x-www-form-urlencoded": function(buffer, charset) {
return qs.parse(buffer.toString(charset));
},
"application/json": function(buffer, charset) {
return JSON.parse(buffer.toString(charset));
},
"text/plai... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/robohydrasummoner.js | lib/robohydrasummoner.js | var fs = require('fs');
var path = require('path');
var RoboHydra = require('../lib/RoboHydra');
var exceptions = require("../lib/exceptions"),
RoboHydraPluginNotFoundException =
exceptions.RoboHydraPluginNotFoundException,
InvalidRoboHydraConfigurationException =
exceptions.InvalidRoboHydraCon... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/exceptions.js | lib/exceptions.js | var util = require('util');
(function () {
"use strict";
// All this exception class mumbo-jumbo, taken from
// http://dustinsenos.com/articles/customErrorsInNode
var RoboHydraException = function(message, constr) {
Error.captureStackTrace(this, constr || this);
this.message = message ... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/utils.js | lib/utils.js | var url = require('url'),
http = require('http'),
https = require('https'),
fs = require('fs'),
qs = require('qs'),
mime = require('mime');
var bufferParser = require('./bufferParser'),
exceptions = require('./exceptions'),
InvalidRoboHydraRequestException =
exceptions.In... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/plugins/admin.js | lib/plugins/admin.js | var fs = require('fs'),
path = require('path'),
querystring = require('querystring');
var ejs = require('ejs'),
markdown = require('markdown').markdown,
qs = require('qs');
var heads = require('../heads'),
RoboHydraHead = heads.RoboHydraHead,
... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
robohydra/robohydra | https://github.com/robohydra/robohydra/blob/947203f6452422c6d51fe2c637a3d912f31673ff/lib/plugins/static/js/robohydra.js | lib/plugins/static/js/robohydra.js | document.addEventListener('DOMContentLoaded', function() {
document.getElementById('newHeadType').addEventListener('change', function() {
var extraPropBoxes = document.getElementsByClassName('new-head-props');
for (var i = 0, len = extraPropBoxes.length; i < len; i++) {
if (extraPropBoxe... | javascript | Apache-2.0 | 947203f6452422c6d51fe2c637a3d912f31673ff | 2026-01-05T03:42:31.087231Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/rollup.config.js | rollup.config.js | import path from 'path';
import json from 'rollup-plugin-json';
import babel from 'rollup-plugin-babel';
import postcss from 'rollup-plugin-postcss';
import commonjs from 'rollup-plugin-commonjs';
import extensions from 'rollup-plugin-extensions';
import external from 'rollup-plugin-peer-deps-external';
import url from... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/src/adaptor.js | src/adaptor.js | import * as _ from 'lodash';
import Edge from './canvas/edge';
import TableNode from './canvas/node';
export const transformInitData = (info) => {
let {
columns, data, config,
nodeMenu, edgeMenu, emptyContent,
emptyWidth
} = info;
let nodes = (data.nodes || []).map((item) => {
return _.assign(i... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/src/canvas/collapse-menu.jsx | src/canvas/collapse-menu.jsx | 'use strict';
import $ from 'jquery';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import ButterflyDataMapping from 'react-data-mapping';
import 'react-data-mapping/dist/index.css';
const Tips = require('butterfly-dag').Tips;
let _genTipDom = (result) => {
let dom = $('<div class="menu-con... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/src/canvas/empty.js | src/canvas/empty.js | import $ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
const isReactEle = (HTMLElement) => {
return React.isValidElement(HTMLElement);
};
/**
* params {Object} config
* params {JSX.Element | String} config.content
* params {Number | String} config.width
*/
export default (config) =... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/src/canvas/endpoint.js | src/canvas/endpoint.js | import $ from 'jquery';
import {Endpoint} from 'butterfly-dag';
class NewEndPoint extends Endpoint {
constructor(opts) {
super(opts);
}
attachEvent() {
$(this.dom).on('mousedown', (e) => {
const LEFT_KEY = 0;
if (e.button !== LEFT_KEY) {
return;
}
e.preventDefault();
... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/src/canvas/node.js | src/canvas/node.js | import $ from 'jquery';
import * as _ from 'lodash';
import { Node } from 'butterfly-dag';
import * as ReactDOM from 'react-dom';
import emptyDom from './empty';
import Endpoint from './endpoint';
import RightMenuGen from './right-menu';
export default class TableNode extends Node {
constructor(opts) {
super(op... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/src/canvas/right-menu.js | src/canvas/right-menu.js | import $ from 'jquery';
import * as ReactDOM from 'react-dom';
const Tips = require('butterfly-dag').Tips;
let _genTipDom = (menuData, data) => {
let dom = $('<div class="menu-container"></div>');
menuData.forEach((item) => {
let menuItem = $('<div class="menu-item"></div>');
if (item.onClick) {
men... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/src/canvas/edge.js | src/canvas/edge.js | import $ from 'jquery';
import {Edge} from 'butterfly-dag';
import RightMenuGen from './right-menu';
export default class BaseEdge extends Edge {
mounted() {
// todo 这块可以优化
this._createRightMenu();
$(this.eventHandlerDom).on('dblclick',(e) => {
e.preventDefault();
e.stopPropagation();
... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/src/canvas/canvas.js | src/canvas/canvas.js | import {Canvas, Tips} from 'butterfly-dag';
import $ from 'jquery';
import CollapseMenuGen from './collapse-menu.jsx';
export default class TableCanvas extends Canvas {
constructor(opts) {
super(opts);
this.originEdges = [];
this._focusItem = null;
this._enableHoverChain = opts.data.enableHoverChain... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/example/index.jsx | example/index.jsx | import React from 'react';
import _ from 'lodash';
import ReactDOM from 'react-dom';
import {Layout, Tooltip} from 'antd';
import {BrowserRouter as Router} from 'react-router-dom';
import TableBuilding from '../src/index.tsx';
import {nodeMenu, edgeMenu, actionMenu} from './menu';
import * as MockData from './mock_dat... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/example/menu.jsx | example/menu.jsx | import React from 'react';
import {
StarOutlined, PlusOutlined,
MinusOutlined, GatewayOutlined
} from '@ant-design/icons';
// 节点菜单
export const nodeMenu = [
{
key: 'setting',
title: '节点设置',
onClick: (key, data) => {
console.log('click setting')
}
},
{
key: 'delete',
render: (k... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/example/webpack.config.js | example/webpack.config.js | 'use strict';
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
module.exports = {
entry: {
app: './index.jsx'
},
output: {
filename: '[name].js',
chunkFilename: '[name].js'
},
resolve: {
m... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
aliyun/react-visual-modeling | https://github.com/aliyun/react-visual-modeling/blob/4cc66b88e04761b0941ae193f3d471a1718e9120/example/mock_data/data.jsx | example/mock_data/data.jsx | export const columns = [
{
key: 'id',
primaryKey: true,
width: 76
},
{
key: 'type',
width: 60,
render: (val, row) => {
return val.toString().toUpperCase();
}
},
{
key: 'desc',
width: 90
}
];
export const data = {
"nodes": [
{
"top": 300,
"left": ... | javascript | MIT | 4cc66b88e04761b0941ae193f3d471a1718e9120 | 2026-01-05T03:43:05.890641Z | false |
mozilla/popcorn.webmaker.org | https://github.com/mozilla/popcorn.webmaker.org/blob/fb3ea8e275db432dd3386f979297865cae682895/Gruntfile.js | Gruntfile.js | module.exports = function( grunt ) {
var jsHintOptions = grunt.file.readJSON( ".jshintrc" );
grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),
jshint: {
options: jsHintOptions,
files: [
"Gruntfile.js",
"server.js",
"lib/**/*.js",
"package.json",
... | javascript | MIT | fb3ea8e275db432dd3386f979297865cae682895 | 2026-01-05T03:42:50.677397Z | false |
mozilla/popcorn.webmaker.org | https://github.com/mozilla/popcorn.webmaker.org/blob/fb3ea8e275db432dd3386f979297865cae682895/server.js | server.js | process.env.NEW_RELIC_BROWSER_MONITOR_ENABLE = false;
// Newrelic *must* be the first module loaded. Do not move this require module!
var newrelic;
if ( process.env.NEW_RELIC_HOME ) {
newrelic = require( "newrelic" );
} else {
newrelic = {
getBrowserTimingHeader: function () {
return "<!-- New Relic RUM ... | javascript | MIT | fb3ea8e275db432dd3386f979297865cae682895 | 2026-01-05T03:42:50.677397Z | false |
mozilla/popcorn.webmaker.org | https://github.com/mozilla/popcorn.webmaker.org/blob/fb3ea8e275db432dd3386f979297865cae682895/test/lib.project.mysql.test.js | test/lib.project.mysql.test.js | var test = require( "tap" ).test,
projectLibrary = require( "../lib/project" );
var DB_USERNAME = process.env.DB_USERNAME || "root";
var DB_DATABASE = process.env.DB_DATABASE || "popcorn";
var DB_PASSWORD = process.env.DB_PASSWORD || "";
var DB_HOST = process.env.DB_HOST || "127.0.0.1";
var mockEmail = "test@ex... | javascript | MIT | fb3ea8e275db432dd3386f979297865cae682895 | 2026-01-05T03:42:50.677397Z | false |
mozilla/popcorn.webmaker.org | https://github.com/mozilla/popcorn.webmaker.org/blob/fb3ea8e275db432dd3386f979297865cae682895/test/routes.index.test.js | test/routes.index.test.js | var test = require("tap").test,
request = require("supertest");
var mockEmail = "test@example.org",
mockSession = require("./mock.session"),
mockProject = require("./mock.project")(),
mockFilter = require("./mock.filter"),
mockSanitizer = require("./mock.sanitizer"),
mockStore = require("./mock... | javascript | MIT | fb3ea8e275db432dd3386f979297865cae682895 | 2026-01-05T03:42:50.677397Z | false |
mozilla/popcorn.webmaker.org | https://github.com/mozilla/popcorn.webmaker.org/blob/fb3ea8e275db432dd3386f979297865cae682895/test/mock.session.js | test/mock.session.js | module.exports = function(data) {
data = data || {};
return function(req, res, next) {
req.session = {};
Object.keys(data).forEach(function(key) {
req.session[key] = data[key];
});
next();
};
};
| javascript | MIT | fb3ea8e275db432dd3386f979297865cae682895 | 2026-01-05T03:42:50.677397Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.