Search is not available for this dataset
query stringlengths 7 355k | document stringlengths 9 341k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
Get Current Value of attributes | function getProgress() {
return document.getElementById("progressbar").getAttribute("aria-valuenow");
return document.getElementById("progressbar").getAttribute("style","width:");
return document.getElementById("progressbar").innerHTML;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getAttr() {\r\n return this.attributes\r\n }",
"static get observedAttributes() {\n return ['value'];\n }",
"readAttributes() {\n this._previousValueState.state = this.getAttribute('value-state')\n ? this.getAttribute('value-state')\n : 'None';\n\n // save the original attribute f... | [
"0.7315704",
"0.72826964",
"0.677964",
"0.67343146",
"0.6732252",
"0.67137057",
"0.67110616",
"0.67110616",
"0.6691765",
"0.6613929",
"0.6575565",
"0.64938223",
"0.6481105",
"0.64710313",
"0.64650023",
"0.6455856",
"0.6431732",
"0.6393101",
"0.6373208",
"0.6360265",
"0.635985... | 0.0 | -1 |
Set value of attributes | function setProgress(value) {
document.getElementById("progressbar").setAttribute("aria-valuenow",value);
document.getElementById("progressbar").setAttribute("style","width: " +value+ "%");
document.getElementById("progressbar").innerHTML = (value+ "%");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set attributes(value) {\n return this.$attributes = value;\n }",
"setAttributes(myAttributes){\n \tif (myAttributes instanceof Attribute){\n \t\tvar keys = myAttributes.getKeys();\n \t\tfor(let i in keys){\n \t\t\tthis.setAttribute(keys[i], myAttributes.getAttribute(keys[i]);\n \t\t}\n \t}else if... | [
"0.7393896",
"0.7372068",
"0.7353428",
"0.7353428",
"0.73294294",
"0.73038214",
"0.72554475",
"0.7224709",
"0.7089676",
"0.7021429",
"0.69919723",
"0.6935125",
"0.68791914",
"0.6870406",
"0.6850064",
"0.68128455",
"0.67740774",
"0.67688197",
"0.6763753",
"0.6738889",
"0.67388... | 0.0 | -1 |
Auto complete value to max in this case max is 100 with Interval of 100. | function autoProgress() {
var elem = document.getElementById("progressbar");
var width = 0;
var id = setInterval(frame, 100);
function frame(){
if(width == 100){
clearInterval(id);
}else{
width++;
elem.style.width = width + '%';
elem.innerHTML = width * 1 + '%';
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set max(max) {\n this._max = !isNumber(max) || max <= 0 ? 100 : max;\n }",
"set _max(value) {\n Helper.UpdateInputAttribute(this, \"max\", value);\n }",
"set max(value) {\n Helper.UpdateInputAttribute(this, 'max', value);\n }",
"function getMaximum () {\n if ((document.getElementById('entM... | [
"0.7480409",
"0.7174174",
"0.71028346",
"0.7095999",
"0.6936987",
"0.6797335",
"0.6754082",
"0.66732305",
"0.66732305",
"0.66732305",
"0.66732305",
"0.66732305",
"0.66732305",
"0.6604408",
"0.65543056",
"0.65214616",
"0.6519194",
"0.6509064",
"0.64966697",
"0.6478105",
"0.647... | 0.0 | -1 |
The function whose prototype chain sequence wrappers inherit from. | function baseLodash(){// No operation performed.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get prototype() {}",
"function FunctionWithPrototypeTest() {}",
"function n(e,t){e.prototype.__proto__=t&&t.prototype,e.__proto__=t}",
"function inheritFrom(subfn,superfn) {\n\tvar r = function () {}\n\tr.prototype = superfn.prototype;\n\tsubfn.prototype = new r();\n}",
"function m(a){var b=function(){};re... | [
"0.63448894",
"0.62097377",
"0.5887767",
"0.58376676",
"0.5755025",
"0.5730794",
"0.5730794",
"0.5718774",
"0.5718774",
"0.5718774",
"0.5718774",
"0.5718774",
"0.5716435",
"0.5716435",
"0.5680218",
"0.5680218",
"0.5680218",
"0.5680218",
"0.5680218",
"0.5680218",
"0.5680218",
... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear(){this.__data__=[];this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",... | 0.7236393 | 19 |
Removes all keyvalue entries from the map. | function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7590112",
"0.70694387",
"0.6735414",
"0.6652174",
"0.6530006",
"0.6267597",
"0.62582785",
"0.62582785",
"0.62582785",
"0.617115",
"0.617115",
"0.617115",
"0.6166302",
"0.61519635",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614... | 0.5723219 | 61 |
Removes all keyvalue entries from the stack. | function stackClear(){this.__data__=new ListCache();this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear () {\n this._dict = {}\n this._stack = [this._dict]\n }",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear() {\n\t this.__... | [
"0.63588345",
"0.6331268",
"0.6331268",
"0.6331268",
"0.627537",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"... | 0.0 | -1 |
This method returns `undefined`. | function noop(){// No operation performed.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function returnUndefined() {}",
"value() { return undefined; }",
"function _undefined() {\n return exports.PREFIX.undefined;\n}",
"function f () {\n return undefined;\n }",
"_get(key) { return undefined; }",
"get None() {}",
"get None() {}",
"get None() {}",
"get None() {}",
"_get_value() ... | [
"0.7349204",
"0.67813563",
"0.6498075",
"0.6468386",
"0.6265139",
"0.6195519",
"0.6195519",
"0.6195519",
"0.6195519",
"0.5957684",
"0.5942946",
"0.5942946",
"0.59360754",
"0.5919196",
"0.5828133",
"0.5788914",
"0.57824624",
"0.5770755",
"0.5736466",
"0.5725097",
"0.57073194",... | 0.0 | -1 |
by calls to these methods by a Babel plugin. In PROD (or in packages without access to React internals), they are left as they are instead. | function warn(format){{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}printWarning('warn',format,args);}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function resetIfUsingPreact() {\n if (window.preact !== undefined) {\n jsxLoader.compiler.pragma = 'React.createElement';\n jsxLoader.compiler.pragmaFrag = 'React.Fragment';\n }\n }",
"react() {\n return;\n }",
"function globalizeReact() {\n ... | [
"0.6231517",
"0.5987249",
"0.5949213",
"0.57122",
"0.57122",
"0.5705207",
"0.56892043",
"0.56892043",
"0.55873036",
"0.5555952",
"0.5543145",
"0.5543145",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0... | 0.0 | -1 |
Base class helpers for the updating state of a component. | function Component(props,context,updater){this.props=props;this.context=context;// If a component has string refs, we will assign a different object later.
this.refs=emptyObject;// We initialize the default updater but the real one gets injected by the
// renderer.
this.updater=updater||ReactNoopUpdateQueue;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"update() {\n BaseState.update.call(this);\n }",
"_update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate = this.needsUpdate();\n // End lifecycle method\n debug(TRACE_UPDATE, this, stateNeedsUpdate);\n\n if (stateNeedsUpdate) {\n this._updateState();\n }\n }",
"func... | [
"0.7217204",
"0.67610246",
"0.66769236",
"0.66106635",
"0.6540022",
"0.65259355",
"0.6489663",
"0.64705694",
"0.645821",
"0.63847154",
"0.6354757",
"0.63347685",
"0.63053316",
"0.6304944",
"0.62717897",
"0.6266675",
"0.621649",
"0.6214279",
"0.6194085",
"0.6189877",
"0.615812... | 0.0 | -1 |
Convenience component with default shallow equality check for sCU. | function PureComponent(props,context,updater){this.props=props;this.context=context;// If a component has string refs, we will assign a different object later.
this.refs=emptyObject;this.updater=updater||ReactNoopUpdateQueue;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function useStrictEquality(b, a) {\n return a === b;\n }",
"get shallowCopy() {\n return this.shallowCopy$();\n }",
"function defaultEqualityCheck(a, b) {\n return !a && !b || a === b;\n }",
"equals() {\n return false;\n }",
"equals() {\n return false;\n }",
... | [
"0.60841435",
"0.5796601",
"0.5670416",
"0.56586224",
"0.56586224",
"0.56335825",
"0.5590515",
"0.5590515",
"0.55875814",
"0.5548068",
"0.54892737",
"0.5487291",
"0.5483514",
"0.5483514",
"0.54746234",
"0.54746234",
"0.54746234",
"0.5454448",
"0.5454448",
"0.54398715",
"0.539... | 0.0 | -1 |
an immutable object with a single mutable value | function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function immutableObjectTest(){\n\nlet test= {'name': 'vishal', 'age':27};\n//Object.freeze(test);\nlet test2= test;\n\ntest.age = 26;\nconsole.log(test);\nconsole.log(test2);\nconsole.log(test === test2);\n\n\n\n\n}",
"static set one(value) {}",
"function makeImmutableObject(obj) {\n\t if (!globalConfig.us... | [
"0.6674448",
"0.66609514",
"0.6358345",
"0.6347869",
"0.6347869",
"0.6263268",
"0.6230736",
"0.6136926",
"0.61048114",
"0.5915378",
"0.5889688",
"0.580687",
"0.5776291",
"0.5763881",
"0.57248324",
"0.56947106",
"0.566211",
"0.5636481",
"0.56181127",
"0.5606209",
"0.5606209",
... | 0.0 | -1 |
Create and return a new ReactElement of the given type. See | function createElement(type,config,children){var propName;// Reserved names are extracted
var props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;{warnIfStringRefCannotBeAutoConverted(config);}}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;// Remaining properties are added to a new props object
for(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto
// the newly allocated props object.
var childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}{if(Object.freeze){Object.freeze(childArray);}}props.children=childArray;}// Resolve default props
if(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(props[propName]===undefined){props[propName]=defaultProps[propName];}}}{if(key||ref){var displayName=typeof type==='function'?type.displayName||type.name||'Unknown':type;if(key){defineKeyPropWarningGetter(props,displayName);}if(ref){defineRefPropWarningGetter(props,displayName);}}}return ReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createElement(type,config,children){var propName=void 0;// Reserved names are extracted\nvar props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__sel... | [
"0.6835192",
"0.6767826",
"0.6757532",
"0.6745889",
"0.6745889",
"0.6745889",
"0.6745889",
"0.6745889",
"0.6745889",
"0.6745889",
"0.6745889",
"0.6745889",
"0.65640503",
"0.65581757",
"0.6406998",
"0.6406998",
"0.6406998",
"0.6406998",
"0.6406998",
"0.63805515",
"0.637205",
... | 0.68920434 | 0 |
Clone and return a new ReactElement using element as the starting point. See | function cloneElement(element,config,children){if(!!(element===null||element===undefined)){{throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+element+".");}}var propName;// Original props are copied
var props=_assign({},element.props);// Reserved names are extracted
var key=element.key;var ref=element.ref;// Self is preserved since the owner is preserved.
var self=element._self;// Source is preserved since cloneElement is unlikely to be targeted by a
// transpiler, and the original source is probably a better indicator of the
// true owner.
var source=element._source;// Owner will be preserved, unless ref is overridden
var owner=element._owner;if(config!=null){if(hasValidRef(config)){// Silently steal the ref from the parent.
ref=config.ref;owner=ReactCurrentOwner.current;}if(hasValidKey(config)){key=''+config.key;}// Remaining properties override existing props
var defaultProps;if(element.type&&element.type.defaultProps){defaultProps=element.type.defaultProps;}for(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){if(config[propName]===undefined&&defaultProps!==undefined){// Resolve default props
props[propName]=defaultProps[propName];}else {props[propName]=config[propName];}}}}// Children can be more than one argument, and those are transferred onto
// the newly allocated props object.
var childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}props.children=childArray;}return ReactElement(element.type,key,ref,self,source,owner,props);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cloneElement(element,config,children){!!(element===null||element===undefined)?invariant(false,'React.cloneElement(...): The argument must be a React element, but you passed %s.',element):void 0;var propName=void 0;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extr... | [
"0.68906343",
"0.66943085",
"0.66943085",
"0.6692962",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6633278",
"0.661405",
"0.661405",
"0.661405",
"... | 0.69132274 | 0 |
Flatten a children object (typically specified as `props.children`) and return an array with appropriately rekeyed children. See | function toArray(children){return mapChildren(children,function(child){return child;})||[];} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function toArrayChildren(children) {\n var ret = [];\n React__default.Children.forEach(children, function (child) {\n ret.push(child);\n });\n return ret;\n }",
"function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,function(child){return child;}... | [
"0.7753311",
"0.7517859",
"0.7405196",
"0.7405196",
"0.7405196",
"0.7405196",
"0.7405196",
"0.7405196",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"... | 0.7432709 | 2 |
Experimental Create Event Handle API. | function isValidElementType(type){if(typeof type==='string'||typeof type==='function'){return true;}// Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
if(type===exports.Fragment||type===exports.Profiler||type===REACT_DEBUG_TRACING_MODE_TYPE||type===exports.StrictMode||type===exports.Suspense||type===REACT_SUSPENSE_LIST_TYPE||type===REACT_LEGACY_HIDDEN_TYPE||enableScopeAPI){return true;}if(typeof type==='object'&&type!==null){if(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_FUNDAMENTAL_TYPE||type.$$typeof===REACT_BLOCK_TYPE||type[0]===REACT_SERVER_BLOCK_TYPE){return true;}}return false;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createEventHandler() {\n return {\n handleEvent: function handleEvent(event) {\n switch (event.type) {\n\n case 'encrypted':\n if (event.initData) {\n var initData = ArrayBuffer.isView(event.initData) ? e... | [
"0.6675035",
"0.6479107",
"0.64392054",
"0.6429872",
"0.6142637",
"0.6102399",
"0.59711486",
"0.59674567",
"0.5964464",
"0.5946079",
"0.59298646",
"0.59168935",
"0.5894774",
"0.5892875",
"0.5872369",
"0.5844633",
"0.58258116",
"0.5786885",
"0.57783765",
"0.573211",
"0.5716495... | 0.0 | -1 |
AsyncMode should be deprecated | function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;// Using console['warn'] to evade Babel and ESLint
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setAsync(){\n this.async = true;\n }",
"function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactI... | [
"0.71772456",
"0.71477026",
"0.71477026",
"0.71477026",
"0.6901749",
"0.6824169",
"0.6809441",
"0.6809441",
"0.6793582",
"0.6785743",
"0.67846984",
"0.6757779",
"0.6750946",
"0.6745032",
"0.6745032",
"0.67303115",
"0.67276573",
"0.67276573",
"0.67276573",
"0.67276573",
"0.672... | 0.707457 | 4 |
Fuse.js v6.4.6 Lightweight fuzzysearch ( Copyright (c) 2021 Kiro Risk ( All Rights Reserved. Apache Software License 2.0 | function isArray(value){return !Array.isArray?getTag(value)==='[object Array]':Array.isArray(value);}// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Search(case_sentences_for_indexing) {\n\n //Configuring options for Fuse library\n var fuse_options = {\n shouldSort: true,\n includeScore: false,\n threshold: 0.6,\n location: 0,\n distance: 100,\n maxPatternLength: 200,\n minMatchCharLength: 1,\n keys: [\n \"title\"\n ]... | [
"0.7111104",
"0.7028673",
"0.6932236",
"0.6343106",
"0.6279555",
"0.62743896",
"0.62261534",
"0.61784285",
"0.6148284",
"0.6139647",
"0.60413206",
"0.6003875",
"0.59473157",
"0.588265",
"0.58691305",
"0.58348745",
"0.58090854",
"0.5808489",
"0.57574004",
"0.5756608",
"0.57468... | 0.0 | -1 |
Fieldlength norm: the shorter the field, the higher the weight. Set to 3 decimals to reduce index size. | function norm(mantissa=3){const cache=new Map();const m=Math.pow(10,mantissa);return {get(value){const numTokens=value.match(SPACE).length;if(cache.has(numTokens)){return cache.get(numTokens);}const norm=1/Math.sqrt(numTokens);// In place of `toFixed(mantissa)`, for faster computation
const n=parseFloat(Math.round(norm*m)/m);cache.set(numTokens,n);return n;},clear(){cache.clear();}};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"normalize()\r\n {\r\n var len = this.mag();\r\n if (len !== 0) \r\n this.mult(1 / len);\r\n\r\n return this;\r\n }",
"static setNormalizeV3(xyz) {\nvar len;\n//--------------\nlen = this.lengthV3(xyz);\nif (1e-5 <= len) {\nreturn this.setInverseScaleV3(xyz, len);\n} else {\n... | [
"0.5737642",
"0.5704147",
"0.56574667",
"0.5433025",
"0.5389228",
"0.5388174",
"0.5370179",
"0.5344227",
"0.5285347",
"0.5268295",
"0.5242519",
"0.52415156",
"0.5190834",
"0.50982887",
"0.505091",
"0.5042904",
"0.50176996",
"0.5002481",
"0.49810243",
"0.49715373",
"0.49558353... | 0.5525789 | 3 |
Adds a doc to the end of the index | add(doc){const idx=this.size();if(isString(doc)){this._addString(doc,idx);}else {this._addObject(doc,idx);}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"add(doc) {\n const idx = this.size()\n\n if (isString(doc)) {\n this._addString(doc, idx)\n } else {\n this._addObject(doc, idx)\n }\n }",
"addDocument (doc) {\n if (this._isOptimized) {\n throw new Error('Cannot add a document to an already-optimized index.');\n }\n\n if (ty... | [
"0.69740826",
"0.6592267",
"0.65395325",
"0.637757",
"0.6045703",
"0.59954685",
"0.58496463",
"0.58385247",
"0.5745251",
"0.56949633",
"0.5565368",
"0.5544018",
"0.5492362",
"0.5484123",
"0.54721063",
"0.5462008",
"0.5460607",
"0.54494643",
"0.5439872",
"0.5392522",
"0.534081... | 0.7230582 | 0 |
Removes the doc at the specified index of the index | removeAt(idx){this.records.splice(idx,1);// Change ref index of every subsquent doc
for(let i=idx,len=this.size();i<len;i+=1){this.records[i].i-=1;}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"removeAt(idx) {\n this.records.splice(idx, 1)\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1\n }\n }",
"deleteAt(index) {}",
"remove(idx) { \n\n }",
"removeAt(idx) {\n\n }",
"remove(index){\n this.... | [
"0.7543374",
"0.7021943",
"0.67737806",
"0.66889304",
"0.6623647",
"0.65367955",
"0.6502412",
"0.64897454",
"0.6451316",
"0.64288545",
"0.6364492",
"0.6363058",
"0.63563263",
"0.63563263",
"0.63545173",
"0.63478565",
"0.63455224",
"0.63081074",
"0.62757295",
"0.62371767",
"0.... | 0.6567226 | 5 |
Return a 2D array representation of the query, for simpler parsing. Example: "^core go$ | rb$ | py$ xy$" => [["^core", "go$"], ["rb$"], ["py$", "xy$"]] | function parseQuery(pattern,options={}){return pattern.split(OR_TOKEN).map(item=>{let query=item.trim().split(SPACE_RE).filter(item=>item&&!!item.trim());let results=[];for(let i=0,len=query.length;i<len;i+=1){const queryItem=query[i];// 1. Handle multiple query match (i.e, once that are quoted, like `"hello world"`)
let found=false;let idx=-1;while(!found&&++idx<searchersLen){const searcher=searchers[idx];let token=searcher.isMultiMatch(queryItem);if(token){results.push(new searcher(token,options));found=true;}}if(found){continue;}// 2. Handle single query matches (i.e, once that are *not* quoted)
idx=-1;while(++idx<searchersLen){const searcher=searchers[idx];let token=searcher.isSingleMatch(queryItem);if(token){results.push(new searcher(token,options));break;}}}return results;});}// These extended matchers can return an array of matches, as opposed | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildArray(formula) {\n // replace true and false with 0 and 1 for parsing\n formula = formula.replace(/false/g, \"0\").replace(/true/g, \"1\");\n // remove spaces and convert to array\n return formula.replace(/\\s/g, '').split('');\n}",
"function split(query) {\n words = query.match(/\"([^\"... | [
"0.6246973",
"0.5986145",
"0.5838154",
"0.5799794",
"0.5768537",
"0.5716359",
"0.5710942",
"0.5570982",
"0.5500174",
"0.54699564",
"0.54127645",
"0.5399325",
"0.5390253",
"0.53763956",
"0.53761923",
"0.5363575",
"0.53631985",
"0.5362661",
"0.5349367",
"0.53287226",
"0.5326596... | 0.51239157 | 33 |
When `auto` is `true`, the parse function will infer and initialize and add the appropriate `Searcher` instance | function parse(query,options,{auto=true}={}){const next=query=>{let keys=Object.keys(query);const isQueryPath=isPath(query);if(!isQueryPath&&keys.length>1&&!isExpression(query)){return next(convertToExplicit(query));}if(isLeaf(query)){const key=isQueryPath?query[KeyType.PATH]:keys[0];const pattern=isQueryPath?query[KeyType.PATTERN]:query[key];if(!isString(pattern)){throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));}const obj={keyId:createKeyId(key),pattern};if(auto){obj.searcher=createSearcher(pattern,options);}return obj;}let node={children:[],operator:keys[0]};keys.forEach(key=>{const value=query[key];if(isArray(value)){value.forEach(item=>{node.children.push(next(item));});}});return node;};if(!isExpression(query)){query=convertToExplicit(query);}return next(query);}// Practical scoring function | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"auto( params ) { \n\n // Extract any feature data.\n this.$set(this, 'sort', params.sort || this.sort || defaults.sort);\n this.$set(this, 'filter', $.extend(true, {}, this.filter, params.filter || defaults.filter));\n this.$set(this, 'paging', $.extend(true, {}, this.paging, params.pag... | [
"0.52827394",
"0.52186435",
"0.47342736",
"0.47016174",
"0.46753716",
"0.4663182",
"0.46393877",
"0.4621972",
"0.45772058",
"0.4572989",
"0.4549086",
"0.4536212",
"0.4518305",
"0.44799227",
"0.4456457",
"0.44356704",
"0.44144872",
"0.44088268",
"0.4389497",
"0.43890962",
"0.4... | 0.61310345 | 0 |
and applies them to the HTMLElements such as popper and arrow | function applyStyles(_ref){var state=_ref.state;Object.keys(state.elements).forEach(function(name){var style=state.styles[name]||{};var attributes=state.attributes[name]||{};var element=state.elements[name];// arrow is optional + virtual elements
if(!isHTMLElement(element)||!getNodeName(element)){return;}// Flow doesn't support to extend this property, but it's the most
// effective way to apply styles to an HTMLElement
// $FlowFixMe[cannot-write]
Object.assign(element.style,style);Object.keys(attributes).forEach(function(name){var value=attributes[name];if(value===false){element.removeAttribute(name);}else {element.setAttribute(name,value===true?'':value);}});});} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }",
"function g(e){if(Q.popperInstance?(y()||Q.popperInstance.sc... | [
"0.7524573",
"0.6590567",
"0.636286",
"0.6360291",
"0.619212",
"0.6143126",
"0.6093509",
"0.6093509",
"0.60842144",
"0.6079199",
"0.6050638",
"0.6050638",
"0.6050638",
"0.6050638",
"0.6050638",
"0.6050638",
"0.60370487",
"0.5937358",
"0.58192044",
"0.58074296",
"0.5796685",
... | 0.0 | -1 |
means it doesn't take into account transforms. | function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed.
// Fixes https://github.com/popperjs/popper-core/issues/1223
var width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width;}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height;}return {x:element.offsetLeft,y:element.offsetTop,width:width,height:height};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getTransform(){return this.__transform}",
"function Transform() {}",
"function Transform() {}",
"function Transform() {}",
"function Transform() {}",
"function Transform() {}",
"static transform() {}",
"updateLocalTransform()\n {\n // empty\n }",
"get transform() {}",
"get transform(... | [
"0.6677838",
"0.6588195",
"0.6588195",
"0.6588195",
"0.6588195",
"0.6588195",
"0.65466",
"0.63946176",
"0.61519814",
"0.61519814",
"0.61519814",
"0.61519814",
"0.61512464",
"0.60736084",
"0.5992981",
"0.5992981",
"0.5987012",
"0.5987012",
"0.5964276",
"0.5938574",
"0.5910615"... | 0.0 | -1 |
return the containing block | function getContainingBlock(element){var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;var isIE=navigator.userAgent.indexOf('Trident')!==-1;if(isIE&&isHTMLElement(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
var elementCss=getComputedStyle(element);if(elementCss.position==='fixed'){return null;}}var currentNode=getParentNode(element);while(isHTMLElement(currentNode)&&['html','body'].indexOf(getNodeName(currentNode))<0){var css=getComputedStyle(currentNode);// This is non-exhaustive but covers the most common CSS properties that
// create a containing block.
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
if(css.transform!=='none'||css.perspective!=='none'||css.contain==='paint'||['transform','perspective'].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==='filter'||isFirefox&&css.filter&&css.filter!=='none'){return currentNode;}else {currentNode=currentNode.parentNode;}}return null;}// Gets the closest ancestor positioned element. Handles some edge cases, | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getContainingBlock(element) {\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\... | [
"0.6577409",
"0.6577409",
"0.6577409",
"0.6571231",
"0.65461355",
"0.65461355",
"0.65461355",
"0.6516638",
"0.6516638",
"0.65010834",
"0.64936745",
"0.64802283",
"0.6474632",
"0.64665604",
"0.64612967",
"0.6339487",
"0.633014",
"0.63266474",
"0.62810093",
"0.627958",
"0.62795... | 0.6270516 | 25 |
such as table ancestors and cross browser bugs. | function getOffsetParent(element){var window=getWindow(element);var offsetParent=getTrueOffsetParent(element);while(offsetParent&&isTableElement(offsetParent)&&getComputedStyle(offsetParent).position==='static'){offsetParent=getTrueOffsetParent(offsetParent);}if(offsetParent&&(getNodeName(offsetParent)==='html'||getNodeName(offsetParent)==='body'&&getComputedStyle(offsetParent).position==='static')){return window;}return offsetParent||getContainingBlock(element)||window;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function k(e,t){return c(e,\"table\")&&c(11!==t.nodeType?t:t.firstChild,\"tr\")&&me(\">tbody\",e)[0]||e}",
"function gtGrdObj(tdObj) { try { var ele = tdObj.parentNode.parentNode.parentNode; if (ele.tagName.toLowerCase() == \"tbody\") le = ele.parentNode; return ele; } catch (e) { return null; } }",
"function ... | [
"0.6445565",
"0.6040161",
"0.58393914",
"0.5824688",
"0.5816572",
"0.5804739",
"0.58030534",
"0.572371",
"0.56821644",
"0.5664005",
"0.55925024",
"0.55506366",
"0.5527616",
"0.5502319",
"0.5501955",
"0.5496449",
"0.54459476",
"0.5415138",
"0.53849775",
"0.53701067",
"0.536003... | 0.5542538 | 12 |
Round the offsets to the nearest suitable subpixel based on the DPR. Zooming can change the DPR, but it seems to report a value that will cleanly divide the values into the appropriate subpixels. | function roundOffsetsByDPR(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return {x:round(round(x*dpr)/dpr)||0,y:round(round(y*dpr)/dpr)||0};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n }",
"function roundOffsetsByDPR(_ref) {\n... | [
"0.75932765",
"0.75747055",
"0.7506673",
"0.7486163",
"0.74772507",
"0.74772507",
"0.74772507",
"0.74772507",
"0.74772507",
"0.7454967",
"0.7454967",
"0.7408192",
"0.73674977",
"0.73082155",
"0.73082155",
"0.73082155",
"0.7266812",
"0.7249476",
"0.7249476",
"0.7249476",
"0.72... | 0.766062 | 1 |
of the `` and `` rect bounds if horizontally scrollable | function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX(element);var y=-winScroll.scrollTop;if(getComputedStyle(body||html).direction==='rtl'){x+=max(html.clientWidth,body?body.clientWidth:0)-width;}return {width:width,height:height,x:x,y:y};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"bounds() {\n const _bounds = new HRect(this.rect);\n _bounds.offsetTo(0, 0);\n return _bounds;\n }",
"function W(){var t=l.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||l[e]:t.height||l[e]}",
"function BoundingBoxRect() { }",
"_calculateBounds() {\n ... | [
"0.6850526",
"0.66271067",
"0.66202945",
"0.6515266",
"0.6497182",
"0.6487071",
"0.64457697",
"0.64024943",
"0.6396382",
"0.6355395",
"0.6345145",
"0.63372374",
"0.6321982",
"0.6319057",
"0.62603396",
"0.62603396",
"0.62572896",
"0.62285376",
"0.6216895",
"0.62146056",
"0.620... | 0.0 | -1 |
given a DOM element, return the list of all scroll parents, up the list of ancesors until we get to the top window object. This list is what we attach scroll listeners to, because if any of these parent elements scroll, we'll need to recalculate the reference element's position. | function listScrollParents(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow(scrollParent);var target=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent;var updatedList=list.concat(target);return isBody?updatedList:// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
updatedList.concat(listScrollParents(getParentNode(target)));} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listScrollParents$1(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent$1(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow$1(scrollParent);var target=isBody?[win].con... | [
"0.72062486",
"0.7164777",
"0.7157121",
"0.7063339",
"0.7063339",
"0.6961722",
"0.6961722",
"0.6961722",
"0.69084173",
"0.6873973",
"0.6873973",
"0.6873973",
"0.6873973",
"0.6841395",
"0.6841395",
"0.6841395",
"0.68379384",
"0.68379384",
"0.68379384",
"0.68379384",
"0.6837938... | 0.7336192 | 1 |
clipping (or hiding) overflowing elements with a position different from `initial` | function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
return clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function resetHiddenItemSize() {\n TweenLite.to(_element, 0, {scale: 1});\n }",
"revertPosition() {\n const context = this.context,\n original = context.originalPosition; // revert to correct location\n\n if (original.next) {\n const isNoop = original.next && original.next.previousSib... | [
"0.53918445",
"0.5333649",
"0.52749443",
"0.52349114",
"0.5218984",
"0.5191169",
"0.517269",
"0.51595616",
"0.51427627",
"0.5067348",
"0.5044781",
"0.5034173",
"0.5027323",
"0.50227445",
"0.5005332",
"0.4976861",
"0.49688527",
"0.4966697",
"0.49623466",
"0.49615896",
"0.49284... | 0.5042726 | 11 |
Composite means it takes into account transforms as well as layout. | function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078
isScrollParent(documentElement)){scroll=getNodeScroll(offsetParent);}if(isHTMLElement(offsetParent)){offsets=getBoundingClientRect(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function composite(src, ops) {\n console.log('composite operations');\n console.log(ops);\n\n var mat = Matrix3x3.identity();\n for(var i=0;i<ops.length;i++) {\n var m = Matrix3x3.identity();\n var params = ops[i];\n switch( params[0] ) {\n ... | [
"0.65486985",
"0.6166722",
"0.6166722",
"0.6010471",
"0.59579456",
"0.58461636",
"0.5741393",
"0.5688997",
"0.56546265",
"0.56008905",
"0.556109",
"0.5505642",
"0.5482712",
"0.5294749",
"0.5281335",
"0.52623343",
"0.5191511",
"0.50583845",
"0.5051368",
"0.50366163",
"0.503661... | 0.0 | -1 |
On visiting object, check for its dependencies and visit them recursively | function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function traverse(object, ancestors, visitor) {\n var key, child, tempList;\n\n visitor.call(null, object);\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && chi... | [
"0.67661756",
"0.650305",
"0.65017045",
"0.6474099",
"0.64717424",
"0.6372098",
"0.6370522",
"0.6334102",
"0.6309952",
"0.6289112",
"0.6213317",
"0.6195653",
"0.61104006",
"0.6004782",
"0.60006046",
"0.5977171",
"0.5937908",
"0.5914214",
"0.5798761",
"0.5770098",
"0.576878",
... | 0.0 | -1 |
Modifiers have the ability to execute arbitrary code before the first update cycle runs. They will be executed in the same order as the update cycle. This is useful when a modifier adds some persistent data that other modifiers need to use, but the modifier is run after the dependent one. | function runModifierEffects(){state.orderedModifiers.forEach(function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options=_ref3$options===void 0?{}:_ref3$options,effect=_ref3.effect;if(typeof effect==='function'){var cleanupFn=effect({state:state,name:name,instance:instance,options:options});var noopFn=function noopFn(){};effectCleanupFns.push(cleanupFn||noopFn);}});} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n if (typeof effect === 'functi... | [
"0.6597659",
"0.6554965",
"0.65514743",
"0.65514743",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
... | 0.68994534 | 2 |
Note: We don't need `envHasBigInt64Array` in fde es6/index.js | function equal$1(a,b){// START: fast-deep-equal es6/index.js 3.1.1
if(a===b)return true;if(a&&b&&typeof a=='object'&&typeof b=='object'){if(a.constructor!==b.constructor)return false;var length,i,keys;if(Array.isArray(a)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(!equal$1(a[i],b[i]))return false;return true;}// START: Modifications:
// 1. Extra `has<Type> &&` helpers in initial condition allow es6 code
// to co-exist with es5.
// 2. Replace `for of` with es5 compliant iteration using `for`.
// Basically, take:
//
// ```js
// for (i of a.entries())
// if (!b.has(i[0])) return false;
// ```
//
// ... and convert to:
//
// ```js
// it = a.entries();
// while (!(i = it.next()).done)
// if (!b.has(i.value[0])) return false;
// ```
//
// **Note**: `i` access switches to `i.value`.
var it;if(hasMap&&a instanceof Map&&b instanceof Map){if(a.size!==b.size)return false;it=a.entries();while(!(i=it.next()).done)if(!b.has(i.value[0]))return false;it=a.entries();while(!(i=it.next()).done)if(!equal$1(i.value[1],b.get(i.value[0])))return false;return true;}if(hasSet&&a instanceof Set&&b instanceof Set){if(a.size!==b.size)return false;it=a.entries();while(!(i=it.next()).done)if(!b.has(i.value[0]))return false;return true;}// END: Modifications
if(hasArrayBuffer&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(b)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(a[i]!==b[i])return false;return true;}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys=Object.keys(a);length=keys.length;if(length!==Object.keys(b).length)return false;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return false;// END: fast-deep-equal
// START: react-fast-compare
// custom handling for DOM elements
if(hasElementType&&a instanceof Element)return false;// custom handling for React/Preact
for(i=length;i--!==0;){if((keys[i]==='_owner'||keys[i]==='__v'||keys[i]==='__o')&&a.$$typeof){// React-specific: avoid traversing React elements' _owner
// Preact-specific: avoid traversing Preact elements' __v and __o
// __v = $_original / $_vnode
// __o = $_owner
// These properties contain circular references and are not needed when
// comparing the actual elements (and not their owners)
// .$$typeof and ._store on just reasonable markers of elements
continue;}// all other properties should be traversed as usual
if(!equal$1(a[keys[i]],b[keys[i]]))return false;}// END: react-fast-compare
// START: fast-deep-equal
return true;}return a!==a&&b!==b;}// end fast-deep-equal | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function v64(v65,v66,v67,v68,v69) {\n const v70 = ArrayBuffer(split);\n // v70 = .unknown\n}",
"function h(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}",
"function makeEnv(env) {\n env.getTotalMemory = function () { return mdle['TOTAL_MEMORY']; };\n env.abort = function () { process.exit(-... | [
"0.59258646",
"0.54551214",
"0.53476554",
"0.5341588",
"0.53322065",
"0.53000367",
"0.52759856",
"0.5270142",
"0.51673603",
"0.5133303",
"0.5119744",
"0.50289637",
"0.5027842",
"0.5000861",
"0.49966353",
"0.4969807",
"0.49406448",
"0.49262202",
"0.4903299",
"0.49010926",
"0.4... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear(){this.__data__=[];this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",... | 0.7236393 | 18 |
Removes all keyvalue entries from the stack. | function stackClear(){this.__data__=new ListCache();this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear () {\n this._dict = {}\n this._stack = [this._dict]\n }",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear() {\n\t this.__... | [
"0.63577217",
"0.63291264",
"0.63291264",
"0.63291264",
"0.62734073",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006"... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the map. | function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map$1||ListCache)(),'string':new Hash()};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7589402",
"0.70686156",
"0.673569",
"0.6651485",
"0.6528891",
"0.6266802",
"0.6257602",
"0.6257602",
"0.6257602",
"0.6170819",
"0.6170819",
"0.6170819",
"0.616584",
"0.6152476",
"0.6147431",
"0.6147431",
"0.6147431",
"0.6147431",
"0.6147431",
"0.6147431",
"0.6147431",
"0... | 0.5825702 | 55 |
Deeply get a value from an object via its path. | function getIn(obj,key,def,p){if(p===void 0){p=0;}var path=toPath(key);while(obj&&p<path.length){obj=obj[path[p++]];}return obj===undefined?def:obj;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }",
"function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i+... | [
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.7947024",
"0.7807266",
"0.77647674",
"0.7747176",
"0.7579353",
"0.75734",
"0.7538337",
"0.7516273",
"0.7497333",
"0.74887854",
"0.74285764",
"0.73955286",
... | 0.0 | -1 |
Deeply set a value from in object via it's path. If the value at `path` has changed, return a shallow copy of obj with `value` set at `path`. If `value` has not changed, return the original `obj`. Existing objects / arrays along `path` are also shallow copied. Sibling objects along path retain the same internal js reference. Since new objects / arrays are only created along `path`, we can test if anything changed in a nested structure by comparing the object's reference in the old and new object, similar to how russian doll cache invalidation works. In earlier versions of this function, which used cloneDeep, there were issues whereby settings a nested value would mutate the parent instead of creating a new object. `clone` avoids that bug making a shallow copy of the objects along the update path so no object is mutated in place. Before changing this function, please read through the following discussions. | function setIn(obj,path,value){var res=clone(obj);// this keeps inheritance when obj is a class
var resVal=res;var i=0;var pathArray=toPath(path);for(;i<pathArray.length-1;i++){var currentPath=pathArray[i];var currentObj=getIn(obj,pathArray.slice(0,i+1));if(currentObj&&(isObject$2(currentObj)||Array.isArray(currentObj))){resVal=resVal[currentPath]=clone(currentObj);}else {var nextPath=pathArray[i+1];resVal=resVal[currentPath]=isInteger(nextPath)&&Number(nextPath)>=0?[]:{};}}// Return original object if new value is the same as current
if((i===0?obj:resVal)[pathArray[i]]===value){return obj;}if(value===undefined){delete resVal[pathArray[i]];}else {resVal[pathArray[i]]=value;}// If the path array has a single element, the loop did not run.
// Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.
if(i===0&&value===undefined){delete res[pathArray[i]];}return res;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setIn(obj, path, value) {\n var res = clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1... | [
"0.75242656",
"0.7520379",
"0.7399823",
"0.7399823",
"0.7399823",
"0.73113424",
"0.71814436",
"0.67938864",
"0.67573845",
"0.67254883",
"0.67254883",
"0.66972333",
"0.66972333",
"0.64113533",
"0.63646054",
"0.63281685",
"0.632334",
"0.63189703",
"0.6268811",
"0.6060656",
"0.6... | 0.7266066 | 6 |
Recursively a set the same value for all keys and arrays nested object, cloning | function setNestedObjectValues(object,value,visited,response){if(visited===void 0){visited=new WeakMap();}if(response===void 0){response={};}for(var _i=0,_Object$keys=Object.keys(object);_i<_Object$keys.length;_i++){var k=_Object$keys[_i];var val=object[k];if(isObject$2(val)){if(!visited.get(val)){visited.set(val,true);// In order to keep array values consistent for both dot path and
// bracket syntax, we need to check if this is an array so that
// this will output { friends: [true] } and not { friends: { "0": true } }
response[k]=Array.isArray(val)?[]:{};setNestedObjectValues(val,value,visited,response[k]);}}else {response[k]=value;}}return response;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setObjectWithNestedKey(obj, key, value) {\n\n if(key.indexOf(\".\")) {\n // Need to deal with arrays\n var keys = key.split(\".\");\n var lastHash = keys.pop();\n for(var i = 0; i < keys.length; i++) {\n let keyPointer = keys[i];\n\n ... | [
"0.63569784",
"0.6188108",
"0.61728525",
"0.6083384",
"0.6081756",
"0.6077687",
"0.60632044",
"0.60546595",
"0.60530597",
"0.5991888",
"0.598843",
"0.59701836",
"0.5966591",
"0.5966591",
"0.5966591",
"0.5966591",
"0.5966591",
"0.59539026",
"0.5939421",
"0.5895184",
"0.5834293... | 0.6219428 | 1 |
Validate a yup schema. | function validateYupSchema(values,schema,sync,context){if(sync===void 0){sync=false;}if(context===void 0){context={};}var validateData=prepareDataForValidation(values);return schema[sync?'validateSync':'validate'](validateData,{abortEarly:false,context:context});} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validationSchema() {\n return {\n name: Yup.string().required(true),\n };\n}",
"function validateYupSchema(values, schema, sync, context) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (context === void 0) {\n context = {};\n }\n\n var validateData = prepareDataForValidation(value... | [
"0.708026",
"0.6426762",
"0.6426762",
"0.6426762",
"0.6426762",
"0.6426762",
"0.6426762",
"0.6037371",
"0.59873",
"0.5872371",
"0.5733999",
"0.5728448",
"0.56688386",
"0.5661867",
"0.56045157",
"0.553236",
"0.549124",
"0.54804677",
"0.54655415",
"0.5416495",
"0.54163957",
"... | 0.71655756 | 0 |
deepmerge array merging algorithm | function arrayMerge(target,source,options){var destination=target.slice();source.forEach(function merge(e,i){if(typeof destination[i]==='undefined'){var cloneRequested=options.clone!==false;var shouldClone=cloneRequested&&options.isMergeableObject(e);destination[i]=shouldClone?deepmerge_1(Array.isArray(e)?[]:{},e,options):e;}else if(options.isMergeableObject(e)){destination[i]=deepmerge_1(target[i],e,options);}else if(target.indexOf(e)===-1){destination.push(e);}});return destination;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mergeArrays(arr1, arr2) {\n \n}",
"merge(tree) {\n let arr = tree.toArray();\n for(let i=0; i<arr.length; i++) {\n this.add(arr[i]);\n }\n }",
"function mergeSort(array) {\r\n //まずアレイを一つずつ要素が入った子アレイを持つ親アレイにする。\r\n const decomposedArray = [];\r\n for (let ele of array) {\r\n dec... | [
"0.6493913",
"0.64938843",
"0.64637727",
"0.6422636",
"0.63669133",
"0.6352357",
"0.633785",
"0.63314736",
"0.6298962",
"0.62649876",
"0.622593",
"0.622237",
"0.6176762",
"0.6166889",
"0.614755",
"0.6132026",
"0.61226326",
"0.6093744",
"0.60814524",
"0.60814524",
"0.60814524"... | 0.6866639 | 0 |
Return multi select values based on an array of options | function getSelectedValues(options){return Array.from(options).filter(function(el){return el.selected;}).map(function(el){return el.value;});} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (el) {\n return el.value;\n });\n}",
"function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (... | [
"0.7157802",
"0.7157802",
"0.7157802",
"0.7157802",
"0.7157802",
"0.7157802",
"0.68796736",
"0.68796736",
"0.68406266",
"0.68406266",
"0.68306524",
"0.6830643",
"0.6739273",
"0.669184",
"0.6674298",
"0.6674298",
"0.66361904",
"0.6542995",
"0.6434029",
"0.6427701",
"0.64018255... | 0.749405 | 0 |
Return the next value for a checkbox | function getValueForCheckbox(currentValue,checked,valueProp){// If the current value was a boolean, return a boolean
if(typeof currentValue==='boolean'){return Boolean(checked);}// If the currentValue was not a boolean we want to return an array
var currentArrayOfValues=[];var isValueInArray=false;var index=-1;if(!Array.isArray(currentValue)){// eslint-disable-next-line eqeqeq
if(!valueProp||valueProp=='true'||valueProp=='false'){return Boolean(checked);}}else {// If the current value is already an array, use it
currentArrayOfValues=currentValue;index=currentValue.indexOf(valueProp);isValueInArray=index>=0;}// If the checkbox was checked and the value is not already present in the aray we want to add the new value to the array of values
if(checked&&valueProp&&!isValueInArray){return currentArrayOfValues.concat(valueProp);}// If the checkbox was unchecked and the value is not in the array, simply return the already existing array of values
if(!isValueInArray){return currentArrayOfValues;}// If the checkbox was unchecked and the value is in the array, remove the value and return the array
return currentArrayOfValues.slice(0,index).concat(currentArrayOfValues.slice(index+1));}// React currently throws a warning when using useLayoutEffect on the server. | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"nextValue() {\n let value = this.getContext().changeValue(NEXT_VALUE);\n\n if (value === null) return value;\n this.value = value;\n\n return true;\n }",
"function next() {\n setValue(()=>{\n return checkValue(value+1)\n })\n }",
"next() {\n ... | [
"0.66381294",
"0.64310277",
"0.6164489",
"0.6139948",
"0.60716945",
"0.6049012",
"0.5960204",
"0.59186673",
"0.5884741",
"0.5867915",
"0.58380634",
"0.5821627",
"0.58103305",
"0.5798497",
"0.57925844",
"0.57908046",
"0.57835233",
"0.5776785",
"0.57597613",
"0.57554394",
"0.57... | 0.0 | -1 |
Connect any component to Formik context, and inject as a prop called `formik`; | function connect(Comp){var C=function C(props){return/*#__PURE__*/react.createElement(FormikConsumer,null,function(formik){!!!formik?warning(false,"Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> component. Component name: "+Comp.name):void 0;return/*#__PURE__*/react.createElement(Comp,Object.assign({},props,{formik:formik}));});};var componentDisplayName=Comp.displayName||Comp.name||Comp.constructor&&Comp.constructor.name||'Component';// Assign Comp to C.WrappedComponent so we can access the inner component in tests
// For example, <Field.WrappedComponent /> gets us <FieldInner/>
C.WrappedComponent=Comp;C.displayName="FormikConnect("+componentDisplayName+")";return hoistNonReactStatics_cjs(C,Comp// cast type to ComponentClass (even if SFC)
);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n ... | [
"0.713233",
"0.71126294",
"0.71036565",
"0.7081676",
"0.7058521",
"0.7058521",
"0.619911",
"0.6107712",
"0.6107712",
"0.6107712",
"0.598304",
"0.5802057",
"0.5759564",
"0.5643108",
"0.5533933",
"0.53613365",
"0.5301838",
"0.52787024",
"0.52782476",
"0.52213615",
"0.52167946",... | 0.61819106 | 7 |
! Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function WSAPI() {\n }",
"private internal function m248() {}",
"private public function m246() {}",
"createObjectContext2() {\n console.log('deprecated')\n return C.extension\n }",
"supportsPlatform() {\n return true;\n }",
"function T7(){return typeof window>\"u\"&&(self.window=self),functio... | [
"0.5718999",
"0.5127648",
"0.50340307",
"0.4986635",
"0.4893337",
"0.48703453",
"0.48676834",
"0.48674643",
"0.4854622",
"0.48420036",
"0.48402965",
"0.48402965",
"0.48220244",
"0.47662336",
"0.4719181",
"0.4710195",
"0.4675956",
"0.4675956",
"0.46712086",
"0.46453077",
"0.46... | 0.0 | -1 |
by calls to these methods by a Babel plugin. In PROD (or in packages without access to React internals), they are left as they are instead. | function warn(format){{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}printWarning('warn',format,args);}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function resetIfUsingPreact() {\n if (window.preact !== undefined) {\n jsxLoader.compiler.pragma = 'React.createElement';\n jsxLoader.compiler.pragmaFrag = 'React.Fragment';\n }\n }",
"react() {\n return;\n }",
"function globalizeReact() {\n ... | [
"0.6231517",
"0.5987249",
"0.5949213",
"0.57122",
"0.57122",
"0.5705207",
"0.56892043",
"0.56892043",
"0.55873036",
"0.5555952",
"0.5543145",
"0.5543145",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0... | 0.0 | -1 |
Trust the developer to only use possibleRegistrationNames in true | function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies);registerDirectEvent(registrationName+'Capture',dependencies);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"allow() {\n this._isAllowed = true;\n }",
"static allowOnlyUsers(ctx) {\n if( ctx.clientIdentity.getMSPID() === USERS_MSP_ID )\n return\n throw new Error(PERMISSION_ERROR_MESSAGE)\n }",
"get Restricted() {}",
"static allowOnlyRegistrar(ctx) {\n if( ctx.clientId... | [
"0.6821976",
"0.6397543",
"0.63840806",
"0.62601405",
"0.6199454",
"0.6155516",
"0.6138417",
"0.60157514",
"0.59850806",
"0.5874411",
"0.5874405",
"0.5854616",
"0.5825604",
"0.58157027",
"0.5803607",
"0.578216",
"0.5779587",
"0.575128",
"0.57488424",
"0.57419086",
"0.5734621"... | 0.0 | -1 |
Get the value for a property on a node. Only used in DEV for SSR validation. The "expected" argument is used as a hint of what the expected value is. Some properties have multiple equivalent values. | function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else {if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if
// the hydration is successful of a javascript: URL, we
// still want to warn on the client.
sanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it
// for the error message.
return node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is
// the fact that we have it is the same as the expected.
return expected;}// Even if this property uses a namespace we use getAttribute
// because we assume its namespaced name is the same as our config.
// To use getAttributeNS we need the local name which we don't have
// in our config atm.
stringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else {return stringValue;}}}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if... | [
"0.8159446",
"0.8159446",
"0.8144443",
"0.8068438",
"0.8068438",
"0.80646837",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
... | 0.7925386 | 37 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.