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
Transforms a number to a locale string based on a style and a format.
function formatNumberToLocaleString(value,pattern,locale,groupSymbol,decimalSymbol,digitsInfo,isPercent){if(isPercent===void 0){isPercent=false;}var formattedText='';var isZero=false;if(!isFinite(value)){formattedText=getLocaleNumberSymbol(locale,NumberSymbol.Infinity);}else{var parsedNumber=parseNumber(value);if(isPer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toLocaleString() {\n let m = this\n m.forEach((val) => {\n let obj = parse(val)\n if (obj.num === null) {\n return\n }\n let num = obj.num.toLocaleString()\n // support ordinal ending, too\n if (val.has('#Ordinal')) {\n let str = format(obj, 'Or...
[ "0.67522806", "0.67301846", "0.66744417", "0.6565295", "0.65246713", "0.64913726", "0.64913726", "0.6467183", "0.6461662", "0.645189", "0.63980275", "0.63752466", "0.6247026", "0.62466335", "0.62301797", "0.62202096", "0.61983883", "0.61559033", "0.6148547", "0.61369616", "0....
0.66556704
3
Parses a number. Significant bits of this parse algorithm came from
function parseNumber(num){var numStr=Math.abs(num)+'';var exponent=0,digits,integerLen;var i,j,zeros;// Decimal point? if((integerLen=numStr.indexOf(DECIMAL_SEP))>-1){numStr=numStr.replace(DECIMAL_SEP,'');}// Exponential form? if((i=numStr.search(/e/i))>0){// Work out the exponent. if(integerLen<0)integerLen=i;integerL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "readNumber(startsWithDot) {\n let start = this.state.pos;\n let isFloat = false;\n let octal = this.input.charCodeAt(this.state.pos) === 48;\n if (!startsWithDot && this.readNumber_int(10) === null) this.raise(start, \"Invalid number\");\n\n let next = this.input.charCodeAt(this.state.pos);\n if ...
[ "0.6968681", "0.688088", "0.6650767", "0.6635103", "0.6583936", "0.6508123", "0.6484148", "0.6484148", "0.6484148", "0.6484148", "0.64791167", "0.64726275", "0.64726275", "0.64726275", "0.64726275", "0.6465291", "0.64535147", "0.6429537", "0.6429537", "0.6429537", "0.6429537"...
0.6492382
6
Round the parsed number to the specified number of decimal places This function changes the parsedNumber inplace
function roundNumber(parsedNumber,minFrac,maxFrac){if(minFrac>maxFrac){throw new Error("The minimum number of digits after fraction ("+minFrac+") is higher than the maximum ("+maxFrac+").");}var digits=parsedNumber.digits;var fractionLen=digits.length-parsedNumber.integerLen;var fractionSize=Math.min(Math.max(minFrac,f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundNum(num){\n return Math.round(num * 10) / 10;\n }", "function roundNumber(v) {\n\treturn parseFloat(parseFloat(v).toFixed(2));\n}", "function RoundNumber (number, decimal){\n\tvar retval = Math.round(Math.pow(10, decimal) * number)/ Math.pow(10, d...
[ "0.6702506", "0.661", "0.6592903", "0.6590989", "0.6589504", "0.657368", "0.65431815", "0.65309024", "0.65151554", "0.6511743", "0.6511145", "0.65035015", "0.64142853", "0.640222", "0.6395694", "0.6387497", "0.6378586", "0.63685894", "0.63351995", "0.63248044", "0.63248044", ...
0.6452229
12
Returns the plural category for a given value. "=value" when the case exists, the plural category otherwise
function getPluralCategory(value,cases,ngLocalization,locale){var key="="+value;if(cases.indexOf(key)>-1){return key;}key=ngLocalization.getPluralCategory(value,locale);if(cases.indexOf(key)>-1){return key;}if(cases.indexOf('other')>-1){return'other';}throw new Error("No plural message found for value \""+value+"\"");}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPluralCategory(value, cases, ngLocalization, locale) {\n var key = \"=\".concat(value);\n\n if (cases.indexOf(key) > -1) {\n return key;\n }\n\n key = ngLocalization.getPluralCategory(value, locale);\n\n if (cases.indexOf(key) > -1) {\n return key;\n...
[ "0.7782675", "0.7757186", "0.7757186", "0.7757186", "0.7757186", "0.7730418", "0.7730418", "0.7730418", "0.7730418", "0.7730418", "0.7728643", "0.7723893", "0.7707399", "0.6796397", "0.6796397", "0.6296372", "0.6245602", "0.6245602", "0.6245602", "0.6245602", "0.6245602", "...
0.77830607
0
Returns the plural case based on the locale
function getPluralCase(locale,nLike){// TODO(vicb): lazy compute if(typeof nLike==='string'){nLike=parseInt(nLike,10);}var n=nLike;var nDecimal=n.toString().replace(/^[^.]*\.?/,'');var i=Math.floor(Math.abs(n));var v=nDecimal.length;var f=parseInt(nDecimal,10);var t=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,''),10...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocalePluralCase(locale){var data=findLocaleData(locale);return data[18/* PluralCase */];}", "function getLocalePluralCase(locale) {\n var data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n }", "function getLocalePluralCase(locale) {\n const data = fin...
[ "0.8500964", "0.8192976", "0.8064144", "0.8064144", "0.8064144", "0.8064144", "0.8064144", "0.8064144", "0.79957676", "0.7795642", "0.7438673", "0.72954845", "0.7277948", "0.7277948", "0.7277948", "0.7277948", "0.7277948", "0.7277948", "0.71729165", "0.71729165", "0.70666814"...
0.7600969
10
Transforms a string into a number (if needed).
function strToNumber(value){// Convert strings to numbers if(typeof value==='string'&&!isNaN(Number(value)-parseFloat(value))){return Number(value);}if(typeof value!=='number'){throw new Error(value+" is not a number");}return value;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeStrToNum(str){\n return Number(str)\n}", "function stringToNum(string) {\n return parseInt(string)\n}", "function stringToNumber(str) {\n return Number(str); //converts a string to a number\n}", "function changeToNumber(myString) {\n return parseInt(myString);\n}", "function stringToNum(a...
[ "0.8229703", "0.7934655", "0.79200417", "0.79138166", "0.78699434", "0.779081", "0.77213645", "0.765737", "0.76447725", "0.7639923", "0.7638015", "0.7638015", "0.7638015", "0.7638015", "0.7638015", "0.76292986", "0.76292986", "0.76292986", "0.76292986", "0.7621869", "0.762092...
0.7550247
24
Returns whether a platform id represents a browser platform.
function isPlatformBrowser(platformId){return platformId===PLATFORM_BROWSER_ID;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPlatformBrowser(platformId) {\n return platformId === PLATFORM_BROWSER_ID;\n}", "function isPlatformBrowser(platformId) {\n return platformId === PLATFORM_BROWSER_ID;\n}", "function isPlatformBrowser(platformId) {\n return platformId === PLATFORM_BROWSER_ID;\n}", "function isPlatformBrows...
[ "0.81827325", "0.81827325", "0.81827325", "0.81827325", "0.81827325", "0.81827325", "0.81827325", "0.81827325", "0.81827325", "0.8115225", "0.8115225", "0.8022583", "0.68013674", "0.67035216", "0.664666", "0.639902", "0.6361735", "0.62697595", "0.6265921", "0.6265921", "0.625...
0.84767634
0
Returns whether a platform id represents a server platform.
function isPlatformServer(platformId){return platformId===PLATFORM_SERVER_ID;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPlatformServer(platformId) {\n return platformId === PLATFORM_SERVER_ID;\n}", "function isPlatformServer(platformId) {\n return platformId === PLATFORM_SERVER_ID;\n}", "function isPlatformServer(platformId) {\n return platformId === PLATFORM_SERVER_ID;\n}", "function isPlatformServer(plat...
[ "0.8535501", "0.8535501", "0.8535501", "0.8535501", "0.8535501", "0.8535501", "0.8535501", "0.8535501", "0.8535501", "0.84863335", "0.84863335", "0.83758587", "0.62653375", "0.6169797", "0.61689556", "0.61689556", "0.61689556", "0.61689556", "0.61689556", "0.61689556", "0.616...
0.86488354
0
Returns whether a platform id represents a web worker app platform.
function isPlatformWorkerApp(platformId){return platformId===PLATFORM_WORKER_APP_ID;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPlatformWorkerApp(platformId) {\n return platformId === PLATFORM_WORKER_APP_ID;\n}", "function isPlatformWorkerApp(platformId) {\n return platformId === PLATFORM_WORKER_APP_ID;\n}", "function isPlatformWorkerApp(platformId) {\n return platformId === PLATFORM_WORKER_APP_ID;\n}", "function ...
[ "0.79500693", "0.79500693", "0.79500693", "0.79500693", "0.79500693", "0.79500693", "0.79500693", "0.79500693", "0.79500693", "0.7889822", "0.7889822", "0.778752", "0.7523414", "0.7523414", "0.7523414", "0.7523414", "0.7523414", "0.7523414", "0.7523414", "0.7523414", "0.75234...
0.81230867
0
Returns whether a platform id represents a web worker UI platform.
function isPlatformWorkerUi(platformId){return platformId===PLATFORM_WORKER_UI_ID;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPlatformWorkerUi(platformId) {\n return platformId === PLATFORM_WORKER_UI_ID;\n}", "function isPlatformWorkerUi(platformId) {\n return platformId === PLATFORM_WORKER_UI_ID;\n}", "function isPlatformWorkerUi(platformId) {\n return platformId === PLATFORM_WORKER_UI_ID;\n}", "function isPlat...
[ "0.81975824", "0.81975824", "0.81975824", "0.81975824", "0.81975824", "0.81975824", "0.81975824", "0.81975824", "0.81975824", "0.81560063", "0.81560063", "0.80456567", "0.7233247", "0.6994771", "0.6994771", "0.6994771", "0.6994771", "0.6994771", "0.6994771", "0.6994771", "0.6...
0.8268958
0
This must be declared as a function, not a fat arrow, so that ES2015 devmode produces code that works with the static_reflector.ts in the ViewEngine compiler. In particular, `_registerDecoratorOrConstructor` assumes that the value returned here can be new'ed.
function factory(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i];}var values=props?props.apply(void 0,Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args)):{};return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ngMetadataName:name},values);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "register() {\n if (this._registered) {\n return;\n }\n\n this._registered = true;\n this._debug = !! process.env.DEBUG;\n const autoloader = this;\n\n let ManagedProxy = null;\n\n const constructor = function (...$args) {\n if (undefined !== th...
[ "0.5766071", "0.5674342", "0.55861855", "0.55143887", "0.55143887", "0.55143887", "0.55143887", "0.55143887", "0.55143887", "0.55143887", "0.55143887", "0.55143887", "0.54761815", "0.54761815", "0.54761815", "0.54761815", "0.54564553", "0.54330933", "0.54330933", "0.54330933", ...
0.54560554
17
Lazily retrieves the reference value from a forwardRef.
function resolveForwardRef(type){if(typeof type==='function'&&type.hasOwnProperty('__forward_ref__')){return type();}else{return type;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Fay$$readRef(ref,x){\n return ref.value;\n}", "get objectReferenceValue() {}", "function getValue(referance) {\n return referance && referance.isLazyValue ? referance.value : referance;\n}", "function getValue(referance) {\n return referance && referance.isLazyValue ? referance.value : referance;...
[ "0.6995646", "0.66834235", "0.6224732", "0.6224732", "0.6147595", "0.60857797", "0.6058935", "0.5903065", "0.58831793", "0.58411705", "0.5794344", "0.5786644", "0.57762164", "0.5764536", "0.5760864", "0.5741904", "0.57339656", "0.5712094", "0.5712094", "0.5712094", "0.5712094...
0.6213592
4
Determine if the argument is shaped like a Promise
function isPromise(obj){// allow any Promise/A+ compliant thenable. // It's up to the caller to ensure that obj.then conforms to the spec return!!obj&&typeof obj.then==='function';}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPromise(input){return typeof Promise!==\"undefined\"&&input instanceof Promise||input!==null&&typeof input===\"object\"&&typeof input.then===\"function\"&&typeof input.catch===\"function\"}", "function isPromise(input){return typeof Promise!==\"undefined\"&&input instanceof Promise||input!==null&&type...
[ "0.7208121", "0.7208121", "0.71709746", "0.69779503", "0.69779503", "0.68881726", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6878156", "0.6815578", "0.68023866", "0.6708669"...
0.669227
21
Compute the SHA1 of the given string see WARNING: this function has not been designed not tested with security in mind. DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.
function sha1(str){var _a,_b;var utf8=utf8Encode(str);var words32=stringToWords32(utf8,Endian.Big);var len=utf8.length*8;var w=new Array(80);var _c=Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],5),a=_c[0],b=_c[1],c=_c[2],d=_c[3],e=_c[4];words32[len>>5]|=0x...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "strSHA1(_s) {\n const _this = this;\n return _this._binb2str(\n _this._coreSHA1(\n _this._str2binb(_s),\n _s.length * _this._chrsz\n )\n );\n }", "function calcSHA1(str)\n{\n return calcSHA1Blks(str2blks_SHA1(str));\n}", "function rstr_sha1(s)\n{\n return binb2rstr(binb_sha1...
[ "0.81237864", "0.8076504", "0.79342675", "0.7898275", "0.7811198", "0.7787037", "0.7782", "0.7728071", "0.7728071", "0.7728071", "0.7728071", "0.7728071", "0.7728071", "0.7728071", "0.76951325", "0.7639959", "0.76356316", "0.762932", "0.76279813", "0.76279813", "0.76113486", ...
0.6499501
70
Compute the fingerprint of the given string The output is 64 bit number encoded as a decimal string based on:
function fingerprint(str){var utf8=utf8Encode(str);var _a=Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([hash32(utf8,0),hash32(utf8,102072)],2),hi=_a[0],lo=_a[1];if(hi==0&&(lo==0||lo==1)){hi=hi^0x130f9bef;lo=lo^-0x6b5f56d8;}return[hi,lo];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fingerprint(str) {\n var utf8 = utf8Encode(str);\n var _ref14 = [hash32(utf8, 0), hash32(utf8, 102072)],\n hi = _ref14[0],\n lo = _ref14[1];\n\n if (hi == 0 && (lo == 0 || lo == 1)) {\n hi = hi ^ 0x130f9bef;\n lo = lo ^ -0x6b5f56d8;\n }\n\n return [...
[ "0.74866194", "0.7415867", "0.7415867", "0.73835677", "0.7369818", "0.7321698", "0.7321698", "0.7321698", "0.7297843", "0.7297843", "0.66905147", "0.66792107", "0.66310644", "0.6622548", "0.65700275", "0.65700275", "0.65700275", "0.6528279", "0.6528034", "0.652682", "0.648920...
0.7446585
1
create a mapping from the message
function SimplePlaceholderMapper(message,mapName){var _this=_super.call(this)||this;_this.mapName=mapName;_this.internalToPublic={};_this.publicToNextId={};_this.publicToInternal={};message.nodes.forEach(function(node){return node.visit(_this);});return _this;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createNameMapper(message) { return null; }", "createNameMapper(message) { return null; }", "createNameMapper(message) {\n return null;\n }", "createNameMapper(message) {\n return null;\n }", "constructor(message, mapName) {\n super();\n this.mapName = mapName;\n thi...
[ "0.6907002", "0.6907002", "0.6757719", "0.6757719", "0.6593736", "0.6593736", "0.6593736", "0.6593736", "0.6491441", "0.5884369", "0.58063215", "0.58063215", "0.58063215", "0.58063215", "0.58063215", "0.58063215", "0.58063215", "0.58063215", "0.58063215", "0.57493883", "0.569...
0.59592134
9
Escape `_ESCAPED_CHARS` characters in the given text with encoded entities
function escapeXml(text){return _ESCAPED_CHARS.reduce(function(text,entry){return text.replace(entry[0],entry[1]);},text);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utils_escape(text) {\n return String(text).replace(ESCAPE_REGEX, function (match) {\n return ESCAPE_LOOKUP[match];\n });\n}", "function utils_escape(text) {\n return String(text).replace(ESCAPE_REGEX, function (match) {\n return ESCAPE_LOOKUP[match];\n });\n}", "function utils_escape(text) {...
[ "0.7602042", "0.7602042", "0.7602042", "0.7443581", "0.7443581", "0.7126806", "0.7126806", "0.7113146", "0.6981714", "0.6964964", "0.6952482", "0.6871474", "0.68686706", "0.68637997", "0.68316966", "0.6830968", "0.68249786", "0.6804933", "0.67723495", "0.67712337", "0.6752326...
0.66631204
27
XMB/XTB placeholders can only contain AZ, 09 and _
function toPublicName(internalName){return internalName.toUpperCase().replace(/[^A-Z0-9_]/g,'_');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lettersAccentComaAndPoint(field){\n var rx = /^[a-zA-Z|\\s|'.'|','|'á'|'é'|'í'|'ó'|'ú'|'Á'|'É'|'Í'|'Ó'|'Ú']+$/;\n if(!rx.test(field.value))\n return false;\n\n return true;\n}", "function assertValidName(name) {\n\t (0, _jsutilsInvariant2['default'])(NAME_RX.test(nam...
[ "0.53847605", "0.53792244", "0.5364212", "0.5363611", "0.5355083", "0.5355083", "0.5355083", "0.5355083", "0.53352326", "0.5311774", "0.52858", "0.5282794", "0.52772677", "0.5272409", "0.5251881", "0.52461296", "0.5243172", "0.5238877", "0.5237544", "0.5235952", "0.52353096",...
0.0
-1
to a JsDoc statement formatted as expected by the Closure compiler.
function i18nMetaToDocStmt(meta){var tags=[];if(meta.description){tags.push({tagName:"desc"/* Desc */,text:meta.description});}if(meta.meaning){tags.push({tagName:"meaning"/* Meaning */,text:meta.meaning});}return tags.length==0?null:new JSDocCommentStmt(tags);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formatDoc(doc, options) {\n return format(printDocToDebug(doc), Object.assign({}, options, {\n parser: \"babel\"\n })).formatted;\n }", "function JavascriptWriter() {\n}", "docString(doc) {\n return `(${doc.v})--(${doc.w}): ${doc.weight}\\n`;\n }", "formatDoc(doc, opts) {\n const debug = p...
[ "0.5978161", "0.5946002", "0.5827335", "0.57411116", "0.5713011", "0.5677358", "0.5652854", "0.54542685", "0.54460573", "0.53501666", "0.5334794", "0.5334794", "0.5334794", "0.526495", "0.5245849", "0.5245849", "0.5167118", "0.5158863", "0.51315933", "0.5124682", "0.50377536"...
0.5542505
7
Parses i18n metas like:
function parseI18nMeta(meta){var _a,_b;var id;var meaning;var description;if(meta){var idIndex=meta.indexOf(I18N_ID_SEPARATOR);var descIndex=meta.indexOf(I18N_MEANING_SEPARATOR);var meaningAndDesc=void 0;_a=Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(idIndex>-1?[meta.slice(0,idIndex),meta.slice(idIndex+2)]:[me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseI18nMeta() {\n var meta = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var customId;\n var meaning;\n var description;\n meta = meta.trim();\n\n if (meta) {\n var idIndex = meta.indexOf(I18N_ID_SEPARATOR);\n var descIndex = meta.indexOf(I18N_MEANING_SEPARATOR)...
[ "0.67660344", "0.6745923", "0.6745923", "0.66817737", "0.66817737", "0.66817737", "0.6604398", "0.6604398", "0.65462255", "0.6444112", "0.6444112", "0.5734512", "0.54932344", "0.5492216", "0.5490847", "0.5487256", "0.54791564", "0.5475547", "0.54748595", "0.5467635", "0.54676...
0.7145943
0
Converts internal placeholder names to publicfacing format (for example to use in goog.getMsg call). Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`.
function formatI18nPlaceholderName(name){var chunks=toPublicName(name).split('_');if(chunks.length===1){// if no "_" found - just lowercase the value return name.toLowerCase();}var postfix;// eject last element if it's a number if(/^\d+$/.test(chunks[chunks.length-1])){postfix=chunks.pop();}var raw=chunks.shift().toLow...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toPublicName(internalName){return internalName.toUpperCase().replace(/[^A-Z0-9_]/g,'_');}", "visitPlaceholderName(internalName) {\n if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n return;\n }\n let publicName = this.mapName(internalName);\n ...
[ "0.6875527", "0.66881984", "0.66881984", "0.66881984", "0.66881984", "0.6624979", "0.65991616", "0.65991616", "0.65991616", "0.65991616", "0.65991616", "0.65991616", "0.65991616", "0.6568084", "0.6542667", "0.6463284", "0.61997", "0.61997", "0.61997", "0.6078663", "0.5625745"...
0.65176296
15
Generates a prefix for translation const name.
function getTranslationConstPrefix(extra){return(""+CLOSURE_TRANSLATION_PREFIX+extra).toUpperCase();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTranslationConstPrefix(extra) {\n return \"\".concat(CLOSURE_TRANSLATION_PREFIX).concat(extra).toUpperCase();\n }", "function getTranslationConstPrefix(extra) {\n return `${CLOSURE_TRANSLATION_PREFIX}${extra}`.toUpperCase();\n}", "function getTranslationConstPrefix(extra) {\n return `...
[ "0.7168395", "0.7081039", "0.7081039", "0.70119464", "0.70119464", "0.6993444", "0.6930697", "0.6930697", "0.6930697", "0.6766403", "0.6766403", "0.6766403", "0.67480564", "0.67480564", "0.6706026", "0.64549345", "0.64342165", "0.63254315", "0.63234353", "0.6241925", "0.62244...
0.7482267
0
Generates translation declaration statements.
function getTranslationDeclStmts(variable$$1,message,meta,params,transformFn){if(params===void 0){params={};}var statements=[];var docStatements=i18nMetaToDocStmt(meta);if(docStatements){statements.push(docStatements);}if(transformFn){statements.push(i18nTranslationToDeclStmt(variable$$1,message,params));// Closure Com...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTranslationDeclStmts(variable, closureVar, message, meta, params, transformFn) {\n if (params === void 0) { params = {}; }\n var statements = [];\n statements.push.apply(statements, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(i18nTranslationToDeclStmt(variable, closureVar, message...
[ "0.64653295", "0.64270157", "0.64270157", "0.6336213", "0.6336213", "0.6267344", "0.61444354", "0.54053986", "0.5306663", "0.5302019", "0.52961445", "0.52488303", "0.51041466", "0.5097256", "0.5066052", "0.5017251", "0.50157493", "0.50157493", "0.500848", "0.49738127", "0.491...
0.65151364
0
Creates an allocator for a temporary variable. A variable declaration is added to the statements the first time the allocator is invoked.
function temporaryAllocator(statements,name){var temp=null;return function(){if(!temp){statements.push(new DeclareVarStmt(TEMPORARY_NAME,undefined,DYNAMIC_TYPE));temp=variable(name);}return temp;};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function temporaryAllocator(statements, name) {\n var temp = null;\n return function () {\n if (!temp) {\n statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n temp = variable(name);\n }\n\n return temp;\n };\n }", "function temp...
[ "0.79008615", "0.7873285", "0.7869665", "0.7869665", "0.7869665", "0.7750674", "0.7750674", "0.7750674", "0.7750674", "0.6263858", "0.6135799", "0.57399505", "0.5665848", "0.54564893", "0.53901684", "0.5381194", "0.53772956", "0.53586763", "0.5282266", "0.52804315", "0.512695...
0.8225123
0
Remove trailing null nodes as they are implied.
function trimTrailingNulls(parameters){while(isNull(parameters[parameters.length-1])){parameters.pop();}return parameters;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trimTrailingNulls(parameters) {\n while (isNull(parameters[parameters.length - 1])) {\n parameters.pop();\n }\n\n return parameters;\n }", "function trimTrailingNulls(parameters) {\n while (isNull(parameters[parameters.length - 1])) {\n parameters.pop();\n }\n re...
[ "0.66346216", "0.64652187", "0.64652187", "0.64652187", "0.64652187", "0.64652187", "0.64652187", "0.64652187", "0.646093", "0.61465555", "0.61300427", "0.60352", "0.60352", "0.60352", "0.60078", "0.5878393", "0.5798024", "0.5795833", "0.5749804", "0.5738964", "0.57254094", ...
0.6626921
1
Extract a map of properties to values for a given element or template node, which can be used by the directive matching machinery.
function getAttrsForDirectiveMatching(elOrTpl){var attributesMap={};elOrTpl.attributes.forEach(function(a){if(!isI18nAttribute(a.name)){attributesMap[a.name]=a.value;}});elOrTpl.inputs.forEach(function(i){attributesMap[i.name]='';});elOrTpl.outputs.forEach(function(o){attributesMap[o.name]='';});return attributesMap;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAttrsForDirectiveMatching(elOrTpl) {\n var attributesMap = {};\n elOrTpl.attributes.forEach(function (a) {\n if (!isI18nAttribute(a.name)) {\n attributesMap[a.name] = a.value;\n }\n });\n elOrTpl.inputs.forEach(function (i) { attributesMap[i.name] = ''; });\n elO...
[ "0.61668676", "0.61668676", "0.6145927", "0.6145824", "0.6145824", "0.6128743", "0.6128743", "0.61174613", "0.60734874", "0.57055044", "0.56717914", "0.5559578", "0.5559578", "0.5527183", "0.5473732", "0.5389866", "0.5389866", "0.537291", "0.537291", "0.53488123", "0.53488123...
0.5956459
9
Construct a factory function expression for the given `R3FactoryMetadata`.
function compileFactoryFunction(meta){var t=variable('t');var statements=[];// The type to instantiate via constructor invocation. If there is no delegated factory, meaning // this type is always created by constructor invocation, then this is the type-to-create // parameter provided by the user (t) if specified, or th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileFactoryFunction(meta) {\n var t = variable('t');\n var statements = [];\n // The type to instantiate via constructor invocation. If there is no delegated factory, meaning\n // this type is always created by constructor invocation, then this is the type-to-create\n // parameter provid...
[ "0.7027273", "0.7027273", "0.69557726", "0.6933661", "0.6933661", "0.69242275", "0.68443525", "0.63286895", "0.63085157", "0.58366066", "0.5611884", "0.56105435", "0.5504961", "0.5443054", "0.5409549", "0.5384221", "0.5384221", "0.52127016", "0.5185127", "0.51155865", "0.5115...
0.68336755
7
A helper function useful for extracting `R3DependencyMetadata` from a Render2 `CompileTypeMetadata` instance.
function dependenciesFromGlobalMetadata(type,outputCtx,reflector){var e_1,_a;// Use the `CompileReflector` to look up references to some well-known Angular types. These will // be compared with the token to statically determine whether the token has significance to // Angular, and set the correct `R3ResolvedDependencyT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dependenciesFromGlobalMetadata(type, outputCtx, reflector) {\n var e_1, _a;\n // Use the `CompileReflector` to look up references to some well-known Angular types. These will\n // be compared with the token to statically determine whether the token has significance to\n // Angular, and set the...
[ "0.65540236", "0.65540236", "0.65540236", "0.6427947", "0.6401693", "0.6401693", "0.6377706", "0.6377706", "0.63418907", "0.6278865", "0.526364", "0.5125259", "0.5119837", "0.50600845", "0.5035426", "0.50344294", "0.50278246", "0.49726257", "0.49726257", "0.4949966", "0.49461...
0.6782263
0
Convert metadata into an `Expression` in the given `OutputContext`. This operation will handle arrays, references to symbols, or literal `null` or `undefined`.
function convertMetaToOutput(meta,ctx){if(Array.isArray(meta)){return literalArr(meta.map(function(entry){return convertMetaToOutput(entry,ctx);}));}if(meta instanceof StaticSymbol){return ctx.importExpr(meta);}if(meta==null){return literal(meta);}throw new Error("Internal error: Unsupported or unknown metadata: "+meta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertMetaToOutput(meta, ctx) {\n if (Array.isArray(meta)) {\n return literalArr(meta.map(function (entry) {\n return convertMetaToOutput(entry, ctx);\n }));\n }\n\n if (meta instanceof StaticSymbol) {\n return ctx.importExpr(meta);\n }\n\n if (meta ...
[ "0.62935627", "0.6273801", "0.62615365", "0.62615365", "0.62615365", "0.62615365", "0.6233458", "0.6233458", "0.6233458", "0.56207895", "0.48960406", "0.48317522", "0.47966096", "0.47168785", "0.46996978", "0.4679556", "0.4667402", "0.4667402", "0.46591276", "0.45534068", "0....
0.63076055
0
JIT compiles an expression and returns the result of executing that expression.
function jitExpression(def,context,sourceUrl,preStatements){// The ConstantPool may contain Statements which declare variables used in the final expression. // Therefore, its statements need to precede the actual JIT operation. The final statement is a // declaration of $def which is set to the expression being compile...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeJITCompiledFunction() {\n\tfunction target(x) {\n\t\treturn x;\n\t}\n\tfor (var i = 0; i < 1000; i++) {\n\t\ttarget(i);\n\t}\n\treturn target;\n}", "evaluate(expr) {\n const result = compile(this.get_('eval.env'), expr).flatMap((f) => f());\n if (fail.match(result)) throw result.get();\n el...
[ "0.72588855", "0.6475261", "0.6387117", "0.6387117", "0.6260536", "0.6074951", "0.60500157", "0.6035256", "0.5970757", "0.5893169", "0.5885524", "0.5885524", "0.5885524", "0.5885524", "0.5885524", "0.5885524", "0.5885524", "0.5885524", "0.5885524", "0.5885524", "0.5885524", ...
0.6743728
1
Write a pipe definition to the output context.
function compilePipeFromRender2(outputCtx,pipe,reflector){var name=identifierName(pipe.type);if(!name){return error("Cannot resolve the name of "+pipe.type);}var metadata={name:name,pipeName:pipe.name,type:outputCtx.importExpr(pipe.type.reference),deps:dependenciesFromGlobalMetadata(pipe.type,outputCtx,reflector),pure:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compilePipeFromRender2(outputCtx, pipe, reflector) {\n const definitionMapValues = [];\n const name = identifierName(pipe.type);\n if (!name) {\n return error(`Cannot resolve the name of ${pipe.type}`);\n }\n const metadata = {\n name,\n pipeName: pipe.name,\n ty...
[ "0.60160184", "0.6007142", "0.5855944", "0.5855944", "0.5842162", "0.58239377", "0.57844853", "0.56022704", "0.56022704", "0.56022704", "0.5528451", "0.5528451", "0.54919857", "0.5413611", "0.54093444", "0.54005414", "0.5326661", "0.5208941", "0.5195894", "0.51444143", "0.514...
0.5755579
7
Regular events have a target Animation events have a phase
function ParsedEvent(name,targetOrPhase,type,handler,sourceSpan){this.name=name;this.targetOrPhase=targetOrPhase;this.type=type;this.handler=handler;this.sourceSpan=sourceSpan;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function at__TARGET_ques_(eventPhase) /* (eventPhase : eventPhase) -> bool */ {\n return (eventPhase === 2);\n}", "onTransitionEnd() {\n this.nextKeyframe();\n }", "function onPhaseChange( e ){\n console.log( e.oldPhase + \" -> \" + e.newPhase );\n //command pattern\n phaseHandler[ e...
[ "0.6102608", "0.6000934", "0.5937864", "0.5750317", "0.56506693", "0.56325215", "0.5627772", "0.56180274", "0.55867046", "0.55461204", "0.5545211", "0.5544172", "0.5483656", "0.5483656", "0.5483656", "0.54520404", "0.54464775", "0.54371285", "0.5427859", "0.53851146", "0.5381...
0.0
-1
Converts the given expression AST into an executable output AST, assuming the expression is used in an action binding (e.g. an event handler).
function convertActionBinding(localResolver,implicitReceiver,action,bindingId,interpolationFunction){if(!localResolver){localResolver=new DefaultLocalResolver();}var actionWithoutBuiltins=convertPropertyBindingBuiltins({createLiteralArrayConverter:function createLiteralArrayConverter(argCount){// Note: no caching for l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createOutputEvaluator(exprNode) {\n var $1 = createEvaluator(exprNode);\n\n if ( typeof $1 !== 'function' ) {\n $1 = stringify($1);\n return outputLiteral;\n }\n return outputEvaluator;\n\n function outputEvaluator(ctx, writer) {\n writer.content(stringify($1(ctx, writer)));\...
[ "0.6105226", "0.5933379", "0.59061", "0.59061", "0.5904402", "0.5786879", "0.5786879", "0.5722266", "0.56076115", "0.5567712", "0.5562704", "0.550372", "0.54629165", "0.54336226", "0.5433573", "0.5418017", "0.541404", "0.539036", "0.5370155", "0.5336298", "0.5318219", "0.53...
0.0
-1
Converts the given expression AST into an executable output AST, assuming the expression is used in property binding. The expression has to be preprocessed via `convertPropertyBindingBuiltins`.
function convertPropertyBinding(localResolver,implicitReceiver,expressionWithoutBuiltins,bindingId,form,interpolationFunction){if(!localResolver){localResolver=new DefaultLocalResolver();}var currValExpr=createCurrValueExpr(bindingId);var stmts=[];var visitor=new _AstToIrVisitor(localResolver,implicitReceiver,bindingId...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createOutputEvaluator(exprNode) {\n var $1 = createEvaluator(exprNode);\n\n if ( typeof $1 !== 'function' ) {\n $1 = stringify($1);\n return outputLiteral;\n }\n return outputEvaluator;\n\n function outputEvaluator(ctx, writer) {\n writer.content(stringify($1(ctx, writer)));\...
[ "0.567963", "0.55826074", "0.55643684", "0.55643684", "0.5501917", "0.54449195", "0.54449195", "0.54449195", "0.54449195", "0.5436123", "0.5301222", "0.5300504", "0.522152", "0.5170679", "0.5151458", "0.51461035", "0.5143715", "0.5140574", "0.5124074", "0.5076137", "0.506723"...
0.51329637
18
Simple helper function to either provide the constant literal that will house the value here or a null value if the provided values are empty.
function getConstantLiteralFromArray(constantPool,values){return values.length?constantPool.getConstLiteral(literalArr(values),true):NULL_EXPR;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function di_safevalue(val)\n{\n if(val==undefined || val=='' || val==null)\n return '';\n else\n return val; \n}", "function isNull(val) {\n return val || \"\"\n}", "Literal(value, options = {}) {\r\n return { ...options, kind: exports.LiteralKind, const: value, type: typeof valu...
[ "0.6176051", "0.6094991", "0.60393316", "0.59241164", "0.5898034", "0.57689613", "0.5740463", "0.5721093", "0.5721093", "0.5714149", "0.5631053", "0.5593234", "0.5593234", "0.5588534", "0.5588534", "0.5588534", "0.5588534", "0.5588534", "0.558527", "0.55844235", "0.556118", ...
0.6143134
1
Simple helper function that adds a parameter or does nothing at all depending on the provided predicate and totalExpectedArgs values
function addParam(params,predicate,value,argNumber,totalExpectedArgs){if(predicate){params.push(value);}else if(argNumber<totalExpectedArgs){params.push(NULL_EXPR);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addParam(params, predicate, value, argNumber, totalExpectedArgs) {\n if (predicate && value) {\n params.push(value);\n } else if (argNumber < totalExpectedArgs) {\n params.push(NULL_EXPR);\n }\n }", "function addParam(params, predicate, value, argNumber, totalExpectedArgs...
[ "0.7525125", "0.7451825", "0.7451825", "0.7451825", "0.74427223", "0.74427223", "0.63049716", "0.6256056", "0.6229533", "0.6211967", "0.5952832", "0.57914966", "0.57872254", "0.57586426", "0.56546634", "0.55443966", "0.5305631", "0.52876705", "0.51912796", "0.518539", "0.5176...
0.76024556
0
Angular Dart introduced &ngsp; as a placeholder for nonremovable space, see: In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character and later on replaced by a space. We are reimplementing the same idea here.
function replaceNgsp(value){// lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE return value.replace(new RegExp(NGSP_UNICODE,'g'),' ');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replaceNgsp(value) {\n // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\n return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');\n }", "function replaceNgsp(value) {\n // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\n return value.replace(new RegExp(NGS...
[ "0.7583008", "0.74927413", "0.74705386", "0.74705386", "0.74705386", "0.74705386", "0.74705386", "0.74705386", "0.74705386", "0.59279287", "0.5878552", "0.58585376", "0.57897216", "0.57825834", "0.5704396", "0.56930673", "0.5673544", "0.5651062", "0.5590639", "0.5589336", "0....
0.77639717
0
Generates an object that is used as a shared state between parent and all child contexts.
function setupRegistry(){return{getUniqueId:getSeqNumberGenerator(),icus:new Map()};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(parentContext) {\n // for minification\n const self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = (key) => self._currentContext.get(key);\n self.setValue = (key, value) => {\n const context = new Base...
[ "0.65398777", "0.62967813", "0.62150395", "0.61480325", "0.59152156", "0.5896228", "0.5870728", "0.5784576", "0.5784576", "0.5784576", "0.5784576", "0.5784576", "0.55694044", "0.5552397", "0.55093205", "0.5483688", "0.5460671", "0.5454257", "0.5433519", "0.5373989", "0.537128...
0.0
-1
Returns a function converting html nodes to an i18n Message given an interpolationConfig
function createI18nMessageFactory(interpolationConfig){var visitor=new _I18nVisitor(_expParser,interpolationConfig);return function(nodes,meaning,description,id,visitNodeFn){return visitor.toI18nMessage(nodes,meaning,description,id,visitNodeFn);};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createI18nMessageFactory(interpolationConfig) {\n var visitor = new _I18nVisitor(_expParser, interpolationConfig);\n return function (nodes, meaning, description, id, visitNodeFn) {\n return visitor.toI18nMessage(nodes, meaning, description, id, visitNodeFn);\n };\n }", "functio...
[ "0.70291007", "0.698992", "0.698992", "0.6974824", "0.69707847", "0.69707847", "0.69700015", "0.69700015", "0.69700015", "0.69568086", "0.62546754", "0.57443905", "0.573366", "0.5671963", "0.5671963", "0.5671963", "0.5671963", "0.56718254", "0.5663592", "0.5663592", "0.566359...
0.71379936
0
Creates a `CssSelector` given a tag name and a map of attributes
function createCssSelector(tag,attributes){var cssSelector=new CssSelector();cssSelector.setElement(tag);Object.getOwnPropertyNames(attributes).forEach(function(name){var value=attributes[name];cssSelector.addAttribute(name,value);if(name.toLowerCase()==='class'){var classes=value.trim().split(/\s+/);classes.forEach(fu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createCssSelector(tag, attributes) {\n const cssSelector = new CssSelector();\n cssSelector.setElement(tag);\n Object.getOwnPropertyNames(attributes).forEach((name) => {\n const value = attributes[name];\n cssSelector.addAttribute(name, value);\n if (name.toLowerCase() === 'c...
[ "0.8061483", "0.8061483", "0.80025876", "0.7992988", "0.7992988", "0.7992988", "0.7417117", "0.7417117", "0.73393184", "0.61695576", "0.55471635", "0.5298937", "0.5286405", "0.5235306", "0.5207369", "0.51308596", "0.5114601", "0.5099408", "0.5079138", "0.5078472", "0.50629234...
0.7931528
6
Parse a template into render3 `Node`s and additional metadata, with no other dependencies.
function parseTemplate(template,templateUrl,options){if(options===void 0){options={};}var interpolationConfig=options.interpolationConfig,preserveWhitespaces=options.preserveWhitespaces;var bindingParser=makeBindingParser(interpolationConfig);var htmlParser=new HtmlParser();var parseResult=htmlParser.parse(template,tem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parse(template,options){warn$2=options.warn||baseWarn;platformIsPreTag=options.isPreTag||no;platformMustUseProp=options.mustUseProp||no;platformGetTagNamespace=options.getTagNamespace||no;transforms=pluckModuleFunction(options.modules,'transformNode');preTransforms=pluckModuleFunction(options.modules,'pre...
[ "0.7016974", "0.7016974", "0.69487864", "0.65582263", "0.65300494", "0.65300494", "0.65279925", "0.65151256", "0.65151256", "0.65151256", "0.65151256", "0.65070146", "0.65070146", "0.65070146", "0.6498842", "0.6498842", "0.6498842", "0.6495886", "0.6492517", "0.64916813", "0....
0.0
-1
Construct a `BindingParser` with a default configuration.
function makeBindingParser(interpolationConfig){if(interpolationConfig===void 0){interpolationConfig=DEFAULT_INTERPOLATION_CONFIG;}return new BindingParser(new Parser(new Lexer()),interpolationConfig,new DomElementSchemaRegistry(),null,[]);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeBindingParser() {\n var interpolationConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_INTERPOLATION_CONFIG;\n return new BindingParser(new Parser$1(new Lexer()), interpolationConfig, new DomElementSchemaRegistry(), null, []);\n }", "function makeBindi...
[ "0.8220744", "0.79354185", "0.73906386", "0.73906386", "0.73788404", "0.73788404", "0.7374048", "0.7205633", "0.7205633", "0.55293226", "0.5271241", "0.52591217", "0.49918026", "0.4991656", "0.48776516", "0.4827748", "0.4827748", "0.4827748", "0.4675147", "0.464163", "0.46368...
0.71119887
9
Add features to the definition map.
function addFeatures(definitionMap,meta){// e.g. `features: [NgOnChangesFeature]` var features=[];var providers=meta.providers;var viewProviders=meta.viewProviders;if(providers||viewProviders){var args=[providers||new LiteralArrayExpr([])];if(viewProviders){args.push(viewProviders);}features.push(importExpr(Identifiers...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addFeatures(definitionMap, meta) {\n // e.g. `features: [NgOnChangesFeature]`\n const features = [];\n const providers = meta.providers;\n const viewProviders = meta.viewProviders;\n if (providers || viewProviders) {\n const args = [providers || new LiteralArrayExpr([])];\n if...
[ "0.77970076", "0.77970076", "0.77172065", "0.77172065", "0.770877", "0.770877", "0.7702555", "0.7688806", "0.7671286", "0.66427255", "0.6477072", "0.6403301", "0.6049519", "0.60398436", "0.6002737", "0.59520817", "0.5937978", "0.5933515", "0.592689", "0.58859026", "0.5880451"...
0.77350664
2
Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.
function compileDirectiveFromMetadata(meta,constantPool,bindingParser){var _a=baseDirectiveFields(meta,constantPool,bindingParser),definitionMap=_a.definitionMap,statements=_a.statements;addFeatures(definitionMap,meta);var expression=importExpr(Identifiers$1.defineDirective).callFn([definitionMap.toLiteralMap()]);// On...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileDirectiveFromRender2(outputCtx, directive, reflector, bindingParser) {\n var name = identifierName(directive.type);\n name || error(\"Cannot resolver the name of \".concat(directive.type));\n var definitionField = outputCtx.constantPool.propertyNameOf(1\n /* Directive */\n );\n var meta = dir...
[ "0.6581444", "0.6580794", "0.6490963", "0.63005996", "0.63005996", "0.63005996", "0.6272483", "0.6272483", "0.60832435", "0.60324895", "0.57415104", "0.5683161", "0.5683161", "0.5673808", "0.5665441", "0.5613383", "0.56026286", "0.56026286", "0.55800956", "0.55800956", "0.558...
0.58770186
10
Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.
function compileComponentFromMetadata(meta,constantPool,bindingParser){var e_1,_a;var _b=baseDirectiveFields(meta,constantPool,bindingParser),definitionMap=_b.definitionMap,statements=_b.statements;addFeatures(definitionMap,meta);var selector=meta.selector&&CssSelector.parse(meta.selector);var firstSelector=selector&&s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileComponentFromRender2(outputCtx,component,render3Ast,reflector,bindingParser,directiveTypeBySel,pipeTypeByName){var name=identifierName(component.type);name||error(\"Cannot resolver the name of \"+component.type);var definitionField=outputCtx.constantPool.propertyNameOf(2/* Component */);var summary...
[ "0.7347816", "0.6867684", "0.6867684", "0.6867684", "0.684962", "0.6746816", "0.6746816", "0.65585357", "0.6130214", "0.6059666", "0.6059666", "0.6059666", "0.6059666", "0.57963616", "0.57963616", "0.5783993", "0.5783993", "0.56118524", "0.55891675", "0.5573498", "0.55309963"...
0.60840935
9
A wrapper around `compileDirective` which depends on render2 global analysis data as its input instead of the `R3DirectiveMetadata`. `R3DirectiveMetadata` is computed from `CompileDirectiveMetadata` and other statically reflected information.
function compileDirectiveFromRender2(outputCtx,directive,reflector,bindingParser){var name=identifierName(directive.type);name||error("Cannot resolver the name of "+directive.type);var definitionField=outputCtx.constantPool.propertyNameOf(1/* Directive */);var meta=directiveMetadataFromGlobalMetadata(directive,outputCt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileDirectiveFromRender2(outputCtx, directive, reflector, bindingParser) {\n var name = identifierName(directive.type);\n name || error(\"Cannot resolver the name of \".concat(directive.type));\n var definitionField = outputCtx.constantPool.propertyNameOf(1\n /* Directive */\n );\n var meta = dir...
[ "0.70029724", "0.6899366", "0.68146205", "0.68146205", "0.68104494", "0.68104494", "0.68104494", "0.6208608", "0.60943824", "0.60943824", "0.60943824", "0.6072936", "0.59218657", "0.59008133", "0.59008133", "0.58220243", "0.5779918", "0.5754231", "0.574644", "0.57435673", "0....
0.6491471
7
A wrapper around `compileComponent` which depends on render2 global analysis data as its input instead of the `R3DirectiveMetadata`. `R3ComponentMetadata` is computed from `CompileDirectiveMetadata` and other statically reflected information.
function compileComponentFromRender2(outputCtx,component,render3Ast,reflector,bindingParser,directiveTypeBySel,pipeTypeByName){var name=identifierName(component.type);name||error("Cannot resolver the name of "+component.type);var definitionField=outputCtx.constantPool.propertyNameOf(2/* Component */);var summary=compon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileComponentFromRender2(outputCtx, component, render3Ast, reflector, bindingParser, directiveTypeBySel, pipeTypeByName) {\n var name = identifierName(component.type);\n name || error(\"Cannot resolver the name of \" + component.type);\n var definitionField = outputCtx.constantPool.propertyNam...
[ "0.7254392", "0.7254392", "0.7254392", "0.7226336", "0.7136645", "0.70999914", "0.70999914", "0.6496377", "0.644656", "0.6436297", "0.63686484", "0.63686484", "0.63586247", "0.63586247", "0.633628", "0.633628", "0.63273895", "0.6039117", "0.5998172", "0.5942425", "0.5942425",...
0.7388673
0
Compute `R3DirectiveMetadata` given `CompileDirectiveMetadata` and a `CompileReflector`.
function directiveMetadataFromGlobalMetadata(directive,outputCtx,reflector){var summary=directive.toSummary();var name=identifierName(directive.type);name||error("Cannot resolver the name of "+directive.type);return{name:name,type:outputCtx.importExpr(directive.type.reference),typeArgumentCount:0,typeSourceSpan:typeSou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toR3DirectiveMeta(metaObj, code, sourceUrl) {\n var typeExpr = metaObj.getValue('type');\n var typeName = typeExpr.getSymbolName();\n if (typeName === null) {\n throw new fatal_linker_error_1.FatalLinkerError(typeExpr.expression, 'Unsupported type, its name could not be det...
[ "0.63883746", "0.59056", "0.584272", "0.584272", "0.584272", "0.56892806", "0.56798315", "0.56204206", "0.5610268", "0.5552347", "0.5552347", "0.5550394", "0.5550394", "0.55416507", "0.5528881", "0.54985", "0.54898214", "0.54898214", "0.5488908", "0.5461915", "0.5461915", "...
0.5729312
5
Convert `CompileQueryMetadata` into `R3QueryMetadata`.
function queriesFromGlobalMetadata(queries,outputCtx){return queries.map(function(query){var read=null;if(query.read&&query.read.identifier){read=outputCtx.importExpr(query.read.identifier.reference);}return{propertyName:query.propertyName,first:query.first,predicate:selectorsFromGlobalMetadata(query.selectors,outputCt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileQuery(query) {\n const meta = new DefinitionMap();\n meta.set('propertyName', literal(query.propertyName));\n if (query.first) {\n meta.set('first', literal(true));\n }\n meta.set('predicate', Array.isArray(query.predicate) ? asLiteral(query.predicate) : query.predicate);\n ...
[ "0.58894694", "0.58894694", "0.54867816", "0.5269269", "0.5143214", "0.48651773", "0.4857423", "0.48360473", "0.4805934", "0.47871804", "0.47759765", "0.47694436", "0.47694436", "0.47025046", "0.46720386", "0.46720386", "0.46577778", "0.46577778", "0.4642467", "0.46218297", "...
0.4509718
24
Convert `CompileTokenMetadata` for query selectors into either an expression for a predicate type, or a list of string predicates.
function selectorsFromGlobalMetadata(selectors,outputCtx){if(selectors.length>1||selectors.length==1&&selectors[0].value){var selectorStrings=selectors.map(function(value){return value.value;});selectorStrings.some(function(value){return!value;})&&error('Found a type among the string selectors expected');return outputC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectorsFromGlobalMetadata(selectors, outputCtx) {\n if (selectors.length > 1 || selectors.length == 1 && selectors[0].value) {\n var selectorStrings = selectors.map(function (value) {\n return value.value;\n });\n selectorStrings.some(function (value) {\n retu...
[ "0.5863319", "0.5815864", "0.5815864", "0.5815864", "0.58110934", "0.58110934", "0.5766695", "0.49919704", "0.49854082", "0.4931305", "0.46818775", "0.46644664", "0.46273476", "0.4595758", "0.4590942", "0.45898497", "0.45664892", "0.45619676", "0.43961793", "0.43595618", "0.4...
0.5872689
0
Extract translatable messages from an html AST
function extractMessages(nodes,interpolationConfig,implicitTags,implicitAttrs){var visitor=new _Visitor$2(implicitTags,implicitAttrs);return visitor.extract(nodes,interpolationConfig);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {\n var visitor = new _Visitor$2(implicitTags, implicitAttrs);\n return visitor.extract(nodes, interpolationConfig);\n }", "function extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {\n var v...
[ "0.63310605", "0.63193685", "0.61906654", "0.6183755", "0.6183755", "0.6183755", "0.6183755", "0.6164149", "0.6164149", "0.6164149", "0.6108749", "0.6108749", "0.6108749", "0.6108749", "0.5929206", "0.5929206", "0.5929206", "0.5929206", "0.5876031", "0.565675", "0.5568642", ...
0.6530167
0
Indicates that a component is still being loaded in a synchronous compile.
function componentStillLoadingError(compType){var error$$1=Error("Can't compile synchronously as "+stringify(compType)+" is still being loaded!");error$$1[ERROR_COMPONENT_TYPE]=compType;return error$$1;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function componentStillLoadingError(compType) {\n var error = Error(\"Can't compile synchronously as \".concat(stringify(compType), \" is still being loaded!\"));\n error[ERROR_COMPONENT_TYPE] = compType;\n return error;\n }", "function componentStillLoadingError(compType) {\n var error$$1 =...
[ "0.6715841", "0.6666415", "0.6666415", "0.64975536", "0.64306766", "0.6159018", "0.6159018", "0.6159018", "0.6159018", "0.6159018", "0.59815824", "0.57299256", "0.56745815", "0.56699556", "0.5663201", "0.56346035", "0.5612585", "0.5604964", "0.55905616", "0.55661553", "0.5522...
0.6965177
0
Plural forms are expanded to `NgPlural` and `NgPluralCase`s
function _expandPluralForm(ast,errors){var children=ast.cases.map(function(c){if(PLURAL_CASES.indexOf(c.value)==-1&&!c.value.match(/^=\d+$/)){errors.push(new ExpansionError(c.valueSourceSpan,"Plural cases should be \"=<number>\" or one of "+PLURAL_CASES.join(", ")));}var expansionResult=expandNodes(c.expression);errors...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _expandPluralForm(ast, errors) {\n var children = ast.cases.map(function (c) {\n if (PLURAL_CASES.indexOf(c.value) == -1 && !c.value.match(/^=\\d+$/)) {\n errors.push(new ExpansionError(c.valueSourceSpan, \"Plural cases should be \\\"=<number>\\\" or one of \".concat(PLURAL_CASES.join(', '))));\n...
[ "0.7043927", "0.69060135", "0.68008065", "0.67469656", "0.6698557", "0.6630098", "0.6624232", "0.6624232", "0.66191924", "0.66191924", "0.65693575", "0.65693575", "0.6361165", "0.63570815", "0.62955236", "0.62860024", "0.62775034", "0.6254436", "0.6254436", "0.6254436", "0.62...
0.7257051
0
Splits a raw, potentially commadelimited `exportAs` value into an array of names.
function splitExportAs(exportAs){return exportAs?exportAs.split(',').map(function(e){return e.trim();}):[];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitExportAs(exportAs) {\n return exportAs ? exportAs.split(',').map(function (e) {\n return e.trim();\n }) : [];\n }", "function splitExportAs(exportAs) {\n return exportAs ? exportAs.split(',').map(function (e) {\n return e.trim();\n }) : [];\n}", "function splitExportAs(ex...
[ "0.83247864", "0.8292441", "0.82724446", "0.82724446", "0.82724446", "0.82724446", "0.82601386", "0.82601386", "0.82601386", "0.63966393", "0.5867015", "0.55464035", "0.5477809", "0.5368817", "0.53552306", "0.53370667", "0.5301142", "0.5283902", "0.5259646", "0.52561575", "0....
0.81224173
9
Remove extra underscore from escaped identifier. See
function unescapeIdentifier(identifier){return identifier.startsWith('___')?identifier.substr(1):identifier;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unescapeIdentifier(identifier) {\n return identifier.startsWith('___') ? identifier.substr(1) : identifier;\n }", "function unescapeIdentifier(identifier) {\n return identifier.startsWith('___') ? identifier.substr(1) : identifier;\n}", "function unescapeIdentifier(identifier) {\n return...
[ "0.82095414", "0.81326824", "0.81326824", "0.81326824", "0.81326824", "0.81326824", "0.81326824", "0.81326824", "0.8096234", "0.765168", "0.75663286", "0.7092955", "0.6992795", "0.67908394", "0.6761164", "0.67523867", "0.66917133", "0.66754174", "0.6674359", "0.6624433", "0.6...
0.83282906
0
including files that are not part of the program but are referenced by an NgModule.
function _analyzeFilesIncludingNonProgramFiles(fileNames,host,staticSymbolResolver,metadataResolver){var seenFiles=new Set();var files=[];var visitFile=function visitFile(fileName){if(seenFiles.has(fileName)||!host.isSourceFile(fileName)){return false;}seenFiles.add(fileName);var analyzedFile=analyzeFile(host,staticSym...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNgIncludes() {\n\n $log.debug('getNgIncludes');\n\n var ngIncludes = vm.session.source.match(/ngInclude:\\s?[\"|'](.*?)[\"|']/igm);\n var includes = [];\n\n angular.forEach(ngIncludes, function(include) {\n\n include = include.replace(/:\\s|\\\"|\\'|ngInclude|{{|}}/g, '').tri...
[ "0.6640134", "0.60539037", "0.5977981", "0.5457291", "0.5456822", "0.5409383", "0.5393114", "0.5364299", "0.5364299", "0.5364299", "0.5364299", "0.5364299", "0.5364299", "0.53545964", "0.5284357", "0.52554274", "0.52421105", "0.5236764", "0.5213044", "0.51924527", "0.51813644...
0.5729506
3
Creates a new AotCompiler based on options and a host.
function createAotCompiler(compilerHost,options,errorCollector){var translations=options.translations||'';var urlResolver=createAotUrlResolver(compilerHost);var symbolCache=new StaticSymbolCache();var summaryResolver=new AotSummaryResolver(compilerHost,symbolCache);var symbolResolver=new StaticSymbolResolver(compilerHo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAotCompiler(compilerHost, options, errorCollector) {\n let translations = options.translations || '';\n const urlResolver = createAotUrlResolver(compilerHost);\n const symbolCache = new StaticSymbolCache();\n const summaryResolver = new AotSummaryResolver(compilerHost, symbolCache);\n ...
[ "0.70308715", "0.70308715", "0.70308715", "0.70308715", "0.7022498", "0.7015635", "0.70097244", "0.70097244", "0.69556195", "0.5987476", "0.5987476", "0.5987476", "0.5987476", "0.57350576", "0.522185", "0.51959944", "0.5172161", "0.5155539", "0.51313645", "0.51313645", "0.511...
0.73315185
0
Extract the scheme of a URL.
function getUrlScheme(url){var match=_split(url);return match&&match[_ComponentIndex.Scheme]||'';}// The code below is adapted from Traceur:
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUrlScheme(url) {\n var match = _split(url);\n\n return match && match[_ComponentIndex.Scheme] || '';\n }", "function getUrlScheme(url) {\n var match = _split(url);\n return match && match[_ComponentIndex.Scheme] || \"\";\n}", "function getUrlScheme(url) {\n var match = _split(ur...
[ "0.8426924", "0.8412718", "0.83328664", "0.83205897", "0.83205897", "0.83205897", "0.83205897", "0.8310414", "0.8283954", "0.8283954", "0.8283954", "0.8283954", "0.8223905", "0.8223905", "0.8213147", "0.81240594", "0.71622634", "0.6857752", "0.684364", "0.68398184", "0.683981...
0.83154285
7
Builds a URI string from alreadyencoded parts. No encoding is performed. Any component may be omitted as either null or undefined.
function _buildFromEncodedParts(opt_scheme,opt_userInfo,opt_domain,opt_port,opt_path,opt_queryData,opt_fragment){var out=[];if(opt_scheme!=null){out.push(opt_scheme+':');}if(opt_domain!=null){out.push('//');if(opt_userInfo!=null){out.push(opt_userInfo+'@');}out.push(opt_domain);if(opt_port!=null){out.push(':'+opt_port)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {\n var out = [];\n if (opt_scheme != null) {\n out.push(opt_scheme + ':');\n }\n if (opt_domain != null) {\n out.push('//');\n if (opt_userInfo != null) {\n ...
[ "0.730493", "0.730493", "0.730493", "0.73048234", "0.72863114", "0.72863114", "0.72863114", "0.72863114", "0.72658044", "0.7114799", "0.68668276", "0.63539696", "0.6205723", "0.6142098", "0.60928625", "0.6076509", "0.5980236", "0.5921211", "0.58850807", "0.5804991", "0.579488...
0.73170125
0
Splits a URI into its component parts. Each component can be accessed via the component indices; for example: goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];
function _split(uri){return uri.match(_splitRe);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static splitURI(uri) {\nvar matches, pattern;\n// lggr.trace? \"Splitting #{uri}\"\npattern = RegExp(\"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\");\nmatches = uri.match(pattern);\nreturn {\nscheme: matches[2],\nauthority: matches[4],\npath: matches[5],\nquery: matches[7],\nfragment: matches[9]\...
[ "0.69643176", "0.68701524", "0.68701524", "0.68701524", "0.68701524", "0.68701524", "0.68701524", "0.68701524", "0.68701524", "0.6862055", "0.680275", "0.6468406", "0.6306754", "0.5621006", "0.55121297", "0.5493512", "0.5440347", "0.5383799", "0.53679174", "0.5362929", "0.534...
0.71587205
0
Removes dot segments in given path component, as described in RFC 3986, section 5.2.4.
function _removeDotSegments(path){if(path=='/')return'/';var leadingSlash=path[0]=='/'?'/':'';var trailingSlash=path[path.length-1]==='/'?'/':'';var segments=path.split('/');var out=[];var up=0;for(var pos=0;pos<segments.length;pos++){var segment=segments[pos];switch(segment){case'':case'.':break;case'..':if(out.length...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeDotSegments(path) {\n var ib = path.split(/\\/+/); // input buffer (array of segments)\n var ob = []; // output buffer\n var n = ib.length;\n for (var i = 0; i < n; i++) {\n var s = ib[i];\n if (s === '..') {\n // preserve leading slas...
[ "0.8325881", "0.8254898", "0.82195115", "0.82086706", "0.82086706", "0.82086706", "0.82086706", "0.82008004", "0.82008004", "0.82008004", "0.82008004", "0.81898654", "0.77241653", "0.77241653", "0.77241653", "0.77241653", "0.77241653", "0.73758495", "0.73615617", "0.71167326", ...
0.8339152
0
Takes an array of the parts from split and canonicalizes the path part and then joins all the parts.
function _joinAndCanonicalizePath(parts){var path=parts[_ComponentIndex.Path];path=path==null?'':_removeDotSegments(path);parts[_ComponentIndex.Path]=path;return _buildFromEncodedParts(parts[_ComponentIndex.Scheme],parts[_ComponentIndex.UserInfo],parts[_ComponentIndex.Domain],parts[_ComponentIndex.Port],path,parts[_Com...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _joinAndCanonicalizePath(parts) {\n let path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain]...
[ "0.73439986", "0.73439986", "0.73439986", "0.73439986", "0.7295589", "0.7295589", "0.7295589", "0.7253666", "0.72343403", "0.7222073", "0.7219059", "0.71578497", "0.7016844", "0.6508363", "0.6508363", "0.64455354", "0.63734806", "0.6309776", "0.621582", "0.6174631", "0.615352...
0.7184894
11
Sets properties on a target object from a source object, but only if the property doesn't already exist on the target object.
function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key];}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }", "function fillProperties(target, source) {\n for (var key in source) {\n if (source.h...
[ "0.78621596", "0.78621596", "0.78621596", "0.78516304", "0.7823122", "0.7823122", "0.7823122", "0.7823122", "0.7823122", "0.7823122", "0.7823122", "0.7823122", "0.7823122", "0.7803601", "0.7791295", "0.7781004", "0.7781004", "0.7781004", "0.7781004", "0.7175083", "0.7124688",...
0.7767049
19
Construct an `InjectorDef` which configures an injector. This should be assigned to a static `ngInjectorDef` field on a type, which will then be an `InjectorType`. Options: `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to create the type must be provided. If that factory fu...
function defineInjector(options){return{factory:options.factory,providers:options.providers||[],imports:options.imports||[]};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ɵɵdefineInjector(options) {\n return {\n factory: options.factory,\n providers: options.providers || [],\n imports: options.imports || []\n };\n }", "function ɵɵdefineInjector(options){return{factory:options.factory,providers:options.providers||[],imports:options.import...
[ "0.68404675", "0.6808711", "0.67926234", "0.67926234", "0.67926234", "0.6711585", "0.6711585", "0.6711585", "0.66880167", "0.6671543", "0.6671543", "0.65380275", "0.6536803", "0.6435686", "0.638258", "0.638258", "0.638258", "0.638258", "0.638258", "0.638258", "0.61374336", ...
0.6478628
13
Read the `ngInjectableDef` type in a way which is immune to accidentally reading inherited value.
function getInjectableDef(type){return type&&type.hasOwnProperty(NG_INJECTABLE_DEF)?type[NG_INJECTABLE_DEF]:null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInheritedInjectableDef(type){if(type&&type[NG_INJECTABLE_DEF]){// TODO(FW-1307): Re-add ngDevMode when closure can handle it\n// ngDevMode &&\nconsole.warn(\"DEPRECATED: DI is instantiating a token \\\"\"+type.name+\"\\\" that inherits its @Injectable decorator but does not provide one itself.\\n\"+(\"...
[ "0.7298825", "0.7237177", "0.71984684", "0.7185446", "0.71020985", "0.7095004", "0.7095004", "0.7095004", "0.7092197", "0.7013111", "0.70119077", "0.6993896", "0.5873441", "0.5864878", "0.564683", "0.563382", "0.563382", "0.563382", "0.563382", "0.563382", "0.56262904", "0....
0.7308115
0
Read the `ngInjectorDef` type in a way which is immune to accidentally reading inherited value.
function getInjectorDef(type){return type&&type.hasOwnProperty(NG_INJECTOR_DEF)?type[NG_INJECTOR_DEF]:null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInjectorDef(type){return type&&type.hasOwnProperty(NG_INJECTOR_DEF)?type[NG_INJECTOR_DEF]:null}", "function getInjectorDef(type) {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : null;\n }", "function getInjectorDef(type) {\n return type.hasOwnProperty(NG_...
[ "0.7223607", "0.70203435", "0.69519496", "0.6945485", "0.6945485", "0.6945485", "0.6945485", "0.6945485", "0.6144469", "0.6137009", "0.6114922", "0.60695285", "0.60104513", "0.60104513", "0.60104513", "0.60104513", "0.60104513", "0.60104513", "0.60068107", "0.595063", "0.5949...
0.7223032
1
Reports whether a given strategy is currently the default for change detection.
function isDefaultChangeDetectionStrategy(changeDetectionStrategy){return changeDetectionStrategy==null||changeDetectionStrategy===ChangeDetectionStrategy.Default;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null || changeDetectionStrategy === ChangeDetectionStrategy.Default;\n }", "function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null || change...
[ "0.7290137", "0.7161872", "0.71334255", "0.71334255", "0.71334255", "0.71334255", "0.71334255", "0.71334255", "0.71334255", "0.71334255", "0.71334255", "0.71334255", "0.5924994", "0.55928576", "0.5561822", "0.5561822", "0.54703087", "0.5459871", "0.5442811", "0.5442811", "0.5...
0.7441068
0
Convince closure compiler that the wrapped function has no sideeffects. Closure compiler always assumes that `toString` has no sideeffects. We use this quirk to allow us to execute a function but have closure compiler mark the call as nosideeffects. It is important that the return value for the `noSideEffects` function...
function noSideEffects(fn){return''+{toString:fn};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function noSideEffects(fn) {\n return '' + { toString: fn };\n}", "function noSideEffects(fn) {\n return '' + { toString: fn };\n}", "function noSideEffects(fn) {\n return '' + { toString: fn };\n}", "function noOP() {\n }", "function noOP() {\n }", "function noOp() {\n return;\n}", "fu...
[ "0.8184875", "0.8184875", "0.8184875", "0.60629386", "0.60629386", "0.60175216", "0.58945024", "0.5864172", "0.5827165", "0.58114904", "0.57935756", "0.57921374", "0.5787495", "0.57698745", "0.5751168", "0.5741838", "0.56510365", "0.5626372", "0.5626372", "0.5626372", "0.5512...
0.82383466
0
The following getter methods retrieve the definition form the type. Currently the retrieval honors inheritance, but in the future we may change the rule to require that definitions are explicit. This would require some sort of migration strategy.
function getComponentDef(type){return type[NG_COMPONENT_DEF]||null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOwnDefinition(type, def) {\n return def && def.token === type ? def : null;\n }", "function getOwnDefinition(type, def) {\n return def && def.token === type ? def : null;\n }", "function getOwnDefinition(type, def) {\n return def && def.token === type ? def : null;\n}", "get de...
[ "0.71563745", "0.71563745", "0.70633936", "0.6809783", "0.6809783", "0.6809783", "0.6767651", "0.6767651", "0.6312701", "0.61688924", "0.61588097", "0.61265707", "0.5999136", "0.59201753", "0.5889981", "0.5846311", "0.5800005", "0.5800005", "0.5800005", "0.5800005", "0.580000...
0.0
-1
Flattens an array in nonrecursive way. Input arrays are not modified.
function flatten(list){var result=[];var i=0;while(i<list.length){var item=list[i];if(Array.isArray(item)){if(item.length>0){list=item.concat(list.slice(i+1));i=0;}else{i++;}}else{result.push(item);i++;}}return result;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flat(array) {\n array.forEach((element) => {\n if (!Array.isArray(element)) {\n newArr.push(element);\n } else {\n flat(element);\n }\n });\n }", "function flat(arr) {\n return arr.reduce((acc, val) => {\n if (val instanceof Array) { return [...acc, ...flat(va...
[ "0.80200684", "0.7935698", "0.7894515", "0.7773508", "0.77491915", "0.76907074", "0.7685926", "0.76750857", "0.76746297", "0.76746213", "0.7653882", "0.7644251", "0.76357615", "0.76245564", "0.7591638", "0.7591638", "0.7591638", "0.7591638", "0.7591638", "0.7591638", "0.75916...
0.0
-1
Retrieves a value from any `LView` or `TData`.
function loadInternal(view,index){ngDevMode&&assertDataInRange(view,index+HEADER_OFFSET);return view[index+HEADER_OFFSET];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get value() {}", "get value() {}", "function getValue(el) {\n return '_value' in el ? el._value : el.value;\n}", "function getValue(el) {\n return '_value' in el ? el._value : el.value;\n}", "function getValue(el) {\n return '_value' in el ? el._value : el.value;\n}", "function getValue(el) {\n ...
[ "0.6453493", "0.6453493", "0.60736054", "0.60736054", "0.60736054", "0.60736054", "0.60736054", "0.60736054", "0.60736054", "0.60736054", "0.60370976", "0.60370976", "0.59487104", "0.5875405", "0.58616406", "0.5778391", "0.5778117", "0.57407254", "0.5736671", "0.5703024", "0....
0.0
-1
Takes the value of a slot in `LView` and returns the element node. Normally, element nodes are stored flat, but if the node has styles/classes on it, it might be wrapped in a styling context. Or if that node has a directive that injects ViewContainerRef, it may be wrapped in an LContainer. Or if that node is a componen...
function readElementValue(value){while(Array.isArray(value)){value=value[HOST];}return value;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClosestRElement(tView, tNode, lView) {\n var parentTNode = tNode; // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n\n while (parentTNode !== null && parentTNode.type & (8\n /* ElementContainer */\n | 32\n /* Icu */\n )...
[ "0.5611767", "0.5601729", "0.5601729", "0.5601729", "0.5601729", "0.5601729", "0.55905575", "0.555789", "0.5332134", "0.5161095", "0.5161095", "0.51073843", "0.50947666", "0.50829965", "0.50829965", "0.50829965", "0.50829965", "0.50829965", "0.507781", "0.5062122", "0.5053723...
0.0
-1
Retrieves an element value from the provided `viewData`, by unwrapping from any containers, component views, or style contexts.
function getNativeByIndex(index,lView){return readElementValue(lView[index+HEADER_OFFSET]);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNativeFromLView(index, viewData) {\n var storageIndex = index + HEADER_OFFSET;\n var slotValue = viewData[storageIndex];\n var wrapper = viewData;\n while (Array.isArray(slotValue)) {\n wrapper = slotValue;\n slotValue = slotValue[HOST];\n }\n if (isStylingContext(wrappe...
[ "0.5790676", "0.5598047", "0.54065007", "0.54065007", "0.54065007", "0.54065007", "0.54065007", "0.54065007", "0.54065007", "0.54065007", "0.54065007", "0.538765", "0.5331114", "0.52862036", "0.52705187", "0.52476156", "0.52476156", "0.52476156", "0.513847", "0.513847", "0.51...
0.49438286
37
Retrieve the root view from any component by walking the parent `LView` until reaching the root `LView`.
function getRootView(target){ngDevMode&&assertDefined(target,'component');var lView=Array.isArray(target)?target:readPatchedLView(target);while(lView&&!(lView[FLAGS]&128/* IsRoot */)){lView=lView[PARENT];}return lView;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n var lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n\n while (lView && !(lView[FLAGS] & 512\n /* IsRoot */\n )) {\n lView =...
[ "0.7642589", "0.75256056", "0.75064343", "0.7485549", "0.7443705", "0.7443705", "0.7443705", "0.7443705", "0.7443705", "0.7443705", "0.731677", "0.731677", "0.71575046", "0.71575046", "0.6833106", "0.6830734", "0.66114765", "0.6499946", "0.63126016", "0.62975407", "0.62788564...
0.7256107
12
Returns the monkeypatch value data present on the target (which could be a component, directive or a DOM node).
function readPatchedData(target){ngDevMode&&assertDefined(target,'Target expected');return target[MONKEY_PATCH_KEY_NAME];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME] || null;\n }", "function readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME] || null;\n}", ...
[ "0.66257316", "0.6621325", "0.66103613", "0.66103613", "0.66103613", "0.66103613", "0.66103613", "0.66103613", "0.66046035", "0.66046035", "0.66046035", "0.6543654", "0.56533206", "0.5537774", "0.5486142", "0.5460432", "0.5460432", "0.5460432", "0.5460432", "0.5460432", "0.54...
0.6461657
12
Unwraps a parent injector location number to find the view offset from the current injector, then walks up the declaration view tree until the view is found that contains the parent injector.
function getParentInjectorView(location,startView){var viewOffset=getParentInjectorViewOffset(location);var parentView=startView;// For most cases, the parent injector can be found on the host node (e.g. for component // or container), but we must keep the loop here to support the rarer case of deeply nested // <ng-tem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentInjectorLocation(tNode, lView) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex; // V...
[ "0.7537058", "0.74758756", "0.73966545", "0.73966545", "0.73966545", "0.73966545", "0.73966545", "0.73966545", "0.7335484", "0.7081156", "0.7072852", "0.7066886", "0.7066886", "0.69246024", "0.68208146", "0.68019587", "0.6724002", "0.6716868", "0.6716868", "0.6716868", "0.671...
0.7025819
13
Unwraps a parent injector location number to find the view offset from the current injector, then walks up the declaration view tree until the TNode of the parent injector is found.
function getParentInjectorTNode(location,startView,startTNode){if(startTNode.parent&&startTNode.parent.injectorIndex!==-1){// view offset is 0 var injectorIndex=startTNode.parent.injectorIndex;var parentTNode_1=startTNode.parent;while(parentTNode_1.parent!=null&&injectorIndex==parentTNode_1.injectorIndex){parentTNode_1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentInjectorLocation(tNode, lView) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex; // V...
[ "0.760583", "0.7553765", "0.7443043", "0.7443043", "0.7443043", "0.7443043", "0.7443043", "0.7443043", "0.72799915", "0.7015484", "0.70133376", "0.7000787", "0.7000787", "0.6748198", "0.6719744", "0.6719744", "0.67115176", "0.66017586", "0.64938116", "0.63992226", "0.63953096...
0.68694127
13
Equivalent to ES6 spread, add each item to an array.
function addAllToArray(items,arr){for(var i=0;i<items.length;i++){arr.push(items[i]);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myPush(arr,...items){\n arr.push(...items);\n}", "function appendAllTo(array, items) {\n return array.push.apply(array, items), array;\n }", "function appendAllTo(array, items) {\n return array.push.apply(array, items), array;\n }", "function __spreadArrays() {\r\n for (var s = 0, ...
[ "0.71277314", "0.7085504", "0.7085504", "0.6965748", "0.69444823", "0.69059", "0.69059", "0.69059", "0.69059", "0.69059", "0.69059", "0.69059", "0.69059", "0.69059", "0.69059", "0.69059", "0.6854284", "0.6854284", "0.6854284", "0.6854284", "0.6854284", "0.6854284", "0.685...
0.6914233
5
Given a current view, finds the nearest component's host (LElement).
function findComponentView(lView){var rootTNode=lView[HOST_NODE];while(rootTNode&&rootTNode.type===2/* View */){ngDevMode&&assertDefined(lView[DECLARATION_VIEW],'lView[DECLARATION_VIEW]');lView=lView[DECLARATION_VIEW];rootTNode=lView[HOST_NODE];}return lView;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHostNative(currentView) {\n ngDevMode && assertLView(currentView);\n var hostTNode = currentView[T_HOST];\n return hostTNode && hostTNode.type === 3 /* Element */ ?\n getNativeByTNode(hostTNode, getLViewParent(currentView)) :\n null;\n}", "function getHostNative(currentView){va...
[ "0.70249146", "0.6767535", "0.6751631", "0.6751631", "0.6751631", "0.64884454", "0.64800566", "0.64522606", "0.6447769", "0.6447769", "0.6447769", "0.6447769", "0.6447769", "0.6257221", "0.6257221", "0.6215687", "0.6193081", "0.6193081", "0.6193081", "0.6193081", "0.6170885",...
0.6053843
23
Sets the current inject implementation.
function setInjectImplementation(impl){var previous=_injectImplementation;_injectImplementation=impl;return previous;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setInjectImplementation(impl) {\n var previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n }", "function setInjectImplementation(impl) {\n var previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}", "funct...
[ "0.80893785", "0.79025185", "0.7872699", "0.7872699", "0.7872699", "0.78590536", "0.78590536", "0.78590536", "0.78590536", "0.78590536", "0.78590536", "0.64283705", "0.60140884", "0.5290422", "0.51780486", "0.5124488", "0.5038298", "0.49413782", "0.48912656", "0.48903403", "0...
0.7881757
2
Injects `root` tokens in limp mode. If no injector exists, we can still inject treeshakable providers which have `providedIn` set to `"root"`. This is known as the limp mode injection. In such case the value is stored in the `InjectableDef`.
function injectRootLimpMode(token,notFoundValue,flags){var injectableDef=getInjectableDef(token);if(injectableDef&&injectableDef.providedIn=='root'){return injectableDef.value===undefined?injectableDef.value=injectableDef.factory():injectableDef.value;}if(flags&InjectFlags.Optional)return null;if(notFoundValue!==undefi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function injectRootLimpMode(token, notFoundValue, flags) {\n var injectableDef = getInjectableDef(token);\n\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value;\n ...
[ "0.74792796", "0.74049586", "0.74049586", "0.74049586", "0.74049586", "0.74049586", "0.72929484", "0.72639567", "0.72639567", "0.72639567", "0.7167053", "0.53942823", "0.5381524", "0.5381524", "0.5381524", "0.5381524", "0.5381524", "0.53732693", "0.53611857", "0.5341208", "0....
0.76316583
0
Loops through the directives on a node and queues all their hooks except ngOnInit and ngDoCheck, which are queued separately in directiveCreate.
function queueLifecycleHooks(tView,tNode){if(tView.firstTemplatePass){// It's necessary to loop through the directives at elementEnd() (rather than processing in // directiveCreate) so we can preserve the current hook order. Content, view, and destroy // hooks for projected components and directives must be called *bef...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queueLifecycleHooks(tView, tNode) {\n if (tView.firstTemplatePass) {\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected co...
[ "0.7259311", "0.7259311", "0.66951793", "0.66192055", "0.6429507", "0.64105475", "0.64105475", "0.5894174", "0.58889675", "0.58889675", "0.58889675", "0.58889675", "0.58889675", "0.58889675", "0.5886399", "0.5793869", "0.5566153", "0.5495627", "0.5463875", "0.5308678", "0.527...
0.757356
0
Queues afterContentInit and afterContentChecked hooks on TView
function queueContentHooks(def,tView,i){if(def.afterContentInit){(tView.contentHooks||(tView.contentHooks=[])).push(i,def.afterContentInit);}if(def.afterContentChecked){(tView.contentHooks||(tView.contentHooks=[])).push(i,def.afterContentChecked);(tView.contentCheckHooks||(tView.contentCheckHooks=[])).push(i,def.afterC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queueViewHooks(def,tView,i){if(def.afterViewInit){(tView.viewHooks||(tView.viewHooks=[])).push(i,def.afterViewInit);}if(def.afterViewChecked){(tView.viewHooks||(tView.viewHooks=[])).push(i,def.afterViewChecked);(tView.viewCheckHooks||(tView.viewCheckHooks=[])).push(i,def.afterViewChecked);}}", "function...
[ "0.6922868", "0.6773001", "0.6773001", "0.6773001", "0.6583349", "0.64904076", "0.6185602", "0.6157445", "0.6157445", "0.6157445", "0.6117153", "0.6117153", "0.6080139", "0.6039029", "0.59752285", "0.59073025", "0.58968306", "0.5872581", "0.5837662", "0.581073", "0.581073", ...
0.75932807
0
Queues afterViewInit and afterViewChecked hooks on TView
function queueViewHooks(def,tView,i){if(def.afterViewInit){(tView.viewHooks||(tView.viewHooks=[])).push(i,def.afterViewInit);}if(def.afterViewChecked){(tView.viewHooks||(tView.viewHooks=[])).push(i,def.afterViewChecked);(tView.viewCheckHooks||(tView.viewCheckHooks=[])).push(i,def.afterViewChecked);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queueViewHooks(def, tView, i) {\n if (def.afterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewInit);\n }\n if (def.afterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewChecked);\n (tView.viewCheckHooks || (tVie...
[ "0.7102561", "0.7102561", "0.7102561", "0.66184545", "0.65531117", "0.64888734", "0.6469649", "0.6322191", "0.6283655", "0.6230369", "0.62205124", "0.59814173", "0.59814173", "0.59506094", "0.5946018", "0.5946018", "0.5938437", "0.5938437", "0.5938437", "0.5934939", "0.593493...
0.78768677
0
Queues onDestroy hooks on TView
function queueDestroyHooks(def,tView,i){if(def.onDestroy!=null){(tView.destroyHooks||(tView.destroyHooks=[])).push(i,def.onDestroy);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeOnDestroys(view){var tView=view[TVIEW];var destroyHooks;if(tView!=null&&(destroyHooks=tView.destroyHooks)!=null){callHooks(view,destroyHooks);}}", "function queueDestroyHooks(def, tView, i) {\n if (def.onDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, def....
[ "0.8244831", "0.7850529", "0.7850529", "0.7850529", "0.780051", "0.780051", "0.780051", "0.752018", "0.7480577", "0.7461554", "0.7461554", "0.7461554", "0.7461554", "0.73938084", "0.73787034", "0.73787034", "0.73710364", "0.7170171", "0.71155435", "0.71155435", "0.7111355", ...
0.8696451
0
Calls onInit and doCheck calls if they haven't already been called.
function executeInitHooks(currentView,tView,checkNoChangesMode){if(!checkNoChangesMode&&currentView[FLAGS]&32/* RunInit */){executeHooks(currentView,tView.initHooks,tView.checkHooks,checkNoChangesMode);currentView[FLAGS]&=~32/* RunInit */;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onInit() {}", "function init() {\n\t\tuserAgentCheck();\n\t\ttestThis();\n\t}", "validateInit() {\n this.runValidation(true);\n }", "init() {\n\t\tthis.replaceData(\n\t\t\tthis.manager.get(\"hostReq\"),\n\t\t\tthis.endpoints.check,\n\t\t\tthis.data.check\n\t\t);\n\t}", "onInit() {}", "...
[ "0.6817285", "0.67709875", "0.6613121", "0.65052235", "0.64785886", "0.6427468", "0.64164996", "0.64107406", "0.6406829", "0.6392421", "0.6392421", "0.6269604", "0.6262386", "0.6259606", "0.62409306", "0.6201326", "0.61884797", "0.6183997", "0.61809635", "0.6167556", "0.61643...
0.6397733
9
Iterates over afterViewInit and afterViewChecked functions and calls them.
function executeHooks(currentView,allHooks,checkHooks,checkNoChangesMode){if(checkNoChangesMode)return;var hooksToCall=currentView[FLAGS]&2/* FirstLViewPass */?allHooks:checkHooks;if(hooksToCall){callHooks(currentView,hooksToCall);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queueViewHooks(def,tView,i){if(def.afterViewInit){(tView.viewHooks||(tView.viewHooks=[])).push(i,def.afterViewInit);}if(def.afterViewChecked){(tView.viewHooks||(tView.viewHooks=[])).push(i,def.afterViewChecked);(tView.viewCheckHooks||(tView.viewCheckHooks=[])).push(i,def.afterViewChecked);}}", "in_view_...
[ "0.6639238", "0.65748835", "0.61830914", "0.61537784", "0.60849845", "0.59548473", "0.59548473", "0.59548473", "0.58878076", "0.58878076", "0.588221", "0.588221", "0.588221", "0.5873012", "0.58610547", "0.58610547", "0.5778809", "0.575101", "0.5529066", "0.55231416", "0.55161...
0.60407484
5
Calls lifecycle hooks with their contexts, skipping init hooks if it's not the first LView pass.
function callHooks(currentView,arr){for(var i=0;i<arr.length;i+=2){arr[i+1].call(currentView[arr[i]]);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode && assertNotEqual(initPhase, 3\n /* InitPhaseCompleted */\n , 'Init pre-order hooks should not be called more than once');\n\n if ((lView[FLAGS] & 3\n /* InitPhaseStateMask */\n ) === initP...
[ "0.6449047", "0.6420392", "0.63806695", "0.6373973", "0.6367166", "0.6367166", "0.6367166", "0.6367166", "0.6367166", "0.6367166", "0.614255", "0.614255", "0.61406195", "0.603619", "0.5980782", "0.5980782", "0.59046596", "0.58654153", "0.5851887", "0.5851887", "0.5851887", ...
0.53616774
71
Enables directive matching on elements. Example: ``` Should match component / directive. Should not match component / directive because we are in ngNonBindable. ```
function enableBindings(){bindingsEnabled=true;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findDirectiveMatches(tView,viewData,tNode){ngDevMode&&assertEqual(getFirstTemplatePass(),true,'should run on first template pass only');var registry=tView.directiveRegistry;var matches=null;if(registry){for(var i=0;i<registry.length;i++){var def=registry[i];if(isNodeMatchingSelectorList(tNode,def.selector...
[ "0.5913423", "0.55316895", "0.54578704", "0.5416293", "0.5409845", "0.5409845", "0.53762645", "0.53762645", "0.53762645", "0.53762645", "0.53762645", "0.53762645", "0.5335033", "0.5248377", "0.52427524", "0.5002033", "0.4930012", "0.4930012", "0.4841348", "0.4833901", "0.4833...
0.0
-1
Disables directive matching on element. Example: ``` Should match component / directive. Should not match component / directive because we are in ngNonBindable. ```
function disableBindings(){bindingsEnabled=false;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableLayoutDirective(){// Return a 1x-only, first-match attribute directive\n\tconfig.enabled=false;return{restrict:'A',priority:'900'};}", "function disableLayoutDirective() {\n // Return a 1x-only, first-match attribute directive\n config.enabled = false;\n\n return {\n restrict : 'A',...
[ "0.6126256", "0.6120303", "0.6120303", "0.57767296", "0.5722904", "0.5722904", "0.5722904", "0.5722904", "0.56739146", "0.5655918", "0.5655918", "0.55753875", "0.5534506", "0.54809415", "0.5445517", "0.52362484", "0.52301115", "0.52185297", "0.5145029", "0.51106626", "0.50900...
0.47521666
48
Restores `contextViewData` to the given OpaqueViewState instance. Used in conjunction with the getCurrentView() instruction to save a snapshot of the current view and restore it when listeners are invoked. This allows walking the declaration view tree in listeners to get vars from parent views.
function restoreView(viewToRestore){contextLView=viewToRestore;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restoreView(viewToRestore) {\n contextViewData = viewToRestore;\n}", "function restoreView(viewToRestore) {\n contextLView = viewToRestore;\n}", "function restoreView(viewToRestore) {\n contextLView = viewToRestore;\n}", "function ɵɵrestoreView(viewToRestore) {\n contextLView = viewToRes...
[ "0.7244714", "0.67665434", "0.67665434", "0.66217166", "0.64029443", "0.64029443", "0.64029443", "0.64029443", "0.64029443", "0.63757455", "0.6354515", "0.62958163", "0.5939948", "0.562169", "0.56196797", "0.55204517", "0.55200976", "0.55200976", "0.55200976", "0.55200976", "...
0.6796575
1
Query instructions can ask for "current queries" in 2 different cases: when creating view queries (at the root of a component view, before any node is created in this case currentQueries points to view queries) when creating content queries (i.e. this previousOrParentTNode points to a node on which we create content qu...
function getOrCreateCurrentQueries(QueryType){var lView=getLView();var currentQueries=lView[QUERIES];// if this is the first content query on a node, any existing LQueries needs to be cloned // in subsequent template passes, the cloning occurs before directive instantiation. if(previousOrParentTNode&&previousOrParentTN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrCreateCurrentQueries(QueryType) {\n // if this is the first content query on a node, any existing LQueries needs to be cloned\n // in subsequent template passes, the cloning occurs before directive instantiation.\n if (previousOrParentTNode && previousOrParentTNode !== viewData[HOST_NODE] &&...
[ "0.71629417", "0.69348174", "0.69348174", "0.61661613", "0.57242435", "0.57242435", "0.5616631", "0.5616631", "0.5616631", "0.5581579", "0.5581579", "0.5575554", "0.5575554", "0.5575554", "0.5522512", "0.54818666", "0.5429752", "0.5429752", "0.5348278", "0.5321245", "0.523717...
0.7117309
1
Checks whether a given view is in creation mode
function isCreationMode(view){if(view===void 0){view=lView;}return(view[FLAGS]&1/* CreationMode */)===1/* CreationMode */;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isCreationMode(view) {\n if (view === void 0) { view = lView; }\n return (view[FLAGS] & 1 /* CreationMode */) === 1 /* CreationMode */;\n}", "function isCreationMode(view) {\n if (view === void 0) { view = lView; }\n return (view[FLAGS] & 1 /* CreationMode */) === 1 /* CreationMode */;\n}", ...
[ "0.876469", "0.876469", "0.8741958", "0.8721842", "0.8721842", "0.8721842", "0.8721842", "0.8721842", "0.8721842", "0.8684313", "0.86483514", "0.6685638", "0.645006", "0.645006", "0.645006", "0.60275644", "0.60130143", "0.5809562", "0.57505465", "0.5645357", "0.5639063", "0...
0.89243895
0
top level variables should not be exported for performance reasons (PERF_NOTES.md)
function getBindingRoot(){return bindingRootIndex;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TempVars() {\n}", "function testVariables () {\n var thisIsNotAvailableOutside = true;\n console.log(thisIsAVariable);\n}", "function yourPrivateFunc() {\n nn.log($page.globalVariable, 'debug');\n nn.log('private function testing...', 'debug');\n nn.log(cms.config.IS_DEBUG, ...
[ "0.64793295", "0.61681414", "0.599885", "0.5982665", "0.59057206", "0.5885867", "0.5851508", "0.583507", "0.58246195", "0.58106023", "0.58032113", "0.5758754", "0.5710319", "0.5702674", "0.5695564", "0.5694936", "0.5668402", "0.56593084", "0.56455547", "0.5627964", "0.5606869...
0.0
-1
Swap the current state with a new state. For performance reasons we store the state in the top level of the module. This way we minimize the number of properties to read. Whenever a new view is entered we have to store the state for later, and when the view is exited the state has to be restored
function enterView(newView,hostTNode){var oldView=lView;if(newView){var tView=newView[TVIEW];firstTemplatePass=tView.firstTemplatePass;bindingRootIndex=tView.bindingStartIndex;}previousOrParentTNode=hostTNode;isParent=true;lView=contextLView=newView;return oldView;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterState(oldState){}", "switchLayout () {\n let prevMode = this.state.editMode\n let nextMode = !this.state.editMode\n localStorage.setItem('SongCheat.App.Mode', nextMode ? 'edit' : 'view')\n\n // current layout (potentially modified) becomes our new reference for prevMode\n let layouts = { [pre...
[ "0.7055818", "0.68500316", "0.6460004", "0.6424842", "0.63491833", "0.63259965", "0.62724245", "0.62724245", "0.62724245", "0.62680113", "0.62647223", "0.6236201", "0.6209481", "0.61965233", "0.6143336", "0.61396", "0.6122097", "0.6120151", "0.61140895", "0.6101274", "0.60956...
0.0
-1
Resets the application state.
function resetComponentState(){isParent=false;previousOrParentTNode=null;elementDepthCount=0;bindingsEnabled=true;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetApplicationState() {\r\n Canvas.clearCanvas();\r\n Animation.reset();\r\n animating = false;\r\n\r\n AlgoSelect.deselectAlgButtons();\r\n AlgoSelect.loadAlgoInfo('default');\r\n\r\n // save to undo history\r\n saveCurrentState()\r\n}", "function reset() {\n\t setState(null);\n\t} // in case...
[ "0.7770524", "0.73984295", "0.7387662", "0.73125356", "0.7223507", "0.72128487", "0.71985674", "0.7116014", "0.7114455", "0.71095127", "0.7107465", "0.702871", "0.7014379", "0.69946265", "0.69879884", "0.6981749", "0.6946842", "0.6945082", "0.6933046", "0.68532455", "0.681502...
0.0
-1
Used in lieu of enterView to make it clear when we are exiting a child view. This makes the direction of traversal (up or down the view tree) a bit clearer.
function leaveView(newView){var tView=lView[TVIEW];if(isCreationMode(lView)){lView[FLAGS]&=~1/* CreationMode */;}else{executeHooks(lView,tView.viewHooks,tView.viewCheckHooks,checkNoChangesMode);// Views are clean and in update mode after being checked, so these bits are cleared lView[FLAGS]&=~(8/* Dirty */|2/* FirstLVi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function embeddedViewEnd() {\n var viewHost = viewData[HOST_NODE];\n refreshDescendantViews();\n leaveView(viewData[PARENT]);\n previousOrParentTNode = viewHost;\n isParent = false;\n}", "function destroyViewTree(rootView){// If the view has no children, we can clean it up and return early.\nif(ro...
[ "0.6224225", "0.6165384", "0.6136776", "0.6102763", "0.6036969", "0.5971733", "0.588426", "0.58835256", "0.5832572", "0.58036804", "0.57968843", "0.5792012", "0.5792012", "0.57868606", "0.5751218", "0.5751218", "0.5751218", "0.5751218", "0.5751218", "0.5751218", "0.5748886", ...
0.0
-1
Registers this directive as present in its node's injector by flipping the directive's corresponding bit in the injector's bloom filter.
function bloomAdd(injectorIndex,tView,type){ngDevMode&&assertEqual(tView.firstTemplatePass,true,'expected firstTemplatePass to be true');var id=typeof type!=='string'?type[NG_ELEMENT_ID]:type.charCodeAt(0)||0;// Set a unique ID on the directive type, so if something tries to inject the directive, // we can easily retri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bloomAdd(injectorIndex, tView, type) {\n if (tView.firstTemplatePass) {\n var id = type[NG_ELEMENT_ID];\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checke...
[ "0.6355087", "0.6212801", "0.61534345", "0.61444676", "0.61444676", "0.61444676", "0.60140085", "0.60140085", "0.60140085", "0.60140085", "0.60140085", "0.60140085", "0.600375", "0.5986644", "0.5969427", "0.5969427", "0.5969427", "0.5969427", "0.5969427", "0.5962348", "0.5862...
0.61847043
2
Creates (or gets an existing) injector for a given element or container.
function getOrCreateNodeInjectorForNode(tNode,hostView){var existingInjectorIndex=getInjectorIndex(tNode,hostView);if(existingInjectorIndex!==-1){return existingInjectorIndex;}var tView=hostView[TVIEW];if(tView.firstTemplatePass){tNode.injectorIndex=hostView.length;insertBloom(tView.data,tNode);// foundation for node b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInjector(elementOrDir) {\n const context = getLContext(elementOrDir);\n if (context === null)\n return Injector.NULL;\n const tNode = context.lView[TVIEW].data[context.nodeIndex];\n return new NodeInjector(tNode, context.lView);\n}", "function getInjector(elementOrDir) {\n const...
[ "0.69639426", "0.6869504", "0.6869504", "0.6869504", "0.6869504", "0.6869504", "0.6848641", "0.6786889", "0.6195605", "0.6108841", "0.6058292", "0.6023752", "0.5996278", "0.59880674", "0.58788186", "0.58542776", "0.58535576", "0.5851614", "0.5851614", "0.5851614", "0.5851614"...
0.492243
98
Finds the index of the parent injector, with a view offset if applicable. Used to set the parent injector initially. Returns a combination of number of `ViewData` we have to go up and index in that `Viewdata`
function getParentInjectorLocation(tNode,view){if(tNode.parent&&tNode.parent.injectorIndex!==-1){return tNode.parent.injectorIndex;// ViewOffset is 0 }// For most cases, the parent injector index can be found on the host node (e.g. for component // or container), so this loop will be skipped, but we must keep the loop ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentInjectorLocation(tNode, view) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n return tNode.parent.injectorIndex; // view offset is 0\n }\n // For most cases, the parent injector index can be found on the host node (e.g. for component\n // or container), so this l...
[ "0.69290894", "0.6893629", "0.6890869", "0.6890869", "0.6237236", "0.6215057", "0.6119756", "0.6119756", "0.6119756", "0.6119756", "0.6119756", "0.6119756", "0.58511066", "0.5844813", "0.56959444", "0.56524885", "0.56524885", "0.56524885", "0.56524885", "0.56524885", "0.56524...
0.6789477
4