_id
stringlengths
2
6
title
stringlengths
0
58
partition
stringclasses
3 values
text
stringlengths
52
373k
language
stringclasses
1 value
meta_information
dict
q60500
stdCall
validation
function stdCall(options, call, args, cb) { var val = ''; for (var key in args) { val += '&' + encodeURIComponent(key) + '=' + encodeURIComponent(args[key]); } if (call !== undefined) { call = '?command=' + call; } if (call === undefined) { call = ''; } if (val === undefined) { val =...
javascript
{ "resource": "" }
q60501
projectConfigAddPaths
validation
function projectConfigAddPaths(originalConfig) { const config = originalConfig; if (!Object.prototype.hasOwnProperty.call(config.paths.src, TASK_NAME)) { config.paths.src[TASK_NAME] = `${config.dirs.src}/styles/`; } if (!Object.prototype.hasOwnProperty.call(config.paths.dest, TASK_NAME)) { config.paths.dest[T...
javascript
{ "resource": "" }
q60502
findHeader
validation
function findHeader(aoa) { const {i} = aoa.reduce( (prev, row, i) => { const len = rowLength(row) if (prev.len < len) { return {i, len} } return prev }, {i: -1, len: 0} ) return i }
javascript
{ "resource": "" }
q60503
lookup
validation
function lookup(name, obj) { for (const key in obj) { const re = RegExp(key, 'i') if (name.match(re)) { return obj[key] } } //else return null }
javascript
{ "resource": "" }
q60504
isSsh
validation
function isSsh(input) { if (Array.isArray(input)) { return input.indexOf("ssh") !== -1 || input.indexOf("rsync") !== -1; } if (typeof input !== "string") { return false; } var prots = protocols(input); input = input.substring(input.indexOf("://") + 3); if (isSsh(prots)) { ...
javascript
{ "resource": "" }
q60505
validation
function(options, cb) { return doNpmCommand({ npmCommand: 'install', cmdArgs: options.dependencies, cmdOptions: { production: options.production || false, loglevel: options.loglevel || undefined, save: options.save || false, 'save-dev': options.saveDev || false, ...
javascript
{ "resource": "" }
q60506
validation
function(){ var i = 0, len = SinonExpect.assertions.length, matcher; for(i, len; i < len; i++){ matcher = SinonExpect.assertions[i]; (function(matcher){ SinonExpect.SinonAssertions.prototype[matcher] = function(){ var args = Array.prototype.slice.call(arguments), ...
javascript
{ "resource": "" }
q60507
validation
function(thingy) { // simple DOM lookup utility function if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); if (!thingy.addClass) { // extend element with a few useful methods thingy.hide = function() { this.style.display = 'none'; }; thingy.show = function() { this....
javascript
{ "resource": "" }
q60508
validation
function(elem, appendElem, stylesToAdd) { // glue to DOM element // elem can be ID or actual DOM element object this.domElement = ZeroClipboard.$(elem); // float just above object, or zIndex 99 if dom element isn't set var zIndex = 99; if (this.domElement.style.zIndex) { zIndex = pars...
javascript
{ "resource": "" }
q60509
_full_delete
validation
function _full_delete(hash, key1, key2){ if( key1 && key2 && hash && hash[key1] && hash[key1][key2] ){ delete hash[key1][key2]; } if( us.isEmpty(hash[key1]) ){ delete hash[key1]; } }
javascript
{ "resource": "" }
q60510
SocketTransport
validation
function SocketTransport(URL, options) { if (!URL) { throw new Error('A WebSocket URL must be passed to the SocketTransport constructor!'); } if (!(this instanceof SocketTransport)) { return new SocketTransport(URL, options); } /** * The URL to use for connecting to the WebSocket server. * Typical...
javascript
{ "resource": "" }
q60511
Commander
validation
function Commander(client, options) { if (!(this instanceof Commander)) { return new Commander(client, options); } EventEmitter2.call(this); this.setMaxListeners(0); options = options || {}; options.retryStrategy = options.retryStrategy || defaultRetry; this._client = client; this._option...
javascript
{ "resource": "" }
q60512
addListElementFontSize
validation
function addListElementFontSize(element) { var hDataWeight = -9007199254740992; var lDataWeight = 9007199254740992; $.each(element.find("li"), function(){ cDataWeight = getDataWeight(this); if (cDataWeight == undefined) { logWarning("No \"data-weight\" attribut de...
javascript
{ "resource": "" }
q60513
validation
function(direction, cloud_element) { var start = $( '#cloudGraphPagingStart' ).val(); var rows = $( '#cloudGraphPagingRows' ).val(); var startAt = start ? parseInt(start) : 0; var numRows = rows ? parseInt(rows) : 20; var newStart = Math.max(startAt + (rows * direction),0); $( '#cloudGraphPagingStart' ).va...
javascript
{ "resource": "" }
q60514
doSubmit
validation
function doSubmit() { // make sure form attrs are set var t = $form.attr('target'), a = $form.attr('action'); // update form attrs in IE friendly way form.setAttribute('target',id); if (form.getAttribute('method') != 'POST') { form.setAttribute('method', 'POST'); } if ...
javascript
{ "resource": "" }
q60515
AppClient
validation
function AppClient(URL, options) { if (!(this instanceof AppClient)) { return new AppClient(URL, options); } options = options || {}; //TODO: Implement option passing. var transport = options.transport || new SocketTransport(URL); var RPC = options.RPC || new JSONRPC(transport); var commander = o...
javascript
{ "resource": "" }
q60516
writeTobuffer
validation
function writeTobuffer(value, buffer) { write(buffer, value, OFFSET, LITTLE_ENDIAN, MANTISSA_LENGTH, NUMBER_OF_BYTES); }
javascript
{ "resource": "" }
q60517
buf2hex
validation
function buf2hex(buffer, options = { prefix: true }) { var hex = Array.prototype.map .call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)) .join(''); return options.prefix === true ? `0x${hex}` : hex; }
javascript
{ "resource": "" }
q60518
num2hex
validation
function num2hex(value, options) { if (value === undefined) throw new Error('Value is undefined'); var buffer = Buffer.alloc(NUMBER_OF_BYTES); writeTobuffer(value, buffer); return buf2hex(buffer, options); }
javascript
{ "resource": "" }
q60519
hex2num
validation
function hex2num(value) { if (value === undefined) throw new Error('Value is undefined'); var buffer = hex2buf(value); return readFromBuffer(buffer); }
javascript
{ "resource": "" }
q60520
validation
function () { var f = $.jstree._focused(); if(f && f !== this) { f.get_container().removeClass("jstree-focused"); } if(f !== this) { this.get_container().addClass("jstree-focused"); focused_instance = this.get_index(); } this.__callback()...
javascript
{ "resource": "" }
q60521
validation
function() { var json = {}; $.each(this, function(k,v) { if (!_isFunction(v)) { json[k] = v; } }); return json; }
javascript
{ "resource": "" }
q60522
validation
function() { var proxy = this, app = this.app; $(window).bind('hashchange.' + this.app.eventNamespace(), function(e, non_native) { // if we receive a native hash change event, set the proxy accordingly // and stop polling if (proxy.is_native === false && !non_native) { Samm...
javascript
{ "resource": "" }
q60523
validation
function() { $(window).unbind('hashchange.' + this.app.eventNamespace()); Sammy.HashLocationProxy._bindings--; if (Sammy.HashLocationProxy._bindings <= 0) { window.clearInterval(Sammy.HashLocationProxy._interval); } }
javascript
{ "resource": "" }
q60524
validation
function(verb, path) { var app = this, routed = false; this.trigger('lookup-route', {verb: verb, path: path}); if (typeof this.routes[verb] != 'undefined') { $.each(this.routes[verb], function(i, route) { if (app.routablePath(path).match(route.path)) { routed = route; ...
javascript
{ "resource": "" }
q60525
validation
function(location, name, data, callback) { if (_isArray(name)) { callback = data; data = name; name = null; } return this.load(location).then(function(content) { var rctx = this; if (!data) { data = _isArray(this.previous_content) ? this.previous...
javascript
{ "resource": "" }
q60526
validation
function(name, data) { if (typeof data == 'undefined') { data = {}; } if (!data.context) { data.context = this; } return this.app.trigger(name, data); }
javascript
{ "resource": "" }
q60527
validation
function(partialPath, locals) { var normalizedPartialPath = normalizeTemplatePath(partialPath, path.dirname(normalizedTemplatePath)); return exports.compile(normalizedPartialPath)(locals); }
javascript
{ "resource": "" }
q60528
validation
function(type, content, textAfter, state) { if (this.jsonMode) { return /^[\[,{]$/.test(content) || /^}/.test(textAfter); } else { if (content == ";" && state.lexical && state.lexical.type == ")") return false; return /^[;{}...
javascript
{ "resource": "" }
q60529
enteringString
validation
function enteringString(cm, pos, ch) { var line = cm.getLine(pos.line); var token = cm.getTokenAt(pos); if (/\bstring2?\b/.test(token.type)) return false; var stream = new CodeMirror.StringStream(line.slice(0, pos.ch) + ch + line.slice(pos.ch), 4); stream.pos = stream.start = token.start; for (;...
javascript
{ "resource": "" }
q60530
resolve
validation
function resolve(paths){ paths = Array.isArray(paths) ? paths : [ paths ]; var fullPath = path.resolve.apply(this, paths).replace(/\\/g, '/'); return { fullPath: fullPath, dirName: path.dirname(fullPath), fileName: path.basename(fullPath), extName: path.extname(fullPath)...
javascript
{ "resource": "" }
q60531
existsOrCreate
validation
function existsOrCreate(filePath, opts, cb){ if(arguments.length===2){ cb = arguments[1]; opts = {}; } opts.encoding = opts.encoding || 'utf8'; opts.data = opts.data || opts.content || ''; opts.mode = opts.mode || '0777'; opts.replace = opts.replace ? true : false; var f...
javascript
{ "resource": "" }
q60532
existsOrCreateSync
validation
function existsOrCreateSync(filePath, opts){ opts = opts || {}; opts.encoding = opts.encoding || 'utf8'; opts.data = opts.data || opts.content || ''; opts.mode = opts.mode || '0777'; var fp = resolve(filePath); var isFile = opts.hasOwnProperty('isFile') ? opts.isFile : !!fp.extName; ...
javascript
{ "resource": "" }
q60533
unwatchAll
validation
function unwatchAll(){ for(var filePath in _fileWatchers) { if(_fileWatchers[filePath]) _fileWatchers[filePath].close(); delete _fileWatchers[filePath]; } for(var dirPath in _dirWatchers) { if(_dirWatchers[dirPath]) _dirWatchers[dirPath].close(); delete _dirWatchers[dirP...
javascript
{ "resource": "" }
q60534
writeFile
validation
function writeFile(filePath, data, callback, count){ // callback(err) if(typeof callback !== 'function') throw new Error('Wrong arguments'); filePath = path.resolve(filePath); count = count || 0; var maxLimit = 5; // 5 * 500ms = 2,5s fs.writeFile(filePath, data, function(err) { if(...
javascript
{ "resource": "" }
q60535
readFile
validation
function readFile(filePath, opts, callback, count){ // callback(err) if(arguments.length===2){ callback = arguments[1]; opts = null; } if(typeof callback !== 'function') throw new Error('Wrong arguments'); filePath = path.resolve(filePath); count = count || 0; var maxLimit =...
javascript
{ "resource": "" }
q60536
getFileInfo
validation
function getFileInfo(fileId, filePath, cb, repeated){ // cb(err, fileInfo) repeated = repeated || 0; var fullPath = resolve(filePath).fullPath; fs.exists(fullPath, function(exists){ if(!exists) cb(); else fs.stat(fullPath, function(err, stat){ if(err && err.code === 'ENOENT'...
javascript
{ "resource": "" }
q60537
getPathAncestors
validation
function getPathAncestors(filename){ var tree = filename.split('/'); tree.pop(); // remove last var treePath = []; for(var i=0;i<tree.length;i++){ treePath.push(createId(tree, i)); } function createId(tree, count){ var id = ''; for(var i=0;i<=count;i++){ ...
javascript
{ "resource": "" }
q60538
getName
validation
function getName(fileId, isFile){ var splitted = fileId.split('/'); // get filename var filename = splitted[splitted.length - 1]; // get file name if(!isFile) return filename; filename = filename.split('.'); if(filename.length === 1) return filename[0]; // file has no extension filename.pop...
javascript
{ "resource": "" }
q60539
getExt
validation
function getExt(filename){ var splitted = filename.split('.'); if(splitted.length === 1) return ''; // file has no extension return splitted[splitted.length - 1]; // get file extension }
javascript
{ "resource": "" }
q60540
getFileItem
validation
function getFileItem(fileId, stat, filePath){ return { id:fileId, fullPath: filePath, name: getName(fileId, !stat.isDirectory()), ancestors: getPathAncestors(fileId), isDir:stat.isDirectory(), isFile:!stat.isDirectory(), ext:!stat.isDirectory() ? getExt(fileId...
javascript
{ "resource": "" }
q60541
getDirChildren
validation
function getDirChildren(parentId, items){ var children = {}; for(var id in items){ if(items[id].ancestors[ items[id].ancestors.length-1 ] === parentId) children[id] = items[id]; } return children; }
javascript
{ "resource": "" }
q60542
compareDirFiles
validation
function compareDirFiles(parentId, old_children, descendants){ var changes = [], not_found = object.extend({}, old_children); for(var id in descendants) { if(descendants[id].ancestors[ descendants[id].ancestors.length-1 ] === parentId) { // compare only direct children ...
javascript
{ "resource": "" }
q60543
validation
function(fn, ctx) { var task = !ctx ? fn : fn.bind(ctx); this.reads.push(task); scheduleFlush(this); return task; }
javascript
{ "resource": "" }
q60544
validation
function(fn, ctx) { var task = !ctx ? fn : fn.bind(ctx); this.writes.push(task); scheduleFlush(this); return task; }
javascript
{ "resource": "" }
q60545
validation
function(props) { if (typeof props != 'object') { throw new Error('expected object'); } var child = Object.create(this); mixin(child, props); child.fastdom = this; // run optional creation hook if (child.initialize) { child.initialize(); } return child; }
javascript
{ "resource": "" }
q60546
flush
validation
function flush(fastdom) { var reads = fastdom.reads.splice(0, fastdom.reads.length), writes = fastdom.writes.splice(0, fastdom.writes.length), error; try { runTasks(reads); runTasks(writes); } catch (e) { error = e; } fastdom.scheduled = false; // If the batch err...
javascript
{ "resource": "" }
q60547
create
validation
function create(props) { var knob = Object.create(this); // apply Widget defaults, then overwrite (if applicable) with Knob defaults _canvasWidget2.default.create.call(knob); // ...and then finally override with user defaults Object.assign(knob, Knob.defaults, props); // set underlying value ...
javascript
{ "resource": "" }
q60548
processPointerPosition
validation
function processPointerPosition(e) { var xOffset = e.clientX, yOffset = e.clientY; var radius = this.rect.width / 2; this.lastValue = this.value; if (!this.usesRotation) { if (this.lastPosition !== -1) { //this.__value -= ( yOffset - this.lastPosition ) / (radius * 2); th...
javascript
{ "resource": "" }
q60549
setContextValue
validation
function setContextValue(setChainContext, chainId, name, value) { if (value instanceof Function) { throw new FunctionAsValueException(); } setChainContext(chainId, name, value); }
javascript
{ "resource": "" }
q60550
recurse
validation
function recurse(node) { // first navigate to the first sibling if (node.previousSibling) recurse(node.previousSibling); // then add the string representation of the nodes ('backward' recursion) switch (node.nodeType) { case 8: // comment html += "<!--" + node.nodeValue + "-->"; br...
javascript
{ "resource": "" }
q60551
validation
function(url, prev, done) { if (url.indexOf('bootstrap/') === 0) { var component = url.substr('bootstrap/'.length+1); var file = cmsDir+'/src/scss/bootstrap/_'+component+'.scss'; try { var stats = fs.lstatSync(file); if (stats.isFile()) { retu...
javascript
{ "resource": "" }
q60552
streamToBuffer
validation
function streamToBuffer(stream, cb){ // cb(err, buffer); var bufs = []; stream.on('data', function(d){ bufs.push(d); }) .on('end', function(){ cb(null, Buffer.concat(bufs)); }) .on('error', function(err){ cb(err); }); }
javascript
{ "resource": "" }
q60553
Bucks
validation
function Bucks(params) { this._tasks = []; this._taskcount = 0; this._results = []; this.callback = none; this.failure = none; this._alive = true; this._interrupt = false; this.__id = uid(); Bucks.living[this.__id] = this; this.initialize(...
javascript
{ "resource": "" }
q60554
cached
validation
function cached(opt) { if (typeof opt == 'undefined' || opt === null) opt = {}; if (typeof opt == 'string') opt = {type:opt}; if (typeof opt.id != 'string') opt.id = _random_string(8); opt = Object.assign({}, getSettings(), opt); for (var i in opt) checkSetting(i, opt[i]); return function (func, key, descr...
javascript
{ "resource": "" }
q60555
validation
function (...rest) { const _key = _hash(rest, opt.id); return cacheObj.get(opt, _key) .then(res => { if (typeof res == 'undefined' || res === null) { res = _update.bind(this)(opt, func, rest); } return res; }); ...
javascript
{ "resource": "" }
q60556
getChain
validation
function getChain(storage, name) { if (storage[GET_CHAIN_METHOD]) { return storage[GET_CHAIN_METHOD](name); } var chain = Object.assign({}, storage[name]); chain['$chainId'] = (0, _Util.generateUUID)(); return Object.assign({}, chain); }
javascript
{ "resource": "" }
q60557
getChainDataById
validation
function getChainDataById(storage, chainId) { if (storage[GET_CHAIN_METHOD]) { return storage[GET_CHAIN_METHOD](chainId); } return storage[chainId]; }
javascript
{ "resource": "" }
q60558
getChainContext
validation
function getChainContext(storage, chainId, field) { if (storage[GET_CHAIN_CONTEXT_METHOD]) { return storage[GET_CHAIN_CONTEXT_METHOD](chainId, field); } if (storage[chainId]) { return storage[chainId][field]; } }
javascript
{ "resource": "" }
q60559
create
validation
function create(props) { var multiButton = Object.create(this); _canvasWidget2.default.create.call(multiButton); Object.assign(multiButton, MultiButton.defaults, props); if (props.value) { multiButton.__value = props.value; } else { multiButton.__value = []; for (var i = 0; i < ...
javascript
{ "resource": "" }
q60560
mkSprite
validation
function mkSprite(srcFiles, destImage, options, callback) { options.src = srcFiles, grunt.verbose.writeln('Options passed to Spritesmth:', JSON.stringify(options)); spritesmith(options, function(err, result) { // If an error occurred, callback with it if (err) { grunt.fatal(err); return; } ...
javascript
{ "resource": "" }
q60561
hasPath
validation
function hasPath(object, path, hasFunc) { path = isKey$1(path, object) ? [path] : castPath$1(path); var result, index = -1, length = path.length; while (++index < length) { var key = toKey$1(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } ...
javascript
{ "resource": "" }
q60562
baseSet
validation
function baseSet(object, path, value, customizer) { if (!isObject$2(object)) { return object; } path = isKey$2(path, object) ? [path] : castPath$2(path); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) {...
javascript
{ "resource": "" }
q60563
mixin
validation
function mixin(ctor, methods) { var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; }; Object.keys(methods).forEach(keyCopier); Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier); return ctor; }
javascript
{ "resource": "" }
q60564
isString
validation
function isString(value) { return typeof value == 'string' || (!isArray$3(value) && isObjectLike$4(value) && objectToString$4.call(value) == stringTag); }
javascript
{ "resource": "" }
q60565
arrayIncludes
validation
function arrayIncludes(array, value) { var length = array ? array.length : 0; return !!length && baseIndexOf(array, value, 0) > -1; }
javascript
{ "resource": "" }
q60566
baseIndexOf
validation
function baseIndexOf(array, value, fromIndex) { if (value !== value) { return baseFindIndex(array, baseIsNaN, fromIndex); } var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; }
javascript
{ "resource": "" }
q60567
countHolders
validation
function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { result++; } } return result; }
javascript
{ "resource": "" }
q60568
createRecurry
validation
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, new...
javascript
{ "resource": "" }
q60569
insertWrapDetails
validation
function insertWrapDetails(source, details) { var length = details.length, lastIndex = length - 1; details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; details = details.join(length > 2 ? ', ' : ' '); return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); ...
javascript
{ "resource": "" }
q60570
toFinite
validation
function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY$3 || value === -INFINITY$3) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; }
javascript
{ "resource": "" }
q60571
toNumber
validation
function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol$3(value)) { return NAN; } if (isObject$4(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject$4(other) ? (other + '') : other; } if (typeof val...
javascript
{ "resource": "" }
q60572
arrayLikeKeys
validation
function arrayLikeKeys(value, inherited) { // Safari 8.1 makes `arguments.callee` enumerable in strict mode. // Safari 9 makes `arguments.length` enumerable in strict mode. var result = (isArray$4(value) || isArguments$1(value)) ? baseTimes(value.length, String) : []; var length = result.length, ...
javascript
{ "resource": "" }
q60573
assignInDefaults
validation
function assignInDefaults(objValue, srcValue, key, object) { if (objValue === undefined || (eq$3(objValue, objectProto$7[key]) && !hasOwnProperty$6.call(object, key))) { return srcValue; } return objValue; }
javascript
{ "resource": "" }
q60574
baseRest
validation
function baseRest(func, start) { start = nativeMax$1(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax$1(args.length - start, 0), array = Array(length); while (++index < length) { array[index] ...
javascript
{ "resource": "" }
q60575
isIndex$3
validation
function isIndex$3(value, length) { length = length == null ? MAX_SAFE_INTEGER$3 : length; return !!length && (typeof value == 'number' || reIsUint$3.test(value)) && (value > -1 && value % 1 == 0 && value < length); }
javascript
{ "resource": "" }
q60576
isIterateeCall
validation
function isIterateeCall(value, index, object) { if (!isObject$5(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike$1(object) && isIndex$3(index, object.length)) : (type == 'string' && index in object) ) { return eq$3(object[index], valu...
javascript
{ "resource": "" }
q60577
getRawTag$1
validation
function getRawTag$1(value) { var isOwn = hasOwnProperty$7.call(value, symToStringTag$1), tag = value[symToStringTag$1]; try { value[symToStringTag$1] = undefined; } catch (e) {} var result = nativeObjectToString$1.call(value); { if (isOwn) { value[symToStringTag$1] = tag; ...
javascript
{ "resource": "" }
q60578
baseGetTag$1
validation
function baseGetTag$1(value) { if (value == null) { return value === undefined ? undefinedTag$1 : nullTag$1; } return (symToStringTag$2 && symToStringTag$2 in Object(value)) ? _getRawTag(value) : _objectToString(value); }
javascript
{ "resource": "" }
q60579
hashDelete$3
validation
function hashDelete$3(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; }
javascript
{ "resource": "" }
q60580
mapCacheSet$3
validation
function mapCacheSet$3(key, value) { var data = _getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; }
javascript
{ "resource": "" }
q60581
castPath$3
validation
function castPath$3(value, object) { if (isArray_1(value)) { return value; } return _isKey(value, object) ? [value] : _stringToPath(toString_1(value)); }
javascript
{ "resource": "" }
q60582
get$2
validation
function get$2(object, path, defaultValue) { var result = object == null ? undefined : _baseGet(object, path); return result === undefined ? defaultValue : result; }
javascript
{ "resource": "" }
q60583
validation
function(savePath, consolidate, useDotNotation, filePrefix, consolidateAll) { this.savePath = savePath || ''; this.consolidate = consolidate === jasmine.undefined ? true : consolidate; this.consolidateAll = consolidateAll === jasmine.undefined ? false : consolidateAll; this.useDotNotatio...
javascript
{ "resource": "" }
q60584
attachLibraryToSelf
validation
function attachLibraryToSelf () { for(var i in libs) if(libs.hasOwnProperty(i) && !self[i]) self[i] = libs[i]; return self; }
javascript
{ "resource": "" }
q60585
applyLibraryToPrototypes
validation
function applyLibraryToPrototypes () { if(!attached) { Object.defineProperty(Object.prototype, handle, { configurable : true, enumerable : false, // Allow users to overwrite the handle on a per instance basis... ...
javascript
{ "resource": "" }
q60586
validation
function (v) { if(this[handle] !== v) { Object.defineProperty(this, handle, { configurable : true, enumerable : true, writable : true, ...
javascript
{ "resource": "" }
q60587
validation
function () { var ccId, proto = getProto(this), cId = proto.constructor.__get_protolib_id__, lib = {}, i = 0, last = null, ...
javascript
{ "resource": "" }
q60588
removeLibraryFromPrototypes
validation
function removeLibraryFromPrototypes () { Object.defineProperty(Object.prototype, handle, { value: undefined }); delete Object.prototype[handle]; attached = false; return self; }
javascript
{ "resource": "" }
q60589
getThisValueAndInvoke
validation
function getThisValueAndInvoke (callback) { return callback(currentThis !== undefined && currentThis !== null ? (typeof currentThis === 'object' ? currentThis : currentThis.valueOf()) : currentThis ); }
javascript
{ "resource": "" }
q60590
create
validation
function create(props) { var button = Object.create(this); _canvasWidget2.default.create.call(button); Object.assign(button, Button.defaults, props); if (props.value) button.__value = props.value; button.init(); return button; }
javascript
{ "resource": "" }
q60591
bindProperty
validation
function bindProperty(o, parent, prop) { Object.defineProperty(o, prop, { get: function () { try { return parent[prop]; } catch (e) {} }, set: function (val) { try { parent[prop] = val; } catch(e) {} }, ...
javascript
{ "resource": "" }
q60592
getKeys
validation
function getKeys (o) { switch(typeof o) { case 'object': return o ? Object.keys(o) : []; case 'string': var keys = []; for(var i = 0; i < o.length; i++) keys.push(i.toString()); return keys; ...
javascript
{ "resource": "" }
q60593
camelize
validation
function camelize () { var ret = []; libs.object.every(arguments, function (s) { if(s) { if(typeof s === 'function') s = fixFirefoxFunctionString(s.toString()); s = s.toString().replace(/[^a-z0-9$]/gi...
javascript
{ "resource": "" }
q60594
decamelize
validation
function decamelize () { var ret = []; libs.object.every(arguments, function (s) { if(s) { if(typeof s === 'function') s = fixFirefoxFunctionString(s.toString()); s = s.toString().replace(/([A-Z$])/g,...
javascript
{ "resource": "" }
q60595
differenceFromString
validation
function differenceFromString (s, other) { if(typeof other !== 'string' || typeof s !== 'string') return s; var sarr = s.split(''), oarr = other.split(''); return libs.array.difference(sarr, oarr).join(''); }
javascript
{ "resource": "" }
q60596
intersectString
validation
function intersectString (s, other) { if(typeof other !== 'string' || typeof s !== 'string') return s; var sarr = s.split(''), oarr = other.split(''); return libs.array.intersect(sarr, oarr).join(''); }
javascript
{ "resource": "" }
q60597
repeat
validation
function repeat (s, times) { times = parseInt(times, 10); times = isNaN(times) || !isFinite(times) || times <= 0 ? 1 : times; var os = s; for(var i = 1; i < times; i++) s += os; return s; }
javascript
{ "resource": "" }
q60598
rtrim
validation
function rtrim (s, what) { what = typeof what === 'string' ? what : '\\s+'; return s.replace(new RegExp(what + '$'), ''); }
javascript
{ "resource": "" }
q60599
ltrim
validation
function ltrim (s, what) { what = typeof what === 'string' ? what : '\\s+'; return s.replace(new RegExp('^' + what), ''); }
javascript
{ "resource": "" }