conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "LILY-1455: Fix assign case modal in case list\n" }, { "from": "human", "value": "angular.module('app.cases').controller('CaseAssignModal', CaseAssignModal);\n\nCaseAssignModal.$inject = ['$uibModalInstance', 'myCase', 'Case', 'User'];\nfunction CaseAssignModal($uibM...
javascript
chosen
[ { "from": "system", "value": "Replace wordpress host with base_url from config\n" }, { "from": "human", "value": "\nif (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\n module.exports = ltriToUrl;\n}\n\n/**\n * Translate an LTRI to a URL\n *\n * @param {string} url ...
javascript
chosen
[ { "from": "system", "value": "Include Rank in transforms registry.\n" }, { "from": "human", "value": "module.exports = {\n aggregate: require('./Aggregate'),\n bin: require('./Bin'),\n cross: require('./Cross'),\n countpattern: require('./CountPattern'),\n linkpath: r...
javascript
chosen
[ { "from": "system", "value": "Use service to run upload\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/profile-upload';\n\nexport default Ember.Component.extend({\n layout,\n\n click(ev) {\n ev.preventDefault();\n\n this.$(`inpu...
javascript
chosen
[ { "from": "system", "value": "Convert Normal Difference Distribution class to ES6\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Internal dependencies\n */\nlet NormalDistribution = require( './normal-distribution' );\n\n// See: http://mathworld.wolfram.com/NormalDifferenceDistribut...
javascript
chosen
[ { "from": "system", "value": "Remove test row generator. Adds `onRefresh` & `setTasks` methods.\n" }, { "from": "human", "value": "/**\n *\n * @flow\n */\n'use strict';\n\nimport React from 'react';\nimport TaskListView from './TaskListView';\nimport type {Task} from '../../reducers/tasks';\nimp...
javascript
chosen
[ { "from": "system", "value": "Add attributes to MutationObserverInit object" }, { "from": "human", "value": "const loopchange = 'loopchange';\nconst srcrequest = 'srcrequest';\n\nfunction createCustomMediaElement() {\n const media = document.createElement('video');\n new MutationObserver(() =>...
javascript
chosen
[ { "from": "system", "value": "Use setTimeout to avoid job overlaping\n" }, { "from": "human", "value": "module.exports = function() {\n var scheduler = {\n domain: require('domain').create(),\n\n initialize: function() {\n this.domain.on(\"error\", function(error) {\n console....
javascript
chosen
[ { "from": "system", "value": "Allow props proxy on Text\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { primaryFontStyle, secondaryFontStyle } from 'styles/font';\n\n/**\n * Text component with automatic typeface formatting.\n */\ncons...
javascript
chosen
[ { "from": "system", "value": "Handle errors on calling request()\n" }, { "from": "human", "value": "exports.Response = function(response) {\n var sendUserError = function(message) {\n response.send(message, { 'Content-Type': 'text/plain' }, 400)\n }\n return {\n response: ...
javascript
chosen
[ { "from": "system", "value": "Add framework of events system\n" }, { "from": "human", "value": "const { exec } = require('child_process');\nconst EventEmitter = require('events');\n\nclass Execute extends EventEmitter {\n constructor() {\n super();\n }\n\n static run(fullCmd) {\n return...
javascript
chosen
[ { "from": "system", "value": "Include course semester and year in results\n" }, { "from": "human", "value": "/** Course search utility for admin **/\n\n!function(app, $) {\n $(document).ready(function() {\n if($('.courses-search-query').length) {\n var target = $('.courses-search-query'...
javascript
chosen
[ { "from": "system", "value": "Use faster `[]` instead of `@each`\n" }, { "from": "human", "value": "import Em from 'ember';\nimport { defaultValue } from 'llama-table/computed';\nvar makeArray = Em.makeArray;\nvar computed = Em.computed;\nvar alias = computed.alias;\nvar reads = computed.reads;\...
javascript
chosen
[ { "from": "system", "value": "Change login from tab to window\n" }, { "from": "human", "value": "Ti.include('/ttyl/home/home.js');\nTi.include('/ttyl/login/login.js');\nTi.include('/ttyl/feed/feed.js')\nTi.include('/ttyl/profile/profile.js')\n// create tab group\n\nvar loginTabGroup = Titanium.U...
javascript
chosen
[ { "from": "system", "value": "Fix handling of empty results\n" }, { "from": "human", "value": "(function() {\n\n angular.module('appControllers')\n\n .controller('UradovnyController', ['$scope', 'AppService', function($scope, AppService) {\n this.update = function() {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add 'info' command to extract the information from a generated voxel shader\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar generator = require('./../'),\n args = process.argv.slice(2),\n ruleString = args[0] || null,\n outOfBoundValue = args[...
javascript
chosen
[ { "from": "system", "value": "Add window prefix to localStorage\n" }, { "from": "human", "value": "import ChromePromise from 'chrome-promise'\n\nwindow.chromep = new ChromePromise()\n\n// set or unset CSS\nwindow.CSS = (() => {\n const styleEl = document.createElement('style')\n\n document.hea...
javascript
chosen
[ { "from": "system", "value": "Support for retrieving perceptual features\n" }, { "from": "human", "value": "'use strict';\n\nvar MusicServices = angular.module('MusicServices', ['ngResource']);\n\n/**\n * Handle the music stored on the server\n */\nMusicServices.factory('Api', ['$resource',\n ...
javascript
chosen
[ { "from": "system", "value": "Add in the leader div style\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport Message from './Welcome.md';\nimport styles from './Welcome.css';\n\nexport default class Welcome extends Component {\n markup() {\n return {\n __...
javascript
chosen
[ { "from": "system", "value": "Fix render error for list group item children\n" }, { "from": "human", "value": "/**\n * breit-wheeler\n *\n * Copyright © 2016 Allen Smith <loranallensmith@github.com>. All rights reserved.\n *\n * This source code is licensed under the MIT license found in t...
javascript
chosen
[ { "from": "system", "value": "Fix eslint checking lib directory\n" }, { "from": "human", "value": "module.exports = {\n parser: '@typescript-eslint/parser',\n extends: ['eslint:recommended'],\n env: {\n node: true,\n },\n rules: {\n 'arrow-parens': 'error',\n 'func-names': 'off',\n...
javascript
chosen
[ { "from": "system", "value": "Initialize KeyBoardManager after loading the page.\n" }, { "from": "human", "value": "'use strict';\n\nvar app = angular.module('2048App', ['Game', 'Grid', 'Keyboard']);\n\n// Game Controller\napp.controller('GameController', ['GameManager', 'GridManager', 'Keyboard...
javascript
chosen
[ { "from": "system", "value": "Use decoded path name to read files\n\nWhen file name contains characters that is encoded in URL(spaces,\nNon-ASCII characters), file name should be decoded before access to\nfiles in file system.\n" }, { "from": "human", "value": "'use strict';\n\nconst MarkdownWat...
javascript
chosen
[ { "from": "system", "value": "Add a build task to grunt.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jasmine: {\n geojson_to_gmaps: {\n ...
javascript
chosen
[ { "from": "system", "value": "Rename default Grunt task to \"build\".\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n grunt.initConfig({\n cssmin: {\n dist: {\n files: {\n 'dist/css/application.min.css': ['dist/css/application.min.css']\n ...
javascript
chosen
[ { "from": "system", "value": "Use jshint option for mozilla addons\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n less: {\n development: {\n files: {\n \"...
javascript
chosen
[ { "from": "system", "value": "Use minified three for skeleton-body\n" }, { "from": "human", "value": "export default {\n title: 'Skeleton Body',\n description: 'Simple Skeleton body with multiple parts experiment',\n tags: 'Skeleton, Bone, Mesh',\n public: false,\n scripts: [\n '../../li...
javascript
chosen
[ { "from": "system", "value": "Include new filter in the module\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('ngGcFilters', [\n 'ngGcCapitalizeEach',\n 'ngGcCapitalize',\n 'ngGcDashToSpace',\n 'ngGcOrdinal',\n 'ngGcPluralize',\n 'ngGcParseFloat',\n 'ngGcSafeString',\n...
javascript
chosen
[ { "from": "system", "value": "Add location change to login\n" }, { "from": "human", "value": "angular.module( 'app' )\n.controller( 'LoginCtrl', function( $scope, UserSvc ) {\n $scope.login = function( username, password ) {\n UserSvc.login( username, password )\n .then( functio...
javascript
chosen
[ { "from": "system", "value": "Add server as a task, allowing webserver and watch to run simutanously\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n\n connect: {\n server: {\n options: {\n port: 1337,\n base: 'dist',\...
javascript
chosen
[ { "from": "system", "value": "Work around bizarre ember-cli bug.\n\nWithout this, the addon's `vendor` folder was considered the apps and\nwas \"winning\" out over the `treeForVendor` work that was done in the\naddon's index.js.\n" }, { "from": "human", "value": "/* global require, module */\nva...
javascript
chosen
[ { "from": "system", "value": "Copy doc to index.html to fix the project page.\n" }, { "from": "human", "value": "/*jshint node: true, camelcase: false */\n\n'use strict';\n\nmodule.exports = function (grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\...
javascript
chosen
[ { "from": "system", "value": "Use enviroment variable for deployment\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n sshconfig: {\n 'onair.riplive.it': {\n \thost: 'onair.riplive.it',\n username: 'rip',\n password: 'rip_adm...
javascript
chosen
[ { "from": "system", "value": "Remove registerTask actions, they already exist and gives problems when they are specified multiple times\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n 'use strict';\n\n grunt.initConfig({\n autoprefixer: {\n single_file: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add JSHint in test target.\n" }, { "from": "human", "value": "/*\n * grunt-stamp\n * https://github.com/brainkim/grunt-stamp\n *\n * Copyright (c) 2013 Brian Kim\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function(grunt) {\n grunt...
javascript
chosen
[ { "from": "system", "value": "Remove arrival background color helper\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport moment from 'moment';\nimport stringToHue from 'bus-detective/utils/string-to-hue';\nvar inject = Ember.inject;\n\nexport default Ember.Component.extend({\n ...
javascript
chosen
[ { "from": "system", "value": "Copy logged bodies before they change.\n" }, { "from": "human", "value": "function Recorder (events, id, type) {\n this._events = events\n this._id = id\n this._type = type\n}\n\nRecorder.prototype.record = function (body) {\n if (body != null) {\n ...
javascript
chosen
[ { "from": "system", "value": "Delete to the root now deletes all todos on db.\n" }, { "from": "human", "value": "var express = require('express');\nvar cors = require('cors');\nvar bodyParser = require('body-parser');\nvar Pool = require('pg').Pool;\nvar pool = new Pool({\n database: 'todo',\n ...
javascript
chosen
[ { "from": "system", "value": "Fix modal does not close bug\n" }, { "from": "human", "value": "var shipment = $(\"#shipment-templ\").html();\nvar template = Handlebars.compile(shipment);\n\n//Sample - To be replaced by GET db content\n// {\n// author: \"zachlatta\",\n// na...
javascript
chosen
[ { "from": "system", "value": "Add default options for import functionality\n" }, { "from": "human", "value": "const path = require('path');\n\nconst logger = require('./logger');\n\nconst addMetadata = (res, filepath) => {\n\tif (res.constructor === Array) {\n\t\treturn res.map(item => {\n\t\t\t...
javascript
chosen
[ { "from": "system", "value": "Remove compatibility layer with navigator.mozL10n\n" }, { "from": "human", "value": "'use strict';\n\nimport { fetch } from './io';\nimport { Service } from '../../bindings/html/service';\nimport { setAttributes, getAttributes } from '../../bindings/html/dom';\n\nco...
javascript
chosen
[ { "from": "system", "value": "Add debug flag to nodemon to allow debugging via node-inspect et. al.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // Load tasks\n grunt.loadNpmTasks('grunt-nodemon');\n grunt.loadNpmTasks('grunt-contrib-less');\n grunt.loadN...
javascript
chosen
[ { "from": "system", "value": "Add additional test for lPartial\n" }, { "from": "human", "value": "(function() {\n module(\"R.lPartial\");\n\n var lPartial = require('eigensheep/l_partial')['default'];\n var multiply = function(a, b) { return a * b; };\n\n test(\"creates a partially-applied v...
javascript
chosen
[ { "from": "system", "value": "Fix issue where schema was not deep-copied\n" }, { "from": "human", "value": "// __Dependencies__\nvar extend = require('util')._extend;\n\n// __Private Members__\nvar schema = {\n \"request\":\n { \"instance\": { \"head\": [], \"get\": [], \"post\": [], \"put\": ...
javascript
chosen
[ { "from": "system", "value": "Remove useless return from evaluateDefer.\n" }, { "from": "human", "value": "\"use strict\";\n\nexports.evaluateDefer = evaluateDefer;\n\nvar evaluate = require(\"./evaluate\");\n\nfunction evaluateDefer(params) {\n if (typeof Promise !== \"function\") {\n ...
javascript
chosen
[ { "from": "system", "value": "Upgrade missing element log to error" }, { "from": "human", "value": "(function() {\n var element = null;\n var nav_elements = document.querySelectorAll('.nav-item-container');\n\n for (var i = 0; i < nav_elements.length; i++) {\n var current = nav_e...
javascript
chosen
[ { "from": "system", "value": "Add export of new validation method\n" }, { "from": "human", "value": "export {\n formatDate,\n formatDateAndTime,\n parsePositiveInteger,\n truncateString,\n parsePositiveFloat,\n formatExpiryDate,\n parseExpiryDate,\n formatPlural,\n} from 'sussol-utilitie...
javascript
chosen
[ { "from": "system", "value": "Add clear, week start and format." }, { "from": "human", "value": "/**\n * Spanish translation for bootstrap-datepicker\n * Bruno Bonamin <bruno.bonamin@gmail.com>\n */\n;(function($){\n\t$.fn.datepicker.dates['es'] = {\n\t\tdays: [\"Domingo\", \"Lunes\", \"Martes\"...
javascript
chosen
[ { "from": "system", "value": "Rename gem -> gems. Change type for gems\n" }, { "from": "human", "value": "\"use strict\";\n(function() {\n var app = angular.module(\"gemStore\", []);\n\n app.controller(\"StoreController\", function () {\n this.product = gem;\n });\n\n var gem = {\n nam...
javascript
chosen
[ { "from": "system", "value": "Add tabindex attribute to searchbar\n\nSummary:\nExplain the **motivation** for making this change. What existing problem does the pull request solve?\n\nThis is small improvement to docs webpage.\nI'm tired of clicking on searchbar with mouse/touchpad, so I've added a `tabinde...
javascript
chosen
[ { "from": "system", "value": "Add about and terms routes\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function (req, res, next) {\n res.render('index', { title: 'Mosaic Ninja' });\n});\n\nmodule.exp...
javascript
chosen
[ { "from": "system", "value": "Change default port from 5000 to 5111\n\nPort 5000 is reserved by macos\n" }, { "from": "human", "value": "#!/usr/bin/env node\nrequire('ts-node').register()\n\n/* eslint-disable no-console */\nconst server = require('./testServer')\nconst port = process.env.PORT ||...
javascript
chosen
[ { "from": "system", "value": "Split up Flexbox guide into two parts to avoid running out of WebGL contexts in Chrome (max of 8 per page).\n" }, { "from": "human", "value": "/* Copyright 2015-2016 Teeming Society. Licensed under the Apache License, Version 2.0 (the \"License\"); DreemGL is a coll...
javascript
chosen
[ { "from": "system", "value": "Switch back to non-orchestra (i.e. standard-) chords\n" }, { "from": "human", "value": "import Backbone from 'backbone';\n\nimport Instrument from './instruments/bandoneon-aa142-orch';\n\nexport default Backbone.Model.extend({\n defaults: {\n variant: 'rig...
javascript
chosen
[ { "from": "system", "value": "Fix tests to match ember-test-helpers 0.3.0.\n" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\nimport { setResolverRegistry } from 'tests/test-support/resolver';\n\nfunction setupRegistry() {\n setResolverRegistry({\n 'component:...
javascript
chosen
[ { "from": "system", "value": "Install latests version by default\n" }, { "from": "human", "value": "'use strict';\n\nvar Package = require('../lib/package').Package;\n\nmodule.exports = function execute(args) {\n\n var running = true;\n\n function callback(deps) {\n var dep_names = Object.k...
javascript
chosen
[ { "from": "system", "value": "Use get for UI and post for data\n" }, { "from": "human", "value": "'use strict';\n\nconst {\n graphqlExpress,\n graphiqlExpress\n} = require('graphql-server-express');\n\nconst bodyParser = require('body-parser');\n\nconst querySchema = require('../graph');\n...
javascript
chosen
[ { "from": "system", "value": "Add another url to accumulator test\n" }, { "from": "human", "value": "'use strict';\n\nvar accumulator = require('../lib/accumulator.js'),\n nock = require('nock');\n\ndescribe('accumulator', function() {\n afterEach(function() {\n nock.cleanAll();\n ...
javascript
chosen
[ { "from": "system", "value": "Remove commonjs in top level\n" }, { "from": "human", "value": "import commonjs from '@rollup/plugin-commonjs';\nimport glslify from 'rollup-plugin-glslify';\nimport resolve from '@rollup/plugin-node-resolve';\nimport copy from \"rollup-plugin-copy\";\n\n\nexport de...
javascript
chosen
[ { "from": "system", "value": "Make use of module field for ES module support. Babel for some previous browser versions.\n" }, { "from": "human", "value": "import babel from 'rollup-plugin-babel';\nimport uglify from 'rollup-plugin-uglify';\n\nexport default {\n entry: 'lindenmayer.js',\n forma...
javascript
chosen
[ { "from": "system", "value": "Fix the github xhr interface\n" }, { "from": "human", "value": "const github = require('./lib/github')\nconst view = require('./lib/view')\n\nvar feeds\n\nrequire('./lib/feeds')\n .then(res => feeds = res)\n\nmodule.exports = {\n '/api/github/xhr/{command}': (requ...
javascript
chosen
[ { "from": "system", "value": "Remove oauth from api routing for testing\n" }, { "from": "human", "value": "var express = require('express');\nvar bodyParser = require('body-parser');\nvar session = require('express-session');\nvar passport = require('passport');\nvar sockets = require('./routes/...
javascript
chosen
[ { "from": "system", "value": "Load all sources, instead of specifying each by name\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n\t'bitproxies': require('./bitproxies'),\n\t'blackhatworld': require('./blackhatworld'),\n\t'coolproxy': require('./coolproxy'),\n\t'freeprox...
javascript
chosen
[ { "from": "system", "value": "Fix eslint errors - 5\n" }, { "from": "human", "value": "/**\n * Parse task and return task info if\n * the task is valid, otherwise throw\n * error.\n * @param {string} query Enetered task\n * @return {object} Task info containing\n * ...
javascript
chosen
[ { "from": "system", "value": "Make the doc gen script a bit more robust\n" }, { "from": "human", "value": "var aglio = require('aglio')\nvar winston = require('winston')\n\nvar options = {\n themeVariables: 'flatly'\n}\n\naglio.renderFile('src/index.apib', 'docs.html', options, function (err, w...
javascript
chosen
[ { "from": "system", "value": "Allow console.log in eslint config\n\nno-console-log is a rule designed for client-side Javascript. This repo\nuses server-side Javascript (aka Node). This repo wants to use\nconsole.log.\n" }, { "from": "human", "value": "module.exports = {\n env: { node: true },\...
javascript
chosen
[ { "from": "system", "value": "Add new UIs to module list\n" }, { "from": "human", "value": "var UI = UI || {};\nUI.Modules = {\n \"character\": { core: true },\n \"chat\": { core: true },\n \"errormessages\": { core: true },\n \"kills\": { core: true },\n \"login\": { core: true ...
javascript
chosen
[ { "from": "system", "value": "Remove dependency of app in generated stubs\n\nngMockE2E is currently the only Angular module which is needed for ABE generated stubs\n" }, { "from": "human", "value": "exports.generateDefaultStub = function (data) {\n angular\n .module(data['stub-options'...
javascript
chosen
[ { "from": "system", "value": "Fix example from previous commit :|\n" }, { "from": "human", "value": "/* eslint-disable import/no-extraneous-dependencies,import/no-unresolved */\n\nimport React, { Fragment, useState } from 'react';\nimport { Form } from 'react-bootstrap';\nimport { Typeahead } fr...
javascript
chosen
[ { "from": "system", "value": "Use the real source's IP even when behind proxy\n\nnginx sets X-Real-IP to the user's real IP.\n" }, { "from": "human", "value": "'use strict';\n\nvar ua = require('universal-analytics');\nvar url = require('url');\nvar extend = require('extend');\nvar config = requ...
javascript
chosen
[ { "from": "system", "value": "Use string interpolation in toString function" }, { "from": "human", "value": "class Character {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this.health_ = 100;\n }\n damage() {\n this.health_ -= 10;\n }\n getHealth() {\n return this.heal...
javascript
chosen
[ { "from": "system", "value": "Use page:load event again since this wasn't working\n" }, { "from": "human", "value": "var conversations = {\n onRespondLaterClick: function() {\n var $listItem = $(this).parents('.conversation-row').parent();\n var path = $(this).attr('data-account-conversat...
javascript
chosen
[ { "from": "system", "value": "Fix most umd export name\n\nSee https://unpkg.com/most@1.4.0/dist/most.js\n" }, { "from": "human", "value": "/* eslint-disable import/no-commonjs */\n\nconst webpack = require('webpack')\n\nconst baseConfig = {\n entry: './src/index.js',\n module: {\n rules: [\...
javascript
chosen
[ { "from": "system", "value": "Add chalk to file to copie" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n var config = {\n copy: {\n src: {\n files: [{\n expand: true,\n src: [\n 'node_modules/socket.io/**/*',\n 'node...
javascript
chosen
[ { "from": "system", "value": "Add all html file to run on continous integration\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n qunit: {\n files: ['test/index.html']\n }\n });\n\n grunt.loadNpmTasks('grunt-contrib-qunit');\n \n // A co...
javascript
chosen
[ { "from": "system", "value": "Grunt: Update sockjs-client path for 1.X\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n grunt.initConfig({\n uglify: {\n main: {\n options: {\n preserveComments: 'some'\n },\n files: {\n 'dist...
javascript
chosen
[ { "from": "system", "value": "Use localhost because Win Edge block loopback access\n" }, { "from": "human", "value": "/*!\n * Bootstrap's Gruntfile\n * https://getbootstrap.com\n * Copyright 2013-2017 The Bootstrap Authors\n * Copyright 2013-2017 Twitter, Inc.\n * Licensed under MIT (https://git...
javascript
chosen
[ { "from": "system", "value": "Use pkg.version instead of build date\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n copy: {\n main: {\n src: 'src/index.js',\n dest: 'dist/<%= pkg....
javascript
chosen
[ { "from": "system", "value": "Remove a not-too-useful comment hating on Django Pipelines\n" }, { "from": "human", "value": "require('js-yaml');\nvar path = require('path');\n\nmodule.exports = function (grunt) {\n grunt.loadNpmTasks('grunt-contrib-jst');\n grunt.loadNpmTasks('grunt-mocha-test'...
javascript
chosen
[ { "from": "system", "value": "Make sure that version / license header is preserved\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\tvar pkg = grunt.file.readJSON(\"package.json\");\n\n\tgrunt.initConfig({\n\t\tuglify : {\n\t\t\toptions : {\n\t\t\t\tbanner : '//! Tokchi ' ...
javascript
chosen
[ { "from": "system", "value": "Switch to ReactiveArray instead of Session and navigate to projects home page after successfull login\n" }, { "from": "human", "value": "Template.register.helpers({\n errorList: function() {\n return Session.get('errors');\n },\n\n formValid: function(user) {\...
javascript
chosen
[ { "from": "system", "value": "Add in progress game to helper data\n" }, { "from": "human", "value": "/* global Games */\nangular\n .module('PLeague')\n .controller('GamesCtrl', GamesCtrl);\n \nfunction GamesCtrl ($scope, $reactive, NewGame, NewTeam) {\n $reactive(this).attach($scope);\n cons...
javascript
chosen
[ { "from": "system", "value": "Add test names for parametrized tests\n" }, { "from": "human", "value": "import React from 'react';\nimport { shallow } from 'enzyme';\nimport { expect } from 'chai';\nimport R from 'ramda';\nimport { Link } from 'react-router';\nimport EntityListItem from '../../.....
javascript
chosen
[ { "from": "system", "value": "Add nodeunit to Grunt file\n" }, { "from": "human", "value": "\"use strict\";\nmodule.exports = function (grunt) {\n\t// Start w/ a clean slate\n\tgrunt.initConfig({});\n\n\t// JSHint\n\tgrunt.loadNpmTasks(\"grunt-contrib-jshint\");\n\tgrunt.config(\"jshint\", {\n\t...
javascript
chosen
[ { "from": "system", "value": "Add delete and create methods\n" }, { "from": "human", "value": "import pify from 'pify'\nimport gradient from '@sanity/gradient-client'\n\nclass SanityClient {\n constructor(config = {}) {\n const client = gradient(config)\n\n this.gradient = pify({\n f...
javascript
chosen
[ { "from": "system", "value": "Update for new Global location\n" }, { "from": "human", "value": "import React from 'react';\n\nimport Style from '../config/GlobalStyle';\nimport { Layout, EventList, Header, Footer } from '../components';\nimport { fixtureApi } from '../services';\n\nexport defaul...
javascript
chosen
[ { "from": "system", "value": "Fix background for chrome dark mode\n" }, { "from": "human", "value": "// TODO: This should be replaced with a styled-components theme\n\nimport { createGlobalStyle } from 'styled-components'\nimport Cookies from 'cookies-js'\n\nexport const toggle = mode => {\n co...
javascript
chosen
[ { "from": "system", "value": "Allow ENV \"PORT\" to override listen port\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\n\n// Load base config\nconst baseConfig = require('./webpack.config.base');\n\n// Create the config\nconst config = Obje...
javascript
chosen
[ { "from": "system", "value": "Remove space from blank line for unit-tests\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %>\nimport hbs from 'htmlbars-inline-precompile';<% } %>\n\nmoduleForComponent('<%= componentPa...
javascript
chosen
[ { "from": "system", "value": "Increase timeout for weather net fetch.\n" }, { "from": "human", "value": "var nodeHelper = require('node_helper'),\n request = require('request'),\n console = require('console'),\n TemplateHandler = require('../shared/template_handler.js');\n\nmodule.expor...
javascript
chosen
[ { "from": "system", "value": "Add faster ticker fetch retry with limited attempts\n" }, { "from": "human", "value": "import req from '../req.js';\nimport Event from '../Event';\n\nconst RETRY_INTERVAL = 1000; // ms\n\nexport default function Ticker() {\n this.event = new Event();\n\n this.read...
javascript
chosen
[ { "from": "system", "value": "Update cards to match june update. Change last update date\n" }, { "from": "human", "value": "const Router = require('express').Router;\nconst router = new Router();\n\nrouter.get('/', (req, res) => {\n res.json({\n message: 'Welcome to Clash Royale API!',\n ...
javascript
chosen
[ { "from": "system", "value": "Fix invalid mock nav data\n\nThe path to home should be \"/\" but ended up\njust being \"\"\n" }, { "from": "human", "value": "import express from 'express';\nimport cors from 'cors';\n\nexport const router = express.Router();\n\nconst {APP_WEB_BASE_PATH} = process....
javascript
chosen
[ { "from": "system", "value": "Use 0.18-style schema spec access\n" }, { "from": "human", "value": "const {Schema, DOMParser} = require(\"prosemirror-model\")\nconst {EditorView} = require(\"prosemirror-view\")\nconst {EditorState} = require(\"prosemirror-state\")\nconst {schema} = require(\"pros...
javascript
chosen
[ { "from": "system", "value": "Add jquery functions for interaction\n" }, { "from": "human", "value": "/**\n * Created by cos-caner on 2/19/16.\n */\n" }, { "from": "gpt", "value": "/**\n * Code for interaction in the support page\n */\n\n'use strict';\n\nvar Raven = require('raven-js...
javascript
chosen
[ { "from": "system", "value": "Fix global name of vtk module\n\nIt is exposed as \"vtk\", not \"vtkjs\".\n" }, { "from": "human", "value": "// The lean build does not include any of the third-party runtime dependencies, rather\n// it assumes they are in the global namespace at runtime.\nvar confi...
javascript
chosen
[ { "from": "system", "value": "Add uglify to prod build.\n" }, { "from": "human", "value": "var webpack = require('webpack');\n\nmodule.exports = {\n entry: [\n './src/index'\n ],\n module: {\n loaders: [{\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n loader: 'babel'\n ...
javascript
chosen
[ { "from": "system", "value": "Fix missing export of reducer visibilityFilter" }, { "from": "human", "value": "import { VisibilityFilters, SET_VISIBILITY_FILTER } from '../actions';\nconst {SHOW_ALL} = VisibilityFilters;\n\n// reducer in charge of dealing with the visibility filter.\nfunction vis...
javascript
chosen
[ { "from": "system", "value": "Improve logic in showing userRoom\n" }, { "from": "human", "value": "const db = require('../db.js');\nconst Rooms = require('../models/roomModel.js');\nconst UsersRooms = require('../models/userRoomModel.js');\n\n\nmodule.exports = (user1Id, user2Id) => {\n const q...
javascript
chosen
[ { "from": "system", "value": "Disable NPM publish, do it manually to cope with failures.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n grunt.loadNpmTasks('grunt-contrib-jshint');\n grunt.loadNpmTasks('grunt-contrib-watch');\n grunt.loadNpmTasks('grunt-mocha-cl...
javascript
chosen