conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Sort posts by submitted timestamp.\n" }, { "from": "human", "value": "Template.postsList.helpers({\n\tposts: function () {\n\t\treturn Posts.find();\n\t}\n});" }, { "from": "gpt", "value": "Template.postsList.helpers({\n\tposts: function () {\n\t\treturn...
javascript
chosen
[ { "from": "system", "value": "Add hindi to list of supported languages\n" }, { "from": "human", "value": "import { addLocaleData } from 'react-intl'\n\nimport en from 'react-intl/locale-data/en'\nimport es from 'react-intl/locale-data/es'\nimport fr from 'react-intl/locale-data/fr'\nimport it fr...
javascript
chosen
[ { "from": "system", "value": "Comment out initial tasks within store state object\n" }, { "from": "human", "value": "'use strict';\n\nimport uuid from '../utils/uuid.js';\n\nexport default {\n state: {\n tasks: [\n { id: uuid(), description: 'Task 1', completed: false },\n { id: uu...
javascript
chosen
[ { "from": "system", "value": "Clear require cache for config reloads.\n\nWrapping in a `Function` worked for simple `config/environment.js`\ncontents but breaks down in other scenarios that relied on the file\nbeing evaluated in \"nodeland\". The prior implementation prevented\ncustom `require`'s (to get t...
javascript
chosen
[ { "from": "system", "value": "Fix issue with raw selectors\n" }, { "from": "human", "value": "\nexport default function rawSelectors() {\n function addRuleHook(rule) {\n if (rule.type === 'style' && isRawSelector(rule.name)) {\n rule.name = rule.name.replace(/^@raw\\s?/, '');\n rul...
javascript
chosen
[ { "from": "system", "value": "Use Array.from instead of toArray\n\n`toArray` seems to return weird/wrong results in PhantomJS, although why\nit just started doing that in this branch is unclear. Anyway, the\nbuilt-in `Array.from` appears to work just fine.\n" }, { "from": "human", "value": "impo...
javascript
chosen
[ { "from": "system", "value": "Test that getSupportedLanguages returns a different array each time\n" }, { "from": "human", "value": "var getSupportedLanguages = require('..').getSupportedLanguages\nvar assert = require('assert')\nvar fs = require('fs')\nvar path = require('path')\n\ndescribe('ge...
javascript
chosen
[ { "from": "system", "value": "Augment number of retrieved actions to the max\n" }, { "from": "human", "value": "import R from 'ramda';\nimport {Observable} from 'rx';\n\nconst trelloSinkDriver = R.curry( ( boardId, input$ ) => {\n return {\n actions$: Observable.create( ( observer ) => {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove insert next klub when no records found\n" }, { "from": "human", "value": "Meteor.startup( () => {\n (! NextKlub.find().count())\n && NextKlub.insert();\n\n Meteor.publish(\"next_klub\", () => NextKlub.find());\n});\n" }, { "from": "gpt", "val...
javascript
chosen
[ { "from": "system", "value": "Add link to user contribution page\n" }, { "from": "human", "value": "import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport Paper from '@material-ui/core/Paper';\nimport MenuList from '@material-ui/core/MenuList';\nimport MenuItem from '...
javascript
chosen
[ { "from": "system", "value": "Copy static files when building\n" }, { "from": "human", "value": "/* eslint-disable import/no-commonjs */\n\nconst fs = require('fs');\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\n\nconst babelRc = JSON.parse(fs.readFileSync('./.babelrc.nod...
javascript
chosen
[ { "from": "system", "value": "Add basic AJAX error handling\n" }, { "from": "human", "value": "var timeout = 4000;\nfunction getProgress(uid) {\n\t$.ajaxSetup({cache:false});\n\t$.ajax({\n\t\tdataType: \"json\",\n\t\turl:\"/get-chat-line/\"+uid,\n\t\tsuccess: function (msg, data) {\n\t\t\t$(\"#l...
javascript
chosen
[ { "from": "system", "value": "Refactor calculating date string into nice method\n" }, { "from": "human", "value": "(function(){\n 'use strict';\n\n angular.module('events')\n .service('eventService', ['$q', '$http', '$filter', 'ApiUrl', EventService]);\n\n /**\n * Events DataService...
javascript
chosen
[ { "from": "system", "value": "Remove useless assertion in quotes test.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar vows = require(\"vows\"),\n assert = require(\"assert\"),\n quotes = require(\"../lib/quotes\");\n\nvows.describe(\"Quotes tests\").addBatch({\n \"get quotes ...
javascript
chosen
[ { "from": "system", "value": "Fix mood search form submition from 'accueil' to 'home'.\n" }, { "from": "human", "value": "function post(path, params, method) {\n method = method || \"post\"; // Set method to post by default if not specified.\n\n // The rest of this code assumes you are not...
javascript
chosen
[ { "from": "system", "value": "Add dropbox script when viewing content\n" }, { "from": "human", "value": "var url_path = window.location.pathname;\n\nconsole.log(\"Is viewing content: \" + isViewingContent(url_path));\nconsole.log(\"File name: \" + getFileName());\nconsole.log(\"Is a PDF: \" + is...
javascript
chosen
[ { "from": "system", "value": "Add comment re: cause of submit binding failure (nested forms)\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n\n tagName: 'form',\n classNames: [ 'uni-form' ],\n classNameBindings: [ 'invalid' ],\n\n inv...
javascript
chosen
[ { "from": "system", "value": "Remove API model for pages\n" }, { "from": "human", "value": "var mongoose = require( 'mongoose' ),\n Schema = mongoose.Schema;\n\nvar schemas = {\n\n user: {\n _id: String,\n password: String,\n },\n\n page: {\n _id: Number,\n title: String,\n ...
javascript
chosen
[ { "from": "system", "value": "Add get all jobs route\n" }, { "from": "human", "value": "import Job from './handlers/job'\nimport Ping from './handlers/ping'\n\nexport default [\n { method: 'GET', path: '/ping', config: { auth: false, handler: Ping } },\n\n { method: 'POST', path: '/jobs', conf...
javascript
chosen
[ { "from": "system", "value": "Fix and ungodly number of linter errors\n" }, { "from": "human", "value": "var express = require('express');\nvar mongoose = require('mongoose');\n\nvar app = express();\n\n// connect to mongo database named \"bolt\"\n// uncomment this line to use a local database\n...
javascript
chosen
[ { "from": "system", "value": "Remove unnessary comments and add author.\n" }, { "from": "human", "value": "/**\n* Use immediately Invoked Function Expression to\n* - Prevent conflicting with other libary on alias $\n* - Scode varaible to be private\n*/\n(function( $ ) {\n $.fn.expandable = func...
javascript
chosen
[ { "from": "system", "value": "Check if env is local to switch http/https\n" }, { "from": "human", "value": "const express = require('express');\nconst exphbs = require('express-handlebars');\nconst bodyParser = require('body-parser');\nconst enforce = require('express-sslify');\nconst controller...
javascript
chosen
[ { "from": "system", "value": "Fix BrowserSync to cooperate with Tracy debug bar\n" }, { "from": "human", "value": "module.exports = function(gulp, config) {\n\n\treturn function(done) {\n\t\tvar c = require('better-console')\n\t\tc.info('watch reload')\n\n\t\tvar browsersync = require('browser-s...
javascript
chosen
[ { "from": "system", "value": "Revert \"Adding this.update to this.init\"\n\nThis reverts commit e58639ce60c11a602b716acb7dc2fe03f3c4ebc6.\n\nConflicts:\n\tjs/jquery-example.js\n" }, { "from": "human", "value": "(function ($) {\r\n\t$.fn.examplePlugin = function (options) {\r\n\t\treturn this.eac...
javascript
chosen
[ { "from": "system", "value": "Update the config for the prompts for inquirer.\n" }, { "from": "human", "value": "/*\n * <%= appNameSlug %>\n * https://github.com/<%= userName %>/<%= appNameSlug %>\n *\n * Copyright (c) <%= year %>, <%= authorName %>\n * Licensed under the <%= license %> license....
javascript
chosen
[ { "from": "system", "value": "Use VueMoment as Vue plugin\n" }, { "from": "human", "value": "import Vue from \"vue\";\nimport VueRouter from \"vue-router\";\n\nimport {createProvider} from './apollo';\nimport {store} from \"./store\";\n\nimport App from \"./app.vue\";\nimport Login from \"./logi...
javascript
chosen
[ { "from": "system", "value": "Add IRC and job execution\n" }, { "from": "human", "value": "var express = require('express');\nvar fs = require('fs');\nvar app = express();\n\napp.use(express.static(__dirname + '/www'));\napp.use('/runs',express.static(__dirname + '/runs'));\n\napp.get('/run_list...
javascript
chosen
[ { "from": "system", "value": "Create a new XHRFormSubmitter and use submit method\n" }, { "from": "human", "value": "window.onload = function () {\n var formEl = document.getElementById(\"myForm\")\n , checkboxEl = document.getElementsByName(\"xhr\")[0]\n , nameEl = document.getElem...
javascript
chosen
[ { "from": "system", "value": "UPDATE autocomplete - set search string\n" }, { "from": "human", "value": "var ResourceService = require(\"services/ResourceService\");\nvar ItemListService = require(\"services/ItemListService\");\n\nVue.component(\"item-search\", {\n\n template: \"#vue-item-sea...
javascript
chosen
[ { "from": "system", "value": "Fix line endings in bin for linux\n" }, { "from": "human", "value": "#!/usr/bin/env node\r\n\r\nvar argv = require('optimist').argv;\r\n\r\nvar debug = argv.debug;\r\ndelete argv.debug;\r\nvar outputFormat = argv.output;\r\ndelete argv.output;\r\n\r\nvar options = {...
javascript
chosen
[ { "from": "system", "value": "Fix flow error on reducer\n" }, { "from": "human", "value": "// @flow\nimport {GameStage} from '../../game-stage'\nimport {computeScores} from './compute-scores'\nimport {toEndedState} from './converter'\nimport {bidWinGenerator} from './bid-win-generator'\nimport {...
javascript
chosen
[ { "from": "system", "value": "Switch Login to use formsyFIeld\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { browserHistory } from 'react-router';\nimport { Form, Button } from 'semantic-ui-react';\nimport...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in dbjs\n" }, { "from": "human", "value": "'use strict';\n\nvar Db = require('dbjs')\n\n , BooleanType = module.exports = Db.Boolean;\n\nBooleanType.set('DOMBox', Db.external(function () {\n\tvar Parent, Box, proto;\n\tParent = this.Base.DOMBox...
javascript
chosen
[ { "from": "system", "value": "Drop support for IE10 when transpiling javascript using babel\n" }, { "from": "human", "value": "// note that every package mentioned here has to be explicitly required (require/import, not a string name)\n// if not, this fails if babel runs in a plugin repo before ...
javascript
chosen
[ { "from": "system", "value": "Allow pieces to take one another\n" }, { "from": "human", "value": "import React from \"react\";\nimport classNames from \"classnames\";\n\nimport { movePiece, selectPiece } from \"store/actions\";\n\nclass ChessBoardSquare extends React.Component {\n constructor(p...
javascript
chosen
[ { "from": "system", "value": "Fix sorting of cohorts in list\n\nWe were incorrectly passing an array where two parameters was correct.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport DS from 'ember-data';\n\nconst { Component, computed, RSVP } = Ember;\nconst { PromiseArray...
javascript
chosen
[ { "from": "system", "value": "Rename result parameter to output in CLI\n" }, { "from": "human", "value": "'use(strict)'\n\nimport {read, write} from '.'\nimport * as argsParser from './util/args'\n\nexport default function () {\n var args = process.argv.slice(2)\n\n let opts = argsParser\n ...
javascript
chosen
[ { "from": "system", "value": "Add log line for susbcription stats email recipients\n" }, { "from": "human", "value": "const logger = require('logger');\nconst mailService = require('services/mailService');\n\nconst DEFAULT_TEMPLATE = 'forest-change-notification';\nconst TEMPLATE_MAP = {\n 'vi...
javascript
chosen
[ { "from": "system", "value": "Update expecyed output file list\n\nThe new mkdocs version seems to produce less files in the output root directory.\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\n\nexports.mkdocs = {\n\n basic: function (test) {\n test.expect(1);\...
javascript
chosen
[ { "from": "system", "value": "Use explicit dependency on 'check' lib\n" }, { "from": "human", "value": "var both = ['client', 'server'];\n\nPackage.describe({\n name: 'lookback:emoji',\n summary: 'Easily render and manage emojis in Meteor.',\n version: '0.2.0',\n git: 'https://github.com/loo...
javascript
chosen
[ { "from": "system", "value": "Fix wrongly used fork effect\n" }, { "from": "human", "value": "// @flow\nimport type { Beacon, Room } from '../../apiTypes';\nimport {\n fetchRooms,\n fetchRoomsStarted,\n fetchRoomsSuccess,\n fetchRoomsError,\n fetchBeacons,\n fetchBeaconsStarted,\n fetchBe...
javascript
chosen
[ { "from": "system", "value": "Add basic AI functionality to follow the ball\n" }, { "from": "human", "value": "import Player from 'props/player';\nimport Ball from 'props/ball';\nimport Net from 'props/net';\nimport canvas from 'canvas';\nimport mouse from 'lib/mouse';\nimport events from 'lib/e...
javascript
chosen
[ { "from": "system", "value": "Enable HMR for storybook redux store\n" }, { "from": "human", "value": "import { configure, addDecorator } from '@storybook/react';\nimport { createStore } from 'redux';\nimport { Provider } from 'react-redux';\nimport * as React from 'react';\nimport handleAction f...
javascript
chosen
[ { "from": "system", "value": "Replace newline characters with break tags in output\n" }, { "from": "human", "value": "/**\n * Copyright 2015 Cm_Star. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with...
javascript
chosen
[ { "from": "system", "value": "Remove actions that we are no longer using post-refactor\n" }, { "from": "human", "value": "const types = {\n USERNAME: 'USERNAME',\n GET_EVENTS: 'GET_EVENTS',\n GET_PUSH_EVENTS: 'GET_PUSH_EVENTS',\n GET_OPENED_PULL_REQUESTS: 'GET_OPENED_PULL_REQUESTS',\n GET_I...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect proptype in native pdf viewer\n" }, { "from": "human", "value": "'use strict';\n\nvar React = require('react'),\n\tGenericViewer = require('../../generic/viewer.js');\n\nvar NativeViewer = React.createClass({\n\tpropTypes: {\n\t\tresizeCallback: React....
javascript
chosen
[ { "from": "system", "value": "Add partial test for submit controller > next.\n" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('controller:submit', 'Unit | Controller | submit', {\n // Specify the other units that are required for this test.\n // ne...
javascript
chosen
[ { "from": "system", "value": "Fix broken test as the result of b8c15c2\n" }, { "from": "human", "value": "import m from 'mithril';\nimport AppComponent from '../../app/scripts/components/app.js';\nimport AIPlayer from '../../app/scripts/models/ai-player.js';\nimport { qs } from './utils.js';\n\n...
javascript
chosen
[ { "from": "system", "value": "Add detection for util.warn in every test spec\n" }, { "from": "human", "value": "var testsContext = require.context(\".\", true, /_spec$/);\ntestsContext.keys().forEach(testsContext);" }, { "from": "gpt", "value": "var util = require('src/util').default...
javascript
chosen
[ { "from": "system", "value": "Handle classes that don't have a constructor\n\nUseful for mixins\n" }, { "from": "human", "value": "// These are mostly a simplification of\n// augment.js (https://github.com/javascript/augment, MIT Licensed) and\n// Douglas Crockford's protoypical inheritance patt...
javascript
chosen
[ { "from": "system", "value": "Use NODE_URI instead of parsing uri from url\n\nFixes #191\n" }, { "from": "human", "value": "\nconst DEFAULT_VIEWS = Object.freeze({\n NEW: 'new',\n EDIT: 'edit',\n VIEW: 'view'\n})\n\nfunction getCurrentUri () {\n const params = new URLSearchParams(window.loca...
javascript
chosen
[ { "from": "system", "value": "Add comment to clarify object type passed into props\n" }, { "from": "human", "value": "import React from 'react'\nimport { Box, Grid, Typography } from '@material-ui/core'\n\nexport default function Flight({ data }) {\n return(\n <Grid item>\n ...
javascript
chosen
[ { "from": "system", "value": "Delete subject dialog is now an mdDialog\n" }, { "from": "human", "value": "angular.module(\"mirmindr\")\n.controller(\"subjectsCtrl\", function($rootScope, $scope){\n $scope.newSub = {};\n $scope.addSub = function(form) {\n if(form.$valid) {\n $scope.user...
javascript
chosen
[ { "from": "system", "value": "Update selector for removing li\n\nAlso remove console.log\n" }, { "from": "human", "value": "$('#title').addClass('redtitle');\n\nvar json = {\n \"room\":{\n \"name\":\"FangDev\",\n \"members\":\"Salgat:1452401384430,Fangfang2:1452401457085\",\n \"...
javascript
chosen
[ { "from": "system", "value": "Use karma's built-in chrome headless mode\n" }, { "from": "human", "value": "module.exports = (config) => {\n config.set({\n frameworks: ['mocha', 'karma-typescript'],\n browsers: ['chromeHeadless'],\n singleRun: true,\n concurrency: Infinity,\n repo...
javascript
chosen
[ { "from": "system", "value": "Disable Firefox tests on TravisCI\n" }, { "from": "human", "value": "'use strict'\n\nvar browsers = ['Chrome', 'Firefox', 'PhantomJS']\n\nif (process.env.TRAVIS) {\n browsers = ['Firefox', 'PhantomJS']\n}\n\nmodule.exports = function(karma) {\n karma.set({\n br...
javascript
chosen
[ { "from": "system", "value": "Add GUI support for Travis\n" }, { "from": "human", "value": "module.exports = function(config) {\n config.set({\n\n client: {\n captureConsole: false\n },\n\n plugins: [\n 'karma-chai',\n 'karma-sinon',\n ...
javascript
chosen
[ { "from": "system", "value": "Update coverage values to match existing\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', 'l...
javascript
chosen
[ { "from": "system", "value": "Change SocketIO client to use a dynamic host\n" }, { "from": "human", "value": "import io from 'socket.io-client';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { App } from './components/app';\nimp...
javascript
chosen
[ { "from": "system", "value": "Fix headers sent with fetch\n" }, { "from": "human", "value": "export function _fetch(url, method, data) {\n const options = {\n headers: {\n 'Accept': 'application/json',\n },\n mode: 'cors',\n method: method || 'GET',\n }\n\n if (url.includes('...
javascript
chosen
[ { "from": "system", "value": "Fix for ignoring passed in output directory and file extension\n" }, { "from": "human", "value": "var fs, path, mkdirp\n\nfunction toFileName(delimiter, name) {\n if (delimiter === \"\") {\n return name\n }\n\n return name\n .replace(/[a-z][A-Z]/g, function...
javascript
chosen
[ { "from": "system", "value": ":+1: Delete module caches only changed files\n" }, { "from": "human", "value": "require('@babel/polyfill')\nrequire('@babel/register')\n\nconst chokidar = require('chokidar')\nconst fs = require('fs')\nconst http = require('http')\n\nconst config = require('../confi...
javascript
chosen
[ { "from": "system", "value": "Add test for iframebuilder rebuild\n" }, { "from": "human", "value": "import iframeBuilder from 'src/helpers/iframeBuilder';\n\ndescribe('iframe Builder', () => {\n describe('getDocument', () => {\n it('should get the document of an iframe', () => {\n // In...
javascript
chosen
[ { "from": "system", "value": "Use correct analytics properties for live/other\n\nThis commit makes the app select different Google analytics properties to track\nagainst depending on which domain the user is browsing.\n\nThis will ensure continuity of analytics when we switch the DNS.\n" }, { "from"...
javascript
chosen
[ { "from": "system", "value": "Create feed content response method to update alerts collection\n" }, { "from": "human", "value": "Meteor.methods({\n updateCount: function(count) {\n AlertsCollection.insert({\n 'clicked' : count\n });\n }\n});" }, { "from": "gpt", "value":...
javascript
chosen
[ { "from": "system", "value": "[application] Add helper method to change mode and route on the application level.\n" }, { "from": "human", "value": "module.exports = {\n render: require('./render'),\n builtInStore: require('./built-in-store'),\n actionBuilder: require('./action-builder'),\n c...
javascript
chosen
[ { "from": "system", "value": "Fix bug: `arguments` can not be concerted as array\n" }, { "from": "human", "value": "module.exports = bindArgs\n\nfunction bindArgs (func) {\n var boundArgs = [].slice.call(arguments, 1)\n return function () {\n func.apply(this, boundArgs.concat(arguments))\n ...
javascript
chosen
[ { "from": "system", "value": "Sort posts by submission date\n" }, { "from": "human", "value": "Template.postsList.helpers({\n posts: function() {\n return Posts.find();\n }\n});\n" }, { "from": "gpt", "value": "Template.postsList.helpers({\n posts: function() {\n return Post...
javascript
chosen
[ { "from": "system", "value": "Enable test for `document.write` in eval'd scripts\n" }, { "from": "human", "value": "var tape = require(\"tape\")\n\nvar evalScript = require(\"../../lib/eval-script\")\n\ntape(\"test evalScript method\", function(t) {\n document.body.className = \"\"\n\n var scr...
javascript
chosen
[ { "from": "system", "value": "Add traversable and foldable to Id" }, { "from": "human", "value": "function Id(a) {\n this.value = a;\n}\n\n// Semigroup (value must also be a Semigroup)\nId.prototype.concat = function(b) {\n return new Id(this.value.concat(b.value));\n};\n\n// Monoid (value...
javascript
chosen
[ { "from": "system", "value": "Use on() instead of delegate().\n\ndelegate() is deprecated.\n" }, { "from": "human", "value": "Zepto(function($) {\n prettyPrint();\n\n var $frameContainer = $('.frames-container');\n var $container = $('.details-container');\n var $activeLine = $frame...
javascript
chosen
[ { "from": "system", "value": "Update view on each animation frame\n" }, { "from": "human", "value": ";(function(lander){\n console.log('Moon Lander Visualisation');\n\n var display = document.getElementById('display');\n var horizon = new Array(display.width);\n horizon[0] = 50;\n ...
javascript
chosen
[ { "from": "system", "value": "Update compiled JS with latest\n" }, { "from": "human", "value": "!function(t,e){function i(e){this.element=e,this.$element=t(e),this.init()}var n=\"textareaAutoSize\",h=\"plugin_\"+n,s=function(t){return t.replace(/\\s/g,\"\").length>0};i.prototype={init:function()...
javascript
chosen
[ { "from": "system", "value": "Handle error on blank hovertext\n" }, { "from": "human", "value": "CRM.$(function ($) {\n $('.fast-action-link').click(function () {\n\n link = $(this)[0];\n // Show a confirmation dialog if appropriate\n if ($(this).hasClass('fast-action-link-confirm')) {...
javascript
chosen
[ { "from": "system", "value": "Fix es6 error on node 5\n" }, { "from": "human", "value": "/* eslint func-names:0 */\n\nconst path = require('path');\nconst webpackConfig = require('../webpack');\n\nmodule.exports = function (config) {\n config.set({\n browsers: ['PhantomJS'],\n\n singleRun...
javascript
chosen
[ { "from": "system", "value": "Make our failing partial stats test pass\n" }, { "from": "human", "value": "var selftest = require('../selftest.js');\nvar Sandbox = selftest.Sandbox;\n\nselftest.define(\"report-stats\", function () {\n var s = new Sandbox;\n\n run = s.run(\"create\", \"foo\");\n...
javascript
chosen
[ { "from": "system", "value": "Add the eslint-pragma for AMD to be more in context\n" }, { "from": "human", "value": "/* eslint-env amd */\n(function (name, definition) {\n if (typeof define === 'function') {\n // AMD\n define(definition)\n } else if (typeof module !== 'undefined' && modu...
javascript
chosen
[ { "from": "system", "value": "Add .abi.json and .json to whitelist for profiler\n" }, { "from": "human", "value": "const path = require(\"path\");\n\nfunction shouldIncludePath(filePath) {\n return path.extname(filePath) === \".sol\";\n}\n\nmodule.exports = { shouldIncludePath };\n" }, { ...
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": "Use node binary defined by user environment" }, { "from": "human", "value": "#!/usr/bin/node\n\"use strict\";\nvar child_process = require(\"child_process\");\nprocess.chdir(__dirname + \"/src\")\nchild_process.execFile(\"find\", [\"-type\", \"f\"], function(err, st...
javascript
chosen
[ { "from": "system", "value": "Add todo about field groups\n" }, { "from": "human", "value": "/* global $ */\nimport Ember from 'ember';\nimport { translationMacro as t } from 'ember-i18n';\n\nexport default Ember.Controller.extend({\n i18n: Ember.inject.service(),\n \n actions: {\n ...
javascript
chosen
[ { "from": "system", "value": "Set test files with \"*-test.js\" pattern." }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = function (grunt) {\n grunt.initConfig({\n eslint: {\n options: {\n config: \".eslintrc\"\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Add PATCH guilds/:guildID/feeds/:feedID route\nAlso fix feedID validation order\n" }, { "from": "human", "value": "const express = require('express')\nconst guildFeedsAPI = express.Router({ mergeParams: true })\nconst validate = require('../../../../middleware/valid...
javascript
chosen
[ { "from": "system", "value": "Fix 'calling set on destroyed object' error\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/freestyle-collection';\n\nconst { computed, inject } = Ember;\n\nexport default Ember.Component.extend({\n layout,...
javascript
chosen
[ { "from": "system", "value": "Use partially module of lodash instead of full package\n" }, { "from": "human", "value": "import $ from 'jquery';\nimport _ from 'lodash/fp';\nimport { match } from 'wildstring';\nimport beautify from './common/beautify';\n\nfunction isMatched(needle, haystack) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix typo on test name\n" }, { "from": "human", "value": "const selectors = require('../../../../selectors')\n\ndescribe('ompany Collections', () => {\n before(() => {\n cy.visit(`/companies`)\n })\n\n it('should return the results summary for a company collect...
javascript
chosen
[ { "from": "system", "value": "Add filter to the route\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n\nexport default Ember.Route.extend(AuthenticatedRouteMixin, {\n currentUser: Ember.inj...
javascript
chosen
[ { "from": "system", "value": "Add back change from Sarvesh\n" }, { "from": "human", "value": "$( document ).ready(function() {\n var url = $.url();\n var query = url.param(\"q\");\n \n if (typeof query != 'undefined')\n {\n $(\"#left\").attr(\"src\", \"https://www.bing....
javascript
chosen
[ { "from": "system", "value": "Fix a mistake, this should use the specified tweet time" }, { "from": "human", "value": "const TwitterPostBase = require('./TwitterPostBase');\nconst { captureGearScreenshot } = require('@/app/screenshots');\nconst { readData, getTopOfCurrentHour } = require('@/comm...
javascript
chosen
[ { "from": "system", "value": "Send index.html on all requests\n" }, { "from": "human", "value": "const path = require('path')\nconst webpack = require('webpack')\nconst WebpackDevServer = require('webpack-dev-server')\nconst proxy = require('proxy-middleware')\nconst url = require('url')\nconst ...
javascript
chosen
[ { "from": "system", "value": "Use http instead of express wrapper to listen\n" }, { "from": "human", "value": "'use strict';\n\nif (process.env.NEW_RELIC_LICENSE_KEY) require('newrelic');\n\nconst express = require('express');\nconst logger = require('./modules').logger;\nconst mongooseHelper = ...
javascript
chosen
[ { "from": "system", "value": "Fix up error case. This would be so much easier with socket.io :fire:\n" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\nvar http = require('http').Server(app);\n\n// TODO: Use socket.io, which requires swift on the ios side,...
javascript
chosen
[ { "from": "system", "value": "Improve regExp logic with name variations\n" }, { "from": "human", "value": "$(document).ready(function() {\n var $body = $('body');\n var senateData;\n\n var scan = function() {\n $.each(senateData, function(i, senator) {\n var firstLastRegEx = new RegEx...
javascript
chosen
[ { "from": "system", "value": "Revert \"Merge remote-tracking branch 'origin/ace' into fix-release\"\n\nThis reverts commit ed28d3050a8a17e57757a9d0739506cdce1a846f, reversing\nchanges made to 3e519399cb1b1d3d1cff638bbeb01e678ce05400." }, { "from": "human", "value": "define(function(require, expo...
javascript
chosen
[ { "from": "system", "value": "Make keyup function a bit more consistant\n" }, { "from": "human", "value": "// JavaScript Document\n\n// Scripts written by YOURNAME @ YOURCOMPANY\n\nvar overlays = document.querySelectorAll(\"[data-overlay]\"),\n overlay_closer = document.querySelector(\".overl...
javascript
chosen
[ { "from": "system", "value": "Fix current color active style\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { colorClick } from '../../actions/assets';\nimport map from 'lodash/map';\nimport classNames from 'classnames...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"Revert \"Revert \"Revert \"Try child process\"\"\"\"\"\n\nThis reverts commit 5d90470f6820b2a27a19f50793c2eea6eda1524c.\n" }, { "from": "human", "value": "const { spawn } = require('child_process')\n\nmodule.exports = {\n onPreBuild({ utils: { sta...
javascript
chosen
[ { "from": "system", "value": "Fix syntax and merge differences\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar oust = require('../index');\nvar pkg = require('../package.json');\nvar fs = require('fs');\n\nvar argv = require('minimist')((process.argv.slice(2)))\n\nvar printHelp = f...
javascript
chosen
[ { "from": "system", "value": "Update dropbox-auth version for avatar field\n" }, { "from": "human", "value": "Package.describe({\n name: 'nitrolabs:accounts-dropbox',\n summary: \"Accounts service for Dropbox\",\n version: '1.3.0',\n git: 'https://github.com/NitroLabs/meteor-accounts...
javascript
chosen
[ { "from": "system", "value": "Improve SEO for Atmosphere. Uniform quoting.\n\nRight now the package doesn't show up at https://atmospherejs.com?q=d3" }, { "from": "human", "value": "Package.describe({\n summary: \"Network visualization library\",\n version: \"1.0.6\",\n name: \"futuresc...
javascript
chosen