_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 27 233k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q59300 | RSASetPublic | validation | function RSASetPublic(N,E) {
if(N != null && E != null && N.length > 0 && E.length > | javascript | {
"resource": ""
} |
q59301 | RSASetPrivate | validation | function RSASetPrivate(N,E,D) {
if(N != null && E != null && N.length > 0 && E.length > 0) {
this.n = parseBigInt(N,16);
this.e = parseInt(E,16);
this.d | javascript | {
"resource": ""
} |
q59302 | supportedLocalesOf | validation | function supportedLocalesOf(service, locales, options) {
if (IS_NULL(InternalRegExpMatch(GetServiceRE(), service))) {
throw MakeError(kWrongServiceType, service);
}
// Provide defaults if matcher was not specified.
if (IS_UNDEFINED(options)) {
options = {};
} else {
options = TO_OBJECT(options);
... | javascript | {
"resource": ""
} |
q59303 | addWEPropertyIfDefined | validation | function addWEPropertyIfDefined(object, property, value) {
if (!IS_UNDEFINED(value)) {
| javascript | {
"resource": ""
} |
q59304 | addWECPropertyIfDefined | validation | function addWECPropertyIfDefined(object, property, value) {
if (!IS_UNDEFINED(value)) {
| javascript | {
"resource": ""
} |
q59305 | toLDMLString | validation | function toLDMLString(options) {
var getOption = getGetOption(options, 'dateformat');
var ldmlString = '';
var option = getOption('weekday', 'string', ['narrow', 'short', 'long']);
ldmlString += appendToLDMLString(
option, {narrow: 'EEEEE', short: 'EEE', long: 'EEEE'});
option = getOption('era', 'str... | javascript | {
"resource": ""
} |
q59306 | fromLDMLString | validation | function fromLDMLString(ldmlString) {
// First remove '' quoted text, so we lose 'Uhr' strings.
ldmlString = InternalRegExpReplace(GetQuotedStringRE(), ldmlString, '');
var options = {};
var match = InternalRegExpMatch(/E{3,5}/, ldmlString);
options = appendToDateTimeObject(
options, 'weekday', match, ... | javascript | {
"resource": ""
} |
q59307 | toLocaleDateTime | validation | function toLocaleDateTime(date, locales, options, required, defaults, service) {
if (!(date instanceof GlobalDate)) {
throw MakeTypeError(kMethodInvokedOnWrongType, "Date");
}
if (IsNaN(date)) return 'Invalid Date';
var internalOptions = toDateTimeOptions(options, | javascript | {
"resource": ""
} |
q59308 | locateAcpiDevice | validation | function locateAcpiDevice(dev) {
if (!dev.isDevice()) {
return null;
}
const addr = dev.address();
const slotId = ((addr >>> 16) & 0xffff) >>> 0;
const funcId = (addr & 0xffff) >>> 0;
let busId = 0;
if (dev.isRootBridge()) {
busId = dev.getRootBridgeBusNumber();
return {
bus: busId,
... | javascript | {
"resource": ""
} |
q59309 | BinaryConstraint | validation | function BinaryConstraint(var1, var2, strength) {
BinaryConstraint.superConstructor.call(this, strength);
this.v1 = var1;
this.v2 | javascript | {
"resource": ""
} |
q59310 | sc_isVectorEqual | validation | function sc_isVectorEqual(v1, v2, comp) {
if (v1.length !== v2.length) return | javascript | {
"resource": ""
} |
q59311 | ArrayPush | validation | function ArrayPush() {
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.push");
var array = TO_OBJECT(this);
var n = TO_LENGTH(array.length);
var m = arguments.length;
// Subtract n from kMaxSafeInteger rather than testing m + | javascript | {
"resource": ""
} |
q59312 | ArraySome | validation | function ArraySome(f, receiver) {
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.some");
// Pull out the length so that modifications to the length in the
// loop will not affect the looping and side effects are visible. | javascript | {
"resource": ""
} |
q59313 | ArrayCopyWithin | validation | function ArrayCopyWithin(target, start, end) {
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.copyWithin");
var array = TO_OBJECT(this);
| javascript | {
"resource": ""
} |
q59314 | ArrayFind | validation | function ArrayFind(predicate, thisArg) {
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.find");
var array = TO_OBJECT(this);
| javascript | {
"resource": ""
} |
q59315 | ArrayFindIndex | validation | function ArrayFindIndex(predicate, thisArg) {
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.findIndex");
var array = TO_OBJECT(this);
| javascript | {
"resource": ""
} |
q59316 | ArrayIncludes | validation | function ArrayIncludes(searchElement, fromIndex) {
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.includes");
var array = TO_OBJECT(this);
| javascript | {
"resource": ""
} |
q59317 | GetMethod | validation | function GetMethod(obj, p) {
var func = obj[p];
if (IS_NULL_OR_UNDEFINED(func)) | javascript | {
"resource": ""
} |
q59318 | CreateStringIterator | validation | function CreateStringIterator(string) {
CHECK_OBJECT_COERCIBLE(string, 'String.prototype[Symbol.iterator]');
var s = TO_STRING(string);
var iterator = new StringIterator;
| javascript | {
"resource": ""
} |
q59319 | MakeMirror | validation | function MakeMirror(value, opt_transient) {
var mirror;
// Look for non transient mirrors in the mirror cache.
if (!opt_transient && mirror_cache_enabled_) {
for (var id in mirror_cache_) {
mirror = mirror_cache_[id];
if (mirror.value() === value) {
return mirror;
}
// Special... | javascript | {
"resource": ""
} |
q59320 | StringConcat | validation | function StringConcat(other /* and more */) { // length == 1
"use strict";
CHECK_OBJECT_COERCIBLE(this, "String.prototype.concat");
var s = TO_STRING(this);
var | javascript | {
"resource": ""
} |
q59321 | PromiseSet | validation | function PromiseSet(promise, status, value) {
SET_PRIVATE(promise, promiseStateSymbol, status);
SET_PRIVATE(promise, promiseResultSymbol, value);
// There are 3 possible states for the resolve, reject symbols when we add
// a new callback --
// 1) UNDEFINED -- This is the zero state where there is no callbac... | javascript | {
"resource": ""
} |
q59322 | PromiseHasUserDefinedRejectHandlerCheck | validation | function PromiseHasUserDefinedRejectHandlerCheck(handler, deferred) {
if (handler !== PromiseIdRejectHandler) {
var combinedDeferred = GET_PRIVATE(handler, promiseCombinedDeferredSymbol);
| javascript | {
"resource": ""
} |
q59323 | CollectNew | validation | function CollectNew(node_list) {
for (var i = 0; i < node_list.length; i++) {
| javascript | {
"resource": ""
} |
q59324 | TemporaryRemoveBreakPoints | validation | function TemporaryRemoveBreakPoints(original_script, change_log) {
var script_break_points = GetScriptBreakPoints(original_script);
var break_points_update_report = [];
change_log.push( { break_points_update: break_points_update_report } );
var break_point_old_positions = [];
for (var i = 0; i < s... | javascript | {
"resource": ""
} |
q59325 | BuildCodeInfoTree | validation | function BuildCodeInfoTree(code_info_array) {
// Throughtout all function we iterate over input array.
var index = 0;
// Recursive function that builds a branch of tree.
function BuildNode() {
var my_index = index;
index++;
var child_array = new GlobalArray();
while (index < cod... | javascript | {
"resource": ""
} |
q59326 | ProcessInternals | validation | function ProcessInternals(info_node) {
info_node.new_start_pos = chunk_it.TranslatePos(
info_node.info.start_position);
var child_index = 0;
var code_changed = false;
var source_changed = false;
// Simultaneously iterates over child functions and over chunks.
while (!chunk_... | javascript | {
"resource": ""
} |
q59327 | FindFunctionInfos | validation | function FindFunctionInfos(compile_info) {
var wrappers = [];
for (var i = 0; i < shared_infos.length; i++) {
var wrapper = shared_infos[i];
if (wrapper.start_position == compile_info.start_position &&
| javascript | {
"resource": ""
} |
q59328 | FunctionCompileInfo | validation | function FunctionCompileInfo(raw_array) {
this.function_name = raw_array[0];
this.start_position = raw_array[1];
this.end_position = raw_array[2];
this.param_num = raw_array[3];
this.code = raw_array[4];
this.code_scope_info = raw_array[5];
| javascript | {
"resource": ""
} |
q59329 | IsFunctionContextLocalsChanged | validation | function IsFunctionContextLocalsChanged(function_info1, function_info2) {
var scope_info1 = function_info1.scope_info;
var scope_info2 = function_info2.scope_info;
var scope_info1_text;
var scope_info2_text;
if (scope_info1) {
scope_info1_text = scope_info1.toString();
| javascript | {
"resource": ""
} |
q59330 | DescribeChangeTree | validation | function DescribeChangeTree(old_code_tree) {
function ProcessOldNode(node) {
var child_infos = [];
for (var i = 0; i < node.children.length; i++) {
var child = node.children[i];
if (child.status != FunctionStatus.UNCHANGED) {
child_infos.push(ProcessOldNode(child));
}
... | javascript | {
"resource": ""
} |
q59331 | MakeBreakPoint | validation | function MakeBreakPoint(source_position, opt_script_break_point) {
var break_point | javascript | {
"resource": ""
} |
q59332 | ScriptBreakPoint | validation | function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
opt_groupId, opt_position_alignment) {
this.type_ = type;
if (type == Debug.ScriptBreakPointType.ScriptId) {
this.script_id_ = script_id_or_name;
} else if (type == Debug.ScriptBreakPointType.ScriptName) {
t... | javascript | {
"resource": ""
} |
q59333 | UpdateScriptBreakPoints | validation | function UpdateScriptBreakPoints(script) {
for (var i = 0; i < script_break_points.length; i++) {
var break_point = script_break_points[i];
if ((break_point.type() | javascript | {
"resource": ""
} |
q59334 | ArrayToProtocolArray_ | validation | function ArrayToProtocolArray_(array, mirror_serializer) {
var json = [];
for (var i = 0; i < array.length; i++) {
| javascript | {
"resource": ""
} |
q59335 | ValueToProtocolValue_ | validation | function ValueToProtocolValue_(value, mirror_serializer) {
// Format the value based on its type.
var json;
switch (typeof value) {
case 'object':
if (value instanceof Mirror) {
json = mirror_serializer.serializeValue(value);
} else if (IS_ARRAY(value)){
json = ArrayToProtocolArray... | javascript | {
"resource": ""
} |
q59336 | runRichards | validation | function runRichards() {
var scheduler = new Scheduler();
scheduler.addIdleTask(ID_IDLE, 0, null, COUNT);
var queue = new Packet(null, ID_WORKER, KIND_WORK);
queue = new Packet(queue, ID_WORKER, KIND_WORK);
scheduler.addWorkerTask(ID_WORKER, 1000, queue);
queue = new Packet(null, ID_DEVICE_A, KIND_DEVICE... | javascript | {
"resource": ""
} |
q59337 | Scheduler | validation | function Scheduler() {
this.queueCount = 0;
this.holdCount = 0;
this.blocks | javascript | {
"resource": ""
} |
q59338 | TaskControlBlock | validation | function TaskControlBlock(link, id, priority, queue, task) {
this.link = link;
this.id = id;
this.priority = priority;
this.queue = queue;
this.task = task;
if (queue == null) { | javascript | {
"resource": ""
} |
q59339 | IdleTask | validation | function IdleTask(scheduler, v1, count) {
this.scheduler = scheduler;
| javascript | {
"resource": ""
} |
q59340 | WorkerTask | validation | function WorkerTask(scheduler, v1, v2) {
this.scheduler = scheduler; | javascript | {
"resource": ""
} |
q59341 | Packet | validation | function Packet(link, id, kind) {
this.link = link;
this.id = id;
this.kind = kind;
| javascript | {
"resource": ""
} |
q59342 | ccallFunc | validation | function ccallFunc(func, returnType, argTypes, args) {
var stack = 0;
function toC(value, type) {
if (type == 'string') {
if (value === null || value === undefined || value === 0) return 0; // null string
if (!stack) stack = Runtime.stackSave();
var ret = Runtime.stackAlloc(value.length+1);
... | javascript | {
"resource": ""
} |
q59343 | addPreRun | validation | function addPreRun(func) {
if (!Module['preRun']) Module['preRun'] = [];
else if (typeof Module['preRun'] == | javascript | {
"resource": ""
} |
q59344 | findPackage | validation | function findPackage(directory) {
const file = path.resolve(directory, 'package.json')
if (fs.existsSync(file) && fs.statSync(file).isFile()) {
return require(file)
}
const parent = | javascript | {
"resource": ""
} |
q59345 | isMultisource | validation | function isMultisource(arg) {
return Array.isArray(arg) &&
!(typeof arg[0] === 'number' && (arg.length === 1 || typeof arg[1] === 'number')) && | javascript | {
"resource": ""
} |
q59346 | resolvePath | validation | function resolvePath (fileName, depth=2) {
if (!isBrowser && isRelative(fileName) && !isURL(fileName)) {
var | javascript | {
"resource": ""
} |
q59347 | areEquivalent | validation | function areEquivalent(s1, s2, table, alphabet) {
for (const symbol of alphabet) {
if (!goToSameSet(s1, s2, | javascript | {
"resource": ""
} |
q59348 | goToSameSet | validation | function goToSameSet(s1, s2, table, symbol) {
if (!currentTransitionMap[s1] || !currentTransitionMap[s2]) {
return false;
}
const originalTransitionS1 = table[s1][symbol];
const originalTransitionS2 = table[s2][symbol];
| javascript | {
"resource": ""
} |
q59349 | isSimpleRange | validation | function isSimpleRange(classRange) {
const {from, to} = classRange;
return (
from.codePoint >= DIGIT_0_CP && from.codePoint <= DIGIT_9_CP &&
to.codePoint >= DIGIT_0_CP && to.codePoint <= DIGIT_9_CP
) || (
from.codePoint >= UPPER_A_CP && from.codePoint <= UPPER_Z_CP && | javascript | {
"resource": ""
} |
q59350 | getRange | validation | function getRange(text) {
const range = text.match(/\d+/g).map(Number);
if (Number.isFinite(range[1]) && range[1] < range[0]) {
| javascript | {
"resource": ""
} |
q59351 | checkClassRange | validation | function checkClassRange(from, to) {
if (from.kind === 'control' || to.kind === 'control' || (!isNaN(from.codePoint) && !isNaN(to.codePoint) && from.codePoint > to.codePoint)) {
| javascript | {
"resource": ""
} |
q59352 | Char | validation | function Char(value, kind, loc) {
let symbol;
let codePoint;
switch (kind) {
case 'decimal': {
codePoint = Number(value.slice(1));
symbol = String.fromCodePoint(codePoint);
break;
}
case 'oct': {
codePoint = parseInt(value.slice(1), 8);
symbol = String.fromCodePoint(code... | javascript | {
"resource": ""
} |
q59353 | checkFlags | validation | function checkFlags(flags) {
const seen = new Set();
for (const flag of flags) {
if (seen.has(flag) || !validFlags.includes(flag)) {
| javascript | {
"resource": ""
} |
q59354 | GroupRefOrDecChar | validation | function GroupRefOrDecChar(text, textLoc) {
const reference = Number(text.slice(1));
if (reference > 0 && reference <= capturingGroupsCount) {
return Node({
type: 'Backreference',
| javascript | {
"resource": ""
} |
q59355 | validateUnicodeGroupName | validation | function validateUnicodeGroupName(name, state) {
const isUnicodeName = uRe.test(name) || ucpRe.test(name);
const isUnicodeState = (state === 'u' || state === 'xu' || state === 'u_class');
if (isUnicodeName && | javascript | {
"resource": ""
} |
q59356 | Node | validation | function Node(node, loc) {
if (yy.options.captureLocations) {
node.loc = {
source: parsingString.slice(loc.startOffset, loc.endOffset),
start: {
line: loc.startLine,
column: loc.startColumn,
offset: loc.startOffset,
| javascript | {
"resource": ""
} |
q59357 | loc | validation | function loc(start, end) {
if (!yy.options.captureLocations) {
return null;
}
return {
startOffset: start.startOffset,
| javascript | {
"resource": ""
} |
q59358 | isMeta | validation | function isMeta(expression, value = null) {
return expression.type === 'Char' && | javascript | {
"resource": ""
} |
q59359 | astTraverse | validation | function astTraverse(root, options = {}) {
const pre = options.pre;
const post = options.post;
const skipProperty = options.skipProperty;
function visit(node, parent, prop, idx) {
if (!node || typeof node.type !== 'string') {
return;
}
let res = undefined;
if (pre) {
res = pre(node... | javascript | {
"resource": ""
} |
q59360 | alt | validation | function alt(first, ...fragments) {
for (let fragment of fragments) {
first = | javascript | {
"resource": ""
} |
q59361 | or | validation | function or(first, ...fragments) {
for (let fragment of fragments) {
first = | javascript | {
"resource": ""
} |
q59362 | gen | validation | function gen(node) {
if (node && !generator[node.type]) {
throw new Error(`${node.type} is not supported in | javascript | {
"resource": ""
} |
q59363 | preservesInCharClass | validation | function preservesInCharClass(value, index, parent) {
if (value === '^') {
// Avoid [\^a] turning into [^a]
return index === 0 && !parent.negative;
}
if (value === '-') {
| javascript | {
"resource": ""
} |
q59364 | disjunctionToList | validation | function disjunctionToList(node) {
if (node.type !== 'Disjunction') {
throw new TypeError(`Expected "Disjunction" node, got "${node.type}"`);
}
const list = [];
if (node.left && node.left.type === | javascript | {
"resource": ""
} |
q59365 | install | validation | function install(name, algorithm) {
if (typeof name !== 'string' || name === '') {
throw new TypeError('The algorithm name must be an non-empty string.');
}
if (
typeof algorithm !== 'object' ||
algorithm === null ||
Array.isArray(algorithm)
) {
throw new TypeError('The algorithm object must... | javascript | {
"resource": ""
} |
q59366 | uninstall | validation | function uninstall(name) {
if (typeof name !== 'string' || name === '') {
throw new TypeError('The algorithm name must be an non-empty string.');
}
const hashFunc = funcs[name];
if (!hashFunc) {
| javascript | {
"resource": ""
} |
q59367 | use | validation | function use(name) {
if (name === undefined) {
if (queue.length === 0) {
throw new Error('No algorithm installed.');
}
name = queue[queue.length - 1];
} else if (typeof name !== 'string' || name === '') {
throw new TypeError('The algorithm name | javascript | {
"resource": ""
} |
q59368 | which | validation | function which(hashstr) {
if (typeof hashstr !== 'string' || hashstr === '') {
throw new TypeError('The hashstr param must be an non-empty string.');
}
const fields = hashstr.split('$');
if (fields.length < 3 || fields[0] !== '') {
throw new TypeError(
'The hashstr param provided is not in a supp... | javascript | {
"resource": ""
} |
q59369 | verify | validation | function verify(hashstr, password) {
const name = which(hashstr);
if (name === null) {
throw new TypeError('No | javascript | {
"resource": ""
} |
q59370 | sanitizeProps | validation | function sanitizeProps(props, toRemove) {
props = {...props};
for (let i = 0, l = toRemove.length; i < | javascript | {
"resource": ""
} |
q59371 | getServers | validation | function getServers () {
var interfaces = os.networkInterfaces()
var result = []
for (var key in interfaces) {
var addresses = interfaces[key]
for (var i = addresses.length; i--;) {
var address = addresses[i]
if (address.family === 'IPv4' && !address.internal) {
var subnet = ip.subnet... | javascript | {
"resource": ""
} |
q59372 | pingServer | validation | function pingServer (address) {
return new Promise(function (resolve) {
var socket = new net.Socket()
socket.setTimeout(1000, close)
socket.connect(80, address, close)
| javascript | {
"resource": ""
} |
q59373 | parseAll | validation | function parseAll (data) {
if (!data || !data[0]) {
return []
}
if (process.platform.includes('linux')) {
var rows = data[0].split('\n')
return rows.map(function (row) {
return parseLinux(row, servers)
}).filter(Boolean)
} else if (process.platform.includes('win32')) {
var winRows = d... | javascript | {
"resource": ""
} |
q59374 | parseOne | validation | function parseOne (data) {
if (!data || !data[0]) {
return
}
if (process.platform.includes('linux')) {
// ignore unresolved hosts (can happen when parseOne returns only one unresolved host)
if (data[0].indexOf('no entry') >= 0) {
return
}
// remove first row (containing "headlines")
... | javascript | {
"resource": ""
} |
q59375 | timePassed | validation | function timePassed(t) {
if (t > 0) this.find(".wcp-time-current").text(parseTime(t,this.vlc.length));
else if (this.find(".wcp-time-current").text() != "" && this.find(".wcp-time-total").text() == "") this.find(".wcp-time-current").text("");
if (typeof opts[this.context].subtitles === 'undefined') opts[th... | javascript | {
"resource": ""
} |
q59376 | validation | function(opts) {
opts.accesskey = opts.accesskey || opts.password;
delete opts.password;
if (opts.selenium.hostname.match(/ondemand.saucelabs.com/)) {
opts.SAUCE_USERNAME = opts.SAUCE_USERNAME || opts.username;
opts.SAUCE_ACCESSKEY = opts.SAUCE_ACCESSKEY || opts.accesskey;
if (typeof opts.SAUCE_USERNAME ... | javascript | {
"resource": ""
} | |
q59377 | ScrollAction | validation | function ScrollAction(opt_callback, opt_distance_func) {
var self = this;
this.beginMeasuringHook = | javascript | {
"resource": ""
} |
q59378 | mockXhrGenerator | validation | function mockXhrGenerator(file) {
var xhr = new MockHttpRequest();
xhr.upload = {};
xhr.onsend = function() {
if (xhr.upload.onloadstart) {
xhr.upload.onloadstart();
}
var total = file && file.size || 1024, done = 0;
function start() {
setTimeout(progress, 1000);
}
function pro... | javascript | {
"resource": ""
} |
q59379 | getLocalModuleVersion | validation | function getLocalModuleVersion (name) {
check.verify.string(name, 'missing name string')
try {
var filename = path.join('node_modules', name, 'package.json')
var contents = fs.readFileSync(filename, 'utf-8')
var pkg = JSON.parse(contents)
| javascript | {
"resource": ""
} |
q59380 | nextVersions | validation | function nextVersions (options, nameVersionPairs, checkLatestOnly) {
check.verify.object(options, 'expected object with options')
check.verify.array(nameVersionPairs, 'expected array')
nameVersionPairs = cleanVersions(nameVersionPairs)
const verbose = verboseLog(options)
verbose('checking NPM registry')
va... | javascript | {
"resource": ""
} |
q59381 | serializeMethods | validation | function serializeMethods(o) {
var v;
for (var k in o) {
v = o[k];
if (_.isObject(v) && | javascript | {
"resource": ""
} |
q59382 | _toJson | validation | function _toJson(next) {
options.xmlConverter(response.body, options, function(error, data) {
if (error) return next(error);
debug('Parsed XML', data);
| javascript | {
"resource": ""
} |
q59383 | itemsCallback | validation | function itemsCallback(error, itemsResponse) {
if (error) throw error;
var items = itemsResponse.searchResult.item;
console.log('Found', items.length, 'items');
for | javascript | {
"resource": ""
} |
q59384 | getExe | validation | function getExe() {
/* istanbul ignore next: tested on all platform on travis */
switch (process.platform) {
case "darwin":
return "mkcert-" + MKCERT_VERSION + "-darwin-amd64"
case "linux":
return "mkcert-" + | javascript | {
"resource": ""
} |
q59385 | download | validation | function download(url, path) {
console.log("Downloading the mkcert executable...")
const file = fs.createWriteStream(path)
return new Promise(resolve => {
function get(url, file) {
https.get(url, (response) => { | javascript | {
"resource": ""
} |
q59386 | mkcert | validation | function mkcert(appDataPath, exe) {
const logPath = path.join(appDataPath, "mkcert.log")
const errPath = path.join(appDataPath, "mkcert.err")
// escape spaces in appDataPath (Mac OS)
appDataPath = appDataPath.replace(" ", "\\ ")
const exePath = path.join(appDataPath, exe)
const crtPath = path.join(appDataPa... | javascript | {
"resource": ""
} |
q59387 | remove | validation | function remove(appDataPath = CERT_PATH) {
if (fs.existsSync(appDataPath)) {
fs.readdirSync(appDataPath) | javascript | {
"resource": ""
} |
q59388 | clone | validation | function clone(v) {
if (v === null || typeof v !== "object") {
return v;
}
if (isArray(v)) {
var arr = v.slice();
for (var i = 0; i < v.length; i++) {
arr[i] = clone(arr[i]);
}
| javascript | {
"resource": ""
} |
q59389 | validation | function (identifier, data, config, cb) {
if (data.tags === undefined) {
return new Error("tags param can | javascript | {
"resource": ""
} | |
q59390 | validation | function (identifier, data, config, cb) {
var path = api.getPath(baseURL, identifier, detailsActionPath);
| javascript | {
"resource": ""
} | |
q59391 | validation | function (identifier, data, config, cb) {
if (data.action === undefined) {
return new Error("action param can | javascript | {
"resource": ""
} | |
q59392 | validation | function (identifier, data, config, cb) {
var path = api.getPathWithData(baseURL, identifier, listLogsPath, | javascript | {
"resource": ""
} | |
q59393 | validation | function (identifier, data, config, cb) {
var path = api.getPath(savedSearchbaseURL, identifier, null);
| javascript | {
"resource": ""
} | |
q59394 | optimize | validation | async function optimize(file) {
check(file);
const name = getName(file);
log('reading file ' + path.basename(name));
| javascript | {
"resource": ""
} |
q59395 | onDataRead | validation | async function onDataRead(filename, data) {
log('file ' + path.basename(filename) + ' read');
const ext = path.extname(filename).replace(/^\./, '');
const optimizedData = await minify[ext](data);
let b64Optimize;
if (ext === 'css')
| javascript | {
"resource": ""
} |
q59396 | applyOptions | validation | function applyOptions(options) {
const settings = {};
options = options || {}; | javascript | {
"resource": ""
} |
q59397 | parseForwarded | validation | function parseForwarded(value) {
const forwarded = {}
value.trim().split(';').forEach((part) => {
const pair = | javascript | {
"resource": ""
} |
q59398 | loadRcConfig | validation | function loadRcConfig(callback) {
const sync = typeof callback !== 'function';
if (sync) {
const fp = rcLoader.for(this.resourcePath);
if (typeof fp !== 'string') {
// no .jshintrc found
return {};
}
this.addDependency(fp);
const options = loadConfig(fp);
delete options.dirname;... | javascript | {
"resource": ""
} |
q59399 | inferMaster | validation | function inferMaster() {
var inferred = _.find(self.nestedLocales, { name: self.defaultLocale }) || self.nestedLocales[0];
if ((self.nestedLocales.length > 1) && (!_.find(self.nestedLocales, function(locale) {
return locale.children && locale.children.length;
}))) {
var others = _.filt... | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.