conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Enable automatic browser reload in browser-test task\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar gutil = require('gulp-util');\nvar webpack = require('webpack');\nvar WebpackDevServer = require('webpack-dev-server');\nvar webpackConfig = requ...
javascript
chosen
[ { "from": "system", "value": "Add a loader while loading repositories\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table';\n\nimport { getRepositories } from '../.....
javascript
chosen
[ { "from": "system", "value": "Fix undefined variable in onUnload\n" }, { "from": "human", "value": "/* See license.txt for terms of usage */\n\n\"use strict\";\n\nconst { Cu, Ci } = require(\"chrome\");\nconst { Firebug } = require(\"./firebug.js\");\nconst { Trace } = require(\"./trace.js\");\n...
javascript
chosen
[ { "from": "system", "value": "Support all the fortran grammars\n" }, { "from": "human", "value": "\"use babel\";\n\nexport default {\n config: {\n executable: {\n type: \"string\",\n default: \"gfortran\"\n },\n gfortran_flags: {\n type: \...
javascript
chosen
[ { "from": "system", "value": "Clone data to avoid mutations to effect rest of workflow\n" }, { "from": "human", "value": "\"use strict\"\n\n/**\n * Inverts the data from the deepstream structure to reduce nesting.\n *\n * { _v: 1, _d: { name: 'elasticsearch' } } -> { name: 'elasticsearch', __ds ...
javascript
chosen
[ { "from": "system", "value": "Add extra logging for node promises\n" }, { "from": "human", "value": "import 'intl';\nimport 'intl/locale-data/jsonp/en.js';\nimport * as Aphrodite from 'aphrodite';\nimport * as AphroditeNoImportant from 'aphrodite/no-important';\n\nimport Vue from 'vue';\nimport ...
javascript
chosen
[ { "from": "system", "value": "Create config.json if not exists\n" }, { "from": "human", "value": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nfunction getValue(obj, pathArr, def) {\n let nextPath = pathArr.shift();\n if (nextPath) {\n return (pathArr.length > 0) ...
javascript
chosen
[ { "from": "system", "value": "Remove empty block for eslint happiness\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'dummy',\n environment,\n rootURL: '/',\n locationType: 'auto',\n ...
javascript
chosen
[ { "from": "system", "value": "Add support to bind to multiple events in one call.\n" }, { "from": "human", "value": "\"use strict\";\n\n// Bind event listeners to target.\nexport function on (target, eventName, listener, capture = false) {\n return target.addEventListener(eventName, listener, c...
javascript
chosen
[ { "from": "system", "value": "Remove dead code from ccNumber controller\n" }, { "from": "human", "value": "'use strict';\n\nvar card = require('creditcards').card;\n\nmodule.exports = function ($parse) {\n return {\n restrict: 'A',\n require: ['ngModel', 'ccNumber'],\n controller: func...
javascript
chosen
[ { "from": "system", "value": "Add failing tests for `A().invoke()` not returning an `A`.\n" }, { "from": "human", "value": "import EmberObject from '../../lib/system/object';\nimport { AbstractTestCase } from 'internal-test-helpers';\nimport { runArrayTests } from '../helpers/array';\n\nclass In...
javascript
chosen
[ { "from": "system", "value": "Refactor `react-engine` client-side mounting to use Require.js\n\nReplace event listener `DOMContentLoaded` with `requirejs` now\nthat the scripts will run after they are loaded.\n\nMake sure to load `react` and `react-dom` before `react-router`.\n\nAlso, attach the modules to ...
javascript
chosen
[ { "from": "system", "value": "Use specified version or increment current version.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n var semver = require('semver');\n var version = grunt.option('version');\n\n function bump () {\n //console.log(arguments[0][0]);\n }\...
javascript
chosen
[ { "from": "system", "value": "Change port from 7700 to 80\n\n" }, { "from": "human", "value": "import express from \"express\"\nimport graphqlHTTP from \"express-graphql\"\nimport { graphqlExpress, graphiqlExpress } from \"graphql-server-express\"\nimport bodyParser from \"body-parser\"\nimport ...
javascript
chosen
[ { "from": "system", "value": "Put feed fixture in startup\n" }, { "from": "human", "value": "defaultFeedIds = [];\n\ndefaultFeeds = [{\n\tname: 'Sneakers',\n\ticon: 'money'\n}, {\n\tname: 'Electronics',\n\ticon: 'laptop'\n}, {\n\tname: 'Clothing (Men)',\n\ticon: 'male'\n}, {\n\tname: 'Clothing (...
javascript
chosen
[ { "from": "system", "value": "Make cache headers sentitive to urls\n" }, { "from": "human", "value": "(function (angular) {\n \"use strict\";\n\n angular.module(\"mfl.gis.interceptor\", [])\n\n .factory(\"mfl.gis.interceptor.headers\", [function () {\n var etag_header = null;\n ...
javascript
chosen
[ { "from": "system", "value": "Fix scope for preEvent and handleEvent calls\n\n" }, { "from": "human", "value": "\"use strict\";\n\nclass SocketHandler {\n constructor(socket) {\n this.socket = socket;\n socket.on(this.eventName, this.preEvent);\n }\n\n preEvent() {\n if (this.require...
javascript
chosen
[ { "from": "system", "value": "Use gulp-uglify-es instead of gulp-uglify\n\nTo properly build the project - has ES in spots\n" }, { "from": "human", "value": "var gulp = require( 'gulp' );\nvar browserify = require( 'browserify' );\nvar source = require( 'vinyl-source-stream' );\nvar...
javascript
chosen
[ { "from": "system", "value": "Fix stray console.log that messed up output\n" }, { "from": "human", "value": "import Rx from 'rx';\nimport glob from 'glob';\n\nvar rxGlobArray = Rx.Observable.fromNodeCallback(glob);\n\nexport\ndefault\n\nfunction rxGlob(...args) {\n console.log(...args);\n ...
javascript
chosen
[ { "from": "system", "value": "Remove user salt from deserialize\n" }, { "from": "human", "value": "import passport from 'koa-passport';\nimport User from '../src/models/users'\nimport { Strategy } from 'passport-local'\n\npassport.serializeUser((user, done) => {\n done(null, user.id)\n})\n\npas...
javascript
chosen
[ { "from": "system", "value": "chore: Build with uglify as default\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar uglify = require('gulp-uglify');\nvar shell = require('gulp-shell');\n\ngulp.task('js', function() {\n\treturn gulp.src(['js...
javascript
chosen
[ { "from": "system", "value": "Delete tests that only wrongly tested uncomputable\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nmongoose.connect('mongodb://localhost:27017/dds');\n\nrequire('../lib/config/mongoose').init(mongoose);\nrequire('../lib/models/acceptanceTest'...
javascript
chosen
[ { "from": "system", "value": "Verify `typings` field in package.json\n" }, { "from": "human", "value": "\"use strict\";\n\nconst expect = require('chai').expect\nconst packageSettings = require('./package.json')\n\nconst Up = require('./' + packageSettings.main)\n\n\ndescribe('The `main` field i...
javascript
chosen
[ { "from": "system", "value": "UglifyJs: Change the ecma option from 8 to 5\n" }, { "from": "human", "value": "'use strict'; // eslint-disable-line\n\nconst { default: ImageminPlugin } = require('imagemin-webpack-plugin');\nconst imageminMozjpeg = require('imagemin-mozjpeg');\nconst UglifyJsPlugi...
javascript
chosen
[ { "from": "system", "value": "Add strict mode to support generation\n" }, { "from": "human", "value": "var fs = require('fs'),\n words = require('./data/buzzwords.json');\n\nfs.writeFileSync('Supported-buzzwords.md',\n 'Supported Buzzwords\\n' +\n '=================\\n' +\n '\\n' +\n...
javascript
chosen
[ { "from": "system", "value": "Standards: Use short function like above\n" }, { "from": "human", "value": "var gulp = require(\"gulp\");\r\nvar uglify = require(\"gulp-uglify\");\r\nvar rename = require(\"gulp-rename\");\r\nvar cleanCSS = require(\"gulp-clean-css\");\r\n\r\nvar config = {};\r\nc...
javascript
chosen
[ { "from": "system", "value": "Comment out build step (gulp).\n" }, { "from": "human", "value": "\"use strict\"\nvar gulp = require(\"gulp\");\nvar eslint = require(\"gulp-eslint\");\nvar babel = require(\"gulp-babel\");\nvar SOURCE_PATH = [\"./src/**/*.js\", \"./src/**/*.jsx\"];\n\n\ngulp.task(\...
javascript
chosen
[ { "from": "system", "value": "Add all .js files to gulp.watch instead of just the files under 'test/'\n" }, { "from": "human", "value": "\"use strict\";\nvar gulp = require('gulp'),\n\tjshint = require('gulp-jshint'),\n\tfilter = require('gulp-filter'),\n\tmocha = require('gulp-mocha');\n\ngu...
javascript
chosen
[ { "from": "system", "value": "Add documentation to uncaughtException handler.\n" }, { "from": "human", "value": "// Module dependencies.\nvar debug = require('debug')('ruche:error');\n\n/**\n * Handle errors\n * @param {Error} error\n * @return {Error}\n */\nvar handle = function (err) {\n deb...
javascript
chosen
[ { "from": "system", "value": "Add test for login component\n" }, { "from": "human", "value": "'use strict';\n\nimport Login from '../src/Login';\n\ndescribe('Login', function() {\n\tit('should be tested', function() {\n\t\tassert.fail('No tests for this module yet.');\n\t});\n});\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Revert \"DE2347 - Remove tenantId index from recordHash as intended\"\n\nThis reverts commit 6718f6f8388ca42d85c6403129be29d2c36852e8.\n\nNeed to keep the index because purging the data in recordHash,\nwhich remains shared across tenants in ingestion_batch_job,\nrequires a full...
javascript
chosen
[ { "from": "system", "value": "Set JavaScript file destination directory, after TypeScript compile\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar ts = require('gulp-typescript');\nvar tslint = require('gulp-tslint');\nvar jade = require('gulp-jade');\n\ngulp.task('jade', func...
javascript
chosen
[ { "from": "system", "value": "Modify slide and fade features\n" }, { "from": "human", "value": "$(document).ready(function() {\n\n $(\".welcome\").on(\"click\", function() {\n console.log(\"YES\");\n $(this).slideUp(1500);\n // $(this).parent().slideUp(1500);\n $(this).parent().anim...
javascript
chosen
[ { "from": "system", "value": "Add helpers.js to ignore from tests\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar mocha = require('gulp-mocha');\nvar istanbul = require('gulp-istanbul');\nvar eslint = require('gulp-eslint');\nvar coveralls = require('gulp-coveralls');\n\ngulp...
javascript
chosen
[ { "from": "system", "value": "Fix order of micromatch parameters\n" }, { "from": "human", "value": "'use strict'\r\n\r\nconst log = require('./log.js')\r\nconst mm = require('micromatch')\r\nconst chalk = require('chalk')\r\nconst watcher = require('simple-watcher')\r\n\r\nclass Watcher {\r\n w...
javascript
chosen
[ { "from": "system", "value": "Use bridge gulp file instead of having to re-generate.\n" }, { "from": "human", "value": "// Generated by CoffeeScript 1.6.2\n(function() {\n var coffee, concat, gulp, gutil, mocha, uglify, wrap;\n\n gulp = require('gulp');\n\n coffee = require('gulp-coffee');\n\...
javascript
chosen
[ { "from": "system", "value": "Change comment to reflect the change of the default css preprocessor." }, { "from": "human", "value": "var elixir = require('laravel-elixir');\n\n/*\n |--------------------------------------------------------------------------\n | Elixir Asset Management\n |--------...
javascript
chosen
[ { "from": "system", "value": "Rename param to be consistent\n" }, { "from": "human", "value": "import Command from './Command.js';\n\n/**\n * Table Command\n */\nexport default class TableCommand extends Command {\n /**\n * @inheritDoc\n */\n execute() {\n const figure = thi...
javascript
chosen
[ { "from": "system", "value": "Support first_name, last_name and name\n" }, { "from": "human", "value": "'use strict';\n\n// @ngInject\nvar authorsDirective = function() {\n return {\n scope: {\n authors: '='\n },\n template: require('./authorstemplate.html'),\n //@ngInject\n ...
javascript
chosen
[ { "from": "system", "value": "Make sure Region is included before View\n\nView depends on Region\n" }, { "from": "human", "value": "var Minionette = (function(global, _, $, Backbone) {\n 'use strict';\n\n // Define and export the Minionette namespace\n var Minionette = {};\n Backbone...
javascript
chosen
[ { "from": "system", "value": "Add private members store to Etherscan client\n" }, { "from": "human", "value": "/**\n * @file Etherscan API client.\n * @module client/etherscan\n */\n\n'use strict'\n\n/**\n * Etherscan API client.\n * @static\n */\nclass Client {\n\n}\n\n// Expose\nmodule.exports...
javascript
chosen
[ { "from": "system", "value": "Add gulp task build markup" }, { "from": "human", "value": "var gulp = require('gulp');\nvar $ = require('gulp-load-plugins')({\n camelize: true\n});\n\nvar config = {\n source: {\n scripts: {\n path: 'app/',\n files: './app/**/*.js'\n }\n },\n b...
javascript
chosen
[ { "from": "system", "value": "Fix gulfile not watching Sass changes\n" }, { "from": "human", "value": "var gulp = require('gulp')\nvar sass = require('gulp-sass')\nvar browserSync = require('browser-sync').create()\n\ngulp.task('sass', function () {\n return gulp.src('./scss/**/*.scss')\n .p...
javascript
chosen
[ { "from": "system", "value": "Add user check to add ranking\n" }, { "from": "human", "value": "import StoriesItemType from '../types/StoriesItemType'\nimport RankingInputItemType from '../types/RankingInputItemType'\nimport {Story, User, Ranking} from '../models'\n\nconst addRanking = {\n name:...
javascript
chosen
[ { "from": "system", "value": "Refactor user credentials as a prototyped object.\n" }, { "from": "human", "value": "var md5= require('./md5');\n\n/*\n * Hide the password. Uses the password to form authorization strings,\n * but provides no interface for exporting it.\n */\nfunction user_credenti...
javascript
chosen
[ { "from": "system", "value": "Fix onBuild callback for webpack watch mode, now it properly outputs what it should to the log (screen). Also microrefactor the webpack calling code.\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar nodemon = require('nodemon');\nvar webpack = req...
javascript
chosen
[ { "from": "system", "value": "Fix headless unit test running\n\nNow \"npm install && npm test\" works locally again.\n" }, { "from": "human", "value": "/*\nCopyright 2014 Spotify AB\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in complian...
javascript
chosen
[ { "from": "system", "value": "Make scroll-up thingy support scroll-down thingy\n" }, { "from": "human", "value": "const fs = require(\"fs\");\nconst path = require(\"path\");\nconst { src, dest, task, watch, series } = require('gulp');\nconst Gitdown = require('@gnd/gitdown');\nconst rename = re...
javascript
chosen
[ { "from": "system", "value": "Add support autoprefixer for cross-browser.\nAdd support minify dist file.\n" }, { "from": "human", "value": "var gulp = require(\"gulp\");\nvar sass = require(\"gulp-sass\");\n\ngulp.task('sass', function () {\n gulp.src('src/hipster-grid-system.scss')\n ...
javascript
chosen
[ { "from": "system", "value": "Fix bug where Navigation Timing info could be accessed to quickly and hence produce weird values\n" }, { "from": "human", "value": "'use strict';\n\n// DEV TIME CODE\nif (FAKE_SERVER) {\n require('fake');\n}\n// DEV TIME CODE\n\nrequire('./index.scss');\n\nvar $ ...
javascript
chosen
[ { "from": "system", "value": "Fix redis syntax error if third argument is undefined\n" }, { "from": "human", "value": "const Redis = require('ioredis');\n\nmodule.exports = url => {\n const redis = new Redis(url);\n\n redis.setJSON = async (...arguments) => {\n arguments[1] = JSON.stringify...
javascript
chosen
[ { "from": "system", "value": "Fix aliases and error message.g\n" }, { "from": "human", "value": "const Command = require('../structures/command.js');\nconst request = require('request');\n\nmodule.exports = class TogetherTube extends Command {\n\n constructor(client) {\n super(client);\n ...
javascript
chosen
[ { "from": "system", "value": "Update field name\n -remove TODO\n" }, { "from": "human", "value": "import DS from 'ember-data';\nimport OsfModel from 'ember-osf/models/osf-model';\n\n/**\n * @module ember-preprints\n * @submodule models\n */\n\n/**\n * Model for OSF APIv2 preprints. This model...
javascript
chosen
[ { "from": "system", "value": "Add live video feed timeout\n" }, { "from": "human", "value": "/**\n * Created by jonathan on 3/7/15.\n */\n\nvar CameraApp = function() {};\n\nCameraApp.prototype = {\n framesPerSecond: 1,\n\n setup: function() {\n this.image = document.getElementById(...
javascript
chosen
[ { "from": "system", "value": "Rename public function to match task name\n" }, { "from": "human", "value": "import patchNode from '../node/patch';\nimport Transaction from '../transaction';\nimport { CreateNodeHookCache, VTree } from '../util/types';\nimport globalThis from '../util/global';\n\n/...
javascript
chosen
[ { "from": "system", "value": "Switch string.incluldes() to string.indexOf() for compatibility reasons\n" }, { "from": "human", "value": "var url = require(\"url\");\nvar qs = require(\"qs\");\n\n/**\n * getNextLink\n * @function\n * @param {Object} response A response object returned from callin...
javascript
chosen
[ { "from": "system", "value": "Remove duplicate elements in an array (FIX)\n" }, { "from": "human", "value": "// Remove duplicate elements from array\n\nfunction removeDups(arr){\n var dupes ={},\n returnArray = [], \n el;\n\n for(var i =0; i<arr.length; i++){\n el = arr[i];\n i...
javascript
chosen
[ { "from": "system", "value": "Set prod env when analyzing bundle\n" }, { "from": "human", "value": "import webpack from 'webpack';\nimport {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';\nimport config from '../webpack.config.prod';\n\nconfig.plugins.push(new BundleAnalyzerPlugin());\n\nc...
javascript
chosen
[ { "from": "system", "value": "Update comment for importing deps" }, { "from": "human", "value": "import $ from 'jquery';\nimport Router from './util/router';\nimport common from './routes/Common';\nimport home from './routes/Home';\nimport about_us from './routes/About';\n\n// Import Bootstrap\n...
javascript
chosen
[ { "from": "system", "value": "Relocate the key to be able to find it eaven easier\n" }, { "from": "human", "value": "var geocoder = require('node-geocoder') (\"google\", \"https\", {\n\tapiKey: '<YOUR-KEY>'\n});\nvar csv = require('csv');\n\nprocess.stdin\n\t.pipe(csv.parse())\n\t.pipe(csv.trans...
javascript
chosen
[ { "from": "system", "value": "Use gulp to create the xpi." }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\n\nvar files = ['manifest.json', 'background.js'];\nvar xpiName = 'catgifs.xpi';\n\ngulp.task('default', function () {\n console.log(files, xpiName)\n});\n" ...
javascript
chosen
[ { "from": "system", "value": "Add lib to NODE_PATH when running the app.\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar shell = require('gulp-shell');\nvar tsc = require('gulp-tsc');\n\ngulp.task('build', function () {\n return gulp.src([\n './**/*.ts',\n '!./node...
javascript
chosen
[ { "from": "system", "value": "Add the test task dependency back to the default gulp task\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\n\nvar options = {\n name: 'ec2prices',\n dependantFiles: ['node_modules/babel/browser-polyfill.js'],\n mainFiles: [\n 'a...
javascript
chosen
[ { "from": "system", "value": "Add specification for fit operation\n" }, { "from": "human", "value": "var parse = require('./parse');\nvar clean = require('./clean');\n\nmodule.exports = Engine = {};\n\nvar pythons = [];\nvar outputs = [];\nvar pythonNum = 0;\n\nEngine.runPython = function(operat...
javascript
chosen
[ { "from": "system", "value": "FIX wrong db schema declaration\n" }, { "from": "human", "value": "import { Mongo } from 'meteor/mongo';\nimport { SimpleSchema } from 'meteor/aldeed:simple-schema';\n\nclass ModuleFulfilmentCollection extends Mongo.Collection {\n insert(fulfilmentData, callBack){\...
javascript
chosen
[ { "from": "system", "value": "Update to change db name on config\n" }, { "from": "human", "value": "var config = {\n /** app mode **/\n mode: 'DEV',\n\n /** db name **/\n db: 'tiapp-exercise',\n\n /** android tablet minimum form factor **/\n tablet: {\n width: 899,\n ...
javascript
chosen
[ { "from": "system", "value": "Remove test for default options\n" }, { "from": "human", "value": "'use strict';\n\nvar grunt = require('grunt');\n\n/*\n ======== A Handy Little Nodeunit Reference ========\n https://github.com/caolan/nodeunit\n\n Test methods:\n test.expect(numAssertions)\n test.d...
javascript
chosen
[ { "from": "system", "value": "Add usage instructions to config blueprint\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n return {};\n};" }, { "from": "gpt", "value": "/* jshint node: true */\n\n/* ==================\n * USAGE ...
javascript
chosen
[ { "from": "system", "value": "Rework the scheduletime helper to work with later admintimewidget helper code\n" }, { "from": "human", "value": "// Basic idea from Bojan Mihelac -\n// http://source.mihelac.org/2010/02/19/django-time-widget-custom-time-shortcuts/\n\n// Django imports jQuery into th...
javascript
chosen
[ { "from": "system", "value": "Use new harness in generated assets unit test\n" }, { "from": "human", "value": "var expect = require('chai').expect,\n request = require('superagent').agent(),\n PrettyCSS = require('PrettyCSS'),\n testhost = require('../src/server').testhost();\n\n\ndescr...
javascript
chosen
[ { "from": "system", "value": "Remove quotes from tests in normalizeArgs\n" }, { "from": "human", "value": "import normalizeArgs, { __RewireAPI__ as rewireAPI } from '../../../src/server/process/normalizeArgs';\n\ndescribe('normalizeArgs', () => {\n afterEach(() => {\n rewireAPI.__Reset...
javascript
chosen
[ { "from": "system", "value": "Remove babel-polyfill import in man.js\n" }, { "from": "human", "value": "import App from './app';\nimport 'babel-polyfill';\ncommon.app = new App(common);\ncommon.app.start();\n" }, { "from": "gpt", "value": "import App from './app';\ncommon.app = new A...
javascript
chosen
[ { "from": "system", "value": "Remove the .only from the generative test\n" }, { "from": "human", "value": "\"use strict\";\n\nconst apiRequest = require( \"../../src/token/api-request\" );\nconst storeToken = require( \"../../src/token/store-token\" );\nconst Promise = require( \"bluebird\" );\n...
javascript
chosen
[ { "from": "system", "value": "Stop titleCase introducing double spaces\n" }, { "from": "human", "value": "formsAngular.filter('titleCase',[function() {\n return function(str, stripSpaces) {\n var value = str.replace(/(_|\\.)/g, ' ').replace(/[A-Z]/g, ' $&').replace(/\\w\\S*/g, function...
javascript
chosen
[ { "from": "system", "value": "Fix remove button in demo table\n" }, { "from": "human", "value": "import Em from 'ember';\nimport LlamaBodyCell from 'llama-table/components/llama-body-cell/component';\nimport layout from 'dummy/templates/components/button-cell';\nvar computed = Em.computed;\nvar ...
javascript
chosen
[ { "from": "system", "value": "Add linux in build options\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n grunt.initConfig({\n nodewebkit: {\n options: {\n platforms: ['win', 'osx'],\n buildDir: './build',\n ...
javascript
chosen
[ { "from": "system", "value": "Remove `file` field from jshint configuration.\n\nTests were failing with message\n\"Warning: Path must be a string. Received null\"\n\nCloses imdone/imdone-core#48\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.ini...
javascript
chosen
[ { "from": "system", "value": "Update coverage values to match current\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js', 'li...
javascript
chosen
[ { "from": "system", "value": "Fix Grunt file for local testing\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // TODO: platforms shouldn't be hardcoded here\n var platforms = ['win64'];\n\n // Build up array of destinations for Twister deamon files\n var de...
javascript
chosen
[ { "from": "system", "value": "Implement computation of rectangle's area\n" }, { "from": "human", "value": "import React from 'react';\n\nimport styles from 'stylesheets/components/common/typography';\n\nconst Rectangle = () => (\n <div>\n <h1 className={styles.heading}>Rechteck</h1>\n <di...
javascript
chosen
[ { "from": "system", "value": "Fix typo 'ploadedAt' => 'uploadedAt'" }, { "from": "human", "value": "import React from 'react';\n\nclass ImageCardComponent extends React.Component {\n static propTypes = {\n uri: React.PropTypes.string.isRequired,\n uploadedAt: React.PropTypes.string.isRequ...
javascript
chosen
[ { "from": "system", "value": "Add global modules list, to be excluded from lazy installation.\n" }, { "from": "human", "value": "var canihaz = require('canihaz'),\n fs = require('fs'),\n p = require('path');\n\n/**\n * Install dependency modules that are not yet installed, and needed for execu...
javascript
chosen
[ { "from": "system", "value": "Fix custom page loading with new domain\n" }, { "from": "human", "value": "function setupLinkHandling() {\n window.history.pushState({\"html\": document.documentElement.outerHTML}, \"\", window.location.href);\n\n var anchors = document.getElementsByTagName(\"...
javascript
chosen
[ { "from": "system", "value": "Increment version to force refresh\n" }, { "from": "human", "value": "'use strict';\n\n/**\n\tApplication-wide metadata is stored here for reuse\n*/\nmodule.exports = {\n\tFRONTEND_VERSION: 31\n};\n" }, { "from": "gpt", "value": "'use strict';\n\n/**\n\t...
javascript
chosen
[ { "from": "system", "value": "Stop using command parser file\n" }, { "from": "human", "value": "import GameStateManager from \"./GameStates/GameStateManager\";\nimport CommandParser from \"./Commands/CommandParser\";\nimport GenerateName from \"./Generators/NameGenerator\";\n\nexport default {\n...
javascript
chosen
[ { "from": "system", "value": "Use new path based on changed __dirname\n" }, { "from": "human", "value": "var fs = require('fs')\nvar path = require('path')\n\nvar codeBlocks = document.querySelectorAll('code[data-path]')\nArray.prototype.forEach.call(codeBlocks, function (code) {\n code.textCon...
javascript
chosen
[ { "from": "system", "value": "Use single quotes in webpack config\n" }, { "from": "human", "value": "const path = require('path');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\n\nmodule.exports = {\n entry: {\n login: './public/src/js/login.js',\n register: './public/src/j...
javascript
chosen
[ { "from": "system", "value": "Remove stray character breaking scripts." }, { "from": "human", "value": "w/**\n * Latvian translation for foundation-datepicker\n * Artis Avotins <artis@apit.lv>\n */\n\n;(function($){\n $.fn.fdatepicker.dates['lv'] = {\n days: [\"Svētdiena\", \"Pirmdiena...
javascript
chosen
[ { "from": "system", "value": "Add rpc host and remove --allow-pending.\n" }, { "from": "human", "value": "var argv = require('cmdenv')('micromono')\n\n/**\n * Parse commmand line and environment options\n */\nargv\n .allowUnknownOption()\n .option('-s --service [services]', 'Names of services ...
javascript
chosen
[ { "from": "system", "value": "CB-6465: Add license headers to Tizen code\n" }, { "from": "human", "value": "( function() {\n\nwin = null;\n\nmodule.exports = {\n show: function() {\n if ( win === null ) {\n win = window.open('splashscreen.html');\n }\n },\n\n hi...
javascript
chosen
[ { "from": "system", "value": "Rename init method according to the spec.\n" }, { "from": "human", "value": "const yeoman = require( 'yeoman-generator' );\nconst description = require( './description' );\n\nmodule.exports = yeoman.Base.extend({\n constructor: function constructor( ...args ) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add include property to babel loader\n" }, { "from": "human", "value": "'use strict';\n\nconst NODE_ENV = process.env.NODE_ENV || 'development';\nconst webpack = require('webpack');\nconst path = require('path');\n\nconst PATHS = {\n app: path.join(__dirname, 'ap...
javascript
chosen
[ { "from": "system", "value": "Make result object local to function\n" }, { "from": "human", "value": "var serviceName = \"facebook\";\n\nvar request = require(\"request\");\nvar serviceConfig = require(\"./../config/services.config.json\");\n\nvar result = {\n servic...
javascript
chosen
[ { "from": "system", "value": "Correct typo of 'injector' method name as 'inject'.\n" }, { "from": "human", "value": "'use strict';\n\nvar contextify = require('contextify');\nvar fs = require('fs');\n\nvar Context = function () {\n var rawContext = contextify();\n\n rawContext.globals = ra...
javascript
chosen
[ { "from": "system", "value": "Edit Initialize JS to Activate Controller/View On Load\n" }, { "from": "human", "value": "$(document).ready(function() {\n\n $.ajax({\n url: '/questions/index',\n method: 'GET',\n dataType: 'json'\n }).done(function(data){\n user_questions = data['ques...
javascript
chosen
[ { "from": "system", "value": "Increase transition time for slideshow images from 3 seconds to 5 seconds\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n mare.views.Home = Backbone.View.extend({\n el: 'body',\n\n initialize: function() {\n \t// DOM ...
javascript
chosen
[ { "from": "system", "value": "Include credentials when entity models are fetched\n" }, { "from": "human", "value": "import fetch from 'isomorphic-fetch'\n\nexport const REQUEST_ENTITY_MODELS = 'REQUEST_ENTITY_MODELS'\nexport const RECEIVE_ENTITY_MODELS = 'RECEIVE_ENTITY_MODELS'\n\nfunction reque...
javascript
chosen
[ { "from": "system", "value": "Convert all property values to strings\n\nAllows using unquoted numeric values. Tricky to test because only\nbreaks when trying to run the whole thing through cssnext in the full\nchain. Will figure it out later :)\n" }, { "from": "human", "value": "import _ from 'l...
javascript
chosen
[ { "from": "system", "value": "Set ascii art max height to 30 lines\n" }, { "from": "human", "value": "'use strict';\n\nvar ascii = require('image-to-ascii');\n\nfunction mock() {\n return function(url, callback) {\n callback('[ascii art]');\n };\n}\n\nfunction prod() {\n return function(ur...
javascript
chosen
[ { "from": "system", "value": "Fix a bug related to the first tick not being called\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n var root = this;\n\n var Countdown = function(duration, onTick, onComplete){\n this.secondsLeft = duration;\n var tick = function() {\n ...
javascript
chosen