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
Subset of jsspresetdefault with only the plugins the MaterialUI components are using.
function jssPreset() { return { plugins: [(0, _jssGlobal.default)(), (0, _jssNested.default)(), (0, _jssCamelCase.default)(), (0, _jssDefaultUnit.default)(), // Disable the vendor prefixer server-side, it does nothing. // This way, we can get a performance boost. // In the documentation, we are using `aut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jssPreset() {\n return {\n plugins: [(0, _jssGlobal2.default)(), (0, _jssNested2.default)(), (0, _jssCamelCase2.default)(), (0, _jssDefaultUnit2.default)(), (0, _jssVendorPrefixer2.default)(), (0, _jssPropsSort2.default)()]\n };\n}", "function jssPreset() {\n return {\n plugins: [(0, _jssGlobal...
[ "0.7725151", "0.7725151", "0.77139", "0.77139", "0.77139", "0.77139", "0.77139", "0.77139", "0.77139", "0.77139", "0.77139", "0.77139", "0.77139", "0.7653868", "0.7648973", "0.7648973", "0.7648973", "0.7627761", "0.7627761", "0.7627761", "0.7627761", "0.7627761", "0.76277...
0.7548309
43
It should to be noted that this function isn't equivalent to `texttransform: capitalize`. A strict capitalization should uppercase the first letter of each word a the sentence. We only handle the first word.
function capitalize(string) { if ( true && typeof string !== 'string') { throw new Error('Material-UI: capitalize(string) expects a string argument.'); } return string.charAt(0).toUpperCase() + string.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sentenceCapitalizer1(text) {\n text = text.toLowerCase();\n let output = \"\";\n text.split(\" \").forEach( sentence => {\n output += sentence.slice(0, 1).toUpperCase();\n output += sentence.slice(1, sentence.length)+\" \";\n } );\n return output.trim();\n}", "function capit...
[ "0.7846188", "0.76360965", "0.76217765", "0.7620559", "0.76184225", "0.76149464", "0.76060736", "0.75868", "0.7550377", "0.75194275", "0.7519179", "0.75146616", "0.7513523", "0.75024986", "0.7500822", "0.74800813", "0.74669296", "0.7462721", "0.74419457", "0.74406534", "0.743...
0.0
-1
Throws a `Cancel` if cancellation has been requested.
function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async cancel() {\n throw new Error(this.cancelMessage);\n }", "cancel() {\n throw new Error(\"Not implemented.\")\n }", "isCanceled(cancelled) {\n if (cancelled) {\n throw new Error(\"Cancelled request\");\n }\n }", "function throwIfCancellationRequested(config) {\n ...
[ "0.79471016", "0.7735734", "0.75341254", "0.74463314", "0.7423634", "0.73854464", "0.73854464", "0.73854464", "0.73854464", "0.73854464", "0.7205521", "0.71672016", "0.71622115", "0.7161273", "0.71419287", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", ...
0.0
-1
Determine if we're running in a standard browser environment This allows axios to run in a web worker, and reactnative. Both environments support XMLHttpRequest, but not fully standard globals. web workers: typeof window > undefined typeof document > undefined reactnative: navigator.product > 'ReactNative'
function isStandardBrowserEnv() { if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { return false; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isStandardBrowserEnv() {\n if (\n typeof navigator !== 'undefined' &&\n (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')\n ) {\n return false;\n }\n return typeof win...
[ "0.81440395", "0.8133076", "0.81291735", "0.8128377", "0.81193095", "0.81193095", "0.8117728", "0.8101225", "0.8101225", "0.8101225", "0.8101225", "0.8101225", "0.8101225", "0.8101225", "0.8101225", "0.80978096", "0.80978096", "0.80978096", "0.80978096", "0.80978096", "0.8097...
0.0
-1
Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. They usually appear for dates that denote time before the timezones were introduced (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891 and GMT+01:00:00 after that date) DategetTimezoneOffset returns...
function getTimezoneOffsetInMilliseconds (dirtyDate) { var date = new Date(dirtyDate.getTime()) var baseTimezoneOffset = date.getTimezoneOffset() date.setSeconds(0, 0) var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + milliseco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_time_zone_offset( ) {\n\tvar current_date = new Date( );\n\tvar gmt_offset = current_date.getTimezoneOffset( ) / 60;\n\treturn (gmt_offset);\n}", "function getTimeZoneOffsetMinutes()\n{\n var offset = new Date().getTimezoneOffset();\n return offset;\n}", "function getTimezoneOffset(d, tz) {\...
[ "0.7559594", "0.74485976", "0.7217977", "0.71948564", "0.66532683", "0.6604078", "0.6578282", "0.6566639", "0.6526746", "0.65241027", "0.6517652", "0.6517652", "0.6517652", "0.6517652", "0.6517652", "0.6472169", "0.64616734", "0.64616734", "0.64616734", "0.64616734", "0.64616...
0.6495619
15
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCDayOfYear(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyDate) var timestamp = date.getTime() date.setUTCMonth(0, 1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818668", "0.6669305", "0.6403972", "0.63366324", "0.6310375", "0.62818384", "0.62818384", "0.62455916", "0.62171143", "0.62171143", "0.62171143", "0.62171143", "0.62171143", "0.61483145", "0.61166734", "0.60870653", "0.6084049", "0.60712206", "0.6052645", "0.6052645", "0....
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCISOWeek(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyDate) var diff = Object(_startOfUTCISOWeek_index_js__WEBPA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818263", "0.66675735", "0.64038146", "0.6337222", "0.6309952", "0.6283027", "0.6283027", "0.6246817", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.6148351", "0.611605", "0.60867715", "0.6081826", "0.6070095", "0.60522497", "0.60522497", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCISOWeekYear(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyDate) var year = date.getUTCFullYear() var fourthOfJanu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818263", "0.66675735", "0.64038146", "0.6337222", "0.6309952", "0.6283027", "0.6283027", "0.6246817", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.6148351", "0.611605", "0.60867715", "0.6081826", "0.6070095", "0.60522497", "0.60522497", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCWeek(dirtyDate, options) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyDate) var diff = Object(_startOfUTCWeek_index_js__WE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818668", "0.6669305", "0.6403972", "0.63366324", "0.6310375", "0.62818384", "0.62818384", "0.62455916", "0.62171143", "0.62171143", "0.62171143", "0.62171143", "0.62171143", "0.61483145", "0.61166734", "0.60870653", "0.6084049", "0.60712206", "0.6052645", "0.6052645", "0....
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCWeekYear (dirtyDate, dirtyOptions) { if (arguments.length < 1) { throw new TypeError('1 argument required, but only ' + arguments.length + ' present') } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate, dirtyOptions) var year = date.getUTCFullYear() va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818668", "0.6669305", "0.6403972", "0.63366324", "0.6310375", "0.62818384", "0.62818384", "0.62455916", "0.62171143", "0.62171143", "0.62171143", "0.62171143", "0.62171143", "0.61483145", "0.61166734", "0.60870653", "0.6084049", "0.60712206", "0.6052645", "0.6052645", "0....
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function setUTCDay(dirtyDate, dirtyDay, dirtyOptions) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var options = dirtyOptions || {} var locale = options.locale var localeWeekStartsOn = locale && locale.options && lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818263", "0.66675735", "0.64038146", "0.6337222", "0.6309952", "0.6283027", "0.6283027", "0.6246817", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.6148351", "0.611605", "0.60867715", "0.6081826", "0.6070095", "0.60522497", "0.60522497", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function setUTCISODay(dirtyDate, dirtyDay) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var day = Object(_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyDay) if (day % 7 === 0) { day = day - 7 } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818263", "0.66675735", "0.64038146", "0.6337222", "0.6309952", "0.6283027", "0.6283027", "0.6246817", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.6148351", "0.611605", "0.60867715", "0.6081826", "0.6070095", "0.60522497", "0.60522497", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function setUTCISOWeek(dirtyDate, dirtyISOWeek) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate) var isoWeek = Object(_toInteger_index_js_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818263", "0.66675735", "0.64038146", "0.6337222", "0.6309952", "0.6283027", "0.6283027", "0.6246817", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.6148351", "0.611605", "0.60867715", "0.6081826", "0.6070095", "0.60522497", "0.60522497", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function setUTCWeek(dirtyDate, dirtyWeek, options) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate) var week = Object(_toInteger_index_js_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.68170786", "0.6668688", "0.64021033", "0.633467", "0.630995", "0.62829614", "0.62829614", "0.62469476", "0.62180746", "0.62180746", "0.62180746", "0.62180746", "0.62180746", "0.6146751", "0.6116433", "0.60861605", "0.608267", "0.60691357", "0.605265", "0.605265", "0.605265...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function startOfUTCISOWeek(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var weekStartsOn = 1 var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyDate) var day = date.getUTCDay() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818263", "0.66675735", "0.64038146", "0.6337222", "0.6309952", "0.6283027", "0.6283027", "0.6246817", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.6148351", "0.611605", "0.60867715", "0.6081826", "0.6070095", "0.60522497", "0.60522497", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function startOfUTCISOWeekYear(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var year = Object(_getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyDate) var fourthOfJanuary = new Date(0) f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818263", "0.66675735", "0.64038146", "0.6337222", "0.6309952", "0.6283027", "0.6283027", "0.6246817", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.6148351", "0.611605", "0.60867715", "0.6081826", "0.6070095", "0.60522497", "0.60522497", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function startOfUTCWeek(dirtyDate, dirtyOptions) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var options = dirtyOptions || {} var locale = options.locale var localeWeekStartsOn = locale && locale.options && locale.o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818263", "0.66675735", "0.64038146", "0.6337222", "0.6309952", "0.6283027", "0.6283027", "0.6246817", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.62177664", "0.6148351", "0.611605", "0.60867715", "0.6081826", "0.6070095", "0.60522497", "0.60522497", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function startOfUTCWeekYear (dirtyDate, dirtyOptions) { if (arguments.length < 1) { throw new TypeError('1 argument required, but only ' + arguments.length + ' present') } var options = dirtyOptions || {} var locale = options.locale var localeFirstWeekContainsDate = locale && locale.options && lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.68170786", "0.6668688", "0.64021033", "0.633467", "0.630995", "0.62829614", "0.62829614", "0.62469476", "0.62180746", "0.62180746", "0.62180746", "0.62180746", "0.62180746", "0.6146751", "0.6116433", "0.60861605", "0.608267", "0.60691357", "0.605265", "0.605265", "0.605265...
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function makeEmptyFunction(arg) { return function () { return arg; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.5823344", "0.5636431", "0.5555746", "0.54894143", "0.5399908", "0.5385459", "0.5363054", "0.5327689", "0.5321938", "0.5315841", "0.5315841", "0.5293436", "0.52668065", "0.52165824", "0.51989865", "0.51919687", "0.51916057", "0.51553124", "0.51408786", "0.51316756", "0.5126...
0.0
-1
Returns true if the HTML5 history API is supported. Taken from Modernizr. changed to avoid false negatives for Windows Phones:
function supportsHistory() { var ua = window.navigator.userAgent; if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; return window.history && 'pushState' in window.histo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function supportsHistory() { // 60\n var ua = navigator.userAgent; // 61\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf(...
[ "0.8457828", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076", "0.84374076",...
0.8341415
92
Returns true if browser fires popstate on hash change. IE10 and IE11 do not.
function supportsPopStateOnHashChange() { return window.navigator.userAgent.indexOf('Trident') === -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function supportsPopStateOnHashChange(){return window.navigator.userAgent.indexOf('Trident')===-1;}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n }", "function supportsHashChange(documentMode, global) {\n return 'onhashchange' i...
[ "0.8509731", "0.8428661", "0.73432076", "0.73432076", "0.73432076", "0.73432076", "0.7323875", "0.7241586", "0.7105203", "0.68672806", "0.6816669", "0.6816669", "0.6816669", "0.68054557", "0.6772742", "0.6761178", "0.67340374", "0.6705982", "0.66592395", "0.6656015", "0.65662...
0.82991886
51
Returns false if using go(n) with hash history causes a full page reload.
function supportsGoWithoutReloadUsingHash() { return window.navigator.userAgent.indexOf('Firefox') === -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changed()\n {\n if (window.location.hash !== this.lastHash)\n {\n this.lastHash = window.location.hash;\n return true;\n }\n else\n {\n return false;\n }\n }", "function checkHash() {\r\n if (location.hash && $this.find(l...
[ "0.6852763", "0.66267955", "0.61700994", "0.61222756", "0.61216486", "0.6110163", "0.6105664", "0.61048263", "0.60959584", "0.6087925", "0.6071701", "0.603127", "0.60293615", "0.60271335", "0.6000149", "0.6000149", "0.6000149", "0.6000149", "0.6000149", "0.6000149", "0.600014...
0.0
-1
Returns true if a given popstate event is an extraneous WebKit event. Accounts for the fact that Chrome on iOS fires real popstate events containing undefined state when pressing the back button.
function isExtraneousPopstateEvent(event) { event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isExtraneousPopstateEvent(event){event.state===undefined&&navigator.userAgent.indexOf('CriOS')===-1;}", "function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n return event.sta...
[ "0.8189164", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764", "0.81115764",...
0.81061935
60
Creates a history object that uses the HTML5 history API including pushState, replaceState, and the popstate event.
function createBrowserHistory(props) { if (props === void 0) { props = {}; } !canUseDOM ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__["default"])(false, 'Browser history needs a DOM') : undefined : void 0; var globalHistory = window.history; var canUseHistory = supportsHistory(); var nee...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBrowserHistory() {\r\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\r\n\t\r\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : unde...
[ "0.73634773", "0.7329644", "0.7329644", "0.7308849", "0.7308849", "0.7308849", "0.7308849", "0.7307007", "0.73040444", "0.73011494", "0.7293236", "0.7287931", "0.728792", "0.72829384", "0.72827846", "0.72827846", "0.72827846", "0.72827846", "0.72827846", "0.7254787", "0.72541...
0.67869323
98
Creates a history object that stores locations in memory.
function createMemoryHistory(props) { if (props === void 0) { props = {}; } var _props = props, getUserConfirmation = _props.getUserConfirmation, _props$initialEntries = _props.initialEntries, initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries, _props$in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMemoryHistory(base = '') {\n let listeners = [];\n let queue = [START];\n let position = 0;\n function setLocation(location) {\n position++;\n if (position === queue.length) {\n // we are at the end, we can simply append a new entry\n queue.push(locati...
[ "0.67093724", "0.6660363", "0.66349125", "0.6514125", "0.6496346", "0.6491885", "0.6476713", "0.64495486", "0.6401474", "0.6383285", "0.6383285", "0.6383285", "0.6383285", "0.6383285", "0.6383285", "0.6377784", "0.63725656", "0.6372155", "0.63628995", "0.63628995", "0.6362899...
0.6322891
57
For Node v0.10 support. Remove this eventually.
function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _node_p(){\n\tvar ret = false;\n\tif( anchor.environment() == 'Node.js' ){ ret = true; }\n\treturn ret;\n }", "function node_error(err) {\r\n node.error(err, err);\r\n }", "private public function m246() {}", "function NodeFsHandler() {}", "function NodeFsHandler() {}", "static reset(...
[ "0.5863744", "0.57052314", "0.5687453", "0.5554483", "0.5554483", "0.5446861", "0.54351884", "0.53819644", "0.53564024", "0.532763", "0.53192127", "0.5206378", "0.5198833", "0.5156521", "0.5149117", "0.512883", "0.512883", "0.512883", "0.51123583", "0.51001763", "0.5091854", ...
0.0
-1
Clones the object and adds a camel cased property version.
function addCamelCasedVersion(obj) { var regExp = /(-[a-z])/g; var replace = function replace(str) { return str[1].toUpperCase(); }; var newObj = {}; for (var key in obj) { newObj[key] = obj[key]; newObj[key.replace(regExp, replace)] = obj[key]; } return newObj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n var newObj = {};\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n return newO...
[ "0.7020577", "0.6956395", "0.6956395", "0.6900087", "0.6881379", "0.6832284", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "0.6757636", "...
0.6878747
30
Add unit to numeric values.
function defaultUnit() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var camelCasedOptions = addCamelCasedVersion(options); function onProcessStyle(style, rule) { if (rule.type !== 'style') return style; for (var prop in style) { style[prop] = iterate(pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unit(i, units) {\n\t if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n\t return i;\n\t } else {\n\t return \"\" + i + units;\n\t }\n\t }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\...
[ "0.6622079", "0.65806407", "0.65806407", "0.65793705", "0.65624154", "0.65624154", "0.61946905", "0.60811275", "0.60735935", "0.60721624", "0.60721624", "0.60721624", "0.6060846", "0.6051657", "0.6045234", "0.60335", "0.6028815", "0.5936279", "0.59199363", "0.58140886", "0.58...
0.0
-1
Get a function to be used for $ref replacement.
function getReplaceRef(container) { return function (match, key) { var rule = container.getRule(key); if (rule) return rule.selector; (0, _warning2.default)(false, '[JSS] Could not find the referenced rule %s in %s.', key, container.options.meta || container); return key; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fnref(name){\n return mkdat(\"fnref\", name);\n }", "function createRef() {\n var func = function setRef(node) {\n func.current = node;\n };\n return func;\n}", "function composeRef() {\n for (\n var _len = arguments.length, refs = new Array(_len), _key = 0;\n ...
[ "0.6649858", "0.64558005", "0.61212206", "0.60655695", "0.60655695", "0.60599333", "0.59819967", "0.5978643", "0.5965357", "0.5952257", "0.58624095", "0.58603877", "0.5857155", "0.58362913", "0.58362913", "0.58349156", "0.582107", "0.582107", "0.57546806", "0.572931", "0.5696...
0.5899973
35
Sort props by length.
function jssPropsSort() { function sort(prop0, prop1) { return prop0.length - prop1.length; } function onProcessStyle(style, rule) { if (rule.type !== 'style') return style; var newStyle = {}; var props = Object.keys(style).sort(sort); for (var prop in props) { newStyle[props[prop]] = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByLength(array) {\n\treturn array.sort(function (a, b) {\n\t\treturn a.length - b.length || // sort by length, if equal then\n\t\t\ta.localeCompare(b); // sort by dictionary order\n\t});\n}", "function sortByLength(strs) {\n let sortedArray = \n strs.sort((sortedArray, valueLength) => {...
[ "0.6475834", "0.6382647", "0.6283946", "0.62305814", "0.61109203", "0.6100722", "0.6030937", "0.599393", "0.5980945", "0.59409404", "0.59344614", "0.5908574", "0.5903283", "0.58823365", "0.5867858", "0.5840485", "0.5840485", "0.5840485", "0.5840485", "0.5840485", "0.5840485",...
0.5851081
40
Get a style property value.
function getPropertyValue(cssRule, prop) { try { return cssRule.style.getPropertyValue(prop); } catch (err) { // IE may throw if property is unknown. return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getStyle(el, property) {\n if (window.getComputedStyle) {\n return document.defaultView.getComputedStyle(el, null)[property];\n }\n if (el.currentStyle) {\n return el.currentStyle[property];\n ...
[ "0.74297154", "0.74020785", "0.7399583", "0.7328178", "0.7311819", "0.7249292", "0.72404826", "0.72404826", "0.7203527", "0.71599", "0.7143572", "0.7133223", "0.70882905", "0.70766973", "0.7049624", "0.70360684", "0.70360684", "0.7029471", "0.7014411", "0.69898814", "0.698285...
0.0
-1
Set a style property.
function setProperty(cssRule, prop, value) { try { var cssValue = value; if (Array.isArray(value)) { cssValue = (0, _toCssValue2['default'])(value, true); if (value[value.length - 1] === '!important') { cssRule.style.setProperty(prop, cssValue, 'important'); return true; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setStyle(property, value) {\n if (!this._props.style) this._props.style = {};\n this._props.style[property] = value;\n }", "function setStyle(element, property, value) {\n element.style[property] = value;\n}", "function setStyle(n, key, value) {\n n.style[key] = value;\n \n }", "function set...
[ "0.798955", "0.7963325", "0.77943856", "0.7488918", "0.73106766", "0.73015743", "0.7267794", "0.7267794", "0.7191311", "0.71117854", "0.71055925", "0.701523", "0.69587797", "0.69548684", "0.69548684", "0.69548684", "0.6919497", "0.69163847", "0.69163847", "0.6902449", "0.6784...
0.0
-1
Remove a style property.
function removeProperty(cssRule, prop) { try { cssRule.style.removeProperty(prop); } catch (err) { (0, _warning2['default'])(false, '[JSS] DOMException "%s" was thrown. Tried to remove property "%s".', err.message, prop); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeProperty(key) {\n var root = document.documentElement;\n\n root.style.removeProperty(key);\n}", "function removeProperty(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop);\n } else {\n cssRule...
[ "0.75522846", "0.7507937", "0.740172", "0.740172", "0.7248959", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0.7172173", "0...
0.6827647
51
Find attached sheet with an index higher than the passed one.
function findHigherSheet(registry, options) { for (var i = 0; i < registry.length; i++) { var sheet = registry[i]; if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) { return sheet; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findHigherSheet(registry, options) {\n for (var i = 0; i < registry.length; i++) {\n var sheet = registry[i];\n if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n return null;\n }...
[ "0.7568206", "0.75397694", "0.7499155", "0.7499155", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", "0.7475129", ...
0.7484676
28
Find attached sheet with the highest index.
function findHighestSheet(registry, options) { for (var i = registry.length - 1; i >= 0; i--) { var sheet = registry[i]; if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) { return sheet; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findHighestSheet(registry, options) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var sheet = registry[i];\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n return null;\n }", "function findHighestSheet(r...
[ "0.77357453", "0.7704632", "0.7696885", "0.7696885", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", "0.76521736", ...
0.7669926
28
Find a comment with "jss" inside.
function findCommentNode(text) { var head = getHead(); for (var i = 0; i < head.childNodes.length; i++) { var node = head.childNodes[i]; if (node.nodeType === 8 && node.nodeValue.trim() === text) { return node; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IsInComment (ss, nn)\r\n { let ii=-1, bb=0;\r\n do { ii=ss.indexOf(\"{\",ii+1); bb++; }\r\n while ((ii>=0)&&(ii<nn));\r\n ii=-1;\r\n do { ii=ss.indexOf(\"}\",ii+1); bb--; }\r\n while ((ii>=0)&&(ii<nn));\r\n return(bb);\r\n }", "function findCommentNode(text) {\n var head = ...
[ "0.6377393", "0.6230793", "0.61686164", "0.61218774", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", "0.61005807", ...
0.61737394
26
Find a node before which we can insert the sheet.
function findPrevNode(options) { var registry = _sheets2['default'].registry; if (registry.length > 0) { // Try to insert before the next higher sheet. var sheet = findHigherSheet(registry, options); if (sheet) return sheet.renderer.element; // Otherwise insert after the last attached. sheet ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPrevNode(options) {\n var registry = sheets.registry;\n\n if (registry.length > 0) {\n // Try to insert before the next higher sheet.\n var sheet = findHigherSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.pa...
[ "0.7421259", "0.74022955", "0.7398367", "0.7398367", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", "0.7362382", ...
0.69664556
60
Insert style element into the DOM.
function insertStyle(style, options) { var insertionPoint = options.insertionPoint; var prevNode = findPrevNode(options); if (prevNode) { var parentNode = prevNode.parentNode; if (parentNode) parentNode.insertBefore(style, prevNode); return; } // Works with iframes and any node types. if (in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertStyle(style) {\n var a=document.createElement(\"style\");\n a.innerHTML=style;\n document.head.appendChild(a);\n}", "function insertStyle(style, options) {\n var insertionPoint = options.insertionPoint;\n var nextNode = findPrevNode(options);\n\n if (nextNode !== false && nextNode.pare...
[ "0.7945176", "0.7706988", "0.7684279", "0.76536816", "0.76536816", "0.764529", "0.764529", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "0.7645039", "...
0.74721646
63
Create a rule instance.
function createRule() { var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'unnamed'; var decl = arguments[1]; var options = arguments[2]; var jss = options.jss; var declCopy = (0, _cloneStyle2['default'])(decl); var rule = jss.plugins.onCreateRule(name, declCopy, options); i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static makeRule(options) {\n return new Rule(options.name, options.severity, options.selector ? Selector.parse(options.selector) : null, Rule.makePattern(options.pattern), options.lint || options.message, options.applies);\n }", "create(context) {\n freezeDeeply(context.opt...
[ "0.68356055", "0.6653184", "0.65755916", "0.64988756", "0.6485865", "0.6473794", "0.6325255", "0.6288921", "0.6207557", "0.61734235", "0.6164909", "0.61511165", "0.5944397", "0.59429896", "0.594144", "0.5869456", "0.58078146", "0.58078146", "0.58069164", "0.5770457", "0.57704...
0.64504606
30
Extracts a styles object with only props that contain function values.
function getDynamicStyles(styles) { var to = null; for (var key in styles) { var value = styles[key]; var type = typeof value === 'undefined' ? 'undefined' : _typeof(value); if (type === 'function') { if (!to) to = {}; to[key] = value; } else if (type === 'object' && value !== null && ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractStyleParts() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var classes = [];\n var objects = [];\n var stylesheet = _Stylesheet__WEBPACK_IMPORTED_MODULE_0__.Stylesheet.getInstance();\n function _processArgs(argsLis...
[ "0.62761724", "0.62761724", "0.62759346", "0.6259358", "0.6161896", "0.6100022", "0.60847485", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873",...
0.6004265
65
Link rule with CSSStyleRule and nested rules with corresponding nested cssRules if both exists.
function linkRule(rule, cssRule) { rule.renderable = cssRule; if (rule.rules && cssRule.cssRules) rule.rules.link(cssRule.cssRules); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function linkRule(rule, cssRule) {\n rule.renderable = cssRule;\n if (rule.rules && cssRule.cssRules) rule.rules.link(cssRule.cssRules);\n }", "function linkRule(rule, cssRule) {\n\t rule.renderable = cssRule;\n\t if (rule.rules && cssRule.cssRules) rule.rules.link(cssRule.cssRules);\n\t}", "function ...
[ "0.668618", "0.6599938", "0.6599938", "0.58266324", "0.581942", "0.570616", "0.56474924", "0.5623747", "0.5611517", "0.55530465", "0.5530931", "0.5530931", "0.5500031", "0.5462916", "0.544259", "0.544092", "0.5435225", "0.5435225", "0.53858876", "0.5370974", "0.5360726", "0...
0.66892326
26
Converts a Rule to CSS string.
function toCss(selector, style) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var result = ''; if (!style) return result; var _options$indent = options.indent, indent = _options$indent === undefined ? 0 : _options$indent; var fallbacks = style.fallbacks; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toCSSDeclaration(prop, val) {\n var props = toCSSProps(prop);\n for (var i = 0, ii = props.length; i < ii; ++i) {\n props[i] += \": \"+val+\";\";\n }\n return props.join(\"\");\n }", "toString(): string {\n if (Array.isArray(this.style)) {\n let str = ''\n for (let index =...
[ "0.61540586", "0.61174166", "0.57030326", "0.5684758", "0.5682039", "0.56459785", "0.5640974", "0.5640974", "0.5640974", "0.5640974", "0.56340164", "0.56340164", "0.56340164", "0.56340164", "0.56340164", "0.56340164", "0.56340164", "0.56340164", "0.56340164", "0.56340164", "0...
0.0
-1
Converts array values to string. `margin: [['5px', '10px']]` > `margin: 5px 10px;` `border: ['1px', '2px']` > `border: 1px, 2px;` `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;` `color: ['red', !important]` > `color: red !important;`
function toCssValue(value) { var ignoreImportant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; if (!Array.isArray(value)) return value; var cssValue = ''; // Support space separated values via `[['5px', '10px']]`. if (Array.isArray(value[0])) { for (var i = 0; i < value.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toCssValue(value) {\n var ignoreImportant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!Array.isArray(value)) return value;\n\n var cssValue = '';\n\n // Support space separated values via `[['5px', '10px']]`.\n if (Array.isArray(value[0])) {\n f...
[ "0.6903995", "0.68009657", "0.67923075", "0.6577335", "0.6524775", "0.6505128", "0.64282936", "0.64282936", "0.63811165", "0.63811165", "0.63811165", "0.63811165", "0.63811165", "0.63811165", "0.63811165", "0.63811165", "0.63811165", "0.63811165", "0.63811165", "0.63811165", ...
0.678808
26
Removes all keyvalue entries from the hash.
function hashClear() { this.__data__ = _nativeCreate_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? Object(_nativeCreate_js__WEBPACK_IMPORTED_MODULE_0__["default"])(null) : {}; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", ...
[ "0.67331547", "0.66229314", "0.65130246", "0.6456053", "0.62131137", "0.6201214", "0.6139392", "0.61100906", "0.6029288", "0.5966744", "0.59360605", "0.59072584", "0.59072584", "0.59072584", "0.59040016", "0.5900616", "0.5900616", "0.5900616", "0.58648694", "0.58648694", "0.5...
0.0
-1
Removes all keyvalue entries from the list cache.
function listCacheClear() { this.__data__ = []; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}", "function listCacheClear() ...
[ "0.7357779", "0.7357779", "0.7357779", "0.7357779", "0.7317932", "0.72645503", "0.72645503", "0.7262977", "0.72569066", "0.72569066", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7234546",...
0.0
-1
Removes all keyvalue entries from the map.
function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new _Hash_js__WEBPACK_IMPORTED_MODULE_0__["default"], 'map': new (_Map_js__WEBPACK_IMPORTED_MODULE_2__["default"] || _ListCache_js__WEBPACK_IMPORTED_MODULE_1__["default"]), 'string': new _Hash_js__WEBPACK_IMPORTED_MODULE_0__["default"] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function multiMapRemo...
[ "0.7590395", "0.70693994", "0.6736648", "0.6651404", "0.6529779", "0.6266445", "0.6259287", "0.6259287", "0.6259287", "0.6172586", "0.6172586", "0.6172586", "0.61676484", "0.61526936", "0.6149207", "0.6149207", "0.6149207", "0.6149207", "0.6149207", "0.6149207", "0.6149207", ...
0.0
-1
Removes all keyvalue entries from the stack.
function stackClear() { this.__data__ = new _ListCache_js__WEBPACK_IMPORTED_MODULE_0__["default"]; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear () {\n this._dict = {}\n this._stack = [this._dict]\n }", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear() {\n\t this.__...
[ "0.63577217", "0.63291264", "0.63291264", "0.63291264", "0.62734073", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006"...
0.0
-1
Expose a method for transforming tokens into the path function.
function tokensToFunction (tokens) { // Compile all the tokens into regexps. var matches = new Array(tokens.length) // Compile all the patterns before compilation. for (var i = 0; i < tokens.length; i++) { if (typeof tokens[i] === 'object') { matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n const matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^...
[ "0.618919", "0.6013548", "0.5990742", "0.5988443", "0.5988443", "0.5988443", "0.5988443", "0.5988443", "0.5988443", "0.59617156", "0.59617156", "0.59617156", "0.59617156", "0.59617156", "0.5929689", "0.5923312", "0.5904867", "0.5898217", "0.5898217", "0.5898217", "0.5898217",...
0.0
-1
Updates the position of the popper, computing the new offsets and applying the new style. Prefer `scheduleUpdate` over `update` because of performance reasons.
function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // ...
[ "0.81239766", "0.80965054", "0.809285", "0.809285", "0.809285", "0.809285", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.807475", "0.8...
0.0
-1
Setup needed event listeners used to update the popper position
function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(refe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function g(e){if(Q.popperInstance?(y()||Q.popperInstance.scheduleUpdate(),Q.props.livePlacement&&!y()&&Q.popperInstance.enableEventListeners()):(Q.popperInstance=v(),Q.props.livePlacement||Q.popperInstance.disableEventListeners())\n/**\n * If the instance previously had followCursor behavior, it will be\n ...
[ "0.6769974", "0.6417632", "0.64030445", "0.6223608", "0.6183171", "0.6181786", "0.6170131", "0.6156681", "0.6137401", "0.610449", "0.6096503", "0.6080667", "0.60669744", "0.60642374", "0.6033124", "0.60322726", "0.60289633", "0.60249007", "0.6023305", "0.60156345", "0.6015634...
0.0
-1
It will add resize/scroll events and start recalculating position of the popper element when they are triggered.
function enableEventListeners() { if (!this.state.eventsEnabled) { this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "adoptPositionOnResize() {\n if (this.adoptOnResize) {\n\n /**\n * Get app event manager\n * @type {ApplicationEventManager|{subscribe, eventList}}\n */\n const appEventManager = this.view.controller.root().eventManager;\n\n appEventManager.subscribe({\n event: {name: appE...
[ "0.6576275", "0.6570369", "0.6539556", "0.6458064", "0.6442035", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "0.6428648", "...
0.0
-1
Remove event listeners used to update the popper position
function removeEventListeners(reference, state) { // Remove resize event listener on window getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { target.removeEventListener('scroll', state.upd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEvents () {\n this.container.classList.remove(\"tooltiped\");\n\n this.container.removeEventListener(\"mouseenter\", this._mouseOver);\n this.container.removeEventListener(\"mousemove\", this._mouseMove);\n this.container.removeEventListener(\"mouseleave\", this._mouseOut);\n ...
[ "0.6902162", "0.6785765", "0.6785765", "0.6785765", "0.6770545", "0.6743059", "0.6592434", "0.6507296", "0.6457278", "0.6452451", "0.6450113", "0.64127916", "0.63347775", "0.629248", "0.62742007", "0.62729037", "0.6259061", "0.62421805", "0.6237802", "0.62315637", "0.62195307...
0.0
-1
It will remove resize/scroll events and won't recalculate popper position when they are triggered. It also won't trigger `onUpdate` callback anymore, unless you call `update` method manually.
function disableEventListeners() { if (this.state.eventsEnabled) { cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(){ // if popper is destroyed, don't perform any further update\nif(this.state.isDestroyed){return;}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}}; // compute reference element offsets\ndata.offsets.reference = getReferenceOffsets(this.state,this.popper,this...
[ "0.7490377", "0.7338239", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", "0.73072255", ...
0.0
-1
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n ...
[ "0.5276731", "0.52603525", "0.51912946", "0.5183357", "0.5126483", "0.50448495", "0.48931673", "0.4861047", "0.48415267", "0.48314145", "0.48242697", "0.48147812", "0.48078167", "0.47866392", "0.47839633", "0.47597152", "0.47521117", "0.47409353", "0.47275993", "0.47050476", ...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own /eslintdisable noselfcompare
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject$1(obj) {\n ...
[ "0.6731362", "0.6633782", "0.6609513", "0.6599949", "0.6599775", "0.6565226", "0.6506394", "0.64681304", "0.6463561", "0.641157", "0.6370518", "0.63660806", "0.63660806", "0.63660806", "0.63660806", "0.6357975", "0.6327474", "0.6323051", "0.63226765", "0.6296809", "0.6296809"...
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\...
[ "0.6908362", "0.6774889", "0.6606997", "0.65384954", "0.64926404", "0.6489072", "0.6489072", "0.6449892", "0.6449892", "0.6428727", "0.64280385", "0.6402795", "0.6402795", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.639...
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for type...
[ "0.6877202", "0.6853745", "0.6853745", "0.6853745", "0.6853745", "0.685244", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0.68470055", "0....
0.0
-1
Returns a string that is postfixed to a warning about an invalid type. For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case \"array\":\n case \"object\":\n return \"an \" + type;\n case \"boolean\":\n ...
[ "0.65989554", "0.6565615", "0.65598816", "0.65598816", "0.65598816", "0.65598816", "0.6522688", "0.6521844", "0.6506291", "0.6506291", "0.6506291", "0.6506291", "0.6506291", "0.6501598", "0.64900815", "0.6477932", "0.6477932", "0.6477932", "0.6477932", "0.6477932", "0.6477932...
0.0
-1
Returns class name of the object, if any.
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(obj) {\n var funcNameRegex = /function\\s+(.+?)\\s*\\(/;\n var results = funcNameRegex.exec(obj['constructor'].toString());\n return (results && results.length > 1) ? results[1] : '';\n }", "getClassName() {\n return this.constructor\n .className;\n...
[ "0.7730571", "0.74697196", "0.74697196", "0.74258965", "0.7164231", "0.71448183", "0.7083163", "0.7080694", "0.6995368", "0.6971116", "0.6901662", "0.6883398", "0.67147285", "0.66557264", "0.6639163", "0.6611592", "0.6611592", "0.6611592", "0.6611592", "0.6600893", "0.6599787...
0.0
-1
Convert from UTF16, forcing the use of bytemode encoding in our QR Code. This allows us to encode Hanji, Kanji, emoji, etc. Ideally we'd do more detection and not resort to bytemode if possible, but we're trading off a smaller library for a smaller amount of data we can potentially encode. Based on
function convertStr(str) { var out = ''; for (var i = 0; i < str.length; i++) { var charcode = str.charCodeAt(i); if (charcode < 0x0080) { out += String.fromCharCode(charcode); } else if (charcode < 0x0800) { out += String.fromCharCode(0xc0 | charcode >> 6); out += String.fromCharCod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utf16to8(str) {\n if (str.match(/^[\\x00-\\x7f]*$/) != null) {\n return str;\n }\n var out, i, j, len, c, c2;\n out = [];\n len = str.length;\n for (i = 0, j = 0; i < len; i++, j++) {\n c = str.charCodeAt(i);\n if (c <= 0x7f) {\n out[j] = str.charAt(i);\n ...
[ "0.709098", "0.6955828", "0.68178576", "0.67809165", "0.67809165", "0.6636817", "0.65850455", "0.64935446", "0.64935446", "0.6464074", "0.636625", "0.63221604", "0.6319097", "0.63089025", "0.63089025", "0.63089025", "0.63089025", "0.62834525", "0.6277709", "0.626692", "0.6257...
0.0
-1
Utils for some components
function isDayDisabled(day) { var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minDate = _ref3.minDate, maxDate = _ref3.maxDate, excludeDates = _ref3.excludeDates, includeDates = _ref3.includeDates, filterDate = _ref3.filterDate; return isOutOfBounds...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Utils() {}", "function Utils() {}", "function Utils(){}", "function AppUtils() {}", "function Utils() {\n}", "function AeUtil() {}", "function DCKBVCommonUtils() {\n // purely static object at the moment, nothing in the instances.\n }", "function Util() {}", "static getHe...
[ "0.68866235", "0.68866235", "0.68192977", "0.66429526", "0.6554634", "0.63973075", "0.6368775", "0.6088154", "0.5995532", "0.59760416", "0.59020364", "0.58955324", "0.5886125", "0.58465254", "0.58465254", "0.58465254", "0.58465254", "0.58323455", "0.58188117", "0.5788791", "0...
0.0
-1
Compares dates year+month combinations
function hasPreSelectionChanged(date1, date2) { if (date1 && date2) { return Object(date_fns_getMonth__WEBPACK_IMPORTED_MODULE_23__["default"])(date1) !== Object(date_fns_getMonth__WEBPACK_IMPORTED_MODULE_23__["default"])(date2) || Object(date_fns_getYear__WEBPACK_IMPORTED_MODULE_24__["default"])(date1) !== Objec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareMonthAndYear(firstMonthAndYear, secondMonthAndYear) {\n var firstMonth = firstMonthAndYear.getMonth();\n var firstYear = firstMonthAndYear.getYear();\n var secondMonth = secondMonthAndYear.getMonth();\n var secondYear = secondMonthAndYear.getYear();\n if (firstYear === secondYear) {\...
[ "0.6947473", "0.69052035", "0.6783506", "0.6741721", "0.66653687", "0.66653687", "0.66235626", "0.6578457", "0.64239943", "0.63727033", "0.6351784", "0.63058513", "0.6291946", "0.62886584", "0.6182949", "0.6127684", "0.60972095", "0.60972095", "0.60886794", "0.60607785", "0.6...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own
function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function i(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", ...
[ "0.7044135", "0.6979357", "0.68574303", "0.6821805", "0.68029666", "0.67803156", "0.6729492", "0.67206", "0.6709456", "0.66839457", "0.6676559", "0.6676559", "0.6676559", "0.66488636", "0.6640003", "0.6640003", "0.6640003", "0.6640003", "0.6625777", "0.6623136", "0.6623136", ...
0.0
-1
Assumes there is no parent namespace.
function getIntrinsicNamespace(type) { switch (type) { case 'svg': return SVG_NAMESPACE; case 'math': return MATH_NAMESPACE; default: return HTML_NAMESPACE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentObject(){\r\n var obj = parent;\r\n if (namespace !== \"\") {\r\n for (var i = 0, ii = namespace.split(\".\"); i < ii.length; i++) {\r\n obj = obj[ii[i]];\r\n }\r\n }\r\n return obj.easyXDM;\r\n}", "function namespaceHTMLInternal() {\n instructionState.lF...
[ "0.59294087", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.57438385", "0.56890935", "0.5673484", "0.56610936", "0.5640146", "0.5580239", "0.544239", "0.5442175", "0.5410278", "0.5397606", "0.53690296", "0.53592485", "0.5327534", "0.532705",...
0.0
-1
Hyphenates a camelcased CSS property name, for example: > hyphenateStyleName('backgroundColor') hyphenateStyleName('MozTransition') hyphenateStyleName('msTransition') < "mstransition" As Modernizr suggests ( an `ms` prefix is converted to `ms`.
function hyphenateStyleName(name) { return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePa...
[ "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.7949319" ]
0.7950179
79
Extra closure so queue and replace can be captured properly
function processChild(element, Component) { var publicContext = processContext(Component, context, threadID); var queue = []; var replace = false; var updater = { isMounted: function (publicInstance) { return false; }, enqueueForceUpdate: function (publicInstance) { if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processQueue(cb){\n\n}", "function shiftQueue(){\n\t\t\t\t\tvar q = queue.shift();\n\t\t\t\t\tvar uri = q[0], func = q[1], args = q[2];\n\t\t\t\t\tfunction callback( value, func ){\n\t\t\t\t\t\tfunc = func || 'onResult';\n\t\t\t\t\t\t// ensure callback isn't executed twice\n\t\t\t\t\t\tif( uri !== null ...
[ "0.59236604", "0.5772006", "0.5736188", "0.5681423", "0.56722724", "0.56443006", "0.56410056", "0.55184406", "0.55184406", "0.55080605", "0.54919213", "0.5485503", "0.5485503", "0.5485503", "0.5485503", "0.54806703", "0.5454444", "0.5443723", "0.540827", "0.53784037", "0.5357...
0.0
-1
DEVonly TODO: type this more strictly:
function ReactDOMServerRenderer(children, makeStaticMarkup) { _classCallCheck(this, ReactDOMServerRenderer); var flatChildren = flattenTopLevelChildren(children); var topFrame = { type: null, // Assume all trees start in the HTML namespace (not totally true, but // this is what we did hi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient private protected internal function m182() {}", "protected internal function m252() {}", "transient final protected internal function m174() {}", "transient protected internal function m189() {}", "static transient fi...
[ "0.6925981", "0.6738153", "0.6522529", "0.651844", "0.6435165", "0.63278633", "0.62989914", "0.6246235", "0.6238488", "0.623479", "0.6182613", "0.61710703", "0.6161236", "0.6129612", "0.6117197", "0.61057746", "0.600592", "0.59749955", "0.59022564", "0.58848274", "0.5850611",...
0.0
-1
Render a ReactElement to its initial HTML. This should only be used on the server. See
function renderToString(element) { var renderer = new ReactDOMServerRenderer(element, false); try { var markup = renderer.read(Infinity); return markup; } finally { renderer.destroy(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderToString(element,options){var renderer=new ReactDOMServerRenderer(element,false,options);try{var markup=renderer.read(Infinity);return markup;}finally{renderer.destroy();}}", "function renderToStaticMarkup(element) {\n\t !React.isValidElement(element) ? false ? invariant(false, 'renderToStaticMa...
[ "0.679307", "0.67493474", "0.67439115", "0.67215127", "0.67178273", "0.67178273", "0.6711781", "0.67092425", "0.66913134", "0.6665206", "0.6665206", "0.6662547", "0.66152126", "0.66152126", "0.66152126", "0.66152126", "0.6610913", "0.660798", "0.65918964", "0.6587991", "0.658...
0.65968245
24
Similar to renderToString, except this doesn't create extra DOM attributes such as datareactid that React uses internally. See
function renderToStaticMarkup(element) { var renderer = new ReactDOMServerRenderer(element, true); try { var markup = renderer.read(Infinity); return markup; } finally { renderer.destroy(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderToString(element,options){var renderer=new ReactDOMServerRenderer(element,false,options);try{var markup=renderer.read(Infinity);return markup;}finally{renderer.destroy();}}", "function renderToString(element) {\n var renderer = new ReactDOMServerRenderer(element, false);\n var markup = r...
[ "0.6909207", "0.66237795", "0.66237795", "0.6594679", "0.64822584", "0.64462084", "0.64462084", "0.64462084", "0.64462084", "0.63740456", "0.63285273", "0.62268734", "0.6218408", "0.6163979", "0.6098177", "0.6098177", "0.6098177", "0.6098177", "0.6098177", "0.6098177", "0.609...
0.0
-1
During execution of guarded functions we will capture the first error which we will rethrow to be handled by the top level error handler.
function rethrowCaughtError() { if (hasRethrowError) { var error = rethrowError; hasRethrowError = false; rethrowError = null; throw error; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _tryEachErrorHandler(next, ctx) {\n if (ctx.ix >= ctx.steps.length) return next(ctx.err2 || ctx.err, 'done'); else { ctx.next = next; _tryStepContext(ctx, _tryNext); }\n }", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw ...
[ "0.6411699", "0.6346317", "0.6346317", "0.6346317", "0.6346317", "0.6346317", "0.6346317", "0.6346317", "0.6328694", "0.632385", "0.61617213", "0.6153279", "0.6153279", "0.6153279", "0.6153279", "0.6153279", "0.6153279", "0.6153279", "0.6153279", "0.6153279", "0.6153279", "...
0.5950171
84
Recomputes the plugin list using the injected plugins and plugin ordering.
function recomputePluginOrdering() { if (!eventPluginOrder) { // Wait until an `eventPluginOrder` is injected. return; } for (var pluginName in namesToPlugins) { var pluginModule = namesToPlugins[pluginName]; var pluginIndex = eventPluginOrder.indexOf(pluginName); !(pluginIndex > -1) ? invaria...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "orderPlugins() {\r\n debug('orderPlugins:before', this.pluginNames);\r\n const runLast = this._plugins\r\n .filter(p => p.requirements.has('runLast'))\r\n .map(p => p.name);\r\n for (const name of runLast) {\r\n const index = this._plugins.findIndex(p => p.name...
[ "0.7994548", "0.74701035", "0.7169167", "0.71361053", "0.71361053", "0.71361053", "0.7128741", "0.7122665", "0.71187073", "0.7117351", "0.7117351", "0.7117351", "0.71010214", "0.71010214", "0.71010214", "0.709135", "0.709135", "0.709135", "0.709135", "0.709135", "0.709135", ...
0.70648617
92
Standard/simple iteration through an event's collected dispatches.
function executeDispatchesInOrder(event) { var dispatchListeners = event._dispatchListeners; var dispatchInstances = event._dispatchInstances; { validateEventDispatches(event); } if (Array.isArray(dispatchListeners)) { for (var i = 0; i < dispatchListeners.length; i++) { if (event.isPropagationS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forEachEventDispatch(event,cb){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if(\"production\"!==process.env.NODE_ENV){validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break...
[ "0.6340201", "0.6318283", "0.6216154", "0.6129209", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6119329", "0.6119329", "0.61154145", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.6078455...
0.0
-1
Given a DOM node, return the closest ReactDOMComponent or ReactDOMTextComponent instance ancestor.
function getClosestInstanceFromNode(node) { if (node[internalInstanceKey]) { return node[internalInstanceKey]; } while (!node[internalInstanceKey]) { if (node.parentNode) { node = node.parentNode; } else { // Top of the tree. This node must not be part of a React tree (or is // unmo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[...
[ "0.73711807", "0.73711807", "0.73711807", "0.73711807", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.7323359", "0.73073095", "0.73073095", "0.7307309...
0.0
-1
Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent instance, or null if the node was not rendered by this React.
function getInstanceFromNode$1(node) { var inst = node[internalInstanceKey]; if (inst) { if (inst.tag === HostComponent || inst.tag === HostText) { return inst; } else { return null; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n if (node instanceof react__WEBPACK_IMPORTED_MODULE_0__.Component) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(node);\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t\t // This n...
[ "0.7598415", "0.738254", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.7352171", "0.73321927", "0.73321927", "0.73321927", ...
0.0
-1
Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding DOM node.
function getNodeFromInstance$1(inst) { if (inst.tag === HostComponent || inst.tag === HostText) { // In Fiber this, is just the state node right now. We assume it will be // a host component or host text. return inst.stateNode; } // Without this first invariant, passing a non-DOM-component triggers t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a...
[ "0.67850256", "0.67771465", "0.6770746", "0.67658514", "0.67658514", "0.6751226", "0.6741835", "0.6741215", "0.6741215", "0.6741215", "0.6741215", "0.6741215", "0.6741215", "0.6741215", "0.6739783", "0.6739783", "0.6739783", "0.6739783", "0.6739783", "0.6739783", "0.6732065",...
0.0
-1
Return the lowest common ancestor of A and B, or null if they are in different trees.
function getLowestCommonAncestor(instA, instB) { var depthA = 0; for (var tempA = instA; tempA; tempA = getParent(tempA)) { depthA++; } var depthB = 0; for (var tempB = instB; tempB; tempB = getParent(tempB)) { depthB++; } // If A is deeper, crawl up. while (depthA - depthB > 0) { instA = g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromIns...
[ "0.82778895", "0.82778895", "0.82778895", "0.8273446", "0.8273446", "0.8273446", "0.8255146", "0.8230099", "0.8230099", "0.8230099", "0.8230099", "0.8200897", "0.8200273", "0.8185259", "0.8185259", "0.8185259", "0.8185259", "0.8185259", "0.8185259", "0.8185259", "0.8185259", ...
0.0
-1
Return if A is an ancestor of B. Return the parent instance of the passedin instance. Simulates the traversal of a twophase, capture/bubble event dispatch.
function traverseTwoPhase(inst, fn, arg) { var path = []; while (inst) { path.push(inst); inst = getParent(inst); } var i = void 0; for (i = path.length; i-- > 0;) { fn(path[i], 'captured', arg); } for (i = 0; i < path.length; i++) { fn(path[i], 'bubbled', arg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : in...
[ "0.7497695", "0.7497695", "0.7497695", "0.74877024", "0.74877024", "0.74877024", "0.7469837", "0.73977727", "0.73977727", "0.73977727", "0.73977727", "0.73977727", "0.73977727", "0.73977727", "0.73977727", "0.73977727", "0.7353614", "0.7353614", "0.7265964", "0.71508837", "0....
0.0
-1
Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that should would receive a `mouseEnter` or `mouseLeave` event. Does not invoke the callback on the nearest common ancestor because nothing "entered" or "left" that element.
function traverseEnterLeave(from, to, fn, argFrom, argTo) { var common = from && to ? getLowestCommonAncestor(from, to) : null; var pathFrom = []; while (true) { if (!from) { break; } if (from === common) { break; } var alternate = from.alternate; if (alternate !== null && alte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleMouseEnter() {\n this._hovered.next(this);\n }", "_elementMouseEnterHandler() {\n const that = this;\n\n if (that.clickMode === 'hover' && !that.disabled && !that.readonly) {\n that._handleMouseInteraction();\n }\n }", "_elementMouseEnterHandler() {\n ...
[ "0.50949967", "0.49241346", "0.49241346", "0.48832065", "0.48795047", "0.48795047", "0.48699674", "0.48652336", "0.4800074", "0.4777132", "0.47349373", "0.47349373", "0.47349373", "0.47349373", "0.47349373", "0.47349373", "0.47349373", "0.47349373", "0.47349373", "0.47349373", ...
0.0
-1
Some event types have a notion of different registration names for different "phases" of propagation. This finds listeners by a given phase.
function listenerAtPhase(inst, event, propagationPhase) { var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; return getListener(inst, registrationName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listenerAtPhase(inst, event, propagationPhase) {\n\t\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t\t return getListener(inst, registrationName);\n\t\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t\t var registrationName = event.dispat...
[ "0.69333166", "0.69333166", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.69323295", "0.6926062", "0.6926062", "0.6901735", "0.6901735", "0.6901735", "...
0.0
-1
A small set of propagation patterns, each of which will accept a small amount of information, and generate a set of "dispatch ready event objects" which are sets of events that have already been annotated with a set of dispatched listener functions/ids. The API is designed this way to discourage these propagation strat...
function accumulateDirectionalDispatches(inst, phase, event) { { !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0; } var listener = listenerAtPhase(inst, event, phase); if (listener) { event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); ev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDirectionalDispatches(inst,upwards,event){if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(inst,'Dispatching inst must not be null'):void 0;}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(inst,event,phase);if...
[ "0.63503486", "0.63503486", "0.6248317", "0.6233284", "0.6086616", "0.6086616", "0.6086616", "0.6086616", "0.6086616", "0.59584206", "0.59584206", "0.5951535", "0.59440076", "0.59440076", "0.59272486", "0.59272486", "0.5926411", "0.5926411", "0.5926411", "0.5926411", "0.59264...
0.0
-1
Collect dispatches (must be entirely collected before dispatching see unit tests). Lazily allocate the array to conserve memory. We must loop through each event and perform the traversal for each one. We cannot perform a single traversal for the entire collection of events because each event may have a different target...
function accumulateTwoPhaseDispatchesSingle(event) { if (event && event.dispatchConfig.phasedRegistrationNames) { traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances...
[ "0.60381204", "0.60381204", "0.60381204", "0.60381204", "0.60381204", "0.59044504", "0.58950555", "0.58950555", "0.58950555", "0.58950555", "0.5878046", "0.5833689", "0.5833689", "0.5833689", "0.5833689", "0.5833689", "0.5833689", "0.5833689", "0.5833689", "0.5833689", "0.579...
0.0
-1
Accumulates without regard to direction, does not look for phased registration names. Same as `accumulateDirectDispatchesSingle` but without requiring that the `dispatchMarker` be the same as the dispatched ID.
function accumulateDispatches(inst, ignoredDirection, event) { if (inst && event && event.dispatchConfig.registrationName) { var registrationName = event.dispatchConfig.registrationName; var listener = getListener(inst, registrationName); if (listener) { event._dispatchListeners = accumulateInto(eve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulate...
[ "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.746616", "0.74661...
0.0
-1
Do not uses the below two methods directly! Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. (It is the only module that is allowed to access these methods.)
function unsafeCastStringToDOMTopLevelType(topLevelType) { return topLevelType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventQueueInBatch(events);}", "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,tar...
[ "0.6448227", "0.6448227", "0.6448227", "0.6334066", "0.6322835", "0.6260723", "0.6219597", "0.61469185", "0.61469185", "0.61469185", "0.61469185", "0.61469185", "0.60969085", "0.60969085", "0.6079227", "0.59554315", "0.5936939", "0.58950293", "0.58950293", "0.58950293", "0.58...
0.0
-1
Return whether a native keypress event is assumed to be a command. This is required because Firefox fires `keypress` events for key commands (cut, copy, selectall, etc.) even though no character is inserted.
function isKeypressCommand(nativeEvent) { return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. !(nativeEvent.ctrlKey && nativeEvent.altKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent...
[ "0.80170923", "0.80170923", "0.80170923", "0.80170923", "0.80170923", "0.80170923", "0.80170923", "0.8008592", "0.7999793", "0.7998758", "0.7998758", "0.7998758", "0.7998758", "0.7998758", "0.7998758", "0.7998758", "0.7998758", "0.7998758", "0.7998758", "0.7998758", "0.799875...
0.0
-1
Get the value for a property on a node. Only used in DEV for SSR validation. The "expected" argument is used as a hint of what the expected value is. Some properties have multiple equivalent values.
function getValueForProperty(node, name, expected, propertyInfo) { { if (propertyInfo.mustUseProperty) { var propertyName = propertyInfo.propertyName; return node[propertyName]; } else { var attributeName = propertyInfo.attributeName; var stringValue = null; if (propertyInfo.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if...
[ "0.81594515", "0.81594515", "0.81444144", "0.8068632", "0.8068632", "0.80648404", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", "0.80603784", ...
0.0
-1
Get the value for a attribute on a node. Only used in DEV for SSR validation. The third argument is used as a hint of what the expected value is. Some attributes have multiple equivalent values.
function getValueForAttribute(node, name, expected) { { if (!isAttributeNameSafe(name)) { return; } if (!node.hasAttribute(name)) { return expected === undefined ? undefined : null; } var value = node.getAttribute(name); if (value === '' + expected) { return expected; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!i...
[ "0.74279034", "0.74279034", "0.74279034", "0.74279034", "0.74279034", "0.74279034", "0.74279034", "0.74279034", "0.74279034", "0.74279034", "0.7330516", "0.7330516", "0.732748", "0.73242146", "0.73242146", "0.73242146", "0.73242146", "0.73242146", "0.73242146", "0.73242146", ...
0.0
-1
Flow does not allow string concatenation of most nonstring types. To work around this limitation, we use an opaque type that can only be obtained by passing the value through getToStringValue first.
function toString(value) { return '' + value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function string(val) {\n return {value: val, type: 'string'};\n}", "get stringValue() {}", "function toString(value){return ''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function toString(value){retu...
[ "0.6296956", "0.6283536", "0.6259516", "0.62229", "0.62229", "0.62229", "0.62229", "0.62229", "0.62229", "0.6185274", "0.6148406", "0.60679895", "0.60679895", "0.60679895", "0.60679895", "0.60679895", "0.60679895", "0.60679895", "0.60679895", "0.60679895", "0.60679895", "0....
0.6113129
85
Implements an host component that allows setting these optional props: `checked`, `value`, `defaultChecked`, and `defaultValue`. If `checked` or `value` are not supplied (or null/undefined), user actions that affect the checked state or value will trigger updates to the element. If they are supplied (and not null/undef...
function getHostProps(element, props) { var node = element; var checked = props.checked; var hostProps = _assign({}, props, { defaultChecked: undefined, defaultValue: undefined, value: undefined, checked: checked != null ? checked : node._wrapperState.initialChecked }); return hostProps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(props) {\n super(props);\n this.value = props.value;\n this.id = RadioButton.idGenerator(this.value);\n this.groupName = props.groupName;\n this.optional = {};\n if (typeof props.onChangeCallback === 'function') {\n this.optional.onChangeCallback =\n...
[ "0.68903565", "0.6786808", "0.6786808", "0.6786808", "0.6786808", "0.6786808", "0.6786808", "0.6786808", "0.6786808", "0.6786808", "0.638824", "0.62571687", "0.621177", "0.6132297", "0.6132297", "0.6132297", "0.6132297", "0.6132297", "0.6132297", "0.6132297", "0.6132297", "...
0.0
-1
In Chrome, assigning defaultValue to certain input types triggers input validation. For number inputs, the display value loses trailing decimal points. For email inputs, Chrome raises "The specified value is not a valid email address". Here we check to see if the defaultValue has actually changed, avoiding these proble...
function setDefaultValue(node, type, value) { if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== 'number' || node.ownerDocument.activeElement !== node) { if (value == null) { node.defaultValue = toString(node._wrapperState.initialValue); } else if (node.defaultValue...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shouldSetInputTextToDefaultValue (props) {\n let result = (this.previousDefaultValue != props.defaultValue) || (this.previousChangeIndicator != props.changeIndicator)\n return result\n }", "function checkValue(value, defaultValue) {\n return (value ? value : defaultValue)\n }", "function setDe...
[ "0.70018065", "0.6645867", "0.65505975", "0.65505975", "0.65117", "0.65117", "0.6503079", "0.6503079", "0.6503079", "0.6503079", "0.6503079", "0.6382664", "0.6382664", "0.6382664", "0.6382664", "0.6382664", "0.6382664", "0.6382664", "0.6382664", "0.6382664", "0.6374976", "0...
0.6291399
98
SECTION: handle `change` event
function shouldUseChangeEvent(elem) { var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "onchange() {}", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}...
[ "0.7854439", "0.77068675", "0.7598244", "0.7521718", "0.7510988", "0.75040656", "0.7448788", "0.74208724", "0.7401909", "0.7386273", "0.7366643", "0.7355561", "0.73510647", "0.73496336", "0.73438776", "0.7339753", "0.7338105", "0.7335427", "0.73326814", "0.73283356", "0.73218...
0.0
-1
(For IE <=9) Starts tracking propertychange events on the passedin element and override the value property so that we can distinguish user events from value changes in JS.
function startWatchingForValueChange(target, targetInst) { activeElement = target; activeElementInst = targetInst; activeElement.attachEvent('onpropertychange', handlePropertyChange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('on...
[ "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.74980253", "0.72807837", "0.7193524", "0.7193524", "0.7044798", "0.7031976", "0.7023571", "0.6934302", "0.6934302", "0....
0.0
-1
(For IE <=9) Removes the event listeners from the currentlytracked element, if any exists.
function stopWatchingForValueChange() { if (!activeElement) { return; } activeElement.detachEvent('onpropertychange', handlePropertyChange); activeElement = null; activeElementInst = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "function removeListeners(useCapturing) {\r\r\n // get all div in list\r\r\...
[ "0.7511157", "0.7134657", "0.7104534", "0.70863074", "0.70863074", "0.70760804", "0.70558333", "0.70454526", "0.7040501", "0.70146626", "0.70063", "0.69850737", "0.69768685", "0.6942995", "0.69234794", "0.6918382", "0.6914762", "0.6900439", "0.68650395", "0.68642944", "0.6862...
0.0
-1
(For IE <=9) Handles a propertychange event, sending a `change` event if the value of the active element has changed.
function handlePropertyChange(nativeEvent) { if (nativeEvent.propertyName !== 'value') { return; } if (getInstIfValueChanged(activeElementInst)) { manualDispatchChangeEvent(nativeEvent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('on...
[ "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.71699053", "0.6945491", "0.68408453", "0.6832097", "0.67444825", "0.66956556", "0.66956556", "0.66956556", "0.66956556", ...
0.0
-1
For IE8 and IE9.
function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.in...
[ "0.71884906", "0.7017687", "0.69904757", "0.69904757", "0.6785186", "0.6688887", "0.6507729", "0.64536047", "0.64536047", "0.64313275", "0.6362184", "0.63474447", "0.6284026", "0.62477905", "0.6229409", "0.619647", "0.61704713", "0.6158199", "0.6144466", "0.6130264", "0.61186...
0.0
-1
SECTION: handle `click` event
function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. var nodeName = elem.nodeName; return nodeName && nodeName.toLowerCase() === 'input' && (elem.type ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick( event ){ }", "handleClick() {}", "function handleClick(){\n console.log(\"clicked\");\n}", "function handleClick(event)\n{\n}", "click() { }", "function clickHandler(){\n console.log('I am clicked');\n}", "function clickHandler(event) {\n\tindexChangeSections(event);\n\ttabChangeSect...
[ "0.8123866", "0.7879277", "0.7531671", "0.7500634", "0.7475805", "0.7402668", "0.73915786", "0.7379595", "0.7379595", "0.7331232", "0.7330436", "0.7245654", "0.72390676", "0.72122186", "0.7116352", "0.7082111", "0.7062615", "0.7056091", "0.7017624", "0.7006748", "0.6982211", ...
0.0
-1
Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support getModifierState. If getModifierState is not supported, we map it to a set of modifier keys exposed by the event. In this case, Lockkeys are not supported. Translation from modifier key to the associated property in the event.
function modifierStateGetter(keyArg) { var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; if (nativeEvent.getModifierState) { return nativeEvent.getModifierState(keyArg); } var keyProp = modifierKeyToProp[keyArg]; return keyProp ? !!nativeEvent[keyProp] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syn...
[ "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.7976371", "0.78771216", "0.78771216", "0.77970207", "0.76019746", "0.75661534", "0.75661534...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own
function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function i(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", ...
[ "0.7044135", "0.6979357", "0.68574303", "0.6821805", "0.68029666", "0.67803156", "0.6729492", "0.67206", "0.6709456", "0.66839457", "0.6676559", "0.6676559", "0.6676559", "0.66488636", "0.6640003", "0.6640003", "0.6640003", "0.6640003", "0.6625777", "0.6623136", "0.6623136", ...
0.0
-1
Performs equality by iterating through keys on an object and returning false when any key has values which are not strictly equal between the arguments. Returns true when the values of all keys are strictly equal.
function shallowEqual(objA, objB) { if (is(objA, objB)) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return fa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equalForKeys(a, b, keys) {\n if (!angular.isArray(keys) && angular.isObject(keys)) {\n keys = protoKeys(keys, [\"$$keys\", \"$$values\", \"$$equals\", \"$$validates\", \"$$new\", \"$$parent\"]);\n }\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n)...
[ "0.65743774", "0.65743774", "0.64678866", "0.6456754", "0.64346087", "0.6335553", "0.62971336", "0.6272359", "0.6241524", "0.62257093", "0.6215097", "0.61831975", "0.6158962", "0.61307156", "0.61275417", "0.6073527", "0.60352224", "0.6015267", "0.6006148", "0.59795713", "0.59...
0.0
-1
`ReactInstanceMap` maintains a mapping from a public facing stateful instance (key) and the internal representation (value). This allows public methods to accept the user facing instance as an argument and map them back to internal methods. Note that this module is currently shared and assumed to be stateless. If this ...
function get(key) { return key._reactInternalFiber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapWrapper(key)\n{\n\tthis.key = key;\n}", "function Map() {\n this.container = new Object();\n}", "function Map() {\r\n this.keys = [];\r\n this.values = [];\r\n}", "function Map() {\n\tthis.keys = [];\n\tthis.values = [];\n\n\t// add a key / value pair to map\n\tthis.add = function(key, v...
[ "0.5623428", "0.5441373", "0.5436777", "0.54273325", "0.5291517", "0.5226511", "0.5218736", "0.51507336", "0.51463443", "0.5143175", "0.512236", "0.51139975", "0.51111865", "0.51106906", "0.50540143", "0.50425756", "0.50247955", "0.50247955", "0.49953097", "0.49953097", "0.49...
0.0
-1
Find the deepest React component completely containing the root of the passedin instance (for use when entire React trees are nested within each other). If React trees are not nested, returns null.
function findRootContainerNode(inst) { // TODO: It may be a good idea to cache this to prevent unnecessary DOM // traversal, but caching is difficult to do correctly without using a // mutation observer to listen for all DOM changes. while (inst.return) { inst = inst.return; } if (inst.tag !== HostRoot)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n ...
[ "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.6875456", "0.67970103", "0.67970103", "0.67970103", "0.67970103", "0.67970103", "0.67970103", "0.6797010...
0.0
-1