conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "11804: Use async/await for ajax request\n" }, { "from": "human", "value": "// Handles getting info about bulk media thresholds\nELMO.Views.ExportCsvView = class ExportCsvView extends ELMO.Views.ApplicationView {\n get events() {\n return {\n 'click #respons...
javascript
chosen
[ { "from": "system", "value": "Clear label state when navigating away from it.\n" }, { "from": "human", "value": "/* @flow */\nimport { createAction } from 'redux-actions'\nconst { objOf, map } = require('ramda')\nimport { compose } from 'sanctuary'\n\nimport { get_body } from 'app/http'\n\nimpor...
javascript
chosen
[ { "from": "system", "value": "Remove chat icon from trigger profile\n" }, { "from": "human", "value": "import React from 'react';\nimport { Link } from 'react-router';\nimport classNames from 'classnames';\n\nimport Icon from '../../widgets/Icon';\n\nconst TriggerProfile = React.createClass({\n ...
javascript
chosen
[ { "from": "system", "value": "Allow to use 'readOnly' as configuration value for container properties.\n" }, { "from": "human", "value": "import { Component } from 'substance'\nimport ContainerEditor from './_ContainerEditor'\nimport ValueComponent from './ValueComponent'\nimport renderNode from...
javascript
chosen
[ { "from": "system", "value": "Use json by default for js library\n" }, { "from": "human", "value": "// general action\n// f_ok(data, textStatus, XMLHttpRequest)\n// f_err(XMLHttpRequest,textStatus, errorThrown)\nfunction general_action( type, url, params, f_ok, f_err ) {\n $.ajax({ \n ...
javascript
chosen
[ { "from": "system", "value": "Use divs to avoid inheriting paragraph styles.\n" }, { "from": "human", "value": "/**\n * Admin Bar Zero Data component.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u...
javascript
chosen
[ { "from": "system", "value": "Use alphabetical route order for easier merging\n" }, { "from": "human", "value": "import React from 'react';\nimport {IndexRoute, Route} from 'react-router';\nimport { isLoaded as isAuthLoaded, load as loadAuth } from 'redux/modules/auth';\nimport {\n App,\n ...
javascript
chosen
[ { "from": "system", "value": "CHANGE the loader for most code in the official example, unify js & ts loading\n" }, { "from": "human", "value": "const path = require('path');\n\nmodule.exports = async ({ config }) => ({\n ...config,\n module: {\n ...config.module,\n rules: [\n ...con...
javascript
chosen
[ { "from": "system", "value": "Switch back to emscripten incoming\n\nFixes #23\n" }, { "from": "human", "value": "const fs = require(\"fs\");\nconst path = require(\"path\");\nconst dependencyUtils = require(\"../../compiler/scripts/dependency-utils\");\n\nconst EMSCRIPTEN_GIT_URL = \"https://git...
javascript
chosen
[ { "from": "system", "value": "Initialize state after listeners are added\n" }, { "from": "human", "value": "/* @flow */\n\nimport './polyfills/requestIdleCallback';\n\nimport '../store/stateManager';\nimport '../store/storeHelpers';\n\nimport '../gcm/gcm-client';\nimport '../history/history-clie...
javascript
chosen
[ { "from": "system", "value": "Switch to 'ridership' name for property in sparkline data.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport Model from 'ember-data/model';\nimport attr from 'ember-data/attr';\n\nexport default Model.extend({\n routeNumber: attr('number'),\n r...
javascript
chosen
[ { "from": "system", "value": "Add -o / --outfile option\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\n\nvar yaml = require('js-yaml');\n\nvar converter = require('./index.js');\n\nvar argv = require('yargs')\n .usage('widdershins [options] {input-spe...
javascript
chosen
[ { "from": "system", "value": "Remove spacebars-compiler -> spacebars test dependency.\n\nThis fixes a circular build-time dependency when building test slices.\n" }, { "from": "human", "value": "Package.describe({\n summary: \"Compiler for Spacebars template language\"\n});\n\nPackage.on_use(fu...
javascript
chosen
[ { "from": "system", "value": "Remove 'Did you know:' from beginning of fact\n" }, { "from": "human", "value": "module.exports = function(robot){\n\n\trobot.facts = {\n\t\tsendFact: function(response){\n\t\t\tvar apiUrl = 'http://numbersapi.com/random',\n\t\t\t\tfact = '';\n\t\t\tresponse.http(ap...
javascript
chosen
[ { "from": "system", "value": "Add the KeyDerivationFunction to AuthKey\n" }, { "from": "human", "value": "// telegram.link\n// Copyright 2014 Enrico Stara 'enrico.stara@gmail.com'\n// Released under the MIT License\n// https://github.com/enricostara/telegram-mt-node\n\n// Aut...
javascript
chosen
[ { "from": "system", "value": "Fix error callbacks in interfaces\n" }, { "from": "human", "value": "var EventEmitter = require('events').EventEmitter;\nvar Subscription = require('./subscription');\n\n\nvar ThoonkBaseInterface = function (thoonk) {\n EventEmitter.call(this);\n this.thoonk =...
javascript
chosen
[ { "from": "system", "value": "Add support for \"innerRef\" prop\n" }, { "from": "human", "value": "import React from \"react\";\nimport R from \"ramda\";\nimport T from \"prop-types\";\n\nexport default function createStyledComponent(displayName, use) {\n return class StyledComponent extends Re...
javascript
chosen
[ { "from": "system", "value": "Use database record to sign jwt token without password\n" }, { "from": "human", "value": "const jwt = require('jsonwebtoken')\nconst config = require('config')\nconst bcrypt = require('bcrypt')\nconst User = require('./../models/user')\n\nconst Authenticate = (...
javascript
chosen
[ { "from": "system", "value": "Fix failing test event undefined when shadow rendering\n" }, { "from": "human", "value": "/* eslint-env jest */\nimport React from 'react';\nimport { shallow } from 'enzyme';\n\nimport CloseButton from './../../components/CloseButton';\n\nconst closeToast = jest.fn(...
javascript
chosen
[ { "from": "system", "value": "uninstall: Remove extraneous warns when removing a symlink\n\nDon't warn about not acting on a module in a symlink when the module's\nparent is being removed anyway\n" }, { "from": "human", "value": "'use strict'\nvar path = require('path')\nvar validate = require('...
javascript
chosen
[ { "from": "system", "value": "Fix JavaScript error causing images not to be loaded\n\nThe error is caused by AssetPage not being available in the window\nscope. It is currently not included in browserify-index.js either. This\nis despite the fact that it has been so earlier. Other browserify\nscripts from c...
javascript
chosen
[ { "from": "system", "value": "Apply arguments, check message for string\n" }, { "from": "human", "value": "if (Meteor.isServer) {\n winston = Npm.require('winston');\n}\n\nSpace.Logger = Space.Object.extend(Space, 'Logger', {\n\n _logger: null,\n _state: 'stopped',\n\n Constructor() {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Use socket.io-client in place of steal-socket.io\n" }, { "from": "human", "value": "import feathers from 'feathers/client';\nimport io from 'steal-socket.io';\nimport socketio from 'feathers-socketio/client';\nimport auth from 'feathers-authentication/client';\nimpo...
javascript
chosen
[ { "from": "system", "value": "Restructure implementation to meet new tests\n" }, { "from": "human", "value": "import { select, local } from \"d3-selection\";\nexport default function (Component){\n var className = Component.className,\n tagName = Component.tagName,\n componentLocal = ...
javascript
chosen
[ { "from": "system", "value": "Remove waiting from PDF page component test\n" }, { "from": "human", "value": "import Vue from 'vue';\nimport pdfjsLib from 'vendor/pdf';\nimport workerSrc from 'vendor/pdf.worker.min';\n\nimport PageComponent from '~/pdf/page/index.vue';\nimport testPDF from '../fi...
javascript
chosen
[ { "from": "system", "value": "Use appropriate model types - continued\n" }, { "from": "human", "value": "// Example model\nvar mongoose = require('mongoose'),\n Schema = mongoose.Schema;\n\n// Authenticate Schema\nvar Account = new Schema ({\n //conflict with node so changed from domain\n ...
javascript
chosen
[ { "from": "system", "value": "Add computed property blockID to fix deprecated binding issues\n" }, { "from": "human", "value": "import DS from 'ember-data';\n\nexport default DS.Model.extend({\n blocks: DS.attr(),\n insertedAt: DS.attr('date', { defaultValue() { return new Date(); } }),\n upd...
javascript
chosen
[ { "from": "system", "value": "Fix lb group by issue\n" }, { "from": "human", "value": "import Resource from 'ember-api-store/models/resource';\nimport { get, computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nexport default Resource.extend({\n intl: service...
javascript
chosen
[ { "from": "system", "value": "Fix ajax URL check to run on page load\n" }, { "from": "human", "value": "$(document).ready(function(){\n\n\n $('#title_inc').tagsInput({'defaultText': '…'});\n $('#title_exc').tagsInput({'defaultText': '…'});\n $('#link_inc').tagsInput({'defaultText': '…'}...
javascript
chosen
[ { "from": "system", "value": "Update main js file to reflect new license (thx for pointing this out @stereobit)" }, { "from": "human", "value": "/**\n * @license wysihtml5 v@VERSION\n * https://github.com/xing/wysihtml5\n *\n * Author: Christopher Blum (https://github.com/tiff)\n *\n * Copyright...
javascript
chosen
[ { "from": "system", "value": "Add support for @hapi/hapi namespace\n" }, { "from": "human", "value": "\nexports.express = () => {\n return require('./lib/consumer/express')\n}\n\nexports.koa = () => {\n var version = parseInt(require('koa/package.json').version.split('.')[0])\n return require...
javascript
chosen
[ { "from": "system", "value": "Change attribution message from 'by' to 'via'\n" }, { "from": "human", "value": "var Twit = require('twit');\n\nvar config = require('./config.json');\nvar talks = require('libtlks').talk;\n\nvar T = new Twit({\n consumer_key: config.twitterConsumerKey,\n cons...
javascript
chosen
[ { "from": "system", "value": "Throw error and exit on failure\n" }, { "from": "human", "value": "#!/usr/bin/env node --harmony\n\nvar program = require('commander');\nvar fetch = require('node-fetch');\nvar base64 = require('base-64');\n\nprogram\n\t.arguments('<uri>')\n\t.version('0.0.2')\n\t.d...
javascript
chosen
[ { "from": "system", "value": "Fix for all combinations of foreign and inherited\n" }, { "from": "human", "value": "'use strict';\n\nvar objectToString = Object.prototype.toString;\nvar ERROR_TYPE = '[object Error]';\n\nmodule.exports = isError;\n\nfunction isError(err) {\n return objectToStri...
javascript
chosen
[ { "from": "system", "value": "Allow addon to be nested at depth of n" }, { "from": "human", "value": "/* jshint node: true */\n\n'use strict';\n\nvar VersionChecker = require('ember-cli-version-checker');\n\nmodule.exports = {\n name: 'ember-scrollable',\n\n init: function() {\n this._super...
javascript
chosen
[ { "from": "system", "value": "Append timestamp to existing message string\n\n- This fixes a race condition that could cause the timestamp to become\nseparated from the rest of the message if there were a lot of calls to\na log method roughly at the same time.\n" }, { "from": "human", "value": "v...
javascript
chosen
[ { "from": "system", "value": "Migrate to the @http npm scope\n" }, { "from": "human", "value": "\nvar request = require('request-core')\n\n\nfunction client (options) {\n if (options.end === undefined) {\n options.end = true\n }\n return request(options)\n}\n\nmodule.exports = client\n" ...
javascript
chosen
[ { "from": "system", "value": "Add exports of a couple of types\n" }, { "from": "human", "value": "export {all} from './lib/all.js'\nexport {one} from './lib/one.js'\nexport {toHast} from './lib/index.js'\n" }, { "from": "gpt", "value": "/**\n * @typedef {import('./lib/index.js').Opti...
javascript
chosen
[ { "from": "system", "value": "Add support for carriage return, carriage return + line feed\n" }, { "from": "human", "value": "/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {s...
javascript
chosen
[ { "from": "system", "value": "Fix invocation of ember-basic-dropdown's contentFor hook\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\n// var path = require('path');\n\nmodule.exports = {\n name: 'ember-power-select',\n included: function(app) {\n // Don't inclu...
javascript
chosen
[ { "from": "system", "value": "Allow long version of object construction.\n" }, { "from": "human", "value": "module.exports = {\n parser: 'babel-eslint',\n extends: 'airbnb',\n globals: {\n before: true,\n beforeEach: true,\n after: true,\n afterEach: true,\n describe: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix error in node module\n" }, { "from": "human", "value": "module.exports = {\n Builder: require(\"./lib/builder\").Builder,\n defaultConfig: require(\"./lib/defaults\")\n};\n" }, { "from": "gpt", "value": "module.exports = {\n Builder: require...
javascript
chosen
[ { "from": "system", "value": "Refactor emit action into its own method\n" }, { "from": "human", "value": "var LogEmitter = function (source) {\n this.source = source;\n};\n\nLogEmitter.prototype.info = function (message) {\n process.emit(\"gulp:log\", { level: \"info\", message: message, sourc...
javascript
chosen
[ { "from": "system", "value": "Add default getSerializationFormats method in superclass\n" }, { "from": "human", "value": "export default class VisComponent {\n constructor (el) {\n if (!el) {\n throw new Error('\"el\" is a required argument');\n }\n\n this.el = el;\n }\n\n rende...
javascript
chosen
[ { "from": "system", "value": "Update ping command to show Discord latency" }, { "from": "human", "value": "const Command = require('../Command')\n\nmodule.exports =\nclass PingCommand extends Command {\n constructor (client) {\n super(client, {\n name: 'ping',\n properName: 'Ping',...
javascript
chosen
[ { "from": "system", "value": "Add js for fake upload button\n" }, { "from": "human", "value": "//$(\"checkbox\").click(setLocationCookie);\n$(document).ready(function() {\n $('#location-checkbox').change(function() {\n if(this.checked) {\n setLocationCookie();\n }\n });\n});" }, ...
javascript
chosen
[ { "from": "system", "value": "Use stateful component for search input and remove appState reducer\n\n" }, { "from": "human", "value": "import React from 'react'\nimport { sparqlConnect } from '../sparql/configure-sparql'\nimport { LOADING, LOADED, FAILED } from 'sparql-connect'\nimport { browser...
javascript
chosen
[ { "from": "system", "value": "Add more filter rules to meet requirement.\n" }, { "from": "human", "value": "var libPath = require('path');\n\nmodule.exports = function supportAngularHtml5(server) {\n var router = server.loopback.Router();\n\n router.all('/*', function(req, res, next) {\n va...
javascript
chosen
[ { "from": "system", "value": "Add socketio websocket status check\n" }, { "from": "human", "value": "import AppDispatcher from '../dispatcher/AppDispatcher';\n\nlet runtimeAddress = localStorage.getItem('runtimeAddress') || '127.0.0.1';\nlet socket = io('http://' + runtimeAddress + ':5000/');\ns...
javascript
chosen
[ { "from": "system", "value": "Add test that draw removes card from deck\n" }, { "from": "human", "value": "var game = require('../game.js');\nvar chai = require('chai');\n\nchai.should();\n\ndescribe('Game', function() {\n describe('createPack', function() {\n it('has 52 cards', function() {...
javascript
chosen
[ { "from": "system", "value": "Modify findByName() to call employeeListTpl\n" }, { "from": "human", "value": "// We use an \"Immediate Function\" to initialize the application to avoid leaving anything behind in the global scope\n(function () {\n\n /* ---------------------------------- Local V...
javascript
chosen
[ { "from": "system", "value": "Improve API to colorize an icon\n\nMove the details to this library. Usage example:\n\n icons.colorize(myButton, [\"#FF0000\", \"#00FF00\"]);\n" }, { "from": "human", "value": "define(function () {\n icons = {};\n\n icons.load = function (iconInfo, callbac...
javascript
chosen
[ { "from": "system", "value": "Add full project optimization in comment for testing\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under the Apache License,\n * Version 2.0 (the \"Licen...
javascript
chosen
[ { "from": "system", "value": "Add some more spice to those lovely messages\n" }, { "from": "human", "value": "window.lovelyTabMessage = (function(){\n var hearts = ['❤','💓','💖','💗','💘','💝','💕'];\n var heart = hearts[Math.floor(Math.random() * (hearts.length))];\n var lang = (windo...
javascript
chosen
[ { "from": "system", "value": "Add data source property to raw feed object\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar config = require('../../config.js');\n\nthis.rawFeedModel = {\n\ttimestamp: {type: Date, default: Date.now},\n\ttex...
javascript
chosen
[ { "from": "system", "value": "Use last vowel, instead of first\n" }, { "from": "human", "value": "var isVowel = require('is-vowel');\nvar khaan = module.exports = {\n\tsplitAtVowels: function ( word ) {\n\t\tvar output = [];\n\t\tvar current = '';\n\t\tfor ( var i = 0; i < word.length; i++ ) {\n...
javascript
chosen
[ { "from": "system", "value": "Update module to match tests\n" }, { "from": "human", "value": "'use strict';\n\nvar through = require('through')\n\nvar write = function write(chunk) {\n\n var self = this\n\n //read each line\n var data = chunk.toString('utf8')\n var lines = data.split('\\n')\...
javascript
chosen
[ { "from": "system", "value": "Update dependencies to be an exact copy of jquery-ui's custom download option\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-ui-sortable',\n\n included: function(app) {\n this._super.included(app);...
javascript
chosen
[ { "from": "system", "value": "Make sure the lint passes\n" }, { "from": "human", "value": "module.exports = {\n Reddit: require( './reddit.js' ),\n Steam: require( './steam.js' ),\n MiggyRSS: require( './MiggyRSS.js' ),\n};\n" }, { "from": "gpt", "value": "/* eslint-disable ...
javascript
chosen
[ { "from": "system", "value": "[import] Reduce batch size to 128kb\n" }, { "from": "human", "value": "const MAX_PAYLOAD_SIZE = 1024 * 512 // 512KB\n\nfunction batchDocuments(docs) {\n let currentBatch = []\n let currentBatchSize = 0\n const batches = [currentBatch]\n\n docs.forEach(doc => {\n...
javascript
chosen
[ { "from": "system", "value": "REMOVE count route from upload plugin" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n type: 'content-api',\n routes: [\n {\n method: 'POST',\n path: '/',\n handler: 'content-api.upload',\n },\n {\n method: 'GET',...
javascript
chosen
[ { "from": "system", "value": "Introduce ember-infinity as a service\n" }, { "from": "human", "value": "export function initialize(application) {\n\n const inject = (property, what) => {\n application.inject('controller', property, what);\n application.inject('component', property, what);\...
javascript
chosen
[ { "from": "system", "value": "Slack: Add a space onto the end of italic text (prevent merging the _ with links)\n" }, { "from": "human", "value": "var plugin;\nvar slack;\nvar config;\n\nvar events = {}\n\nevents.onLoad = function(plugin) {\n // dependency injection, any better methods for No...
javascript
chosen
[ { "from": "system", "value": "Update test storage to better mimic actual storage behavior\n" }, { "from": "human", "value": "export default () => ({\n persist: jest.fn(data => Promise.resolve(data)),\n restore: jest.fn(() =>\n Promise.resolve({ authenticated: { authenticator: 'test' } })\n ...
javascript
chosen
[ { "from": "system", "value": "Add ability to close sidebar by clicking outside\n" }, { "from": "human", "value": "var sidebarOpen = false;\nvar menuText = [\"Menu\", \"Close\"];\nvar menuElement = document.querySelector(\".menu-link\");\nvar sidebarElement = document.querySelector(\".sidebar\");...
javascript
chosen
[ { "from": "system", "value": "refactor(components): Rename prop name => iconName\n" }, { "from": "human", "value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport {SimpleMenu, MenuAnchor, Icon} from '..'\n\nclass IconMenu extends React.PureComponent {\n static displayName...
javascript
chosen
[ { "from": "system", "value": "Add maxmimize and unmaxmize class toggler.\n" }, { "from": "human", "value": "'use strict';\n\nconst $ = require('jquery'),\n remote = require('remote');\n\nlet main = remote.getCurrentWindow();\n\n$(function(){\n $('.tools > div').on('click', (e) => main[e.ta...
javascript
chosen
[ { "from": "system", "value": "Change remaining <a> tags into <Link> components\n" }, { "from": "human", "value": "import React from 'react';\nimport {Link} from 'react-router-dom'\n\nclass Home extends React.Component {\n render() {\n return (\n <div>\n <Link to=\"/add-words\" cl...
javascript
chosen
[ { "from": "system", "value": "Split out status update into its own function.\n" }, { "from": "human", "value": "var Transport = can.Control.extend({\n\n init: function(element, options) {\n this.status = options.status;\n element.html(can.view('views/transport.ejs'));\n },\n\n sendComma...
javascript
chosen
[ { "from": "system", "value": "Fix regression with hiding the window unless --electron-debug\n" }, { "from": "human", "value": "const commander = require('commander')\n\nclass Options {\n constructor(argv) {\n const args = commander\n .option('--electron-debug',\n 'Show the ...
javascript
chosen
[ { "from": "system", "value": "Add the base project structure\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n fetch: function () {\n\n },\n update: function () {\n\n },\n merge: function () {\n\n },\n};\n" }, { "from": "gpt", "value": "'use s...
javascript
chosen
[ { "from": "system", "value": "Add text regsarding the location of the button\nand that splits must be toggled open before editing a split txn.\n" }, { "from": "human", "value": "module.exports = {\n name: 'ToggleSplits',\n type: 'checkbox',\n default: false,\n section: 'accounts',\n title: ...
javascript
chosen
[ { "from": "system", "value": "Add sample sample qunit gulp tasks for testing.\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp'),\n jshint = require('gulp-jshint'),\n mocha = require('gulp-mocha');\n\nvar paths = {\n scripts: ['./*.js', './test/*.js', '!./lib...
javascript
chosen
[ { "from": "system", "value": "Fix suggested npm install command.\n\nInstructions were pointing to the wrong project." }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\nvar spawnSync = require('child_process').spawnSync;\nvar HttpResponse = require('http-response-object');...
javascript
chosen
[ { "from": "system", "value": "Use a regex to parse the syntax\n\ninto key, plus, minus, rule number\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports =\n\n/*@ngInject*/\nfunction ProofreadingPlayCtrl(\n $scope, $state, ProofreadingService, RuleService\n) {\n $scope.id = $state...
javascript
chosen
[ { "from": "system", "value": "Fix console is undefined on IE 8\n" }, { "from": "human", "value": "jQuery(function ($) {\n function d(event) {\n event.keyCode === 13 && button.click();\n }\n\n function click() {\n image.attr('src', src + (src.indexOf('?') < 0 ? '?' : '&') +...
javascript
chosen
[ { "from": "system", "value": "Support for Internet Explorer 8\n" }, { "from": "human", "value": "/**\n * @author mrdoob / http://mrdoob.com\n * @author Jesús Leganés Combarro \"Piranna\" <piranna@gmail.com>\n */\n\nfunction EventTarget()\n{\n var listeners = {};\n\n this.addEventListener = fun...
javascript
chosen
[ { "from": "system", "value": "[MISC] Test all grunt tasks on Travis CI\n" }, { "from": "human", "value": "var config = require('./Build/Config');\n\nmodule.exports = function(grunt) {\n\t'use strict';\n\n\t// Display the execution time of grunt tasks\n\trequire('time-grunt')(grunt);\n\n\t// Load...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"Added support for multiple files (excluding minified scripts)\"\"\n\nThis reverts commit fde48e384ec241fef5d6c4c80a62e3f32f9cc7ab.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function (grunt) {\n require('time-grunt')(gr...
javascript
chosen
[ { "from": "system", "value": "Use Node resolving mechanism to locate Prism CSS\n" }, { "from": "human", "value": "var Prism = require('prismjs');\nvar cheerio = require('cheerio');\n\nmodule.exports = {\n book: {\n assets: './node_modules/prismjs/themes',\n css: [\n 'prism.css'\n ...
javascript
chosen
[ { "from": "system", "value": "Add ESLint comment for globals: describe, it, expect\n" }, { "from": "human", "value": "\n'use strict';\n\n// eslint-disable-next-line no-console\nconsole.log(`———————————————————————————————— ${(new Date())} \\n\\n`);\n\ndescribe('MarkTodoItem', () => {\n const te...
javascript
chosen
[ { "from": "system", "value": "Remove legacy and stop using deprecated things\n\n" }, { "from": "human", "value": "module.exports = {\n \"sourceMaps\": true,\n \"presets\": [\n [\"@babel/preset-env\", {\n \"targets\": {\n \"browsers\": [\n ...
javascript
chosen
[ { "from": "system", "value": "Use callback instead of htmlCallback" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nvar replace = require('broccoli-replace');\nvar favicons = require('broccoli-favicon');\n\nvar htmlCache = null;\n\nmodule.exports = {\n\n name: 'ember-c...
javascript
chosen
[ { "from": "system", "value": "feat: Change background of spinner to match login\n" }, { "from": "human", "value": "import React from 'react';\nimport '../../aframeComponents/scene-load';\nimport '../../aframeComponents/aframe-minecraft';\nimport AssetLoader from './AssetLoader';\nimport InitialL...
javascript
chosen
[ { "from": "system", "value": "Allow other middleware by calling `cb()`\n" }, { "from": "human", "value": "'use strict';\n\nvar assign = require('object-assign');\nvar chalk = require('chalk');\nvar ProgressBar = require('progress');\n\n/**\n * Progress bar download plugin\n *\n * @param {Object}...
javascript
chosen
[ { "from": "system", "value": "Add android devices back in\n" }, { "from": "human", "value": "// Some user-accessible config for unit tests\n// Format is: { platform:{ ...settings.. } }\n\n// numDevices - The number of devices the server will start a test with\n// Any other devices a...
javascript
chosen
[ { "from": "system", "value": "Check if child property exists prior to adding to property\n" }, { "from": "human", "value": "/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nfunction accesorString(value) {\n\tvar depths = value.split(\".\...
javascript
chosen
[ { "from": "system", "value": "Use config to build paths\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2013-2015 Memba Sarl. All rights reserved.\n * Sources at https://github.com/Memba\n */\n\n/* jshint node: true, expr: true */\n/* globals describe: false, before: false, it: false */...
javascript
chosen
[ { "from": "system", "value": "Edit content structure to knex taxonomy_term_data migration file\n" }, { "from": "human", "value": "\r\nexports.up = function(knex, Promise) {\r\n return knex.schema.createTable('taxonomy_term_data', function (table) {\r\n table.increments('id').primary()\r\n ...
javascript
chosen
[ { "from": "system", "value": "Check that the run script has been written\n" }, { "from": "human", "value": "'use strict';\nlet path = require('path');\nlet assert = require('yeoman-generator').assert;\nlet helpers = require('yeoman-generator').test\n\ndescribe('react-webpack-redux:root', () => {...
javascript
chosen
[ { "from": "system", "value": "Add a test for userNumbers not divisible by 3 or 5\n" }, { "from": "human", "value": "describe('pingPong', function() {\n it(\"is true for a number that is divisible by 3\", function() {\n expect(pingPong(6)).to.equal(true);\n });\n it(\"is true for a number t...
javascript
chosen
[ { "from": "system", "value": "Put the notice fade back in\n" }, { "from": "human", "value": "//document.observe(\"dom:loaded\", function(){\n// if ($('flash_notice')){\n// Element.fade.delay(4,'flash_notice');\n// }\n// if ($('q')) {\n// $('q').activate();\n// if ($('search_extended'...
javascript
chosen
[ { "from": "system", "value": "Allow passing in initial date\n" }, { "from": "human", "value": "module.exports = (addDays = 0) => {\n\tlet date = new Date();\n\tdate.setDate(date.getDate() + addDays);\n\tdate.setUTCHours(0);\n\tdate.setUTCMinutes(0);\n\tdate.setUTCSeconds(0);\n\tdate.setUTCMillis...
javascript
chosen
[ { "from": "system", "value": "Add API base url and key\n" }, { "from": "human", "value": "/* @flow */\n\n'use strict';\n\nexport const settings = {\n\tAPI_BASE_URL: 'https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/',\n API_KEY: 'jVDiaXvfpsmshdrtFO7JHibo7Hrtp16UelPjsnBE4Bfzl0CV5u'\n}...
javascript
chosen
[ { "from": "system", "value": "Remove extra form from account page.\n" }, { "from": "human", "value": "import React from 'react';\n\nimport { PasswordForgetForm } from '../PasswordForget';\nimport PasswordChangeForm from '../PasswordChange';\nimport { AuthUserContext, withAuthorization } from '.....
javascript
chosen
[ { "from": "system", "value": "Fix shaka.polyfill missing in externs\n\nThe generated externs did not include shaka.polyfill because we used\nthe wrong annotation on the class. This fixes it.\n\nRaised in PR #1273\n\nChange-Id: I348064a117a7e1878b439ad8bd1ce49df56bfd39\n" }, { "from": "human", "...
javascript
chosen
[ { "from": "system", "value": "Install Babel before generating `dist-modules`\n\nOtherwise it will rely on globally installed Babel. Not good.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n// adapted based on rackt/history (MIT)\nvar execSync = require('child_process').execSync;\nvar st...
javascript
chosen
[ { "from": "system", "value": "Fix an bug into the id generation for a score record.\n" }, { "from": "human", "value": "(function(){\n\tangular\n\t\t.module(\"movieMash\")\n\t\t.factory(\"scoreService\",scoreService);\n\n\t\tscoreService.$inject=['localStorageService','$firebaseArray','firebaseDa...
javascript
chosen
[ { "from": "system", "value": "Check if endpoint handler exists.\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar endpoint = require('../app/endpoint');\n\nrouter.get('/event/:name/:args(*)', function(req, res) {\n var e = endpoint('h...
javascript
chosen
[ { "from": "system", "value": "Fix `context` argument wrongly passed to callback\n" }, { "from": "human", "value": "/**\n * @author Richard Davey <rich@photonstorm.com>\n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/licens...
javascript
chosen