conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use title as document.title as well\n" }, { "from": "human", "value": "\"use strict\";\nclass Titlebar {\n\tconstructor(title) {\n\t\tthis.element = document.createElement(\"div\");\n\t\tthis.element.classList.add(\"titlebar\");\n\t\tthis.setTitle(title);\n\t}\n\n\t...
javascript
chosen
[ { "from": "system", "value": "Handle empty or missing user agent responses.\n" }, { "from": "human", "value": "function parse_user_agent(agent) {\n \"use strict\";\n var fields = [];\n\n fields[0] = agent;\n fields[1] = \"Mozilla-compatible\";\n fields[2] = \"Unix-derived\";\n ...
javascript
chosen
[ { "from": "system", "value": "Set the current document to the first search result\n" }, { "from": "human", "value": "// SidebarView\ndefine(function (require) {\n var _ = require('underscore'),\n $ = require('jquery'),\n Backbone = require('backbone'),\n Handlebars = require('handlebar...
javascript
chosen
[ { "from": "system", "value": "Add unique identifier in front of the label\n" }, { "from": "human", "value": "'use strict';\n\n// convert an experiment, an array of spectra, to a chart\n\nvar types=require('./types.js');\n\n\n\nmodule.exports=function (experiments, channels, index) {\n var cha...
javascript
chosen
[ { "from": "system", "value": "Remove model argument from View altogether\n" }, { "from": "human", "value": "import domify from 'domify';\n\n\nexport default class View {\n constructor({app, model}) {\n this.app = app;\n this.model = model;\n }\n\n render() {\n const html = this.getHT...
javascript
chosen
[ { "from": "system", "value": "Fix bug in overall feedback view for students.\n\nhttps://www.pivotaltracker.com/story/show/152263862\n[#152263862]\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react'\n\n\nimport '../../css/activity-feedback.less'\n\nexport default class...
javascript
chosen
[ { "from": "system", "value": "Clean up semantics of ConditionalPromises.\n" }, { "from": "human", "value": "class ConditionalPromise {\n /**\n * Create a conditional promise - like a promise, but cancelable!\n */\n constructor(...args) {\n if ([...args].length) {\n this._promise = ...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix invalid source map for imported files in transformer-less\n" }, { "from": "human", "value": "// @flow\n\nimport path from 'path'\nimport { createFileTransformer, loadLocalFromContext } from 'pundle-api'\n\nimport manifest from '../package.json'\n\nfunction...
javascript
chosen
[ { "from": "system", "value": "Put the type extraction route in place but only if the command line is right\n" }, { "from": "human", "value": "var _ = require('lodash');\nvar fs = require('fs');\n\n// Assists in generating documentation for A2\n\nmodule.exports = {\n enabled: false,\n construct...
javascript
chosen
[ { "from": "system", "value": "Change port from 8443 to 443\n" }, { "from": "human", "value": "import { map } from 'mobx';\n\nexport const server = {\n credentials: map(),\n application: {\n secure: true,\n host: 'live.zoomdata.com',\n path: '/zoomdata',\n port: ...
javascript
chosen
[ { "from": "system", "value": "Fix for creating paygroup without tax rule\n" }, { "from": "human", "value": "\n/**\n * Order Types Schema\n */\nCore.Schemas.PayGroup = new SimpleSchema({\n _id: {\n type: String,\n optional: true\n },\n code: {\n type: String\n },\...
javascript
chosen
[ { "from": "system", "value": "Allow to override progress property of backdrop-content\n" }, { "from": "human", "value": "import Ember from \"ember\";\n\nconst {\n Component,\n computed,\n String: { htmlSafe },\n computed: { alias },\n inject: { service },\n get,\n} = Ember;\n\n...
javascript
chosen
[ { "from": "system", "value": "Make sure value is defined before trying to call length\n" }, { "from": "human", "value": "(function() {\n $('.assignment_invitations.identifier, .group_assignment_invitations.identifier').ready(function() {\n return $('form').on('change keyup', function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix linking to engine's application route\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { attributeMungingMethod } from './link-to-utils';\n\nconst {\n LinkComponent,\n getOwner,\n get,\n set\n} = Ember;\n\nexport default LinkComponent.ex...
javascript
chosen
[ { "from": "system", "value": "Remove a “trick babel” hack in analytics\n\nTest plan\n* with or without the “Drop IE 11” commit applied\n* bin/rspec ./gems/plugins/analytics/spec_canvas/selenium/analytics_account_view_spec.rb:71\n Should pass\n\nOr to test manually:\n* apply the “drop ie11” commit in canvas...
javascript
chosen
[ { "from": "system", "value": "Allow some kind of downloading to work on Safari\n" }, { "from": "human", "value": "export default (filename, blob) => {\n const downloadLink = document.createElement('a');\n document.body.appendChild(downloadLink);\n\n // Use special ms version if availabl...
javascript
chosen
[ { "from": "system", "value": "Convert extended Form to native class, providing compatibility with ember-bootstrap 5.1+\n" }, { "from": "human", "value": "import { notEmpty } from '@ember/object/computed';\nimport { assert } from '@ember/debug';\nimport RSVP from 'rsvp';\nimport BsForm from 'embe...
javascript
chosen
[ { "from": "system", "value": "Refactor because <Score/> is now a pure function\n" }, { "from": "human", "value": "require('./testdom')('<html><body></body></html>');\nimport { assert } from 'chai';\nimport React from 'react';\nimport TestUtils from 'react-addons-test-utils';\nimport Score from '...
javascript
chosen
[ { "from": "system", "value": "Replace hardcoded coordinates with randomly generated values\n" }, { "from": "human", "value": "import Prop from 'props/prop';\nimport canvas from 'canvas';\n\nimport collision from 'lib/collision';\nimport events from 'lib/events';\n\n// Maybe make these coords an ...
javascript
chosen
[ { "from": "system", "value": "Order props and methods on lambda context, add comment regarding prototype\n" }, { "from": "human", "value": "const { randomId } = require('./utils');\n\n// https://docs.aws.amazon.com/lambda/latest/dg/limits.html\n// default function timeout in seconds\nconst DEFAU...
javascript
chosen
[ { "from": "system", "value": "Add en locale data and detect language using various methods\n" }, { "from": "human", "value": "import React from 'react';\nimport {compose, branch, renderComponent} from 'recompose';\nimport {BrowserRouter, withRouter} from 'react-router-dom';\n\nimport {IntlProvid...
javascript
chosen
[ { "from": "system", "value": "Enable the additional validation methods.\n" }, { "from": "human", "value": "define([\n 'require',\n '../../lib/jquery.validate',\n '../logging'\n], function(require) {\n var log = require('../logging').getLogger('validate');\n\n var init = function($...
javascript
chosen
[ { "from": "system", "value": "Copy in vendored js dependencies\n\n[#128177719]\n\nSigned-off-by: Andrew Crump <bad96bc28586e95c5d7da81c13d926ea5028b22f@pivotal.io>\n" }, { "from": "human", "value": "const gulp = require('gulp');\nconst runSequence = require('run-sequence');\nconst {spawn} = requ...
javascript
chosen
[ { "from": "system", "value": "Fix show/hide slide out menu onresize :tada:\n" }, { "from": "human", "value": "'use strict';\n\nvar navMenu = navMenu || {};\n\nnavMenu = function() {\n\n this.init = function() {\n \n $('html').addClass('menu_mobile');\n \n $('.menu-btn').on('click', ...
javascript
chosen
[ { "from": "system", "value": "Add GA event when user reaches bottom of page\n" }, { "from": "human", "value": "$(document).ready(function () {\n\n /* Add the current year to the footer */\n function getYear() {\n var d = new Date();\n var n = d.getFullYear();\n return ...
javascript
chosen
[ { "from": "system", "value": "Set currentPath in init lifecycle hook.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from './template';\n\n/**\n * Modal that provides examples and explanation of Lucene Search syntax\n *\n * ```handlebars\n * {{search-help-modal\n * ...
javascript
chosen
[ { "from": "system", "value": "chore: Modify reducer for function purity\n" }, { "from": "human", "value": "'use strict';\nimport { TOGGLE_EVENT_MODAL } from '../actions/index';\n\n\nexport default function eventEditingModal(state = false, action) {\n switch (action.type) {\n case TOGGLE_EVEN...
javascript
chosen
[ { "from": "system", "value": "Add LICENSE in the javascript source\n" }, { "from": "human", "value": "(function() {\n dig = {};\n" }, { "from": "gpt", "value": "/*\nCopyright (c) 2012 Chris Pettitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof t...
javascript
chosen
[ { "from": "system", "value": "Add saga for generating me data\n" }, { "from": "human", "value": "import { takeLatest } from 'redux-saga/effects';\n\nimport {\n ME_FROM_TOKEN,\n} from './constants';\n\nfunction* getMeFromToken() {\n\n}\n\nfunction* meData() {\n yield takeLatest(ME_FROM_TOKEN, g...
javascript
chosen
[ { "from": "system", "value": "Substitute static content with the state object\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...
javascript
chosen
[ { "from": "system", "value": "Use filter in page search\n" }, { "from": "human", "value": "import update from 'lodash/fp/update'\n\nimport db from '../pouchdb'\nimport { keyRangeForPrefix } from '../pouchdb'\nimport { pageKeyPrefix } from '../activity-logger'\nimport { searchableTextFields, revi...
javascript
chosen
[ { "from": "system", "value": "Use predefined \"global\" var in place of \"this\".\n" }, { "from": "human", "value": "\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine(this.sn = sn);\n\t} else if ( typeof module === \"object\" && module.exports ) {\n\t\tmodule.exports = sn;\n\t}...
javascript
chosen
[ { "from": "system", "value": "Remove code for debugging Travis\n" }, { "from": "human", "value": "import React from 'react';\nimport { mount } from 'enzyme';\nimport { createStore } from 'redux';\n\nimport Phone from '../dev-server/Phone';\nimport App from '../dev-server/containers/App';\nimport...
javascript
chosen
[ { "from": "system", "value": "[Fix] Correct use of `commander` for parsing CLI options\n\n- `changelog` is not a \"git-style-subcommand\"\n- output help if no parameters are provided\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n/*!\n * thoughtful-release <https://github.com/nknapp/t...
javascript
chosen
[ { "from": "system", "value": "Change boolean-based options to real booleans" }, { "from": "human", "value": "(function() {\n\n // Creates an iframe with an embedded HipChat conversation window.\n //\n // Options:\n // url - The url to the room to embed; required\n // el - ...
javascript
chosen
[ { "from": "system", "value": "Handle jQuery in noConflict mode.\n\nSee: http://api.jquery.com/ready/\n" }, { "from": "human", "value": "// DOM Ready\n$(function() {\n\n\t// SVG fallback\n\t// toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script#update\n\tif (!Modernizr.svg)...
javascript
chosen
[ { "from": "system", "value": "Send error messages back to Slack\n\nWe send HTTP status 200, along with a message (non-200 are not shown in the\nSlack views..)\n" }, { "from": "human", "value": "var config = require('config');\nvar express = require('express');\nvar bodyParser = require('body-par...
javascript
chosen
[ { "from": "system", "value": "Add graceful exit from SIGTERM (docker)\n" }, { "from": "human", "value": "\"use strict\";\n\nconst path = require(\"path\");\nconst env = process.env.NODE_ENV || \"development\";\nconst config = require(path.join(__dirname, \"config/config\"))(env);\n\nif (env === ...
javascript
chosen
[ { "from": "system", "value": "Connect to mongo here so we only do it once\n" }, { "from": "human", "value": "var express = require('express'),\n pages = require('./routes/pages.js'),\n signup = require('./routes/signup.js'),\n flash = require('connect-flash'),\n auth = require('./modules/aut...
javascript
chosen
[ { "from": "system", "value": "Support for Coffee Script 1.7.0\n" }, { "from": "human", "value": "/*\n * Windows Azure Setup\n */\n\nglobal.DEBUG = true;\n\nrequire('coffee-script');\nrequire('./app/init.coffee');\n\n" }, { "from": "gpt", "value": "/*\n * Start Nitro Server\n */\n\ngl...
javascript
chosen
[ { "from": "system", "value": "Fix routing of the application.\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter } from 'react-router-dom';\nimport { Provider } from 'react-redux';\nimport 'bootstrap/dist/css/bootstrap.css';\n...
javascript
chosen
[ { "from": "system", "value": "Add getQuestionnaires functionality, Fix putQuestionnaire\n" }, { "from": "human", "value": "'use strict'\n\nconst MongoClient = require('mongodb').MongoClient;\nconst ObjectId = require('mongodb').ObjectID;\n\nmodule.exports = (mongodbUrl) => {\n\n async function ...
javascript
chosen
[ { "from": "system", "value": "Allow specifying AngularJS version for testing using env variable\n" }, { "from": "human", "value": "module.exports = function(config) {\n\tconfig.set({\n\t\tbasePath: '',\n\t\tframeworks: ['jasmine'],\n\t\tfiles: [\n\t\t\t'https://ajax.googleapis.com/ajax/libs/angu...
javascript
chosen
[ { "from": "system", "value": "Support running licensee on Windows\n\nThis improves the experience on Windows, also see issue #33.\n" }, { "from": "human", "value": "// Copyright 2017 TODO Group. All rights reserved.\n// Licensed under the Apache License, Version 2.0.\n\nconst spawnSync = require...
javascript
chosen
[ { "from": "system", "value": "Fix the regex to match the license reported by licensee\n\nAt least with licensee 9.2.1 there is no leading '\\n' anymore. Fix the\nregex to match in any case.\n" }, { "from": "human", "value": "// Copyright 2017 TODO Group. All rights reserved.\n// Licensed under t...
javascript
chosen
[ { "from": "system", "value": "Change default milestonesExpanded setting to `current`\n" }, { "from": "human", "value": "import actionTypes from '../constants';\n\nconst initialState = {\n canManageLessonPlan: false,\n milestonesExpanded: 'all',\n};\n\nexport default function (state = initialSt...
javascript
chosen
[ { "from": "system", "value": "Make Heroku.configure a named function\n" }, { "from": "human", "value": "var Request = require('./request'),\n _ = require('lodash');\n\nmodule.exports = Heroku;\n\nfunction Heroku (options) {\n this.options = options;\n}\n\nHeroku.configure = function (c...
javascript
chosen
[ { "from": "system", "value": "Fix module require context issue.\n\nRequire the main module (whose dependencies will be mocked) in the\nparent context of the mockit module. This fixes an issue where the main\nmodule was being required in the global scope, causing there to be\nissues resolving the path correc...
javascript
chosen
[ { "from": "system", "value": "Add URL Routes for Blog & Projects\n" }, { "from": "human", "value": "Router.configure({\n layoutTemplate: 'layout'\n});\n\nRouter.map(function(){\n this.route('home', {\n path: '/',\n template: 'home'\n });\n\n // Other routes\n this.route('about');\n t...
javascript
chosen
[ { "from": "system", "value": "CNAPI-79: Fix crash due to location of log object\n" }, { "from": "human", "value": "var restify = require('restify');\nvar endpoints = require('./endpoints');\n\nfunction createServer(options) {\n var cnapi = restify.createServer({\n name: 'Compute Node A...
javascript
chosen
[ { "from": "system", "value": "Move index creation to startup\n" }, { "from": "human", "value": "import { ProductsCollection } from 'meteor/moreplease:common';\n\nconst productIndexes = [\n { productId: 1 },\n { variationId: 1 },\n { storeId: 1 },\n];\n\nproductIndexes.forEach((index) => {\n ...
javascript
chosen
[ { "from": "system", "value": "Whitelist beforeEach and afterEach as globals for eslint\n" }, { "from": "human", "value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true,\n \"node\": true\n },\n \"globals\": {\n \"describe\": false,\n \"it\": false\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Fix session being sought on res\n" }, { "from": "human", "value": "var r = require('rethinkdb');\nvar redditBot = require('../reddit/contexts/bot.js');\n\nmodule.exports = function authBotCtor(cfg, env) {\n var botAuthReddit = redditBot(cfg);\n\n return function a...
javascript
chosen
[ { "from": "system", "value": "Fix unnamed function ESLint warning\n" }, { "from": "human", "value": "if (!global.requestAnimationFrame) {\n global.requestAnimationFrame = function(callback) {\n setTimeout(callback, 0);\n };\n}\n" }, { "from": "gpt", "value": "if (!global.request...
javascript
chosen
[ { "from": "system", "value": "Add xls & ppt support\n" }, { "from": "human", "value": "// Avoid recursive frame insertion...\nvar extensionOrigin = 'chrome-extension://' + chrome.runtime.id;\nif (!location.ancestorOrigins.contains(extensionOrigin)) {\n var links = document.getElementsByTagName(...
javascript
chosen
[ { "from": "system", "value": "Add Chapter 09, exercise 2\n" }, { "from": "human", "value": "var text = \"'I'm the cook,' he said, 'it's my job.'\";\n\nconsole.log(\n text.replace(/([a-z])'([a-z])/gi, \"$1~~$2\")\n .replace(/'/g, \"\\\"\")\n .replace(/~~/g, \"'\"));\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Add correlationId to message options\n" }, { "from": "human", "value": "'use strict'\n\n\nclass Response {\n constructor(messenger, msg) {\n this.messenger = messenger\n this.queue = msg.properties.replyTo\n this.corr = msg.properties.corr\n }\n\n send (...
javascript
chosen
[ { "from": "system", "value": "Test attribute is set correctly for Nam = Val\n" }, { "from": "human", "value": "var sga = require(\"__buttercup/classes/commands/command.sga.js\");\n\nmodule.exports = {\n setUp: function(cb) {\n this.command = new sga();\n (cb)();\n },\n\n errors: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add vote results back to entries\n" }, { "from": "human", "value": "import {List, Map} from 'immutable';\n\nexport function setEntries(state, entries) {\n return state.set('entries', List(entries));\n}\n\nexport function next(state) {\n const entries = state.g...
javascript
chosen
[ { "from": "system", "value": "Move stylesheet to react-atlas package when building for production.\n" }, { "from": "human", "value": "var fs = require(\"fs\");\nvar path = require(\"path\");\nvar spawn = require(\"cross-spawn\");\nvar glob = require(\"glob\");\nvar path = require(\"path\");\n\n/...
javascript
chosen
[ { "from": "system", "value": "Remove erroneous semicolon in security test script\n" }, { "from": "human", "value": "(function(){\n var message = 'Ya been pwned by an XSS from an unsanitized script tag injection.';\n if(alertify){\n alertify.error(message);\n } else {\n document.body.inn...
javascript
chosen
[ { "from": "system", "value": "Revert \"We need an entity name\"\n\nThis reverts commit 880b08cb402e0cdac54abc48089cf168285ca611.\n" }, { "from": "human", "value": "module.exports = {\n //description: '',\n normalizeEntityName: function() {}, // no-op since we're just adding dependencies\n\n /...
javascript
chosen
[ { "from": "system", "value": "Update gulpfile to watch contrib styles and not just core project files\n" }, { "from": "human", "value": "var autoprefix = require(\"gulp-autoprefixer\"),\n connect = require(\"gulp-connect\"),\n gulp = require(\"gulp\"),\n sass = require(\"...
javascript
chosen
[ { "from": "system", "value": "Update throbber test time to avoid test inaccuracies\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict';\n\nvar throbber = require('../../lib/throbber')\n , interval = require('clock/lib/interval')\n , format = require('../../lib/index').red;...
javascript
chosen
[ { "from": "system", "value": "Add test that child nodes are rendered.\n\n`render` should render all child nodes.\n" }, { "from": "human", "value": "import React from 'react';\nimport { DragDropContext } from 'react-dnd';\nimport DraggableContext from './draggable-context';\n\nfdescribe('Draggabl...
javascript
chosen
[ { "from": "system", "value": "Add 'add' to projectDeploy provided interface\n" }, { "from": "human", "value": "// Requires\nvar _ = require('underscore');\nvar DeploymentSolution = require(\"./solution\").DeploymentSolution;\n\n// List of all deployment solution\nvar SUPPORTED = [];\n\nfunction ...
javascript
chosen
[ { "from": "system", "value": "Add styling clases to fix buttons appearing white on iOS\n" }, { "from": "human", "value": "$(function() {\n var markdownTable = $('.markdown-table-wrap');\n\n if (markdownTable.length) {\n $('<button class=\"btn btn--mobile-table-show\">View table</but...
javascript
chosen
[ { "from": "system", "value": "Put initialization in a separate callable function." }, { "from": "human", "value": "var argscheck = require ('cordova/argscheck')\nvar exec = require ('cordova/exec')\n\nmodule.exports = function () {\n var exports = {}\n \n exports.getPlayerId = function (ini...
javascript
chosen
[ { "from": "system", "value": "Use correct path in examples when using handlers nested in subdirs\n" }, { "from": "human", "value": "const path = require('path');\nconst nodeExternals = require('webpack-node-externals');\n\nmodule.exports = {\n entry: './src/handler.js',\n target: 'node',\n ex...
javascript
chosen
[ { "from": "system", "value": "Switch to keyup to repaint any time the block is changed.\n" }, { "from": "human", "value": "function CodeBlockDefinition() {\r\n window.wagtailStreamField.blocks.StructBlockDefinition.apply(this, arguments);\r\n}\r\n\r\nCodeBlockDefinition.prototype.render = fun...
javascript
chosen
[ { "from": "system", "value": "Allow the init function to be async\n" }, { "from": "human", "value": "const express = require('express');\n\nmodule.exports = init => {\n const app = express();\n app.disable('x-powered-by');\n\n init(app, express);\n\n const port = process.env.PORT;\n if (!po...
javascript
chosen
[ { "from": "system", "value": "[detail] Add a function to ease page creation.\n" }, { "from": "human", "value": "module.exports = {\n detail: require('./detail'),\n search: require('./search')\n};\n" }, { "from": "gpt", "value": "//Dependency\nvar React = require('react');\nvar deta...
javascript
chosen
[ { "from": "system", "value": "Move pg done() call before callback for consistency\n" }, { "from": "human", "value": "var pg = require('pg');\n\nvar query = function(connectionString, query, params, callback) {\n // handle case where params are omitted\n if (arguments.length === 3) {\n callb...
javascript
chosen
[ { "from": "system", "value": "Add multiple file upload support\n" }, { "from": "human", "value": "Invitations = new Mongo.Collection(\"invitations\");\n\nInvitationsSchema = new SimpleSchema({\n emails: {\n type: [String],\n label: \"E-mail address\",\n regEx: SimpleSchema.RegEx.Email\...
javascript
chosen
[ { "from": "system", "value": "Add a debug helper, thanks to rhyslbw\n" }, { "from": "human", "value": "Handlebars.registerHelper('isActive', function (siteName) {\n var current = Router.current();\n\n if ('undefined' !== typeof current && current !== null) {\n return current.route.n...
javascript
chosen
[ { "from": "system", "value": "Fix way to specify layer url.\n" }, { "from": "human", "value": "Lizard.collections.Layer = Backbone.Collection.extend({\n\tparse: function(response){\n\t\treturn response.results\n\t},\n\n\turl: local_settings.layers_url,\n\tmodel: Lizard.models.Layer\n});\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Add only() option for filtering clients for a broadcast\n" }, { "from": "human", "value": "var EventEmitter = require('events').EventEmitter;\n\nfunction ClientPool(){\n\tvar list = {};\n\tvar client_pool = this;\n\tthis.list = list;\n\tthis.count = 0;\n\t\n\t//call...
javascript
chosen
[ { "from": "system", "value": "Revert \"adding JSON to the list of extensions that should be compressed\"\n\nThis reverts commit 71aeb2fb86f80caf25d565e79260e3441ebd343a.\n" }, { "from": "human", "value": "'use strict';\n\nvar es = require('event-stream'),\n\tpath = require('path'),\n\tzlib = req...
javascript
chosen
[ { "from": "system", "value": "Add improvement for code coverage by using yet unmerged PR to karma-remap-istanbul repo\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exp...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"refactor: add progress reporter back in for karma tests\"\"\n\nThis reverts commit f4855a955decace888d1291eab1b09b076b51a2f.\n" }, { "from": "human", "value": "module.exports = function (config) {\n config.set({\n basePath: './',\n framework...
javascript
chosen
[ { "from": "system", "value": "feat(types): Add transformation and validation methods to BaseType.\n" }, { "from": "human", "value": "/**\n * @typedef {object} ConfigFieldBaseType\n */\nclass ConfigFieldBaseType {\n /**\n * Array of validators for this type\n * @type {function.<boolean>[]}\n...
javascript
chosen
[ { "from": "system", "value": "Make jsgi demo app run again\n" }, { "from": "human", "value": "// start the web server. (we'll soon write a dedicated script to do this.)\nif (module.id === require.main) {\n require('ringo/httpserver').start();\n}\n" }, { "from": "gpt", "value": "//...
javascript
chosen
[ { "from": "system", "value": "Stop telling people to run npm rebuild with --force\n\nThis forces a local compilation (slow) when they just want to\ndownload right binary (fast).\n" }, { "from": "human", "value": "/*!\n * node-sass: lib/errors.js\n */\n\nvar sass = require('./extensions'),\n pkg...
javascript
chosen
[ { "from": "system", "value": "Add the ability to choose on which side will display a ribbon\n" }, { "from": "human", "value": "import React from 'react'\nimport moment from 'moment'\n\nconst LastHarvesting = ({harvest}) => {\n const color = harvest.status === \"successful\" ? \"green\" : \"red\...
javascript
chosen
[ { "from": "system", "value": "Add css and style loaders.\n" }, { "from": "human", "value": "const path = require('path')\n\n// commonjs module\nmodule.exports = {\n context: __dirname,\n entry: './js/ClientApp.js',\n devtool: 'eval',\n output: {\n path: path.join(__dirname, '/public'),\n ...
javascript
chosen
[ { "from": "system", "value": "Add build condition for producton/development\n" }, { "from": "human", "value": "\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: './app.js',\n\n output: {\n filename: 'bundle.js'\n },\n\n devtool: \"source-map\",\n\n module...
javascript
chosen
[ { "from": "system", "value": "Add support to .jsx files.\n" }, { "from": "human", "value": "'use strict'\n\nconst webpack = require('webpack')\nconst path = require('path')\n\nconst configuration = {\n entry: [\n 'webpack-dev-server/client?http://localhost:8080',\n 'webpack/hot/only-dev-s...
javascript
chosen
[ { "from": "system", "value": "Use !== instead of != (so not type conversion is performed)." }, { "from": "human", "value": "'use strict';\n\n/* Controllers */\nvar demoControllers = angular.module('demoControllers', []);\n\ndemoControllers.controller('NodeCtrl', ['$scope', '$routeParams', 'DemoS...
javascript
chosen
[ { "from": "system", "value": "Add Cancel link when loading screen is lagging\n" }, { "from": "human", "value": "import React from 'react';\nimport lbry from '../lbry.js';\nimport {BusyMessage, Icon} from './common.js';\n\nvar LoadScreen = React.createClass({\n propTypes: {\n message: React.P...
javascript
chosen
[ { "from": "system", "value": "Change route config for angularjs\n" }, { "from": "human", "value": "var VarsApp = {\n baseUrl : '/delibouquet-git/delibouquet/app',\n autor : \"Biellcon Digital\"\n};\n\nrequire.config({\n baseUrl: VarsApp.baseUrl,\n urlArgs: 'v=1.0'\n});\n\nrequire(\n ...
javascript
chosen
[ { "from": "system", "value": "Change URL of pull request so it's not altered by generator\n\n* Fixes https://github.com/Automattic/underscores.me/issues/39\n* Related to #808\n" }, { "from": "human", "value": "/**\n * skip-link-focus-fix.js\n *\n * Helps with accessibility for keyboard only user...
javascript
chosen
[ { "from": "system", "value": "Disable no-redeclare for non-standard `find` identifier\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* Find elements in an array-like object that satisfy a test condition.\n*\n* @module @stdlib/utils/find\n*\n* @example\n* var find = require( '@stdlib/ut...
javascript
chosen
[ { "from": "system", "value": "Remove unused $window and $document" }, { "from": "human", "value": "/*jslint node: true */\n/*global ZeroClipboard */\n'use strict';\n\nangular.module('ngClipboard', []).\n provider('ngClip', function() {\n var self = this;\n this.path = '//cdnjs.cloudflare....
javascript
chosen
[ { "from": "system", "value": "Fix flow error in method parameter\n" }, { "from": "human", "value": "// @flow\nimport net from 'net';\n\nimport config from './config/server';\n\nconst server = net.createServer();\n\nserver.on('connection', socket => {\n socket.on('data', data => {\n console.l...
javascript
chosen
[ { "from": "system", "value": "Fix typo in test description\n" }, { "from": "human", "value": "var assert = require('assert');\nvar Metalsmith = require('metalsmith');\nvar frontmatter = require('../lib');\n\ndescribe('metalsmith-matters', function(){\n it('should add add metadata based on the f...
javascript
chosen
[ { "from": "system", "value": "Stop the game going to sleep.\n" }, { "from": "human", "value": "#pragma strict\n\nvar skin : GUISkin;\n\nfunction Start() {\n#if UNITY_IPHONE\n Social.localUser.Authenticate(function(result : boolean){});\n#endif\n\n // Set the fintering mode of the GUI font ...
javascript
chosen
[ { "from": "system", "value": "Refactor to create global VarDef\n" }, { "from": "human", "value": "/**\n * Created by ChengFuLin on 2015/5/11.\n */\nvar VarDef = require('./vardef'),\n Def = require('./def'),\n varFactory = require('./varfactory'),\n defFactory = require('./deffactory');...
javascript
chosen
[ { "from": "system", "value": "Update 'Saddleback' tag - 'New England'\n" }, { "from": "human", "value": "var select = require('cheerio-soupselect').select;\nvar coerce = require('../tools/coerce');\nvar debug = require('debug')('liftie:resort:saddleback');\n\nfunction parse(dom) {\n var liftSta...
javascript
chosen
[ { "from": "system", "value": "Add genres and set max width instead of height.\n" }, { "from": "human", "value": "$('form').submit(function(event) {\n\tevent.preventDefault();\n\n\tvar movie = $('#movie'),\n\t\tid = $('#search-id').val();\n\n\tmovie.html('<img src=\"/static/img/loading.gif\">');\...
javascript
chosen
[ { "from": "system", "value": "Enable gcm and email module\n" }, { "from": "human", "value": "import 'newrelic';\n// Socket\nimport '../modules/socket/socket-server';\n\n// Auth modules\nimport '../modules/facebook/facebook';\nimport '../modules/google/google';\nimport '../modules/session/session...
javascript
chosen