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
TODO: Remove this line and break up compilePartial
function template(templateSpec, env) { /* istanbul ignore next */ if (!env) { throw new Exception("No environment passed to template"); } if (!templateSpec || !templateSpec.main) { throw new Exception('Unknown template object: ' + typeof templateSpec); } // Note: Using env.VM refere...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compile() {\n\n}", "CompileEmpty() {\n\n }", "Compile() {\n\n }", "_compile () {\n this.root._compile()\n }", "get partial() {\n let partial = this.vars.PERCY_PARTIAL_BUILD;\n return !!partial && partial !== '0';\n }", "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n...
[ "0.7011107", "0.64136094", "0.6321752", "0.5911436", "0.5830825", "0.57666177", "0.5764401", "0.5664798", "0.563324", "0.5577112", "0.5577098", "0.5569413", "0.55645156", "0.55043846", "0.54819727", "0.54677933", "0.5462777", "0.53904444", "0.53578395", "0.53569376", "0.53314...
0.0
-1
calculate hash value, pls note the function uses MD5 but can change to any other stronger algorithem such as SHA256 instead
function hash(message) { const bytes = Crypto.MD5(message); return bytes.toString(Crypto.enc.utf8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateHash(){\n return SHA256(this.fromAddress + this.toAddress + this.amount).toString();\n }", "calculateHash(){ \r\n return SHA256(this.index + this.previousHash + this.timestamp + JSON.stringify(this.data)).toS...
[ "0.7831596", "0.7802335", "0.7798968", "0.77615196", "0.77318996", "0.7729106", "0.7717458", "0.7690574", "0.76673335", "0.76114404", "0.7608251", "0.7598544", "0.7598544", "0.75829864", "0.7562367", "0.75586414", "0.7526436", "0.75220627", "0.7519389", "0.7505299", "0.748269...
0.6826378
51
function to read food Stock
function readStock(data){ foodS=data.val(); foodObj.updateFoodStock(foodS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readStock(data){\n foods=data.val();\n }", "function readStock(data){\n foods=data.val();\n }", "function readStock (data){\n foods = data.val();\n}", "function readStock(data) {\n foodS = data.val();\n foodObj.updateFoodStock(foodS);\n }", "function readStock(data){\n foodS = dat...
[ "0.8141997", "0.8141997", "0.7895278", "0.7832634", "0.7724158", "0.7724158", "0.7698036", "0.7698036", "0.7698036", "0.7698036", "0.7698036", "0.7698036", "0.7698036", "0.7698036", "0.7669284", "0.7659527", "0.7659527", "0.7629874", "0.7532688", "0.75300366", "0.751715", "...
0.72028065
34
function to add food in stock
function addFoods(){ foodS++; database.ref('/').update({ Food:foodS }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addFoods() {\r\n foodObj.updateFoodStock(foodStock + 1);\r\n}", "function addFood(){\r\n foodS++;\r\n foodObj.updateFoodStock(foodS);\r\n}", "'BUY_STOCK' (state, {stockId, quantity, stockPrice}) {\n // check to see if I already own the stock, to increase instead of create\n const reco...
[ "0.7917977", "0.755903", "0.6909317", "0.6854717", "0.6784857", "0.675893", "0.674812", "0.6723968", "0.6715073", "0.67066336", "0.6683858", "0.6670215", "0.6640416", "0.66324395", "0.6631956", "0.6625506", "0.6625506", "0.6618442", "0.6614858", "0.6604128", "0.65908957", "...
0.0
-1
returns only unique groups
function uniqBy(a, key) { var seen = {}; return a.filter(function (item) { var k = key(item); return seen.hasOwnProperty(k) ? false : (seen[k] = true); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUniqueGroups(){\n const { variables, groupVariable } = this.options\n return Object.keys(variables[groupVariable].values)\n //const { data } = this\n //const { variables, groupVariable } = this.options\n //let groups = [], g\n //for (let i = 0, l = data.length; i < l; i++) {\n // g = varia...
[ "0.7202415", "0.6779355", "0.67200106", "0.63650596", "0.62670827", "0.6124923", "0.6115514", "0.6105307", "0.60748667", "0.6005658", "0.6002699", "0.5986022", "0.5974226", "0.59727746", "0.5968288", "0.59606004", "0.5952247", "0.59427303", "0.59229165", "0.5912167", "0.59080...
0.5571729
83
Development Build HTML task
function htmlDevelopmentBuild(cb) { return src(htmlSource) .pipe(dest(htmlDestination)); cb(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function htmlTask(cb) {\n // prettier-ignore\n return src('app/*html')\n .pipe(useref())\n .pipe(gulpif('*.js', uglify()))\n .pipe(dest('dist/'));\n cb();\n}", "function buildHtml(env) {\n return gulp.src(PATHS.src.html)\n // print the files\n .pipe(size(SIZE_OPTS))\n // inser...
[ "0.7259891", "0.71634513", "0.71479106", "0.71020764", "0.7050292", "0.70002526", "0.69058096", "0.686879", "0.68473953", "0.6825237", "0.6805219", "0.677832", "0.6774726", "0.6764815", "0.6746288", "0.6742759", "0.66124177", "0.65798455", "0.657791", "0.6557514", "0.65391284...
0.75302076
0
Production Build HTML task
function htmlProductionBuild(cb) { return src(htmlSource) .pipe(htmlmin({ collapseWhitespace: true, minifyCSS: true, minifyJS: true, minifyURLs: true, collapseInlineTagWhitespace: true, })) .pipe(dest(htmlDestination)); cb(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function htmlDevelopmentBuild(cb) {\r\n return src(htmlSource)\r\n .pipe(dest(htmlDestination));\r\n cb();\r\n}", "function buildProdHtml(cb) {\n return gulp\n .src(\"./dist/index.html\")\n .pipe(inject(gulp.src(\"./dist/app/app-*.min.css\", { read: false }), { relative: true, removeTags: t...
[ "0.7350984", "0.7247373", "0.713407", "0.70285213", "0.70197666", "0.69995195", "0.6800571", "0.675047", "0.67491186", "0.67472535", "0.6699041", "0.66488165", "0.6599931", "0.6566826", "0.6553224", "0.65485954", "0.6530849", "0.652447", "0.65192807", "0.65115076", "0.6432734...
0.71721685
2
Deveopment Process JavaScript Task
function javaScriptDevlopmentBuild(cb) { return src(javaScriptSource) .pipe(concat('app.js')) .pipe(rename({ extname: '.min.js', })) .pipe(dest(javaScriptDestination)); cb(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete(callback) {\n if (this.state === 'finish') {\n this.recordInfor('开始删除已完成传输任务...')\n callback('finish', this.uuid)\n } else {\n this.recordInfor('开始删除正在下载任务...')\n this.pauseTask()\n this.recordInfor('暂停了下载任务')\n this.removeCache(callback.bind(this, 'running', this.uuid))\...
[ "0.5853056", "0.5834398", "0.58271885", "0.57116276", "0.54971784", "0.541165", "0.540045", "0.532089", "0.532089", "0.53062904", "0.53053963", "0.52879465", "0.52867544", "0.528488", "0.5248093", "0.5245487", "0.52448475", "0.52338463", "0.52222383", "0.52222383", "0.5210816...
0.0
-1
Production Process JavaScript Task
function javaScriptProductionBuild(cb) { return src(javaScriptSource) .pipe(concat('app.js')) .pipe(babel({ presets: ['@babel/env'] })) .pipe(uglify()) .pipe(rename({ extname: '.min.js', })) .pipe(dest(javaScriptDestination)); cb(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jsTask() {\n\n return src(files.jsPath)\n\n .pipe(concat('script.js'))\n\n .pipe(minify())\n\n .pipe(dest('src/js'));\n\n}", "function jsTask() {\n return src(files.jsPath)\n .pipe(babel())\n .pipe(conCat('main.js'))\n //terser minifies the files after con...
[ "0.6658644", "0.66184765", "0.6617548", "0.6546386", "0.64660656", "0.64397216", "0.6414432", "0.6386149", "0.637463", "0.62756455", "0.6245718", "0.62422884", "0.61917955", "0.6185486", "0.61849225", "0.61520845", "0.61445755", "0.61382604", "0.6134106", "0.613156", "0.61257...
0.6109126
24
Problem: Check if 2nd argument is truthy on all elements of a collection. / Solution
function truthCheck(collection, pre) { // check if all elements in collection has pre as a property // and that each element is a truthy return collection.every(function(element) { // check if the element has the property // check if the element is a truthy return element.hasOwnPropert...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truthCheck(collection, pre) {\n\n function truthy(element) {\n return element[pre];\n}\n \n\n return collection.every(truthy);\n\n}", "function truthCheck (collection, pre) {\n // Is everyone being true?\n return collection.every(obj => obj[pre]);\n}", "function truthCheck(collection, pre) {\n\t...
[ "0.7615574", "0.73781157", "0.73151785", "0.7141372", "0.7141372", "0.690947", "0.686741", "0.6860195", "0.6825302", "0.6825302", "0.6825302", "0.6825302", "0.6825302", "0.6825302", "0.6825302", "0.6825302", "0.6825302", "0.6741818", "0.67346", "0.6732483", "0.67262846", "0...
0.6767446
17
call when failed to get Current Location
function fail() { alert('Failed to get your Location.'); var defaultPosition = { coords: { latitude: 10.3193294, longitude: 123.903832 }, }; initialize(defaultPosition); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currLocError() {\n\talert(\"Unable to retrieve current location. Please allow the site to know your location, or enter your coordinates manually instead.\")\n}", "function geolocError(){\n console.log(\"Error getting user's location :(\");\n}", "function cbGetCurPosFail(error) {\n switch...
[ "0.82389486", "0.7541426", "0.742686", "0.7406078", "0.73535544", "0.72262853", "0.72192305", "0.72126955", "0.71403635", "0.71392006", "0.71325713", "0.70969087", "0.7055795", "0.70148784", "0.69976676", "0.69936", "0.69739616", "0.6959015", "0.6952614", "0.69291544", "0.691...
0.6610619
63
display sample data restautants
function displayRestaurantJSON (restaurantJSON) { restaurantJSON.done(function(results) { if(results.length > 0) { sampleData = results; createPieChart(); populateTypeOption(); filterRestaurants(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayInitialSample(){\n\t\t//probably call it when starwars is clicked\n\t\tclearInfo();\n\t\t$spanInfo.html(\"<h4><b>Sample piece of data from each class on the API</b></h4>\");\n\t\t// $spanInfo.append(\"<h4 class='label label-info lb-md'>Starships, Vehicles, Species, Films, Planets, People</h4>\");\n...
[ "0.71728414", "0.67242557", "0.6588711", "0.64176613", "0.63516307", "0.63406456", "0.62169665", "0.6133172", "0.6093967", "0.60740715", "0.60304785", "0.59847987", "0.59545404", "0.5896327", "0.58810997", "0.5853141", "0.5850516", "0.5838515", "0.5798858", "0.5768963", "0.57...
0.56231225
37
get restaurants by type
function getRestaurantsByType (type) { var request = { location: selectedCoords, radius: $radius.val(), query: type + " restaurant" }; $('.bg_overlay_alt').addClass('is_show'); $('body').addClass('no_scroll'); placeService.textSearch(request, function (results, status, pagina...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRestaurants(location) {\n let targetLocation = new google.maps.LatLng(location.lat, location.lng);\n\n let request = {\n location: targetLocation,\n radius: \"1500\",\n type: [\"restaurant\"]\n };\n\n service = new google.maps.places.PlacesService(map);\n service.nearbySearch(request, cal...
[ "0.71127945", "0.6918127", "0.66968787", "0.6681522", "0.6677581", "0.64822096", "0.6307113", "0.630007", "0.6291423", "0.6241873", "0.6213456", "0.6191828", "0.61884564", "0.61878175", "0.6157082", "0.61338204", "0.61112916", "0.6086721", "0.6060422", "0.6051863", "0.6030350...
0.84927887
0
remove restaurants by type
function removeRestaurantsByType (type) { for(var i in sampleData) { if(sampleData[i].type == type) { markers_arr[i].setMap(null); markers_arr[i] = null; sampleData[i] = null; count--; i--; } } sampleData = sampleData.filter(n => n)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeRestaurants(allRestaurants) {\n allRestaurants([]);\n}", "function removeRestaurantMarkers(restaurant) {\n for (var j = 0; j < markers.length; j++) {\n if (markers[j].place_id === restaurant.getAttribute(\"place_id\")) {\n markers[j].setMap(null);\n }\n }\n}", "function getRestaura...
[ "0.7034118", "0.65201306", "0.6492267", "0.63607574", "0.63036835", "0.61963487", "0.611824", "0.60962576", "0.6075147", "0.607152", "0.60319114", "0.6028675", "0.5986491", "0.59643173", "0.5961802", "0.5859202", "0.5851932", "0.58504415", "0.5839194", "0.5782787", "0.5710810...
0.8037027
0
callback function for textSearch
function callbackTextSearch (results, pagination, type) { for(var i in results) { results[i].type = type; getCountInRadius(results[i]); } updateCountDisplay(count); createPieChart(); $('.bg_overlay_alt').removeClass('is_show'); $('body').removeClass('no_scroll'); marke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "afterSearch(searchText, result) {\n }", "function searchTerm(){\n \n }", "function search() {\n let search_text = $search_text.value;\n decide_search(search_text)\n}", "signalNewSearchText(txt) {\n const {searchTextChangedCallback} = this.props;\n if (searchTextChangedCallback) {\n...
[ "0.7474264", "0.7391849", "0.7298164", "0.72838193", "0.7188612", "0.714939", "0.70091736", "0.69717973", "0.6890706", "0.6815705", "0.67665625", "0.6765003", "0.6731436", "0.6729185", "0.6677116", "0.6664467", "0.6587986", "0.6534656", "0.6473321", "0.647176", "0.64485997", ...
0.5945083
91
draw marker of current location
function drawSelfMarker () { //set marker var userMarker = new google.maps.Marker({ position: myLatLng, map: map, animation: google.maps.Animation.BOUNCE, title: "You are here!", icon: getIcon("assets/images/placeholder.svg") }); // draw circle within current loc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawMarker(markerLoc) {\n this.context2d.beginPath();\n this.context2d.lineWidth = this.markerWidth;\n this.context2d.strokeStyle = this.markerColour;\n this.context2d.moveTo(markerLoc, 50);\n this.context2d.lineTo(markerLoc, 130);\n this.context2d.stroke();\n this....
[ "0.76098275", "0.6894215", "0.68518", "0.6785179", "0.67146516", "0.6672579", "0.66515875", "0.657197", "0.65673006", "0.6516243", "0.64619964", "0.6447624", "0.6446655", "0.6435799", "0.6426862", "0.6414046", "0.64085656", "0.6400745", "0.6398485", "0.638507", "0.6372374", ...
0.679489
3
draws a circle when user clicks the map
function drawCircle(point, radius) { removeCircle(); selectedCoords = point; // set Circle cityCircle = new google.maps.Circle({ strokeOpacity: 0.8, strokeWeight: 2, strokeColor: '#3498db', fillOpacity: 0.35, fillColor: '#3498db', map: map, center:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onMapClick(e) {\r\n console.log(e.latlng.lat);\r\n marker.setLatLng([e.latlng.lat, e.latlng.lng]).addTo(mymap)\r\n console.log(e.latlng.lng);\r\n circle.options.color = \"black\";\r\n console.log(circle.options)\r\n circle.options.opacity = 1;\r\n circle.setLatLng([e.latlng.lat, e.lat...
[ "0.7440361", "0.7368504", "0.6907737", "0.68518865", "0.67333156", "0.6711128", "0.6670256", "0.66641974", "0.66578233", "0.66395366", "0.65985876", "0.6596798", "0.6588575", "0.6540479", "0.65203017", "0.6498904", "0.6486835", "0.64782315", "0.6451083", "0.6443903", "0.64187...
0.69061774
3
compute zoom value base on radius
function radiusToZoom(radius){ radius *= 0.00035; return Math.round(14-Math.log(radius)/Math.LN2) - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function radiusToZoom(radius)\n{\n return Math.round(14-Math.log(radius)/Math.LN2);\n}", "function updateRadius(){\n var zoom = mymap.getZoom();\n \n switch(zoom) {\n case 13 : return 8;\n case 14 : return 10;\n case 15 : return 12;\n case 16 : ...
[ "0.8133808", "0.79324704", "0.74190634", "0.72548723", "0.7115156", "0.6826122", "0.67107934", "0.6705417", "0.669002", "0.66771877", "0.6613978", "0.6599064", "0.6587632", "0.6562168", "0.65596265", "0.6490796", "0.648817", "0.6469426", "0.6452716", "0.6449521", "0.64370584"...
0.8051807
1
set icons base on url
function getIcon(url) { var icon = { url: url, //url scaledSize: new google.maps.Size(50, 50), // scaled size origin: new google.maps.Point(0,0), // origin anchor: new google.maps.Point(20,40), // anchors labelOrigin: new google.maps.Point(20,-10) } return icon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateurl(val){\n seticonurl(val);\n }", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'n...
[ "0.7290364", "0.6687962", "0.6687962", "0.6682943", "0.6682943", "0.66760665", "0.66760665", "0.66528153", "0.66528153", "0.66494703", "0.66494703", "0.66355616", "0.66355616", "0.66107965", "0.66107965", "0.6583741", "0.6583741", "0.657736", "0.657736", "0.65495205", "0.6549...
0.59212726
80
create marker and marker events
function createMarker(place) { // get place location var placeLoc = place.geometry.location; //get icon var icon = getIcon("assets/images/pin.svg"); //set marker var marker = new google.maps.Marker({ map: map, title: place.name, animation: null, position: pl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addEventMarker(coord, text, iconKey, events, ourEventOptions) {\n let eventMarker = this.addMarker(coord, text, iconKey);\n eventMarker.ourEventOptions = ourEventOptions;\n eventMarker.on(\"click\", () => {\n events(eventMarker.ourEventOptions);\n });\n }", "parseEvents() {\n return {\n ...
[ "0.7159162", "0.692309", "0.6901616", "0.6859479", "0.6844007", "0.6801004", "0.67644656", "0.675005", "0.6721878", "0.6718495", "0.6708426", "0.66788405", "0.6646374", "0.6624262", "0.6607426", "0.65815914", "0.65667075", "0.6547722", "0.6539884", "0.6539308", "0.64982134", ...
0.6196281
74
set marker info window
function setMarkerContent (place, position) { var images = ""; var ratings = ""; var prices = ""; var pricesArr = ['Free', 'Inexpensive', 'Moderate', 'Expensive', 'Very Expensive']; if(place.photos !== undefined) { var url = place.photos[0].getUrl({'maxWidth': 1000, 'maxHeight': 1000}); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMarkerInfo(info) {\n infoWindow.setContent(info);\n }", "function showInfoWindow() { \n currentmarker = this;\n infoWindow.open(map, currentmarker);\n buildIWContent();\n\n}", "function setInfoWindow(marker, infoWindow) {\n if (infoWindow.marker != marker) {\n ...
[ "0.8603524", "0.8074214", "0.7977656", "0.7744401", "0.7726031", "0.76625043", "0.7623564", "0.76046854", "0.75711805", "0.7554246", "0.75535434", "0.7531114", "0.7512954", "0.7432555", "0.741733", "0.7412215", "0.740922", "0.74078673", "0.7392222", "0.73857766", "0.73841316"...
0.0
-1
get directions to marker
function getDirections (lat, lng) { prevPoint = {lat: lat, lng: lng}; calculateRoute(myLatLng, prevPoint); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDirections(){\n\tvar waypts = [];\n\tfor(landmark in itinerary){\n\t\tvar point = itinerary[landmark].mapData.geometry.location\n\t\tvar loc = new google.maps.LatLng(point.lat, point.lng);\n\t\twaypts.push({location: loc, stopover: true});\n\t\tconsole.log(itinerary[landmark].yelpData);\n\t}\n\n\tvar r...
[ "0.7252875", "0.69861835", "0.66770416", "0.6648747", "0.6619634", "0.6574667", "0.6532643", "0.6399741", "0.6386825", "0.6324859", "0.6261759", "0.62465227", "0.6230264", "0.6226853", "0.6215659", "0.62100786", "0.61891025", "0.6177234", "0.61310124", "0.6115427", "0.6087920...
0.6784746
2
get count within radius
function getCountInRadius (place) { if(selectedCoords) { var diff = (google.maps.geometry.spherical.computeDistanceBetween(place.geometry.location, selectedCoords)); if(diff <= $radius.val()) { createMarker(place); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function radiusFunc (count) {\n if (count > 300 ) {\n return 100\n } else if (count > 75) {\n return count/1.19\n } else if (count >= 50) {\n return count/1.1\n } else if (count >= 25) {\n return count\n } else if (count >= 10) {\n ...
[ "0.7041564", "0.64849013", "0.6477994", "0.6449046", "0.6290525", "0.6187777", "0.5859792", "0.5856393", "0.58551013", "0.5794963", "0.5771383", "0.5771383", "0.57708627", "0.57592756", "0.5758903", "0.5753383", "0.57342565", "0.5731735", "0.5728973", "0.572375", "0.5720142",...
0.70859736
0
clears current route if there is a route.
function clearRoutes() { if (directionsDisplay != null) { // empty html content for directions $('#right-panel').html(''); // set previous point to null prevPoint = null; directionsDisplay.setMap(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearRoutes() {\n clearStops();\n routeLyr.removeAll();\n routeLyr.graphics = [];\n }", "clickClearRoute () {\n if (!this.routeDisplay) {\n return;\n }\n\n this.showAlert(undefined, false);\n this.routeDisplay.setMap(null);\n th...
[ "0.6800706", "0.66194254", "0.64409053", "0.64243865", "0.6331372", "0.6278265", "0.6249564", "0.6221859", "0.61911756", "0.6182749", "0.61750674", "0.6127386", "0.61233276", "0.60283315", "0.60283315", "0.59745747", "0.59745747", "0.59745747", "0.59745747", "0.59745747", "0....
0.70908135
0
remove circle, if there is a circle
function removeCircle() { if(cityCircle != undefined) { cityCircle.setMap(null); inspectMarker.setMap(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeCircle() {\n console.log(\"removeCircle\");\n this.remove();\n if(--counter === 0){\n clearInterval(timer);\n circles = [];\n timer = null;\n }\n }", "function deleteCircle()\n{\n\t//get each of the 9 ring segment SVGs and delete them...
[ "0.7893753", "0.764728", "0.7637663", "0.73369473", "0.73369473", "0.73369473", "0.7326863", "0.72292143", "0.7094532", "0.70505065", "0.6794219", "0.6764151", "0.67012596", "0.66987973", "0.6692025", "0.66330653", "0.659545", "0.6589837", "0.65811104", "0.6553095", "0.642116...
0.76875913
1
remove markers in the map
function removeMarkers() { if(markers_arr.length > 0) { for(var i = 0; i < markers_arr.length; i++) { markers_arr[i].setMap(null); } } if(markerCluster) markerCluster.clearMarkers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeMarkers(){\n for(i=0; i<gmarkers.length; i++){\n gmarkers[i].setMap(null);\n }\n }", "function removeMarkers() {\n for (i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n }", "function removeMarkers() {\n for (i = 0; i < ma...
[ "0.87773913", "0.87692124", "0.87692124", "0.8766355", "0.8648114", "0.8620449", "0.86000556", "0.8597305", "0.85927063", "0.851779", "0.8510776", "0.85034996", "0.84881467", "0.84783655", "0.84655696", "0.8419246", "0.84146166", "0.84129024", "0.8408665", "0.836866", "0.8349...
0.81592923
58
returns all unique values
function onlyUnique(value, index, self) { return self.indexOf(value) === index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unique() {\n var arr = [];\n for(var i = 0; i < this.length; i++) {\n if(!arr.contains(this[i])) {\n arr.push(this[i]);\n }\n }\n return arr; \n}", "getUniqueValues(inputArray) {\n let uniques = [];\n inputArray.forEach((input) => {\n input.forEach((inp) => {\n ...
[ "0.76316947", "0.75545007", "0.75445616", "0.7514176", "0.747667", "0.73412067", "0.72439164", "0.7221969", "0.720916", "0.7204431", "0.7198161", "0.7198161", "0.7198161", "0.7198161", "0.7198161", "0.7198161", "0.7198161", "0.7198161", "0.7198161", "0.7171697", "0.7165004", ...
0.0
-1
populates options for restaurant types
function populateTypeOption () { var options = ''; var type = ['Fast Food', 'Casual Dining', 'Fine Dining'];//,'Ethnic', 'Fast Casual', 'Family Style']; var special = ['Barbeque', 'Lechon', 'Steak'];//, 'Dessert', 'Pizza', 'Vegetarian']; type.sort(); special.sort(); $.each( type.filter( onlyUni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initOptions() {\n\t\tfunction selectType() {\n\t\t\tvar options = document.getElementById(\"type\").getElementsByTagName(\"li\");\n\t\t\tfor (var o=options.length; o>0;) {\n\t\t\t\tvar current = options[--o];\n\t\t\t\tcurrent.className = current.className.replace(\" on\", \"\");\n\t\t\t\tif (current.id.ma...
[ "0.63581824", "0.62619007", "0.6154446", "0.6015596", "0.5988538", "0.5964042", "0.595241", "0.5944163", "0.5883639", "0.5834525", "0.5798907", "0.5776785", "0.5776495", "0.5744206", "0.5702754", "0.5684368", "0.5674529", "0.56229013", "0.5590632", "0.5548125", "0.5530543", ...
0.61922413
2
process sample data to display pie chart
function processSampleData() { var array = []; var type = []; for(var i in sampleData) { if(sampleData[i].type) { array.push({ y: 1 , label: sampleData[i].type, legendText: sampleData[i].type //label : sampleData[i].opening_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pieChart(pienumber) {\n if (dataselection == \"Total population within the locality\") {\n val = \"B01003_001E\";\n } else\n if (dataselection == \"Age distribution broken down by sex\") {\n val = \"B01001_001E\";\n queue()\n .defer(d3.json, \"http://api.census.gov...
[ "0.67391485", "0.6657683", "0.65980333", "0.6535376", "0.64432615", "0.64337707", "0.64290476", "0.6423663", "0.6391913", "0.63113856", "0.6295979", "0.62644506", "0.62599015", "0.6257384", "0.6233177", "0.6220183", "0.62181824", "0.6206281", "0.6192989", "0.618845", "0.61539...
0.5896451
56
create pie chart for types of restaurant
function createPieChart() { $("#chartContainer").CanvasJSChart({ title: { text: "Restaurants (within the circle)", fontSize: 24 }, legend :{ verticalAlign: "center", horizontalAlign: "right", title: "Restaurants" }, data: [ { type: "pie"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_routine_pie_type(ndx) {\n var routineDim = ndx.dimension(dc.pluck('type'));\n\n var totalRoutineAppointmentsGroup = routineDim.group().reduceSum(dc.pluck('routine')); \n dc.pieChart(\"#routine_type_pie\")\n \n .dimension(routineDim)\n ...
[ "0.71541613", "0.7070068", "0.6789546", "0.6738122", "0.6690286", "0.6385223", "0.636947", "0.6309193", "0.6230868", "0.62264407", "0.6195941", "0.61692196", "0.6125474", "0.6118799", "0.61010927", "0.6090957", "0.60819495", "0.6073469", "0.60615873", "0.604979", "0.6045033",...
0.61765283
11
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.81440705", "0.8133243", "0.81292456", "0.8128354", "0.81192863", "0.81192863", "0.8117673", "0.81011647", "0.81011647", "0.81011647", "0.81011647", "0.81011647", "0.81011647", "0.81011647", "0.81011647", "0.8097791", "0.8097791", "0.8097791", "0.8097791", "0.8097791", "0.8...
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.527866", "0.52612406", "0.51951283", "0.518796", "0.51302594", "0.5044646", "0.48934332", "0.4857401", "0.484017", "0.48302925", "0.482028", "0.4812441", "0.4808473", "0.47852293", "0.47828078", "0.47574478", "0.47493434", "0.4739314", "0.47239366", "0.4703992", "0.4703992...
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.79481304", "0.77363", "0.7533432", "0.7445535", "0.7422875", "0.7385155", "0.7385155", "0.7385155", "0.7385155", "0.7385155", "0.7205279", "0.7166646", "0.71623874", "0.71610326", "0.7141718", "0.71380454", "0.71380454", "0.71380454", "0.71380454", "0.71380454", "0.7138045...
0.0
-1
these helpers produces better vm code in JS engines due to their explicitness and function inlining
function isUndef(v) { return v === undefined || v === null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Module() {\n \"use asm\";\n\n function d0() {\n do { } while(false);\n return 110;\n }\n\n function d1() {\n do { return 111; } while(false);\n return 112;\n }\n\n function d2() {\n do { break; } while(false);\n return 113;\n }\n\n function d3(a) {\n a = a | 0;\n do { if (a...
[ "0.6219685", "0.6018181", "0.6018181", "0.59570915", "0.5859962", "0.5846416", "0.5799001", "0.578328", "0.57496375", "0.57079464", "0.5662499", "0.56519455", "0.5626822", "0.5612754", "0.5612754", "0.5581817", "0.55455136", "0.5522949", "0.5514861", "0.54650563", "0.54625833...
0.0
-1
Check if value is primitive
function isPrimitive(value) { return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPrimitive(value){return typeof value==='string'||typeof value==='number';}", "function isPrimitive(value){return typeof value==='string'||typeof value==='number'||typeof value==='boolean';}", "function isPrimitive(value){return typeof value==='string'||typeof value==='number'||typeof value==='boolea...
[ "0.842668", "0.8386476", "0.8386476", "0.8342391", "0.8267003", "0.823295", "0.823295", "0.823295", "0.823295", "0.823295", "0.823295", "0.823295", "0.823295", "0.8198997", "0.8198997", "0.8197481", "0.81682295", "0.81682295", "0.81682295", "0.81682295", "0.81603813", "0.81...
0.82243407
13
Quick object check this is primarily used to tell Objects from primitive values when we know the value is a JSONcompliant type.
function isObject(obj) { return obj !== null && typeof obj === 'object'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#isPrimitive(value) {\n return value !== Object(value); \n }", "function isValueObject(obj) {\n\treturn (obj instanceof Number) || (obj instanceof String) || (obj instanceof Boolean) || (obj === null);\n}", "function isPrimitiveType (obj) {\r\n return ( typeof obj === 'boolean' ||\r\n typeof o...
[ "0.7209676", "0.70476824", "0.69167143", "0.69099313", "0.68993556", "0.6769612", "0.67213315", "0.67122287", "0.67026234", "0.67012334", "0.67012334", "0.67012334", "0.67012334", "0.67012334", "0.67012334", "0.67012334", "0.67012334", "0.67012334", "0.67012334", "0.67012334", ...
0.0
-1
Strict object type check. Only returns true for plain JavaScript objects.
function isPlainObject(obj) { return _toString.call(obj) === '[object Object]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]'\n }", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isPlainObject(obj){\n \tif (obj.constructor.name===\"Obj...
[ "0.7536036", "0.75246125", "0.75246125", "0.75211227", "0.7430592", "0.7411866", "0.7401077", "0.7401077", "0.7401077", "0.7401077", "0.7387758", "0.7381515", "0.7377266", "0.7371283", "0.7371283", "0.7371283", "0.7371283", "0.7371283", "0.7371105", "0.7371105", "0.73683083",...
0.7400811
11
Check if val is a valid array index.
function isValidArrayIndex(val) { var n = parseFloat(String(val)); return n >= 0 && Math.floor(n) === n && isFinite(val); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidArrayIndex(val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val)\n }", "function isValidArrayIndex(val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val)\n }", "function isVa...
[ "0.8163073", "0.8163073", "0.8135276", "0.810251", "0.8052686", "0.80396044", "0.80396044", "0.80396044", "0.80396044", "0.8011256", "0.8011256", "0.8011256", "0.8011256", "0.8011256", "0.8011256", "0.8011256", "0.8011256", "0.8011256", "0.8011256", "0.8011256", "0.7992112", ...
0.80971944
6
Convert a value to a string that is actually rendered.
function toString(val) { return val == null ? '' : typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStringify(value) {\n if (typeof value === 'string')\n return value;\n if (value == null)\n return '';\n return '' + value;\n}", "function valueToHTML(value) {\n var valueType = typeof value;\n\n var output = \"\";\n if (value == null) {\n outp...
[ "0.7583682", "0.7350029", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.7300044", "0.72896737", "0.7267361", "0.7260151", "0.7191873", "0.7167368", ...
0.0
-1
Convert a input value to a number for persistence. If the conversion fails, return original string.
function toNumber(val) { var n = parseFloat(val); return isNaN(n) ? val : n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toNumber(value) {\n if (hasValue(value) && !isNumber(value)) {\n var converted = Number(value);\n if (isNaN(converted) && isString(value) && value != \"\") {\n return toNumber(value.replace(/[^0-9.\\-]+/g, ''));\n }\n return converted;\n }\n return value;\n}...
[ "0.6704623", "0.6612754", "0.63621587", "0.6353078", "0.6353078", "0.6353078", "0.6341244", "0.6256715", "0.6256715", "0.6256715", "0.6256715", "0.6256715", "0.62517154", "0.6251364", "0.6251364", "0.6251364", "0.6251364", "0.6244528", "0.623729", "0.62147915", "0.6214398", ...
0.0
-1
Make a map and return a function for checking if a key is in that map.
function makeMap(str, expectsLowerCase) { var map = Object.create(null); var list = str.split(','); for (var i = 0; i < list.length; i++) { map[list[i]] = true; } return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async has(key) {}", "has (key, strict = true) {\n if (!strict) {\n return [...this.keys()].some((_key) => {\n return isEqual(key, _key);\n });\n }\n return Map.prototype.has.call(this, key);\n }", "has(key) {\n return this.map[key] !== ...
[ "0.615577", "0.60051006", "0.5998297", "0.5866956", "0.58040553", "0.5790977", "0.5766538", "0.565447", "0.5595331", "0.556336", "0.5559474", "0.55424625", "0.5533858", "0.55334234", "0.55334234", "0.55256295", "0.5516744", "0.54920965", "0.5468", "0.5454164", "0.5441525", ...
0.520258
43
Remove an item from an array
function remove(arr, item) { if (arr.length) { var index = arr.indexOf(item); if (index > -1) { return arr.splice(index, 1); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove$1(arr,item){if(arr.length){var index=arr.indexOf(item);if(index>-1){return arr.splice(index,1);}}}", "function remove(arr, item){\n\t var idx = indexOf(arr, item);\n\t if (idx !== -1) arr.splice(idx, 1);\n\t }", "function remove(array, item) {\n var index = _.indexOf...
[ "0.80125916", "0.7984197", "0.7935999", "0.78854436", "0.78851926", "0.78680825", "0.78680825", "0.77908796", "0.7784093", "0.7777242", "0.77427274", "0.77427274", "0.77427274", "0.7733749", "0.7721959", "0.7709162", "0.7705378", "0.7705378", "0.7705378", "0.7705378", "0.7705...
0.76207423
34
Create a cached version of a pure function.
function cached(fn) { var cache = Object.create(null); return function cachedFn(str) { var hit = cache[str]; return hit || (cache[str] = fn(str)); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cached(fn){var cache=Object.create(null);return function cachedFn(str){var hit=cache[str];return hit||(cache[str]=fn(str));};}", "function cached(fn){var cache=Object.create(null);return function cachedFn(str){var hit=cache[str];return hit||(cache[str]=fn(str));};}", "function cached(fn){var cache=Obj...
[ "0.69524795", "0.69524795", "0.69524795", "0.6894079", "0.6888596", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", "0.68345284", ...
0.68645334
6
Simple bind, faster than native
function bind(fn, ctx) { function boundFn(a) { var l = arguments.length; return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx); } // record original fn length boundFn._length = fn.length; return boundFn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleBind(context,fn){return function(value){fn.call(context,value);};}", "function simpleBind(context, fn) { // 14775\n return function(value) { ...
[ "0.7496607", "0.7335848", "0.713787", "0.713787", "0.70185053", "0.6932239", "0.693094", "0.693094", "0.689574", "0.688864", "0.6852869", "0.68492305", "0.68492305", "0.68492305", "0.68492305", "0.68492305", "0.68492305", "0.68492305", "0.68492305", "0.68492305", "0.684644", ...
0.68954074
9
Convert an Arraylike object to a real Array.
function toArray(list, start) { start = start || 0; var i = list.length - start; var ret = new Array(i); while (i--) { ret[i] = list[i + start]; } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertArray( array, type, forceClone ) {\n\n\tif ( ! array || // let 'undefined' and 'null' pass\n\t\t! forceClone && array.constructor === type ) return array;\n\n\tif ( typeof type.BYTES_PER_ELEMENT === 'number' ) {\n\n\t\treturn new type( array ); // create typed array\n\n\t}\n\n\treturn Array.prototy...
[ "0.7303728", "0.7302309", "0.7286136", "0.72795963", "0.7258968", "0.71805614", "0.713539", "0.7130816", "0.7130816", "0.7130037", "0.7130037", "0.7130037", "0.7130037", "0.7130037", "0.7130037", "0.7130037", "0.7130037", "0.7130037", "0.709515", "0.70892256", "0.70538026", ...
0.0
-1
Mix properties into target object.
function extend(to, _from) { for (var key in _from) { to[key] = _from[key]; } return to; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key]}}}", "function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key];}}}", "functi...
[ "0.7324986", "0.7308233", "0.7212952", "0.71756953", "0.71756953", "0.71756953", "0.7053572", "0.70173156", "0.70173156", "0.70173156", "0.70173156", "0.7011723", "0.7011723", "0.7011723", "0.7011723", "0.7011723", "0.7011723", "0.7011723", "0.7011723", "0.7011723", "0.693479...
0.0
-1
Merge an Array of Objects into a single Object.
function toObject(arr) { var res = {}; for (var i = 0; i < arr.length; i++) { if (arr[i]) { extend(res, arr[i]); } } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bs_arrayMerge(obj1, obj2) {\n if (!bs_isObject(obj1) || !bs_isObject(obj2)) return false;\n for (var key in obj2) {obj1[key] = obj2[key];}\n return obj1;\n}", "function merge (...params) {\n // check if all are objects\n let l = params.length\n for (l; l > 0; l--) {\n const item = params[l - 1]...
[ "0.6403866", "0.6157577", "0.6079626", "0.60319227", "0.60078406", "0.5958751", "0.5936174", "0.5872089", "0.5847438", "0.58379513", "0.5837888", "0.5808705", "0.5794686", "0.5779685", "0.5775897", "0.57679904", "0.57679904", "0.5754346", "0.5743135", "0.5737983", "0.5737983"...
0.5777849
15
Perform no operation. Stubbing args to make Flow happy without leaving useless transpiled code with ...rest (
function noop(a, b, c) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static noop(...args) {\n if (false) {\n console.log(args);\n }\n }", "function noop() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n }", "function noArgs() {\n console.log(\"hi\")\n}", "function noop() {\n var args = [];...
[ "0.67828757", "0.6758134", "0.67013633", "0.6555893", "0.6555893", "0.6429612", "0.64011616", "0.622201", "0.61428285", "0.61428285", "0.61000454", "0.61000454", "0.61000454", "0.61000454", "0.6083697", "0.60678476", "0.60678476", "0.60678476", "0.6006888", "0.5986967", "0.59...
0.0
-1
Generate a static keys string from compiler modules.
function genStaticKeys(modules) { return modules.reduce(function (keys, m) { return keys.concat(m.staticKeys || []); }, []).join(','); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genStaticKeys(modules){return modules.reduce(function(keys,m){return keys.concat(m.staticKeys||[]);},[]).join(',');}", "function genStaticKeys(modules){return modules.reduce(function(keys,m){return keys.concat(m.staticKeys||[]);},[]).join(',');}", "function genStaticKeys(modules){return modules.reduce...
[ "0.8597151", "0.8597151", "0.8597151", "0.84345806", "0.8410926", "0.84083796", "0.84083796", "0.84083796", "0.84029716", "0.83939236", "0.8393605", "0.83849823", "0.83648694", "0.83648694", "0.83648694", "0.83648694", "0.83648694", "0.83648694", "0.83648694", "0.83648694", "...
0.83854616
12
Check if two values are loosely equal that is, if they are plain objects, do they have the same shape?
function looseEqual(a, b) { if (a === b) { return true; } var isObjectA = isObject(a); var isObjectB = isObject(b); if (isObjectA && isObjectB) { try { var isArrayA = Array.isArray(a); var isArrayB = Array.isArray(b); if (isArrayA && isArrayB) { return a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sameExactShape(a, b) {\n\treturn JSON.stringify(a) === JSON.stringify(b)\n}", "function sameShape(a, b) {\n return JSON.stringify(a) === JSON.stringify(b)\n}", "function looseEqual(a,b){var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){return JSON.stringify(a)===JSON.string...
[ "0.8019994", "0.77488726", "0.7318741", "0.72728986", "0.7229161", "0.7221931", "0.7221931", "0.72055435", "0.72055435", "0.72055435", "0.72055435", "0.72055435", "0.71942", "0.71482396", "0.71482396", "0.71133727", "0.7090923", "0.7090923", "0.7090923", "0.7090923", "0.70909...
0.6896354
91
Ensure a function is called only once.
function once(fn) { var called = false; return function () { if (!called) { called = true; fn.apply(this, arguments); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function once(fn){var called=false;return function(){var args=[],len=arguments.length;while(len--){args[len]=arguments[len];}if(called){return;}called=true;return fn.apply(this,args);};}", "function once(fn){var called=false;return function(){if(!called){called=true;fn.apply(this,arguments);}};}", "function on...
[ "0.78162867", "0.7794991", "0.7794991", "0.77837825", "0.7511972", "0.7486433", "0.7455255", "0.7455255", "0.74350595", "0.7425318", "0.7425318", "0.74080145", "0.74080145", "0.74080145", "0.74080145", "0.73987424", "0.73987424", "0.73987424", "0.73987424", "0.73987424", "0.7...
0.7431102
11
Check if a string starts with $ or _
function isReserved(str) { var c = (str + '').charCodeAt(0); return c === 0x24 || c === 0x5F; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startsWith(c){ return c=='_' || Character.isLetter(c) }", "function beginsWithCharacter(username){\n return /^[A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*$/.test(username);\n}", "function starts_with(str, prefix) {\n\t\treturn str.lastIndexOf(prefix, 0) === 0;\n\t}", "function is_alphaDashUnderscore(str)\n{\n ...
[ "0.6809397", "0.64830947", "0.6418743", "0.63947165", "0.6364793", "0.6174454", "0.61610985", "0.6136182", "0.61189294", "0.6094362", "0.6089015", "0.6088359", "0.60722625", "0.60722625", "0.6068401", "0.60577387", "0.60526854", "0.60371375", "0.6011135", "0.59893996", "0.598...
0.0
-1
optimized shallow clone used for static nodes and slot nodes because they may be reused across multiple renders, cloning them avoids errors when DOM manipulations rely on their elm reference.
function cloneVNode(vnode, deep) { var componentOptions = vnode.componentOptions; var cloned = new VNode(vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, componentOptions, vnode.asyncFactory); cloned.ns = vnode.ns; cloned.isStatic = vnode.isStatic; cloned.key = vnode.key;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneVNode(vnode,deep){var componentOptions=vnode.componentOptions;var cloned=new VNode(vnode.tag,vnode.data,vnode.children,vnode.text,vnode.elm,vnode.context,componentOptions,vnode.asyncFactory);cloned.ns=vnode.ns;cloned.isStatic=vnode.isStatic;cloned.key=vnode.key;cloned.isComment=vnode.isComment;cloned...
[ "0.7215599", "0.72151595", "0.7204659", "0.68195015", "0.68195015", "0.68195015", "0.6811046", "0.6811046", "0.6794157", "0.6790796", "0.67763656", "0.67763656", "0.67763656", "0.67763656", "0.67763656", "0.67436475", "0.6734787", "0.6725122", "0.6725122", "0.6725122", "0.672...
0.6923268
3
helpers Augment an target Object or Array by intercepting the prototype chain using __proto__
function protoAugment(target, src, keys) { /* eslint-disable no-proto */ target.__proto__ = src; /* eslint-enable no-proto */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function protoAugment(target,src){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target, src) {\n target.__proto__ = src\n}", "function protoAugment(target, src) {\n\t /* eslint-disable no-proto */\n\t target.__proto__ = src;\n\t /* eslint-enable ...
[ "0.76835257", "0.7601347", "0.7541629", "0.75325716", "0.75325716", "0.75325716", "0.75325716", "0.75325716", "0.75325716", "0.75325716", "0.753026", "0.75286764", "0.75286764", "0.75277656", "0.75277656", "0.75225973", "0.75225973", "0.75225973", "0.75225973", "0.7517877", "...
0.0
-1
Augment an target Object or Array by defining hidden properties. / istanbul ignore next
function copyAugment(target, src, keys) { for (var i = 0, l = keys.length; i < l; i++) { var key = keys[i]; def(target, key, src[key]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function borderLayoutvue_type_script_lang_js_objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Ob...
[ "0.62739867", "0.60117996", "0.5853424", "0.5723327", "0.5723327", "0.57033855", "0.57033855", "0.57033855", "0.56746244", "0.56700784", "0.5669998", "0.56670225", "0.5656639", "0.5656639", "0.55862767", "0.55862767", "0.55862767", "0.55862767", "0.55862767", "0.55862767", "0...
0.0
-1
Attempt to create an observer instance for a value, returns the new observer if successfully observed, or the existing observer if the value already has one.
function observe(value, asRootData) { if (!isObject(value) || value instanceof VNode) { return; } var ob; if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { ob = value.__ob__; } else if (observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function observer(value) {\n let ob = null;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (Array.isArray(value) || isObject(value)) {\n ob = new Observer(value);\n }\n return ob;\n }", "function ob...
[ "0.7411146", "0.6519929", "0.64425147", "0.6441028", "0.64123064", "0.6407005", "0.6407005", "0.63625973", "0.5903993", "0.58817965", "0.5795763", "0.5795763", "0.5795763", "0.5795763", "0.5795763", "0.5795763", "0.5795763", "0.5795763", "0.5795763", "0.5795763", "0.5795763",...
0.55134857
67
Define a reactive property on an Object.
function defineReactive(obj, key, val, customSetter, shallow) { var dep = new Dep(); var property = Object.getOwnPropertyDescriptor(obj, key); if (property && property.configurable === false) { return; } // cater for pre-defined getter/setters var getter = property && property.get; v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineReactive(obj,key,val,customSetter,shallow){var dep=new Dep();var property=Object.getOwnPropertyDescriptor(obj,key);if(property&&property.configurable===false){return;}// cater for pre-defined getter/setters\nvar getter=property&&property.get;var setter=property&&property.set;var childOb=!shallow&&ob...
[ "0.72795117", "0.72795117", "0.7274864", "0.7128314", "0.70622796", "0.70460284", "0.6923976", "0.6914472", "0.6910857", "0.6860026", "0.6854898", "0.6854898", "0.6852583", "0.6841315", "0.68341327", "0.6817454", "0.68093616", "0.68033606", "0.67992777", "0.6795812", "0.67937...
0.6776202
23
Set a property on an object. Adds the new property and triggers change notification if the property doesn't already exist.
function set(target, key, val) { if (Array.isArray(target) && isValidArrayIndex(key)) { target.length = Math.max(target.length, key); target.splice(key, 1, val); return val; } if (key in target && !(key in Object.prototype)) { target[key] = val; return val; } var ob = t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@action\n setProp(property, newVal) {\n this.set(property, newVal);\n }", "set property(){}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = value;\n}", "function patchProperty(obj, prop, value) {\n obj[prop] = v...
[ "0.75902367", "0.73247325", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7164413", "0.7137079", "0.7137079", "0.7137079", ...
0.0
-1
Delete a property and trigger change if necessary.
function del(target, key) { if (Array.isArray(target) && isValidArrayIndex(key)) { target.splice(key, 1); return; } var ob = target.__ob__; if (target._isVue || ob && ob.vmCount) { "development" !== 'production' && warn('Avoid deleting properties on a Vue instance or its root $data ' +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeProperty(aProperty){\n let propIndex = this._indexOfProperty(aProperty);\n if(propIndex >= 0){\n this._properties.splice(propIndex, 1);\n\n }\n }", "deleteProperty(group, propertyIndex) {\n group.properties.splice(propertyIndex, 1);\n }", "function DeleteProperty(ta...
[ "0.71016866", "0.6920753", "0.67536545", "0.6663919", "0.65771246", "0.6545739", "0.6545739", "0.6545739", "0.6531088", "0.6494311", "0.6455599", "0.6452116", "0.6449189", "0.6444511", "0.6444511", "0.6444511", "0.6444511", "0.6444511", "0.6444511", "0.6444511", "0.6444511", ...
0.0
-1
Collect dependencies on array elements when the array is touched, since we cannot intercept array element access like property getters.
function dependArray(value) { for (var e = void 0, i = 0, l = value.length; i < l; i++) { e = value[i]; e && e.__ob__ && e.__ob__.dep.depend(); if (Array.isArray(e)) { dependArray(e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n }", "function dependArray (value) {\n for (var e = (void 0), i = 0, l...
[ "0.650563", "0.650563", "0.650563", "0.650563", "0.6487567", "0.64802784", "0.64205337", "0.64205337", "0.64205337", "0.64205337", "0.64205337", "0.64205337", "0.64144486", "0.6412111", "0.6397404", "0.6397404", "0.6393053", "0.63712656", "0.63712656", "0.63712656", "0.636469...
0.6417402
12
Helper that recursively merges two data objects together.
function mergeData(to, from) { if (!from) { return to; } var key, toVal, fromVal; var keys = Object.keys(from); for (var i = 0; i < keys.length; i++) { key = keys[i]; toVal = to[key]; fromVal = from[key]; if (!hasOwn(to, key)) { set(to, key, fromVal); } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "fun...
[ "0.72985435", "0.72985435", "0.729328", "0.7284459", "0.726219", "0.7257751", "0.7257751", "0.7233519", "0.7124497", "0.7124497", "0.7110065", "0.7064576", "0.7064576", "0.7064576", "0.7054798", "0.7054798", "0.7036599", "0.7036599", "0.7036599", "0.7036599", "0.7036599", "...
0.7061614
14
Hooks and props are merged as arrays.
function mergeHook(parentVal, childVal) { return childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $merge(){\r\n var mix = {};\r\n for (var i = 0; i < arguments.length; i++) {\r\n for (var property in arguments[i]) {\r\n var ap = arguments[i][property];\r\n var mp = mix[property];\r\n if (mp && $type(ap) == 'object' && $type(mp) == '...
[ "0.5942159", "0.5922896", "0.58216906", "0.5776483", "0.57003736", "0.56951946", "0.56951946", "0.5578446", "0.55729896", "0.55729896", "0.55729896", "0.55729896", "0.55729896", "0.5563147", "0.55501586", "0.55501586", "0.55501586", "0.55466485", "0.55466485", "0.55382335", "...
0.0
-1
Assets When a vm is present (instance creation), we need to do a threeway merge between constructor options, instance options and parent options.
function mergeAssets(parentVal, childVal, vm, key) { var res = Object.create(parentVal || null); if (childVal) { "development" !== 'production' && assertObjectType(key, childVal, vm); return extend(res, childVal); } else { return res; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeAssets(parentVal,childVal,vm,key){var res=Object.create(parentVal||null);if(childVal){\"development\"!=='production'&&assertObjectType(key,childVal,vm);return extend(res,childVal);}else{return res;}}", "function mergeAssets(parentVal,childVal,vm,key){var res=Object.create(parentVal||null);if(childV...
[ "0.63014585", "0.63014585", "0.6090103", "0.6090103", "0.6090103", "0.6090103", "0.6067388", "0.6064718", "0.6064718", "0.6051493", "0.60480183", "0.60480183", "0.60480183", "0.60480183", "0.60480183", "0.60480183", "0.60480183", "0.60480183", "0.60480183", "0.60480183", "0.6...
0.6066126
7
Ensure all props option syntax are normalized into the Objectbased format.
function normalizeProps(options, vm) { var props = options.props; if (!props) { return; } var res = {}; var i, val, name; if (Array.isArray(props)) { i = props.length; while (i--) { val = props[i]; if (typeof val === 'string') { name = camelize(val); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n ...
[ "0.732496", "0.72964007", "0.72918266", "0.72918266", "0.72918266", "0.72918266", "0.7290914", "0.7286272", "0.72693044", "0.72677135", "0.72677135", "0.72194535", "0.7185055", "0.7185055", "0.7185055", "0.7185055", "0.7185055", "0.7185055", "0.7185055", "0.7185055", "0.71850...
0.7254047
11
Normalize all injections into Objectbased format
function normalizeInject(options, vm) { var inject = options.inject; var normalized = options.inject = {}; if (Array.isArray(inject)) { for (var i = 0; i < inject.length; i++) { normalized[inject[i]] = { from: inject[i] }; } } else if (isPlainObject(inject)) { for (var key in i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject))...
[ "0.6754015", "0.6754015", "0.6754015", "0.6754015", "0.6754015", "0.6754015", "0.6661425", "0.6661425", "0.6649033", "0.6649033", "0.6649033", "0.6649033", "0.6649033", "0.6649033", "0.6649033", "0.6649033", "0.6649033", "0.6634905", "0.6634905", "0.6631924", "0.6631924", "...
0.0
-1
Normalize raw function directives into object format.
function normalizeDirectives(options) { var dirs = options.directives; if (dirs) { for (var key in dirs) { var def = dirs[key]; if (typeof def === 'function') { dirs[key] = { bind: def, update: def }; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unwrapFunctions(obj){\n\t\tvar res = {};\n\t\tfor(var p in obj){\n\t\t\tvar tp = typeof(obj[p]); \n\t\t\tif(tp == 'function'){\n\t\t\t\tres[p] = obj[p]();\n\t\t\t}else if(tp == 'object'){\n\t\t\t\tvar un = obj[p]; \n\t\t\t\tif(obj[p] && obj[p]['toJSON']){\n\t\t\t\t\tun = obj[p]['toJSON']();\n\t\t\t\t}\n\t...
[ "0.5401769", "0.535105", "0.53300947", "0.53300947", "0.53300947", "0.53300947", "0.53249854", "0.53204286", "0.5291194", "0.5291194", "0.5291194", "0.52891684", "0.5288414", "0.52847105", "0.52823156", "0.5263894", "0.5254451", "0.5254451", "0.5254451", "0.52355665", "0.5235...
0.0
-1
Merge two option objects into a new one. Core utility used in both instantiation and inheritance.
function mergeOptions(parent, child, vm) { { checkComponents(child); } if (typeof child === 'function') { child = child.options; } normalizeProps(child, vm); normalizeInject(child, vm); normalizeDirectives(child); var extendsFrom = child.extends; if (extendsFrom) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeOptions(obj1,obj2){var obj3={};var attrname;for(attrname in obj1){obj3[attrname]=obj1[attrname];}for(attrname in obj2){obj3[attrname]=obj2[attrname];}return obj3;}", "function _mergeOptions(obj1,obj2) {\n\t var obj3 = {};\n\t for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n\t...
[ "0.76736695", "0.73250103", "0.7277217", "0.7275695", "0.7250222", "0.72238654", "0.7216537", "0.7216537", "0.7216537", "0.7216537", "0.7216537", "0.72117054", "0.7198151", "0.7166621", "0.71599907", "0.7137279", "0.7137279", "0.7137279", "0.7104883", "0.7092019", "0.70874864...
0.66575074
53
Resolve an asset. This function is used because child instances need access to assets defined in its ancestor chain.
function resolveAsset(options, type, id, warnMissing) { /* istanbul ignore if */ if (typeof id !== 'string') { return; } var assets = options[type]; // check local registration variations first if (hasOwn(assets, id)) { return assets[id]; } var camelizedId = camelize(id); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveAsset(options,type,id,warnMissing){/* istanbul ignore if */if(typeof id!=='string'){return;}var assets=options[type];// check local registration variations first\nif(hasOwn(assets,id)){return assets[id];}var camelizedId=camelize(id);if(hasOwn(assets,camelizedId)){return assets[camelizedId];}var Pas...
[ "0.628147", "0.628147", "0.62600416", "0.61540127", "0.61540127", "0.61540127", "0.61254156", "0.61254156", "0.61254156", "0.61254156", "0.61254156", "0.60808533", "0.60808533", "0.6080175", "0.6056928", "0.60198945", "0.5997715", "0.5971935", "0.5971935", "0.5971935", "0.597...
0.6111216
11
Get the default value of a prop.
function getPropDefaultValue(vm, prop, key) { // no default, return undefined if (!hasOwn(prop, 'default')) { return undefined; } var def = prop.default; // warn against non-factory defaults for Object & Array if ("development" !== 'production' && isObject(def)) { warn('Invalid defau...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (isObject(def)) {\n warn(\n 'Invalid default value fo...
[ "0.77855986", "0.77855986", "0.77855986", "0.77853745", "0.7772297", "0.77393365", "0.77393365", "0.77393365", "0.77393365", "0.77393365", "0.77393365", "0.77341413", "0.7715974", "0.77146715", "0.77053255", "0.77053255", "0.76969695", "0.76969695", "0.76969695", "0.76969695", ...
0.77417207
5
Assert whether a prop is valid.
function assertProp(prop, name, value, vm, absent) { if (prop.required && absent) { warn('Missing required prop: "' + name + '"', vm); return; } if (value == null && !prop.required) { return; } var type = prop.type; var valid = !type || type === true; var expectedTypes = []...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertProp(prop,name,value,vm,absent){if(prop.required&&absent){warn('Missing required prop: \"'+name+'\"',vm);return;}if(value==null&&!prop.required){return;}var type=prop.type;var valid=!type||type===true;var expectedTypes=[];if(type){if(!Array.isArray(type)){type=[type];}for(var i=0;i<type.length&&!val...
[ "0.7921195", "0.78768694", "0.78768694", "0.78420407", "0.7789014", "0.7789014", "0.7789014", "0.773328", "0.773328", "0.77272594", "0.769152", "0.769152", "0.769152", "0.769152", "0.769152", "0.769152", "0.76686805", "0.7639104", "0.7615246", "0.7615246", "0.7615246", "0.7...
0.7793334
4
Use function string name to check builtin types, because a simple equality check will fail when running across different vms / iframes.
function getType(fn) { var match = fn && fn.toString().match(/^\s*function (\w+)/); return match ? match[1] : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isBuiltinType(fn) {\n return (\n // scalars\n fn === Number ||\n fn === Boolean ||\n fn === String ||\n // objects\n fn === Object ||\n fn === Array ||\n fn === Date ||\n fn === RegExp ||\n fn === Buffer ||\n fn === Null ||\n /...
[ "0.70351076", "0.63936704", "0.63136196", "0.6307277", "0.61617553", "0.61473936", "0.614104", "0.614104", "0.6138571", "0.6123208", "0.60898674", "0.6078934", "0.6065123", "0.6063992", "0.6045785", "0.6044609", "0.59802425", "0.5959729", "0.5949807", "0.5901194", "0.5901194"...
0.0
-1
Wrap a function so that if any code inside triggers state change, the changes are queued using a Task instead of a MicroTask.
function withMacroTask(fn) { return fn._withTask || (fn._withTask = function () { useMacroTask = true; var res = fn.apply(null, arguments); useMacroTask = false; return res; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapTaskFunction(fn, ctx) {\n return fn.call(ctx, () => ({\n /* ??? in which situation does this */\n }));\n}", "registerSync(syncFunction) {\n this.setState({ requestSync: syncFunction },\n function() {\n this.updateItem(this.state);\n }.bind(this));\n\n //syncFunction();\n ...
[ "0.60896254", "0.6011042", "0.58011556", "0.57410026", "0.5698128", "0.5698128", "0.5635426", "0.5596823", "0.55509585", "0.5540535", "0.5538776", "0.5529899", "0.55255055", "0.55255055", "0.55255055", "0.55255055", "0.55255055", "0.55255055", "0.55255055", "0.55255055", "0.5...
0.55402297
10
Recursively traverse an object to evoke all converted getters, so that every nested property inside the object is collected as a "deep" dependency.
function traverse(val) { _traverse(val, seenObjects); seenObjects.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverse(obj) {\n _lodash2.default.each(obj, function (val, indexOrProp) {\n // Move deeper into the object\n var next = obj[indexOrProp];\n\n // If we can go no further, then quit\n if (MongoObject.isBasicObject(next)) {\n traverse(next);\n }...
[ "0.6294247", "0.61243063", "0.59527695", "0.5853044", "0.5791482", "0.5790336", "0.5785725", "0.5776655", "0.57664883", "0.5763798", "0.57544094", "0.57544094", "0.57379156", "0.56977165", "0.5658969", "0.5650575", "0.5596752", "0.55833745", "0.5582242", "0.5565907", "0.55634...
0.0
-1
The template compiler attempts to minimize the need for normalization by statically analyzing the template at compile time. For plain HTML markup, normalization can be completely skipped because the generated render function is guaranteed to return Array. There are two cases where extra normalization is needed: 1. When...
function simpleNormalizeChildren(children) { for (var i = 0; i < children.length; i++) { if (Array.isArray(children[i])) { return Array.prototype.concat.apply([], children); } } return children; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children){for(var i...
[ "0.6916454", "0.6916454", "0.67736834", "0.6731355", "0.6731355", "0.6731355", "0.6731355", "0.6731355", "0.66958165", "0.64316386", "0.64225775", "0.64225775", "0.64225775", "0.63168925", "0.6304049", "0.630393", "0.630393", "0.630393", "0.630393", "0.6300315", "0.6300315", ...
0.0
-1
2. When the children contains constructs that always generated nested Arrays, e.g. , , vfor, or when the children is provided by user with handwritten render functions / JSX. In such cases a full normalization is needed to cater to all possible types of children values.
function normalizeChildren(children) { return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children){for(var i...
[ "0.81383675", "0.81383675", "0.8134532", "0.7862443", "0.7862443", "0.7862443", "0.7846073", "0.7846073", "0.7846073", "0.7846073", "0.7846073", "0.7834197", "0.78136206", "0.78136206", "0.78136206", "0.78136206", "0.78136206", "0.78136206", "0.77821416", "0.7776711", "0.7762...
0.0
-1
Runtime helper for resolving raw children VNodes into a slot object.
function resolveSlots(children, context) { var slots = {}; if (!children) { return slots; } for (var i = 0, l = children.length; i < l; i++) { var child = children[i]; var data = child.data; // remove slot attribute if the node is resolved as a Vue slot node if (data && dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveSlots(children,context){var slots={};if(!children){return slots;}for(var i=0,l=children.length;i<l;i++){var child=children[i];var data=child.data;// remove slot attribute if the node is resolved as a Vue slot node\nif(data&&data.attrs&&data.attrs.slot){delete data.attrs.slot;}// named slots should ...
[ "0.7115032", "0.70903903", "0.674626", "0.6733027", "0.67191803", "0.67191803", "0.67191803", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", "0.67173", ...
0.6710417
63
Reset the scheduler's state.
function resetSchedulerState() { index = queue.length = activatedChildren.length = 0; has = {}; { circular = {}; } waiting = flushing = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetSchedule() {\n this._scheduler.resetSchedule();\n }", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n {\n circular = {};\n }\n waiting...
[ "0.8266349", "0.82172596", "0.82172596", "0.82172596", "0.82154727", "0.81575215", "0.8139569", "0.8139569", "0.8138771", "0.8138771", "0.8125626", "0.81134814", "0.81134814", "0.8109907", "0.80759263", "0.8069766", "0.8069766", "0.8026845", "0.8016995", "0.80021304", "0.7976...
0.7894808
29
Flush both queues and run the watchers.
function flushSchedulerQueue() { flushing = true; var watcher, id; // Sort queue before flush. // This ensures that: // 1. Components are updated from parent to child. (because parent is always // created before the child) // 2. A component's user watchers are run before its render watch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushSchedulerQueue() {\n\t\t runSchedulerQueue(queue.sort(queueSorter));\n\t\t runSchedulerQueue(userQueue);\n\t\t // user watchers triggered more watchers,\n\t\t // keep flushing until it depletes\n\t\t if (queue.length) {\n\t\t return flushSchedulerQueue();\n\t\t }\n\t\t // devtool hook\n\t\t...
[ "0.7189309", "0.717069", "0.717069", "0.717069", "0.704732", "0.70443827", "0.70443827", "0.70443827", "0.7042908", "0.7042908", "0.7042908", "0.7042908", "0.7042908", "0.703647", "0.703647", "0.703647", "0.6824283", "0.68206215", "0.6791244", "0.6786133", "0.67702395", "0....
0.0
-1
Queue a keptalive component that was activated during patch. The queue will be processed after the entire tree has been patched.
function queueActivatedComponent(vm) { // setting _inactive to false here so that a render function can // rely on checking whether it's in an inactive tree (e.g. router-view) vm._inactive = false; activatedChildren.push(vm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queueActivatedComponent(gm) {\n // setting _inactive to false here so that a render function can\n // rely on checking whether it's in an inactive tree (e.g. router-view)\n gm._inactive = false;\n activatedChildren.push(gm);\n}", "function queueActivatedComponent (vm) {\n\t // setting _inactive to ...
[ "0.6755782", "0.67061824", "0.67061824", "0.67029536", "0.67029536", "0.67029536", "0.67029536", "0.66978735", "0.66943604", "0.66943604", "0.66567516", "0.66567516", "0.66567516", "0.66567516", "0.66567516", "0.66567516", "0.66567516", "0.66567516", "0.66567516", "0.66567516",...
0.6697052
8
Push a watcher into the watcher queue. Jobs with duplicate IDs will be skipped unless it's pushed when the queue is being flushed.
function queueWatcher(watcher) { var id = watcher.id; if (has[id] == null) { has[id] = true; if (!flushing) { queue.push(watcher); } else { // if already flushing, splice the watcher based on its id // if already past its id, it will be run next immediately. var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queueWatcher (watcher) {\n var id = watcher.id;\n if (has$1[id] == null) {\n has$1[id] = true;\n if (!flushing) {\n queue.push(watcher);\n } else {\n // if already flushing, splice the watcher based on its id\n // if already past its id, it will be run next immediately.\n va...
[ "0.7737173", "0.7737173", "0.7737173", "0.7737173", "0.7737173", "0.7728555", "0.7705355", "0.7705355", "0.7705355", "0.7700099", "0.7689418", "0.7689418", "0.7689418", "0.7689418", "0.7689418", "0.76834166", "0.76834166", "0.7682968", "0.7682968", "0.7682968", "0.76792884", ...
0.76834667
15
Runtime helper for rendering vfor lists.
function renderList(val, render) { var ret, i, l, keys, key; if (Array.isArray(val) || typeof val === 'string') { ret = new Array(val.length); for (i = 0, l = val.length; i < l; i++) { ret[i] = render(val[i], i); } } else if (typeof val === 'number') { ret = new Array(val); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderList(val,render){var ret,i,l,keys,key;if(Array.isArray(val)||typeof val==='string'){ret=new Array(val.length);for(i=0,l=val.length;i<l;i++){ret[i]=render(val[i],i);}}else if(typeof val==='number'){ret=new Array(val);for(i=0;i<val;i++){ret[i]=render(i+1,i);}}else if(isObject(val)){keys=Object.keys(va...
[ "0.6948139", "0.6948139", "0.6730186", "0.6730186", "0.6683913", "0.6683913", "0.6683913", "0.6683913", "0.6683913", "0.6683913", "0.6683913", "0.6683913", "0.6643842", "0.6615833", "0.656697", "0.656697", "0.6562301", "0.6562301", "0.6562301", "0.6562301", "0.6562301", "0....
0.6754318
2
Runtime helper for rendering
function renderSlot(name, fallback, props, bindObject) { var scopedSlotFn = this.$scopedSlots[name]; var nodes; if (scopedSlotFn) { // scoped slot props = props || {}; if (bindObject) { if ("development" !== 'production' && !isObject(bindObject)) { warn('slot v-bind witho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_render() {}", "render() {}", "render() {}", "render() {}", "static rendered () {}", "static rendered () {}", "render(){}", "render(){}", "function render() {\n\n\t\t\t}", "render() { }", "function render() {\n\t\t\n\t}", "function render() {\n\t\t\t}", "function render() {\n\t}", "render...
[ "0.8192984", "0.796873", "0.796873", "0.796873", "0.79451245", "0.79451245", "0.7530891", "0.7530891", "0.74304307", "0.74069357", "0.7388042", "0.7380203", "0.73708105", "0.7322241", "0.7322241", "0.725457", "0.725457", "0.7074182", "0.7055107", "0.70497113", "0.70109904", ...
0.0
-1
Runtime helper for resolving filters
function resolveFilter(id) { return resolveAsset(this.$options, 'filters', id, true) || identity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applyFindFilters(filters) { throw 'Not Implemented' }", "function resolveFilter(id){return resolveAsset(this.$options,'filters',id,true)||identity;}", "function resolveFilter(id){return resolveAsset(this.$options,'filters',id,true)||identity;}", "function executeOnFilters(fn) {\n\t var appState = getApp...
[ "0.69978595", "0.6792624", "0.6792624", "0.6602312", "0.6572347", "0.6572347", "0.6572347", "0.6572347", "0.6572347", "0.6559325", "0.6551497", "0.6551497", "0.6546134", "0.6533371", "0.64145756", "0.63767576", "0.6374046", "0.6374046", "0.6374046", "0.6374046", "0.63544434",...
0.0
-1
Runtime helper for checking keyCodes from config. exposed as Vue.prototype._k passing in eventKeyName as last argument separately for backwards compat
function checkKeyCodes(eventKeyCode, key, builtInAlias, eventKeyName) { var keyCodes = config.keyCodes[key] || builtInAlias; if (keyCodes) { if (Array.isArray(keyCodes)) { return keyCodes.indexOf(eventKeyCode) === -1; } else { return keyCodes !== eventKeyCode; } } else if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkKeyCodes(eventKeyCode,key,builtInAlias,eventKeyName){var keyCodes=config.keyCodes[key]||builtInAlias;if(keyCodes){if(Array.isArray(keyCodes)){return keyCodes.indexOf(eventKeyCode)===-1;}else{return keyCodes!==eventKeyCode;}}else if(eventKeyName){return hyphenate(eventKeyName)!==key;}}", "function c...
[ "0.7395627", "0.7395627", "0.7170469", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.6985413", "0.69040984", "0.6882067", "0.6882067", "0.6882067", "0.6882067", ...
0.6930081
16
Runtime helper for merging vbind="object" into a VNode's data.
function bindObjectProps(data, tag, value, asProp, isSync) { if (value) { if (!isObject(value)) { "development" !== 'production' && warn('v-bind without argument expects an Object or Array value', this); } else { if (Array.isArray(value)) { value = toObject(value); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindObjectProps(data,tag,value,asProp,isSync){if(value){if(!isObject(value)){\"development\"!=='production'&&warn('v-bind without argument expects an Object or Array value',this);}else{if(Array.isArray(value)){value=toObject(value);}var hash;var loop=function loop(key){if(key==='class'||key==='style'||isR...
[ "0.575118", "0.575118", "0.55760384", "0.5571887", "0.5544255", "0.54515207", "0.543922", "0.54350704", "0.5429057", "0.5428097", "0.5421436", "0.54194015", "0.54194015", "0.54194015", "0.5419051", "0.5419051", "0.5394343", "0.5388724", "0.5381499", "0.53707486", "0.53707486"...
0.5450113
6
Runtime helper for rendering static trees.
function renderStatic(index, isInFor, isOnce) { // render fns generated by compiler < 2.5.4 does not provide v-once // information to runtime so be conservative var isOldVersion = arguments.length < 3; // if a static tree is generated by v-once, it is cached on the instance; // otherwise it is purel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStatic(index, isInFor) {\n // static trees can be rendered once and cached on the contructor options\n // so every instance shares the same cached trees\n var options = this.$options;\n var cached = options.cached || (options.cached = []);\n var tree = cached[index];\n // if has already-render...
[ "0.70402855", "0.7031438", "0.7031438", "0.700297", "0.69444066", "0.69346774", "0.69346774", "0.69346774", "0.69346774", "0.6915462", "0.6899169", "0.6899169", "0.68987626", "0.68987626", "0.68987626", "0.6893576", "0.6893576", "0.68925536", "0.68882704", "0.6867529", "0.686...
0.6890428
18
Runtime helper for vonce. Effectively it means marking the node as static with a unique key.
function markOnce(tree, index, key) { markStatic(tree, "__once__" + index + (key ? "_" + key : ""), true); return tree; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function markOnce(tree, index, key) {\n markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n return tree;\n }", "function markOnce(tree, index, key) {\n\t markStatic(tree, \"__once__\" + index + (key ? \"_\" + key : \"\"), true);\n\t return tree;\n\t}", "function markOnce(t...
[ "0.7307867", "0.72644734", "0.72644734", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.7207664", "0.71539545", "0.71056765", "0.71056765", "0.7084502", "0.7068957", "0.70687896...
0.72334355
3
transform component vmodel info (value and callback) into prop and event handler respectively.
function transformModel(options, data) { var prop = options.model && options.model.prop || 'value'; var event = options.model && options.model.event || 'input';(data.props || (data.props = {}))[prop] = data.model.value; var on = data.on || (data.on = {}); if (isDef(on[event])) { on[event] = [data....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transformModel (options, data) {\n\t var prop = (options.model && options.model.prop) || 'value';\n\t var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;\n\t var on = data.on || (data.on = {});\n\t if (isDef(on[event])) {\n\t on[...
[ "0.6737575", "0.6737575", "0.6730038", "0.6730038", "0.6730038", "0.6650488", "0.6650488", "0.6645445", "0.66281325", "0.66068804", "0.66068804", "0.66068804", "0.66068804", "0.66068804", "0.66068804", "0.66068804", "0.66068804", "0.66068804", "0.66068804", "0.66068804", "0.6...
0.6684194
5
wrapper function for providing a more flexible interface without getting yelled at by flow
function createElement(context, tag, data, children, normalizationType, alwaysNormalize) { if (Array.isArray(data) || isPrimitive(data)) { normalizationType = children; children = data; data = undefined; } if (isTrue(alwaysNormalize)) { normalizationType = ALWAYS_NORMALIZE; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator(...
[ "0.6006854", "0.57391536", "0.57391536", "0.57391536", "0.57336915", "0.56734383", "0.55895805", "0.5574484", "0.5558737", "0.55205995", "0.5486861", "0.5402142", "0.52952385", "0.52812856", "0.52571064", "0.52345145", "0.52315", "0.52315", "0.52315", "0.5225872", "0.5192646"...
0.0
-1
Query an element selector if it's not an element already.
function query(el) { if (typeof el === 'string') { var selected = document.querySelector(el); if (!selected) { "development" !== 'production' && warn('Cannot find element: ' + el); return document.createElement('div'); } return selected; } else { return el; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function query (el) {\n\t if (typeof el === 'string') {\n\t var selector = el\n\t el = document.querySelector(el)\n\t if (!el) {\n\t process.env.NODE_ENV !== 'production' && warn(\n\t 'Cannot find element: ' + selector\n\t )\n\t return document.createElement('div')\n\t }\n\t }\n...
[ "0.69562656", "0.6932194", "0.6932194", "0.68758327", "0.68758327", "0.6866427", "0.68579197", "0.68579197", "0.68579197", "0.6856853", "0.68201727", "0.6796526", "0.6796526", "0.6796526", "0.6796526", "0.6796526", "0.6796526", "0.6796526", "0.6796526", "0.6796526", "0.679652...
0.0
-1
set scope id attribute for scoped CSS. this is implemented as a special case to avoid the overhead of going through the normal attribute patching process.
function setScope(vnode) { var i; if (isDef(i = vnode.fnScopeId)) { nodeOps.setAttribute(vnode.elm, i, ''); } else { var ancestor = vnode; while (ancestor) { if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) { nodeOps.setAttribute(vnode.el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushScopeId(id) {\r\n currentScopeId = id;\r\n}", "function pushScopeId(id) {\r\n currentScopeId = id;\r\n}", "function pushScopeId(id) {\n currentScopeId = id;\n}", "function pushScopeId(id) {\n currentScopeId = id;\n}", "function pushScopeId(id) {\n currentScopeId = id;\n}", "fu...
[ "0.6507363", "0.6507363", "0.6445586", "0.6445586", "0.6445586", "0.6445586", "0.6445586", "0.6445586", "0.6445586", "0.6423039", "0.6423039", "0.6423039", "0.6423039", "0.642108", "0.64098793", "0.64098793", "0.64098793", "0.64098793", "0.64098793", "0.64098793", "0.64098793...
0.64527977
2
Note: this is a browseronly function so we can assume elms are DOM nodes.
function hydrate(elm, vnode, insertedVnodeQueue, inVPre) { var i; var tag = vnode.tag; var data = vnode.data; var children = vnode.children; inVPre = inVPre || data && data.pre; vnode.elm = elm; if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) { vnode.isAsyncP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkNodeEl(el) {\n return el.nodeType === 1;\n }", "domRemoveChildren(el) {\n if (!el) return;\n while (el.firstChild) {\n el.firstChild.remove();\n };\n }", "function getOuterHTML(el){if(el.outerHTML){return el.outerHTML;}else{var container=document.createElement(...
[ "0.6369419", "0.60760003", "0.6033419", "0.6033419", "0.6033419", "0.597494", "0.597494", "0.597494", "0.597494", "0.5931921", "0.59156203", "0.581493", "0.58131546", "0.5809575", "0.5794876", "0.5794876", "0.57752883", "0.5748383", "0.5747906", "0.5736269", "0.57067645", "...
0.0
-1
note: this only removes the attr from the Array (attrsList) so that it doesn't get processed by processAttrs. By default it does NOT remove it from the map (attrsMap) because the map is needed during codegen.
function getAndRemoveAttr(el, name, removeFromMap) { var val; if ((val = el.attrsMap[name]) != null) { var list = el.attrsList; for (var i = 0, l = list.length; i < l; i++) { if (list[i].name === name) { list.splice(i, 1); break; } } } if (removeFrom...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _cleanupAttributes(target) {\n\t for (var n in this.attributes) {\n\t target.removeAttribute(n);\n\t }\n\t }", "function getAndRemoveAttr(el,name,removeFromMap){var val;if((val=el.attrsMap[name])!=null){var list=el.attrsList;for(var i=0,l=list.length;i<l;i++){if(list[i].name=...
[ "0.7031372", "0.6987807", "0.6987807", "0.6950632", "0.64855564", "0.64575964", "0.64468855", "0.64468855", "0.642312", "0.642312", "0.642312", "0.63694537", "0.63694537", "0.63694537", "0.63509834", "0.63370967", "0.6310577", "0.62871754", "0.62871754", "0.62871754", "0.6287...
0.6529853
4
Crossplatform code generation for component vmodel
function genComponentModel(el, value, modifiers) { var ref = modifiers || {}; var number = ref.number; var trim = ref.trim; var baseValueExpression = '$$v'; var valueExpression = baseValueExpression; if (trim) { valueExpression = "(typeof " + baseValueExpression + " === 'string'" + "? " +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gen_vm() {\n var angelic = require(\"tenshi/angelic/robot\");\n var vm = angelic.make();\n\n vm.set_common_defs_path('chrome://angel-player/content/common_defs');\n\n function set_motor ( port, val ) {\n // TODO(ericnguyen): use correct API here\n simmy.robot.setMotor(port, val);\n // TODO(er...
[ "0.6402173", "0.6358891", "0.6358891", "0.63267535", "0.632275", "0.632275", "0.632275", "0.632275", "0.6310688", "0.6307372", "0.62999815", "0.62999815", "0.62999815", "0.62999815", "0.62999815", "0.62999815", "0.62999815", "0.62999815", "0.62999815", "0.62999815", "0.629998...
0.62786067
70
Crossplatform codegen helper for generating vmodel value assignment code.
function genAssignmentCode(value, assignment) { var res = parseModel(value); if (res.key === null) { return value + "=" + assignment; } else { return "$set(" + res.exp + ", " + res.key + ", " + assignment + ")"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genAssignmentCode(value, assignment) {\n var modelRs = parseModel(value);\n if (modelRs.idx === null) {\n return value + \"=\" + assignment;\n } else {\n return \"$set(\" + modelRs.exp + \", \" + modelRs.idx + \", \" + assignment + \")\";\n }\n}", "function genAssignmentCode(value, assignment)...
[ "0.64556855", "0.64556855", "0.6401989", "0.6401989", "0.6319662", "0.6319662", "0.6319662", "0.6319662", "0.6319662", "0.6319662", "0.6311306", "0.6311306", "0.62977546", "0.6282011", "0.62727714", "0.6266667", "0.62559646", "0.6246034", "0.6246034", "0.62224823", "0.6222482...
0.6293345
13
normalize vmodel event tokens that can only be determined at runtime. it's important to place the event as the first in the array because the whole point is ensuring the vmodel callback gets called before userattached handlers.
function normalizeEvents(on) { /* istanbul ignore if */ if (isDef(on[RANGE_TOKEN])) { // IE input[type=range] only supports `change` event var event = isIE ? 'change' : 'input'; on[event] = [].concat(on[RANGE_TOKEN], on[event] || []); delete on[RANGE_TOKEN]; } // This was origina...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeEvents (on) {\n\t var event;\n\t /* istanbul ignore if */\n\t if (on[RANGE_TOKEN]) {\n\t // IE input[type=range] only supports `change` event\n\t event = isIE ? 'change' : 'input';\n\t on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);\n\t delete on[RANGE_TOKEN];\n\t }\n\t ...
[ "0.61188644", "0.61188644", "0.61188644", "0.60326105", "0.6014502", "0.6014502", "0.60097134", "0.60097134", "0.60097134", "0.6008751", "0.60056734", "0.6003765", "0.5988705", "0.5988705", "0.5988705", "0.5988705", "0.5962868", "0.5942128", "0.5942128", "0.5942128", "0.59421...
0.59441876
17
merge static and dynamic style data on the same vnode
function normalizeStyleData(data) { var style = normalizeStyleBinding(data.style); // static style is pre-processed into an object during compilation // and is always a fresh object, so it's safe to merge into it return data.staticStyle ? extend(data.staticStyle, style) : style; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeStyleData (data) {\n var style = normalizeStyleBinding(data.style);\n // static style is pre-processed into an object during compilation\n // and is always a fresh object, so it's safe to merge into it\n return data.staticStyle\n ? extend(data.staticStyle, style)\n ...
[ "0.6215778", "0.6199974", "0.61943537", "0.6168322", "0.6168322", "0.6168322", "0.6168322", "0.61192024", "0.61192024", "0.61192024", "0.61184067", "0.61184067", "0.61184067", "0.61184067", "0.61184067", "0.61184067", "0.61043054", "0.60975385", "0.60975385", "0.60975385", "0...
0.61212295
8
normalize possible array / string values into Object
function normalizeStyleBinding(bindingStyle) { if (Array.isArray(bindingStyle)) { return toObject(bindingStyle); } if (typeof bindingStyle === 'string') { return parseStyleText(bindingStyle); } return bindingStyle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeIdentificationValues(ids) {\n const normalized = {};\n Object.entries(ids).forEach(([marker, value]) => {\n if (value === null) {\n normalized[marker] = null;\n }\n else if (Array.isArray(value)) {\n normalized[marker] = value.map((v) => v.toString...
[ "0.6133222", "0.6036086", "0.5830098", "0.58291584", "0.58291584", "0.58291584", "0.56881946", "0.56881946", "0.5685236", "0.56383586", "0.56066495", "0.56066495", "0.56066495", "0.56066495", "0.56066495", "0.56066495", "0.56066495", "0.55650276", "0.55643666", "0.55582786", ...
0.0
-1
parent component style should be after child's so that parent component's style could override it
function getStyle(vnode, checkChild) { var res = {}; var styleData; if (checkChild) { var childNode = vnode; while (childNode.componentInstance) { childNode = childNode.componentInstance._vnode; if (childNode.data && (styleData = normalizeStyleData(childNode.data))) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChildStyle() {\n\t\treturn {\n\t\t\tposition: 'relative'\n\t\t};\n\t}", "function inheirtInlineStyles(parent, el){\n\t\tvar style = parent.getProperty('style');\n\t\t\n\t\t// Put parent styles before child styles.\n\t\tstyle && el.setProperty('style', style.replace(/([^;])$/, '$1;') + (el.getProperty('style')...
[ "0.65132004", "0.64950204", "0.610668", "0.6058311", "0.58068186", "0.55824643", "0.5580157", "0.5567029", "0.5567029", "0.5567029", "0.55625933", "0.5536426", "0.552795", "0.552795", "0.55243844", "0.55059993", "0.5497124", "0.54736674", "0.54656726", "0.54524225", "0.539117...
0.50956774
58
Add class with compatibility for SVG since classList is not supported on SVG elements in IE
function addClass(el, cls) { /* istanbul ignore if */ if (!cls || !(cls = cls.trim())) { return; } /* istanbul ignore else */ if (el.classList) { if (cls.indexOf(' ') > -1) { cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); }); } else {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hackSVG() {\n\tif (SVGElement && SVGElement.prototype) {\n\n\t\tSVGElement.prototype.hasClass = function(className) {\n\t\t\treturn new RegExp('(\\\\s|^)' + className + '(\\\\s|$)').test(this\n\t\t\t\t\t.getAttribute('class'));\n\t\t};\n\n\t\tSVGElement.prototype.addClass = function(className) {\n\t\t\tif...
[ "0.7646955", "0.7538302", "0.715277", "0.715277", "0.7131344", "0.7131344", "0.71100616", "0.71061164", "0.71061164", "0.70534873", "0.7012893", "0.6931945", "0.6931945", "0.6931945", "0.6931945", "0.6931945", "0.6927917", "0.6918403", "0.6347607", "0.62825215", "0.6246344", ...
0.0
-1