conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Simplify iteration with intermediate array result value\n" }, { "from": "human", "value": "'use strict'\nvar ip = require('iterator-protocol'),\n iterator = ip.iterator\n\nmodule.exports = iterable\nfunction iterable(nextGen, iter) {\n return new LazyIterable(ne...
javascript
chosen
[ { "from": "system", "value": "Add budgetController , uiController , controller modules and keypress event on the global object\n" }, { "from": "human", "value": "/*\n * Developed by Radu Puspana\n * Date August 2017\n * Version 1.0\n */\n\nconsole.log(\"welcome to myExpenses!\");\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Change success code to 201\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express');\nvar supertest = require('supertest');\nvar logger = require('log4js').getLogger('Unit-Test');\nvar nconf = require('nconf');\n\nvar request = supertest(...
javascript
chosen
[ { "from": "system", "value": "Remove Accept header for websockets\n" }, { "from": "human", "value": "import { Readable } from 'stream';\n\nexport default class ServerRequestAdapter extends Readable {\n constructor(connection, mpq, headers, body) {\n super({\n objectMode: true\n });\n...
javascript
chosen
[ { "from": "system", "value": "Switch to getting added user from the websocket broadcast.\n" }, { "from": "human", "value": "App.Controllers.controller(\"usersController\", [\"$scope\", \"Restangular\", usersController]);\nfunction usersController($scope, Restangular) {\n Restangular.one(\"api...
javascript
chosen
[ { "from": "system", "value": "HIde analyses from comparison select if there are active jobs for that analysis\n" }, { "from": "human", "value": "import {createSelector} from 'reselect'\n\nimport selectActiveRegionalAnalysis from './active-regional-analysis'\nimport selectRegionalAnalyses from '....
javascript
chosen
[ { "from": "system", "value": "Add mixing percentage to display\n" }, { "from": "human", "value": "Handlebars.registerHelper('color', function(color) {\n var nameText = '';\n var hex = color.hex;\n var colorPickerLink = 'https://duckduckgo.com/?q=color+picker+' +\n encodeURICompon...
javascript
chosen
[ { "from": "system", "value": "Allow additional parameter `request_visible_actions` for Google OAuth2 provider\n" }, { "from": "human", "value": "/**\n * This class implements authentication against google\n * using the OAuth2 authorization flow in a popup window.\n */\n\nimport Oauth2 from 'tori...
javascript
chosen
[ { "from": "system", "value": "Change to allow file overwrites\n" }, { "from": "human", "value": "/*\n * Grunt Remove Logging\n * https://github.com/ehynds/grunt-remove-logging\n *\n * Copyright (c) 2013 Eric Hynds\n * Licensed under the MIT license.\n */\n\nmodule.exports = function(grunt) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix collaborators field of placeholderObj to be an array.\n" }, { "from": "human", "value": "import React from 'react';\n\nimport SaveTripModal from './save-trip-modal.js'\n\n/**\n * Component corresponding to add trips modal.\n *\n * @param {Object} props These are...
javascript
chosen
[ { "from": "system", "value": "Improve efficiency of queue loop\n\nThis commit avoids a property lookup on every iteration of the\nqueue-consuming loop by first storing it in a variable, since we don't\nexpect the size of the array to change within the duration of the loop.\nThis will make the initialization...
javascript
chosen
[ { "from": "system", "value": "Use dev version of Firefox (supports vertical writing-mode) in tests on Sauce Labs\n" }, { "from": "human", "value": "module.exports = function(config) {\n var commonConfig = (require(\"./karma-common.conf\"))(config);\n var customLaunchers = {\n sl_chr...
javascript
chosen
[ { "from": "system", "value": "Improve tracking code to track movement across the site\n" }, { "from": "human", "value": " var _paq = window._paq = window._paq || [];\n /* tracker methods like \"setCustomDimension\" should be called before \"trackPageView\" */\n _paq.push([\"setDomains\", [\"*...
javascript
chosen
[ { "from": "system", "value": "Fix pass callback on error\n" }, { "from": "human", "value": "'use strict'\n\nconst { waterfall } = require('async')\nconst { defaults } = require('lodash')\n\nconst checkHostsAvailability = require('../util/check-hosts-availability')\nconst checkRequiredParams = re...
javascript
chosen
[ { "from": "system", "value": "Disable punycode until it will work on Travis\n\nIt was added to this list:\nhttps://github.com/brave/browser-laptop/issues/5389\n\nAuditors: da39a3ee5e6b4b0d3255bfef95601890afd80709@diracdeltas\n" }, { "from": "human", "value": "/* global describe, it, beforeEach *...
javascript
chosen
[ { "from": "system", "value": "Add AWS CodeBuild examples (AWS SDK for JS v3)\n" }, { "from": "human", "value": "/* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: Apache-2.0\nABOUT THIS NODE.JS EXAMPLE: This example works with AWS SDK for JavaScript v...
javascript
chosen
[ { "from": "system", "value": "Create invalid user objects in fixtures\n" }, { "from": "human", "value": "/**\n * Created by Liam Vovk on 2017-05-14.\n */\n\nmodule.exports.users = [\n {\n name: 'Liam TestDB',\n email: 'liam_is_swag@test.com',\n phone_number: 1234567,\n age: 21,\n ...
javascript
chosen
[ { "from": "system", "value": "Move plugin load order around to ensure required plugins exist at the right time\n\nThis really is a great illustration of the limitations of the plugin system!\ncollections-online plugins need a user system to already have been registered.\nThe newly-inlined motif-tagging and ...
javascript
chosen
[ { "from": "system", "value": "Fix namespace in tick generator quick test.\n" }, { "from": "human", "value": "function makeData() {\n \"use strict\";\n\n return makeRandomData(50);\n}\n\nfunction run(div, data, Plottable) {\n \"use strict\";\n\n var svg = div.append(\"svg\").attr(\"height\", ...
javascript
chosen
[ { "from": "system", "value": "Cover single method invocation stats\n" }, { "from": "human", "value": "/* eslint-env mocha */\n'use strict'\n\nconst _ = require('lodash')\nconst expect = require('chai').expect\nconst LodashWrapper = require('../client/wrappers/Lodash')\nconst TEST_DATA = require(...
javascript
chosen
[ { "from": "system", "value": "Use environment-configured port if available\n" }, { "from": "human", "value": "'use strict';\n\nconst PORT = 23526;\nconst restify = require('restify');\nconst shortid = require('shortid');\nconst uuid = require('uuid');\nconst RetroSocket = require('./retroSocket'...
javascript
chosen
[ { "from": "system", "value": "Fix JS errors on pages without logout link\nalso redirect after logging out\n" }, { "from": "human", "value": "export default class MainView {\n mount() {\n // This will be executed when the document loads...\n document.getElementsByClassName(\"logout-link\"...
javascript
chosen
[ { "from": "system", "value": "Fix logout state name in actions\n" }, { "from": "human", "value": "import {\n LOGIN_SUCCESS,\n LOGIN_FAILURE,\n LOGOUT_SUCCESS,\n LOGOUT_FAILURE\n} from '../constants/actions/Auth';\n\nconst fakeUser = {\n username: 'demo',\n token: 'ojn2jr3wrefj'\n};\n\nexpo...
javascript
chosen
[ { "from": "system", "value": "Update MaterialSlider unit test with chai-jquery\n" }, { "from": "human", "value": "\n describe('slider tests', function () {\n\n it('Should have MaterialSlider globally available', function () {\n expect(MaterialSlider).to.be.a('function');\n });\n\n ...
javascript
chosen
[ { "from": "system", "value": "Make it so that Struct Pointer return values work.\n" }, { "from": "human", "value": "var FFI = require(\"./ffi\"),\n util = require(\"util\");\n\n// CIF proves a JS interface for the libffi \"callback info\" (CIF) structure\nvar CIF = module.exports = fun...
javascript
chosen
[ { "from": "system", "value": "Make sure dependency are loaded on demand\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar merge = require('lodash.merge');\nvar configUtils = require('./utils/config-utils');\nvar Config = require('./config');\n...
javascript
chosen
[ { "from": "system", "value": "Send root page for all non-static files (let Backbone handle routing)\n" }, { "from": "human", "value": "var connect = require('connect'),\n port = process.env.PORT || 3000;\n\nconnect()\n .use(connect.static('app'))\n .listen(port);\n\nconsole.log('Application l...
javascript
chosen
[ { "from": "system", "value": "Add some elements to the DOM.\n" }, { "from": "human", "value": "console.log(\"Hello!\");\n" }, { "from": "gpt", "value": "console.log(\"Hello!\");\n\nlet div = document.createElement('div');\nlet h1 = document.createElement('h1');\nh1.textContent = \"He...
javascript
chosen
[ { "from": "system", "value": "Fix output handling in shelljs 0.7\n" }, { "from": "human", "value": "var shell = require('shelljs');\n\nif (exec('git status --porcelain').output != '') {\n console.error('Git working directory not clean.');\n process.exit(2);\n}\n\nvar versionIncrement = process...
javascript
chosen
[ { "from": "system", "value": "Enhance generateTree function by adding edge condition for root\n" }, { "from": "human", "value": "function generateTree(dataArr, root) {\n let subTree, directChildren, subDataArr;\n let { name, id, articlesCount } = root;\n if (dataArr.length === 0) {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove geolocation in wait for https\n" }, { "from": "human", "value": "const html = require('choo/html');\nconst map = require('./map');\nconst { loader } = require('../icons');\nconst { __ } = require('../../locale');\n\nmodule.exports = function (state, emit) {\n...
javascript
chosen
[ { "from": "system", "value": "Change pause hotkey to P\n" }, { "from": "human", "value": "'use strict';\n\nDarwinator.Boot = function() {};\n\nDarwinator.Boot.prototype = {\n \n preload: function () {\n this.load.image('preloader', 'assets/preloader.gif');\n },\n\n create: function () {\n...
javascript
chosen
[ { "from": "system", "value": "Add version constraint for easy-meteor-settings\n" }, { "from": "human", "value": "Package.describe({\n name: 'hubaaa:endpoint-puller',\n version: '0.1.0',\n // Brief, one-line summary of the package.\n summary: 'Pulls API endpoints, checking for new data and pa...
javascript
chosen
[ { "from": "system", "value": "Set custom exception's prototype chain properly\n" }, { "from": "human", "value": "(function (GoL, _) {\n \"use strict\";\n\n var cellNameToSymbol = { Alive: '*', Dead: '.' };\n\n function InvalidArgument(message) {\n this.prototype = Error.prototype;\n th...
javascript
chosen
[ { "from": "system", "value": "Set \"X-Droonga-Cached=yes\" for cached contents\n" }, { "from": "human", "value": "var Cache = require('./cache');\nvar Entry = require('./entry');\n\nfunction generateKey(request) {\n return request.method + '\\n' + request.url;\n}\n\nfunction sendCachedResponse(...
javascript
chosen
[ { "from": "system", "value": "Fix deprecated res.send to res.sendStatus\n" }, { "from": "human", "value": "const db = require('./db');\nconst express = require('express');\nconst convertIdToBase62 = require('./base62').convertIdToBase62;\nconst logger = require('winston');\n\nconst router = expr...
javascript
chosen
[ { "from": "system", "value": "Add beforeEach, afterEach, it('not null'), it('should ...')\n" }, { "from": "human", "value": "describe(\"Simple Test:\", function()\n{\n\t\"use strict\";\n\n\tit(\"a is in fact 'Hello World!' and b to be not null\", function()\n\t{\n\t\tvar a = \"Hello World!\";\n\...
javascript
chosen
[ { "from": "system", "value": "Refresh disks on starting or stopping array\n" }, { "from": "human", "value": "$(function() {\n var $array_controls = $('#array-controls');\n\n $(document).on('click', '#array-controls a', function(e) {\n e.preventDefault();\n var $btn = $(this),\n co...
javascript
chosen
[ { "from": "system", "value": "Adjust for new module loader.\n" }, { "from": "human", "value": "/*\n ___ usage ___ en_US ___\n usage: prolific average <options>\n\n -q, --qualified <string>\n The qualified name of the entry to aggregate.\n\n --help\n Disp...
javascript
chosen
[ { "from": "system", "value": "Fix penalties section in userprofile\n" }, { "from": "human", "value": "// @flow\n\nimport React from 'react';\nimport moment from 'moment-timezone';\nimport { FormatTime } from 'app/components/Time';\n\ntype Penalty = {\n id: number,\n reason: string,\n weight: ...
javascript
chosen
[ { "from": "system", "value": "Fix require path typo error.\n" }, { "from": "human", "value": "var Browser = require('zombie'),\n browser = new Browser(),\n assert = require('assert'),\n server = require('../server/server'),\n router = require('../server/router'),\n requestHandler ...
javascript
chosen
[ { "from": "system", "value": "Allow .minilock extensions to wrap onscreen also so that names don’t look weird when they are shelved.\n" }, { "from": "human", "value": "miniLock.templates = {}\n\nminiLock.templates.keyStrengthMoreInfo = ''\n\t+ 'The passphrase you have entered is too weak.'\n\t+ ...
javascript
chosen
[ { "from": "system", "value": "Use position to change data\n" }, { "from": "human", "value": "import { call, put, takeLatest } from 'redux-saga/effects';\nimport envConfig from 'env-config';\n\nimport { WeatherActions, WeatherTypes } from './weather.redux';\nimport { get } from '../api/api.sagas'...
javascript
chosen
[ { "from": "system", "value": "Check for null values in games played\n" }, { "from": "human", "value": "var args = arguments[0] || {};\n\nvar player = args.player;\n\n$.name.text = player.get(\"FirstName\") + \" \" + player.get(\"LastName\");\n$.position.text = player.get(\"Position\");\n$.gamesP...
javascript
chosen
[ { "from": "system", "value": "Allow blueprint command to be run without an additional param\n" }, { "from": "human", "value": "'use strict';\n\nmodule.export = {\n afterInstall: function() {\n return this.addBowerPackageToProject([\n { name: 'paint', target: 'git://github.com/alphasights/...
javascript
chosen
[ { "from": "system", "value": "Improve spec window's default behavior.\n" }, { "from": "human", "value": "var app = require('app');\nvar BrowserWindow = require('browser-window');\n\nvar window = null;\n\napp.on('finish-launching', function() {\n window = new BrowserWindow({\n title: 'atom-sh...
javascript
chosen
[ { "from": "system", "value": "Fix and ungodly number of linter errors\n" }, { "from": "human", "value": "angular.module('achievements.controller', [])\n .controller('AchievementsController', function($scope) {\n\n $scope.gold = 15; // Place holder for user-specific data\n $scope.silver = ...
javascript
chosen
[ { "from": "system", "value": "Add shuffle function and card structure generator function\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport GameTable from '../GameTable'\nimport PlayerUI from '../PlayerUI'\n\nconst App = () => {\n\n return (\n <div clas...
javascript
chosen
[ { "from": "system", "value": "Add socket event to refresh sequence page\n" }, { "from": "human", "value": "/**\n * @module client/controllers/controllerSequence\n */\n'use strict';\n\n// TODO move to service\nvar find = require('101/find');\n\nrequire('app')\n .controller('controllerSequence', ...
javascript
chosen
[ { "from": "system", "value": "Change id of page message div in connection mgmt\n\nrefs #11448\n" }, { "from": "human", "value": "var MessageView = Backbone.View.extend({\n tagName:\"div\",\n id:\"pageMessage\",\n className: \"message message-success message-width\",\n\n initialize: f...
javascript
chosen
[ { "from": "system", "value": "feat(CLI): Add dummy version number to the CLI\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\nconst commander = require('commander')\nconst program = require('../lib/program')\nconst showWinnerImage = require('../lib/modules/show-winner-image')\nconst AP...
javascript
chosen
[ { "from": "system", "value": "Fix EOL character in env variable\n" }, { "from": "human", "value": "'use strict';\n\nvar Roboat = require('../lib/roboat');\n\nvar token = process.env.BOT_API_KEY;\nvar name = process.env.BOT_NAME;\n\nvar roboat = new Roboat({\n\ttoken: \"xoxb-16684972324-HB5B89jvs...
javascript
chosen
[ { "from": "system", "value": "Move router to App layer\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter, Match, Redirect } from 'react-router';\nimport App from './App';\nimport Notes from './components/pages/Notes';\nimport...
javascript
chosen
[ { "from": "system", "value": "fix: Make stdin mode throw on error\n" }, { "from": "human", "value": "import program from 'commander'\nimport stdin from 'stdin'\n\nimport info from '../package.json'\nimport { checkFiles, checkString } from './checks'\n\nexport default function main() {\n program...
javascript
chosen
[ { "from": "system", "value": "Change variable to `svg` for clear code\n" }, { "from": "human", "value": "const isNode = !(typeof window !== 'undefined' && window.document && document.createElement)\nconst svgSource = require('raw!../dist/owl-ui.svg')\n\nif (!isNode) {\n const div = document.cre...
javascript
chosen
[ { "from": "system", "value": "Fix project id query param\n" }, { "from": "human", "value": "let express = require('express');\nlet router = express.Router();\n\n/* GET Project */\nrouter.get('/', function (req, res) {\n res.render('graph', {\n title: 'Jama Software Capstone',\n subtitle: ...
javascript
chosen
[ { "from": "system", "value": "Check localhost loads with message\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\n/* GET all paintings. */\nrouter.get('/', function(req, res, next) {\n res.send('great art at naffordable prices');\n});\n\nmo...
javascript
chosen
[ { "from": "system", "value": "Fix my silly mistake combining the arrays of objects\n" }, { "from": "human", "value": "var request = require('request');\nvar _und = require('underscore');\n\n/* Get orders listing. */\nexports.list = function(req, res){\n var results = {\n orders: [],\n ...
javascript
chosen
[ { "from": "system", "value": "Return animation, new default easing\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Animated,\n AppState,\n Easing,\n View,\n ViewPropTypes\n} from 'react-native';\nimport CircularProgress from './...
javascript
chosen
[ { "from": "system", "value": "Fix string interpolation for displaying time periods\n\nThe interpolation was done in a way that actually subtracted two strings from each other instead of putting the literal '-' between them.\n" }, { "from": "human", "value": "import dayjs from './dayjs.js'\nimpor...
javascript
chosen
[ { "from": "system", "value": "Remove login code from the logout function\n" }, { "from": "human", "value": "var helpers = require('./../../helpers.js')\n\nconst { client } = require('nightwatch-cucumber')\nconst { defineSupportCode } = require('cucumber')\n\ndefineSupportCode(({ Given, Then, Whe...
javascript
chosen
[ { "from": "system", "value": "Revert \"Use style from the original node, not the clone\"\n" }, { "from": "human", "value": "export default function getCloneDimensions(node, options) {\n const { parentNode } = node\n const context = document.createElement('div')\n const clone = node.cloneNode(...
javascript
chosen
[ { "from": "system", "value": "Add styles for buttonview view\n" }, { "from": "human", "value": "import { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n mainContainer: {\n // flex: 3,\n width: Dimensions.get('window').width * .97,\n height: Dimensi...
javascript
chosen
[ { "from": "system", "value": "Set testnet as default network\n" }, { "from": "human", "value": "const AppConstants = {\n //Application name\n appName: 'Nano Wallet',\n\n version: '2.0.0',\n\n //Network\n defaultNetwork: 104,\n\n // Ports\n defaultNisPort: 7890,\n defaultM...
javascript
chosen
[ { "from": "system", "value": "Fix block manager rendering with custom appendTo\n" }, { "from": "human", "value": "import { isFunction } from 'underscore';\nimport { createEl } from '../../utils/dom';\n\nexport default {\n open() {\n const { container, editor, bm, config } = this;\n const ...
javascript
chosen
[ { "from": "system", "value": "Change className proptype from mandatory.\n" }, { "from": "human", "value": "/* @flow */\nimport React, { PropTypes } from 'react';\n\nexport class BotWinPercent extends React.Component {\n // props: Props;\n static propTypes = {\n gamesPlayed: PropTypes.number...
javascript
chosen
[ { "from": "system", "value": "chore(tooling): Add csp to webpack dev server\n" }, { "from": "human", "value": "/**\n * In development we assume that the code generated is going to be consumed by\n * webpack dev server and we are bundling into a single js file.\n */\n\nimport webpack from 'webpac...
javascript
chosen
[ { "from": "system", "value": "Add story to db by action\n" }, { "from": "human", "value": "import {\n LOAD_STORIES_SUCCESS,\n ADD_STORY\n} from '../constants'\n\nimport fetch from '../core/fetch'\n\nexport function loadStories () {\n return (dispatch) => {\n fetch('/graphql', {\n meth...
javascript
chosen
[ { "from": "system", "value": "Handle undefined sails.config.globals by using defaults.\n" }, { "from": "human", "value": "/**\n * Module dependencies.\n */\n\nvar _ = require('lodash');\nvar async = require('async');\n\n\n/**\n * exposeGlobals()\n *\n * Expose certain global variables\n * (if co...
javascript
chosen
[ { "from": "system", "value": "Add button for hue test to homepage\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { Link } from 'react-router-dom';\nimport Logo from './Logo.js';\n\nclass Home extends Component {\n render(){\n return (\n <div>\n ...
javascript
chosen
[ { "from": "system", "value": "Remove references to non-existant tests\n" }, { "from": "human", "value": "Package.describe({\n\tname: 'mizzao:autocomplete',\n\tsummary: 'Client/server autocompletion designed for Meteor\\'s collections and reactivity',\n\tversion: '0.5.1',\n\tgit: 'https://github....
javascript
chosen
[ { "from": "system", "value": "Work on lambda type inference\n" }, { "from": "human", "value": "var Function = require('./Function')\nvar ident = require('./_utils').ident;\nvar indentEach = require('./_utils').indentEach;\nvar types = require('../types');\n\n\nexports.traverse = Function.travers...
javascript
chosen
[ { "from": "system", "value": "Move check of connection to a specific function" }, { "from": "human", "value": "let connecting = false;\nlet connection = null;\n\n\nexport async function connect(serverInfo, databaseName) {\n if (connecting) throw new Error('connecting to server');\n\n try {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove useless parameter from promise\n" }, { "from": "human", "value": "'use strict';\n\nvar kss = require('kss');\n\nmodule.exports = function(grunt) {\n grunt.registerMultiTask('kss', 'Generate style guide with KSS.', function() {\n\n var done = this.async();...
javascript
chosen
[ { "from": "system", "value": "Disable native window.fetch for browsers\n" }, { "from": "human", "value": "var nodeFetch = require(\"node-fetch\");\n\nvar fetch = nodeFetch;\nif (typeof window === \"object\" && typeof window.fetch === \"function\") {\n fetch = window.fetch;\n}\n\nmodule.export...
javascript
chosen
[ { "from": "system", "value": "Check document dir before extending options\n" }, { "from": "human", "value": "/**\n * @Description: GridGallery is a tiny package that will generate a grid depending on\n * the elements height. It is not required to have the same height\n *\n * @Autho...
javascript
chosen
[ { "from": "system", "value": "Replace LoginNavigator by Layout from navigator.createRootNavigator\n" }, { "from": "human", "value": "import React from 'react'\nimport { StackNavigator } from 'react-navigation'\nimport { Provider } from 'mobx-react'\n\nimport LoginScreen from './screens/LoginScre...
javascript
chosen
[ { "from": "system", "value": "refactor(presentation): Move cursor functionality to presentation\n" }, { "from": "human", "value": "import { Slide } from './Slide';\n\nexport class Presentation {\n constructor() {\n this._slides = [];\n this._currentSlideIndex = 0;\n }\n\n /**\n * Push...
javascript
chosen
[ { "from": "system", "value": "Add off as a noop function to touch editor.\n\nCloses #3107\n" }, { "from": "human", "value": "var createTouchEditor = function createTouchEditor() {\n var noop = function () {},\n TouchEditor;\n\n TouchEditor = function (el, options) {\n /*jshin...
javascript
chosen
[ { "from": "system", "value": "Update breadcrumb to support localization\n" }, { "from": "human", "value": "(function () {\n\n\t\"use strict\";\n\n\tvar app = angular.module('RbsChange');\n\n\tapp.config(['$provide', function ($provide)\n\t{\n\t\t$provide.decorator('RbsChange.UrlManager', ['$dele...
javascript
chosen
[ { "from": "system", "value": "Make new zips appear at the top\n" }, { "from": "human", "value": "import React from 'react';\n\nimport ZipCodeEntry from './ZipCodeEntry';\nimport WeatherDisplay from './WeatherDisplay';\n\nexport default class App extends React.Component {\n constructor(props) {\...
javascript
chosen
[ { "from": "system", "value": "Add routing to 404 component\n" }, { "from": "human", "value": "import React from 'react';\nimport { BrowserRouter, Match } from 'react-router'\nimport Header from './components/Header';\nimport CTA from './components/CTA';\nimport Footer from './components/Footer';...
javascript
chosen
[ { "from": "system", "value": "Add tilted axis labels for X axis\n" }, { "from": "human", "value": "var d3 = require(\"d3\");\n\nmodule.exports = function xAxis(my, g){\n var axisG = g.append(\"g\").attr(\"class\", \"x axis\");\n var axis = d3.svg.axis();\n\n my.addPublicProperty(\"xAxisTickDe...
javascript
chosen
[ { "from": "system", "value": "Add message handler\nAdd search functionality for card pattern\nAdd formatOutput function\nAdd capitalizeFirstLetter method to String prototype\n" }, { "from": "human", "value": "import 'jsdom-global/register'\n\nimport Discord from 'discord.js'\nimport HearthstoneJ...
javascript
chosen
[ { "from": "system", "value": "Add field for author id\n\n" }, { "from": "human", "value": "const Sequelize = require('sequelize');\n\nconst { db } = require('../struct/Database');\n\nconst Star = db.define('stars', {\n\tmessageID: {\n\t\ttype: Sequelize.STRING,\n\t\tprimaryKey: true,\n\t\tallowN...
javascript
chosen
[ { "from": "system", "value": "Fix CLI project name s/node-push-to-deploy/push-to-deploy\n" }, { "from": "human", "value": "var fs = require(\"fs\");\nvar http = require(\"http\");\nvar nopt = require(\"nopt\");\nvar main = require(\"./main\");\nvar yaml = require(\"js-yaml\");\n\nvar configs, op...
javascript
chosen
[ { "from": "system", "value": "Add parentResource helpers to Resource\n\n" }, { "from": "human", "value": "import {Container} from './';\n\nexport default class Resource {\n\t/**\n\t * @param {Object} params\n\t */\n\tconstructor({service, name, identifierName, collectionRoot, itemRoot}) {\n\t\tt...
javascript
chosen
[ { "from": "system", "value": "Break out general validation from modules\n\nRequest formatting and existence validation will be done in a top\nlevel routing file (not yet implemented). This leaves the modules\nto simply implement their specific cases, and handle action-specific\nvalidation.\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Use correct aws api to set services up\n" }, { "from": "human", "value": "let AWS = require(\"aws-sdk\");\n\nclass Strategy {\n constructor(set_all = false) {\n this.mapping = Object.create(null);\n if (set_all) {\n this.dynamo()\n this.sqs()\n ...
javascript
chosen
[ { "from": "system", "value": "docs(CLI): Add description to CLI commands\n" }, { "from": "human", "value": "// @flow\n\nimport 'babel-polyfill';\n\nimport program from 'commander';\nimport { blue, green, gray } from 'chalk';\nimport installer from '../installer';\nimport { androidClient, iosClie...
javascript
chosen
[ { "from": "system", "value": "Add log for Twilio ICE servers.\n" }, { "from": "human", "value": "var twilio = require('twilio')\nvar winston = require('winston')\n\nif (process.env.TWILIO_SID && process.env.TWILIO_TOKEN) {\n var client = twilio(process.env.TWILIO_SID, process.env.TWILIO_TOKEN)\...
javascript
chosen
[ { "from": "system", "value": "Add Trash explosions on lifeTime end.\n" }, { "from": "human", "value": "/*globals define*/\ndefine([\n 'entities/physics-entity'\n], function( PhysicsEntity ) {\n 'use strict';\n\n function Trash( options, lifeTime ) {\n PhysicsEntity.call( this, options );\n...
javascript
chosen
[ { "from": "system", "value": "Use option.text instead of option.label.\n" }, { "from": "human", "value": "/**\n * Patterns checkedflag - Add checked flag to checkbox labels\n *\n * Copyright 2013 Simplon B.V. - Wichert Akkerman\n */\ndefine([\n \"jquery\",\n \"../registry\",\n \"../util...
javascript
chosen
[ { "from": "system", "value": "Use class name as instance name by default\n" }, { "from": "human", "value": "import mobx from 'mobx';\nimport spy from './spy';\n\nexport default function dev(store, config) {\n if (typeof window === 'undefined' || !window.devToolsExtension) return store;\n\n if ...
javascript
chosen
[ { "from": "system", "value": "Add some things from tutorial\n" }, { "from": "human", "value": "var HomeView = function(store) {\n\n this.initialize = function() {\n // Define a div wrapper for the view. The div wrapper is used to attach events.\n this.el = $('<div/>');\n ...
javascript
chosen
[ { "from": "system", "value": "Update reducer naming in combine reducers\n" }, { "from": "human", "value": "import { combineReducers, createStore } from 'redux'\nimport auth from '../modules/Auth/reducer'\nimport households from '../modules/Households/reducer'\nimport members from '../modules/Mem...
javascript
chosen
[ { "from": "system", "value": "Add time to log-actor & increment-index events\n" }, { "from": "human", "value": "export default function run(simulation) {\n while (\n simulation.getState().currentEventIndex <\n simulation.getState().timeline.length\n ) {\n const currentEventIndex = sim...
javascript
chosen
[ { "from": "system", "value": "Update dependency node-sass to v4.9.0" }, { "from": "human", "value": "Package.describe({\n name: 'angular-scss-compiler',\n version: '0.3.1_2',\n summary: 'Angular Scss Compiler Package',\n git: 'https://github.com/Urigo/angular-meteor/tree/master/atmosphere-pa...
javascript
chosen
[ { "from": "system", "value": "Allow commands on the editor\n" }, { "from": "human", "value": "define([\n \"ace\"\n], function(ace) {\n var hr = codebox.require(\"hr/hr\");\n\n var Tab = hr.View.extend({\n className: \"component-editor\",\n\n initialize: function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix having mixed of named & default export\n" }, { "from": "human", "value": "import Client from './client';\nimport {VERSIONS} from './utils';\n\nexport {default as Frame} from './frame';\n\n// The `webstomp` Object\nconst webstomp = {\n VERSIONS,\n // This m...
javascript
chosen