conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Upgrade for compatability with Hapi 8\n" }, { "from": "human", "value": "exports.register = function(plugin, options, next) {\n\n // Wait 10 seconds for existing connections to close then exit.\n var stop = function() {\n plugin.servers[0].stop({\n timeout...
javascript
chosen
[ { "from": "system", "value": "Allow lowercase React import and using an object reference\n" }, { "from": "human", "value": "var path = require('path');\n\nmodule.exports = function (source) {\n if (this.cacheable) {\n this.cacheable();\n }\n\n var filename = path.basename(this.resourcePath...
javascript
chosen
[ { "from": "system", "value": "WORK WORK CARRY CARRY MOVE MOVE MOVE\n" }, { "from": "human", "value": "module.exports = function () {\n StructureSpawn.prototype.createCustomCreep = \n function(energy, roleName) {\n var numberOfParts = Math.floor(energy / 350);\n var body = [];...
javascript
chosen
[ { "from": "system", "value": "Use === instead of == to please the standard\n" }, { "from": "human", "value": "var shell = require('shelljs')\n\nif (exec('git status --porcelain').stdout) {\n console.error('Git working directory not clean. Please commit all chances to release a new package to np...
javascript
chosen
[ { "from": "system", "value": "Allow modifier key press when opening table rows\n" }, { "from": "human", "value": "// Forest tables\n\n$(document).on('mouseenter', '.forest-table tbody tr', function() {\n var $row = $(this);\n\n $row.addClass('active');\n\n $(document).one('turbolinks:before-c...
javascript
chosen
[ { "from": "system", "value": "Edit controllerAs label for ShoppingListDirectiveController\n" }, { "from": "human", "value": "// app.shoppingListDirective.js\n\n(function() {\n \"use strict\";\n\n angular.module(\"ShoppingListDirectiveApp\")\n .directive(\"shoppingList\", ShoppingList);\n\n ...
javascript
chosen
[ { "from": "system", "value": "Fix \"Expected '===' and instead saw '=='.\"" }, { "from": "human", "value": "////\tExternal Links\n// Open external links in a new tab.\n$(function () {\n\t$('a').each(function () {\n\t\tif ( $(this).href.indexOf(window.location.host) == -1 ) {\n\t\t\t$(this).attr(...
javascript
chosen
[ { "from": "system", "value": "Copy core .htaccess file to dist\n" }, { "from": "human", "value": "var gulp = require('gulp');\n\nvar clean = require('gulp-clean');\nvar zip = require('gulp-zip');\n\nvar bases = {\n root: 'dist/'\n};\n\nvar paths = [\n 'core/actions/*',\n 'core/common/**...
javascript
chosen
[ { "from": "system", "value": "Add config for instagram authentication\n" }, { "from": "human", "value": "// TODO Just add fallbacks to config.js\nvar path = require('path')\n\nmodule.exports = {\n port: 8080,\n address: '127.0.0.1',\n\n session_secret: 'asdf',\n\n database: {\n host: 'mon...
javascript
chosen
[ { "from": "system", "value": "Make Interact.confirm use configurable acceptance strings\n" }, { "from": "human", "value": "var _ = require(\"lodash\");\nvar Bacon = require(\"baconjs\");\n\nvar Interact = module.exports;\n\nInteract.ask = function (question) {\n var readline = require(\"readlin...
javascript
chosen
[ { "from": "system", "value": "Set short delay for demo\n" }, { "from": "human", "value": "(function () {\n var cogClass = function () {};\n cogClass.prototype.exec = function (params, request, response) {\n var oops = this.sys.apiError;\n var sys = this.sys;\n var user...
javascript
chosen
[ { "from": "system", "value": "Fix test input file with incorrect contets\n" }, { "from": "human", "value": "module.exports = {\n\tname: 'commonjs.legacy.index_json/commonjs.legacy.index_js.js'\n};\n" }, { "from": "gpt", "value": "module.exports = {\n\tname: 'commonjs.legacy.index_jso...
javascript
chosen
[ { "from": "system", "value": "Migrate quantiles to buckets creation\n" }, { "from": "human", "value": "'use strict';\n\nrequire('es6-promise').polyfill();\n\nvar debug = require('../helper/debug')('fn-quantiles');\nvar LazyFiltersResult = require('../model/lazy-filters-result');\nvar fnBuckets =...
javascript
chosen
[ { "from": "system", "value": "Fix test for inline toolbar\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { expect } from 'chai';\nimport { mount } from 'enzyme';\nimport Toolbar from '../index';\n\ndescribe('Toolbar', () => {\n it('allows children to overri...
javascript
chosen
[ { "from": "system", "value": "Resolve objectives in course publication check\n\nWe can also use the length value of the relationship to check if there\nare parents which engages auto tracking.\n" }, { "from": "human", "value": "/* eslint-disable ember/no-computed-properties-in-native-classes */\...
javascript
chosen
[ { "from": "system", "value": "Use the afterRender run loop to check if has children\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/floating-mobile-buttons';\n\nexport default Ember.Component.extend({\n layout,\n tagName: 'ul',\n clas...
javascript
chosen
[ { "from": "system", "value": "Add a urlRoot to allow use outside of a collection.\n" }, { "from": "human", "value": "\"use strict\";\n\n\ngreat.Artist = Backbone.Model.extend({\n});\n\n\ngreat.ArtistsCollection = Backbone.PageableCollection.extend({\n model: great.Artist,\n comparator: \"n...
javascript
chosen
[ { "from": "system", "value": "Refactor camelCase function to use custom compose function\n" }, { "from": "human", "value": "import R from 'ramda';\nimport uncapitalize from './uncapitalize.js';\nimport pascalCase from './pascal-case.js';\n\n// a -> a\nconst camelCase = R.compose(uncapitalize, pa...
javascript
chosen
[ { "from": "system", "value": "Remove reset camera click event\n" }, { "from": "human", "value": "$(document).ready(function() {\n console.log( \"ready!\" );\n\n var gameForeground = $('#gameForeground')[0];\n var gameFront = $('#gameFront')[0];\n var gameBack = $('#gameBack')[0];\n ...
javascript
chosen
[ { "from": "system", "value": "Fix Redux DevTools for mobile\n" }, { "from": "human", "value": "import { compose, createStore, applyMiddleware } from 'redux'\nimport persistState from 'redux-localstorage'\nimport thunk from 'redux-thunk'\n\nimport RootReducer from 'reducers/RootReducer'\n\nexport...
javascript
chosen
[ { "from": "system", "value": "BUG: Fix undefined error when no search file found\n" }, { "from": "human", "value": "jQuery(function($) {\n\t$('#tipue_search_input').tipuesearch({\n\t\t'mode': 'static',\n\t\t'contentLocation': '/search_index'\n\t});\n\n\t$(\"form.no-pageload input\").keypress(fun...
javascript
chosen
[ { "from": "system", "value": "Fix message processing for sticker comments.\n" }, { "from": "human", "value": "var config = require('../config.json');\nvar modIDs = config.modIDs;\n\n/**\n * A single Facebook post or comment.\n * @class\n */\nvar Post = module.exports = function (id) {\n\n /** @...
javascript
chosen
[ { "from": "system", "value": "Create ItemRenderer from options passed to Deck\n" }, { "from": "human", "value": "var _ = require(\"lodash\");\nvar EventEmitter = require(\"events\").EventEmitter;\nvar util = require(\"util\");\nvar ItemCollection = require(\"./itemcollection\");\n\nfunction Deck...
javascript
chosen
[ { "from": "system", "value": "Fix handling of NuGet errors\n" }, { "from": "human", "value": "'use strict';\n\nvar shell = require('shelljs');\nvar cmd = require('./cmd');\n\n// Execute msbuild.exe with passed arguments\nmodule.exports = function exec(args) {\n process.exit(shell.exec(cmd(arg...
javascript
chosen
[ { "from": "system", "value": ":art: Handle failure in name guessing\n" }, { "from": "human", "value": "'use babel'\nconst FS = require('fs')\nconst Path = require('path')\nconst {View} = require('./view')\nconst callsite = require('callsite')\nimport {guessName, installPackages, packagesToInstal...
javascript
chosen
[ { "from": "system", "value": "Fix error handling in lexer\n" }, { "from": "human", "value": "\"use strict\";\n\nvar Class = require(\"./Class\");\n\nvar CompileError = exports.CompileError = Class.extend({\n\n\tinitialize: function () {\n\t\tswitch (arguments.length) {\n\t\tcase 2: // token, tex...
javascript
chosen
[ { "from": "system", "value": "Update path to createReducer function\n" }, { "from": "human", "value": "import { expect } from 'chai';\nimport Immutable from 'immutable';\nimport { createReducer } from 'rook/lib/redux/createStore';\nimport reducers from '../modules';\nconst reducer = createReduce...
javascript
chosen
[ { "from": "system", "value": "Fix for search not working when pressing the enter key.\n" }, { "from": "human", "value": "export default Ember.TextField.extend(Ember.TargetActionSupport, {\n change: function() {\n this.triggerAction({\n action: 'search'\n });\n },\n...
javascript
chosen
[ { "from": "system", "value": "Update the d3ma var, make it more global like d3.ma\n" }, { "from": "human", "value": "var d3 = window.d3;\n\nvar previousD3ma = window.d3.ma;\n\nvar d3ma = d3.ma = {};\n\nd3ma.noConflict = function() {\n\twindow.d3ma= previousD3ma;\n\treturn d3ma;\n};\n\nd3ma.asser...
javascript
chosen
[ { "from": "system", "value": "Use only information from dashboard API for dashboard display.\n\nThis fixes a problem with course run ids which may not exist\n" }, { "from": "human", "value": "import React from 'react';\n\nimport { makeCourseStatusDisplay } from '../util/util';\n\nclass CourseLis...
javascript
chosen
[ { "from": "system", "value": "Update for new React types, context, forwardRef, etc" }, { "from": "human", "value": "import React from 'react';\n\nimport createChainableTypeChecker from './utils/createChainableTypeChecker';\n\nfunction elementType(props, propName, componentName, location, propFul...
javascript
chosen
[ { "from": "system", "value": "Add sendSMS method and confirm that it works\n" }, { "from": "human", "value": "require('dotenv').config();\n\nexport const sendSMS = (message) => {\n \n const formData = new FormData()\n\n formData.append('body', encodeURIComponent(message))\n\n formData.append...
javascript
chosen
[ { "from": "system", "value": "Add leading to zeros to single digit\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport logo from './logo.svg';\nimport './App.css';\n\nclass App extends Component {\n render() {\n return (\n <div className=\"App\">\n ...
javascript
chosen
[ { "from": "system", "value": "Add skipAuthorization to options instead of a variable in our method" }, { "from": "human", "value": "var JWTHelper = require('./jwt-helper');\nvar JWTConfig = require('./jwt-config');\n\nvar JWTRequest = {\n setAuthorizationHeader(options, token) {\n if (...
javascript
chosen
[ { "from": "system", "value": "Make it work on Node 4\n\nNode 4 does not support destructuring." }, { "from": "human", "value": "'use strict';\n\nconst yarpm = require('../lib');\n\nconst argv = process.argv.slice(2);\n\nexports.run = function run(options) {\n yarpm(argv, Object.assign({stdin: p...
javascript
chosen
[ { "from": "system", "value": "Remove first call to textFit\n" }, { "from": "human", "value": "'use strict';\n\n// Directive for using http://www.jacklmoore.com/autosize/\nangular.module('Teem')\n .directive('textfit',[\n '$timeout',\n function($timeout) {\n return {\n link: function(s...
javascript
chosen
[ { "from": "system", "value": "Correct app name in ActionCtrl tests\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('Controller: ActionCtrl', function () {\n\n // load the controller's module\n beforeEach(module('nameApp'));\n\n var ActionCtrl,\n scope;\n\n // Initialize the c...
javascript
chosen
[ { "from": "system", "value": "client: Remove obsolete prop from CircularProgress.\n" }, { "from": "human", "value": "import React from 'react';\nimport { CircularProgress } from 'material-ui/Progress';\nimport Text from './Text';\n\nconst Loading = ({ message }) => (\n <div className=\"loading\...
javascript
chosen
[ { "from": "system", "value": "Update to include latest web platform tests\n\nIncludes https://github.com/w3c/web-platform-tests/pull/5146.\n" }, { "from": "human", "value": "\"use strict\";\n\nif (process.env.NO_UPDATE) {\n process.exit(0);\n}\n\nconst path = require(\"path\");\nconst fs = requ...
javascript
chosen
[ { "from": "system", "value": "Add user id of logged in user to res.locals\n" }, { "from": "human", "value": "const router = require('express').Router()\nconst nonUser = require('./non-user')\nconst user = require('./user-only')\n\nrouter.use((req, res, next) => {\n let loggedIn = false\n if (r...
javascript
chosen
[ { "from": "system", "value": "Disable column equalization before print.\n" }, { "from": "human", "value": "/*global jQuery:false*/\n(function($) {\n function equalize() {\n var elements = $('.left, .right');\n var max_height = Math.max.apply(\n null,\n elem...
javascript
chosen
[ { "from": "system", "value": "FIX error with webpack when WebSocket not exists\n\nWhen building with webpack and you didn't define module.exports it will default to an empty object {}\r\nSo when transport.enabled test !!WebSocketDriver it returns true instead of false." }, { "from": "human", "va...
javascript
chosen
[ { "from": "system", "value": "Use webpack dev server as proxy to rails\n" }, { "from": "human", "value": "// Note: You must restart bin/webpack-watcher for changes to take effect\n\nconst merge = require('webpack-merge')\nconst common = require('./common.js')\n\nconst { resolve } = require('path...
javascript
chosen
[ { "from": "system", "value": "Use new Vue whitespace optimization\n" }, { "from": "human", "value": "const { dev_server: devServer } = require('@rails/webpacker').config;\n\nconst isProduction = process.env.NODE_ENV === 'production';\nconst inDevServer = process.argv.find(v => v.includes('webpac...
javascript
chosen
[ { "from": "system", "value": "Add CORS to node server.\n" }, { "from": "human", "value": "const MONGOOSE_CONSOLE_DEFAULT_PORT = 8080;\nconst PROMETHEUS_CONFIGURATION_PATH = '/configuration/prometheus.yml';\n\nvar express = require('express');\nvar bodyParser = require('body-parser');\nvar fs = r...
javascript
chosen
[ { "from": "system", "value": "FIX - поправлен JS для адаптива меню\n" }, { "from": "human", "value": "/* eslint-disable */\n$('.nav-toggle').click(function (e) {\n $('.nav-menu').slideToggle(500);\n});\n\ndebounce(function(){\n $(window).resize(function(){\n if($(window).width() > 7...
javascript
chosen
[ { "from": "system", "value": "Remove password as hidden field\n" }, { "from": "human", "value": "var keystone = require('keystone');\nvar Types = keystone.Field.Types;\n\n/**\n * Y Model\n * ==========\n */\nvar Y = new keystone.List('Y');\n\nY.add({\n\tname: { type: Types.Name, required: true, ...
javascript
chosen
[ { "from": "system", "value": "[WEB-465] Fix typo in \"powerful apps\"" }, { "from": "human", "value": "import React from 'react';\nimport Helmet from 'react-helmet';\nimport Hero from './Hero';\n\nconst LandingPageHero = ({ title, headline }, { modals }) => {\n return (\n <div>\n <Helme...
javascript
chosen
[ { "from": "system", "value": "Fix karma config. Watch files when not CI environment.\n" }, { "from": "human", "value": "const buble = require('rollup-plugin-buble');\nconst nodeResolve = require('rollup-plugin-node-resolve');\nconst commonJS = require('rollup-plugin-commonjs');\n\n\nmodule.expor...
javascript
chosen
[ { "from": "system", "value": "Make the web port configurable" }, { "from": "human", "value": "// This is the main server file.\n//\n// It parses the command line and instantiates the two servers for this app:\nconst async = require('async')\nconst {cyan, dim, green, red} = require('chalk')\ncons...
javascript
chosen
[ { "from": "system", "value": "[Test] Fix unit test following merge of maintenance/1.2.0 changes.\n" }, { "from": "human", "value": "/* ============================================================================\n\n Copyright (C) 2006-2016 Talend Inc. - www.talend.com\n\n This source code is av...
javascript
chosen
[ { "from": "system", "value": "Update getResources to support lists, not labels\n" }, { "from": "human", "value": "// Returns a list of resources by IDs or label\nexport default function(state, resourceName, idsOrLabel) {\n const resourceSlice = state[resourceName];\n if (!resourceSlice) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix for module error in console.\n" }, { "from": "human", "value": "// Here you can add settings which change per environment. This file will be also used by the buildserver to inject environment specific values.\n// Settings are made available through the configSer...
javascript
chosen
[ { "from": "system", "value": "Update Adapter to match API\n" }, { "from": "human", "value": "Ember.Adapter = Ember.Object.extend({\n find: function(record, id) {\n throw new Error('Ember.Adapter subclasses must implement find');\n },\n\n findQuery: function(record, id) {\n throw new Err...
javascript
chosen
[ { "from": "system", "value": "Hide help text if click outside element.\n\n– SAAS-457\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .directive('helpicon', ['$document', helpicon]);\n\n function helpicon($document) {\n return {\n restri...
javascript
chosen
[ { "from": "system", "value": "Fix process undefined in content script\n\nFixes #1113.\n" }, { "from": "human", "value": "'use strict';\n\nvar userData, offlineUser;\nofflineUser = localStorage.getItem('offline_users');\n\nif (offlineUser) {\n userData = JSON.parse(localStorage.getItem('offline_...
javascript
chosen
[ { "from": "system", "value": "Add banner to built version\n" }, { "from": "human", "value": "var gulp = require('gulp');\n//var gutil = require('gulp-util');\nvar fs = require('fs');\nvar durandal = require('gulp-durandal');\nvar header = require('gulp-header');\nvar paths = require('../paths');...
javascript
chosen
[ { "from": "system", "value": "Update last seen date when connecting through socket.io\n" }, { "from": "human", "value": "'use strict';\n\n/*\n * Socket.io related things go !\n */\n\nimport { log, LOG_TYPES } from './log';\nimport { decodeJWT } from './JWT';\n\nconst EVENT_TYPES = {\n DI...
javascript
chosen
[ { "from": "system", "value": "Refactor spaceCase function to use custom compose function\n" }, { "from": "human", "value": "import R from 'ramda';\n\n// a -> a\nconst spaceCase = R.compose(\n R.trim,\n R.replace(/([a-z])([A-Z])/g, '$1 $2'),\n R.replace(/(\\.|-|_)/g, ' ')\n);\n\nexport default...
javascript
chosen
[ { "from": "system", "value": "Add borderRadius to the box prop list\n" }, { "from": "human", "value": "import omit from 'lodash.omit';\nimport pick from 'lodash.pick';\n\nconst boxProps = [\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'borderWidth',\n 'borderBottomWidth',\n 'borderCo...
javascript
chosen
[ { "from": "system", "value": "Fix goto simple sections at sidebar\n" }, { "from": "human", "value": "import ServerboardView from 'app/components/project'\nimport store from 'app/utils/store'\nimport { projects_update_info } from 'app/actions/project'\n\nvar Project=store.connect({\n state(state...
javascript
chosen
[ { "from": "system", "value": "Remove alert for testing purpose\n" }, { "from": "human", "value": "// This file is required by the index.html file and will\n// be executed in the renderer process for that window.\n// All of the Node.js APIs are available in this process.\nconst {clipboard} = requ...
javascript
chosen
[ { "from": "system", "value": "Revert local change to config." }, { "from": "human", "value": "var juju_config = {\n // These are blacklisted config items not passed into subapps mounted into\n // the main App.\n serverRouting: false,\n html5: true,\n container: '#main',\n viewContainer: '#...
javascript
chosen
[ { "from": "system", "value": "Add Chapter 06, exercise 1\n" }, { "from": "human", "value": "function Vector(x, y) {\n this.x = x;\n this.y = y;\n}\n\nVector.prototype.plus = function(vec) {\n return new Vector(this.x + vec.x, this.y + vec.y);\n}\n\nVector.prototype.minus = function(vec)...
javascript
chosen
[ { "from": "system", "value": "Add Chapter 09, exercise 3\n" }, { "from": "human", "value": "var number = /^(\\+|-)?(\\d+(\\.\\d*)?|\\.\\d+)([Ee](\\+|-)?\\d+)?$/;\n" }, { "from": "gpt", "value": "let number = /^[+-]?\\d*(\\d\\.|\\.\\d)?\\d*([eE][+-]?\\d+)?$/;\n" } ]
javascript
chosen
[ { "from": "system", "value": "Add stub for creating job definitions. Add back snapshot uploading prior to job submission\n" }, { "from": "human", "value": "// dependencies ------------------------------------------------------------\n\nimport aws from '../libs/aws';\n\n// handlers --------------...
javascript
chosen
[ { "from": "system", "value": "Watch and run tests on lib change too.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function (grunt) {\n\n grunt.initConfig({\n mochacli: {\n options: {\n ui: 'bdd',\n reporter: 'spec',\n ...
javascript
chosen
[ { "from": "system", "value": "Fix in publish to example folder\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n concat: {\n dist: {\n src: ['src/**/*.js'],\n dest:...
javascript
chosen
[ { "from": "system", "value": "Support older browsers that lack Intl\n\nWhile Intl.NumberFormat is a much more performant implementation\n(see #1566), and is supported by all modern browsers, there are\nstill older browsers in the wild that lack support for it. Most\nnotably, Safari 9 and the Android built-i...
javascript
chosen
[ { "from": "system", "value": "Fix issue with switching when there is dual supply\n" }, { "from": "human", "value": "$(document).on(\"turbolinks:load\", function() {\n\n $(\".first-date-picker\").datepicker(\n {\n dateFormat: 'DD, d MM yy',\n altFormat: 'yy-mm-dd',\n al...
javascript
chosen
[ { "from": "system", "value": "Add onClick function to `Login`\n\nUse a suffix for `getImgurToken` to solve the no-shadow linting conflict.\n\nAlthough the prop types for `getImgurToken` are defined through\na recompose function, the linter indicates a false error.\n" }, { "from": "human", "value...
javascript
chosen
[ { "from": "system", "value": "Fix typos and use context instead of console\n" }, { "from": "human", "value": "var fs = rquire('fs');\n\nmodule.exports = function (context, xmlZipBlob) {\n context.log('Node.js blob trigger function processed blob:', xmlZipBlob);\n console.log(`typeof xmlZip...
javascript
chosen
[ { "from": "system", "value": "Fix linting paths to match previous refactor\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n 'use strict';\n\n grunt.initConfig({\n jshint: {\n options: grunt.file.readJSON('.jshintrc'),\n gruntfile: 'Gruntfile.js',\n bin...
javascript
chosen
[ { "from": "system", "value": "Add grep argument to run tests with a filter\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n run: {\n app: {\n options: {\n wait: false\n },\n...
javascript
chosen
[ { "from": "system", "value": "Exclude private functions from documentation\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n var attache = {\n buildDir: 'dist'\n };\n\n // Project configuration.\n grunt.initConfig({\n appConfig: attache,\n pkg: grunt.file.rea...
javascript
chosen
[ { "from": "system", "value": "Set dev port back to 3000\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n bower: {\n install: {\n options: {\n targetDir: './lib/ui',\n l...
javascript
chosen
[ { "from": "system", "value": "Complete 'Global scope & Shadowing' challenge in 'Scopes chains closures' tutorial\n" }, { "from": "human", "value": "function foo() {\n var bar;\n function zip() {\n var quux;\n }\n}\n" }, { "from": "gpt", "value": "function foo() {\n var bar;\n ...
javascript
chosen
[ { "from": "system", "value": "Include Autoprefixer into sourcemaps process\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar browserSync = require('browser-sync');\nvar sass = require('gulp-sass');\nvar sourcemaps = require('gulp-sourcemaps');\nvar handleErro...
javascript
chosen
[ { "from": "system", "value": "Revert \"FIX - Removing unique constraint on user.email from migration script\"\n\nThis reverts commit c6cedc7fa613c9f376b5d59938acdaad1e4eae7f.\n" }, { "from": "human", "value": "const TABLE_NAME = 'users';\n\nexports.up = function(knex, Promise) {\n\n return Prom...
javascript
chosen
[ { "from": "system", "value": "Fix code style in TodoMVC Flux example\n" }, { "from": "human", "value": "/**\n * Copyright 2013-2014 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * Yo...
javascript
chosen
[ { "from": "system", "value": "Fix js error after update\n" }, { "from": "human", "value": "angular.module(\"protonet.platform\").controller(\"InstallUpdateCtrl\", function($scope, $state, $timeout, API, Notification) {\n\n function toggleDetailedUpdateStatus() {\n $scope.showDetailedUpdateSt...
javascript
chosen
[ { "from": "system", "value": "Make reference input use new Sanity client syntax\n" }, { "from": "human", "value": "import {ReferenceInput} from 'role:@sanity/form-builder'\nimport client from 'client:@sanity/base/client'\nimport {unprefixType} from '../utils/unprefixType'\n\nfunction fetchSingle...
javascript
chosen
[ { "from": "system", "value": "Adjust GitHub source to produce meaningful output\n" }, { "from": "human", "value": "(function() {\n'use strict';\n\nvar _ = Timeline.helpers;\n\nTimeline.Stream.source.GitHub = {\n\ticon: 'github',\n\n\toptions: {\n\t\tresponse: 'json',\n\t\tpaginate: 10,\n\t\turl:...
javascript
chosen
[ { "from": "system", "value": "Change migration to add currency and issuer\n" }, { "from": "human", "value": "'use strict';\n\nexports.up = function(knex, Promise) {\n return knex.schema.createTable('Transactions', function (table) {\n table.increments(\"id\").primary();\n table....
javascript
chosen
[ { "from": "system", "value": "Move length to options while keeping support for legacy params\n" }, { "from": "human", "value": "\"use strict\";\n\nvar crypto = require('crypto');\nvar charset = require('./charset.js');\n\nexports.generate = function(length, options) {\n \n var chars;\n \n i...
javascript
chosen
[ { "from": "system", "value": "Fix TravisCI issue where the build hangs after starting\n" }, { "from": "human", "value": "Tinytest.addAsync('CurrentRoute.name returns the name of the current route', function (test, next) {\n Router.go('apple');\n setTimeout(function () {\n test.equal(Current...
javascript
chosen
[ { "from": "system", "value": "Allow boolean evaluation of dependsOn on headings" }, { "from": "human", "value": "var React = require('react');\n\nfunction evalDependsOn(dependsOn, values) {\n\tif (!_.isObject(dependsOn)) return true;\n\tvar keys = _.keys(dependsOn);\n\treturn (keys.length) ? _.e...
javascript
chosen
[ { "from": "system", "value": "Change failure callback to show responding html embedded failure message from Active Record.\n" }, { "from": "human", "value": "$(document).ready( function () {\n $(\".upvote\").click( function() {\n var commentId = $(\".upvote\").data(\"id\");\n event.preven...
javascript
chosen
[ { "from": "system", "value": "Rename _config to config now\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('offlineMode', [])\n\t.config(function ($httpProvider) {\n\t\t$httpProvider.interceptors.push('httpInterceptor');\n\t})\n\t.factory('httpInterceptor', function ($q) {\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix the proper footer based on cartodb_com_hosted.\n" }, { "from": "human", "value": "var cdb = require('cartodb.js-v3');\n\nvar DEFAULT_LIGHT_ACTIVE = false;\n\nmodule.exports = cdb.core.View.extend({\n initialize: function () {\n this._initModels();\n\n thi...
javascript
chosen
[ { "from": "system", "value": "Fix some mistakes in the jsx-self transform.\n" }, { "from": "human", "value": "\n /**\n * This adds {fileName, lineNumber} annotations to React component definitions\n * and to jsx tag literals.\n *\n *\n * == JSX Literals ==\n *\n * <sometag />\n *\n * becomes:\n ...
javascript
chosen
[ { "from": "system", "value": "Use inline annotation in config block\n\nFixes minification issues\n" }, { "from": "human", "value": ";(function() {\n\t'use strict';\n\tangular.module('pagespeedApp', ['pagespeed.templates']).config(function($sceDelegateProvider) {\n\t\t$sceDelegateProvider.resourc...
javascript
chosen
[ { "from": "system", "value": "Fix bug on the class loader\n" }, { "from": "human", "value": "'use strict';\n\nvar ensure = require('ensure.js'),\n ClassNotFoundException = require('./Exceptions/ClassNotFoundException.js'),\n ClassMap = require('../Mapper/ClassMap.js');\n\nvar Loader;\n\n/*...
javascript
chosen
[ { "from": "system", "value": "Fix casing of bluebird import\n" }, { "from": "human", "value": "import {browser} from '../mini-testium-mocha';\nimport {delay} from 'Bluebird';\n\ndescribe('proxy', () => {\n before(browser.beforeHook);\n\n describe('handles errors', () => {\n it('with no cont...
javascript
chosen
[ { "from": "system", "value": "Use stream while reading file\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @file Hydrate the file from scratch.\n * Download it from Cluestr, save it to local storage, run tika and returns the result.\n *\n * This helper is used in the server queue.\n...
javascript
chosen
[ { "from": "system", "value": "Remove https restriction from cookie setter.\n" }, { "from": "human", "value": "var crypto = require('crypto');\nvar _ = require('underscore');\n\nfunction TokenContainer() {\n this._tokens = {};\n this._startGarbageCollecting();\n}\n\nTokenContainer._hourMs = 60 ...
javascript
chosen
[ { "from": "system", "value": "Fix spelling error in file header.\n" }, { "from": "human", "value": "/**\n * Utlity to have the page wait for a given length.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may...
javascript
chosen
[ { "from": "system", "value": "Add extra field so _id is passed to make notification read\n" }, { "from": "human", "value": "Requests = new Mongo.Collection('requests');\n\nMeteor.methods({\n addRequest: function(requestAttributes) {\n check(Meteor.userId(), String);\n check(requestAttribu...
javascript
chosen
[ { "from": "system", "value": "Remove externals option for import React, ReactDOM, etc...\n" }, { "from": "human", "value": "var path = require('path');\nvar process = require('process');\nvar fs = require('fs');\n\nvar nodeModules = {};\nfs.readdirSync('node_modules')\n .filter(function(x) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use name of package.json as build output" }, { "from": "human", "value": "/* global __dirname, require, module*/\n\nconst webpack = require('webpack');\nconst UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;\nconst path = require('path');\nconst env = require('yarg...
javascript
chosen