conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add option to pass options object to ng-simditor\n" }, { "from": "human", "value": "module.exports = angular\n .module('simditor.directive', [])\n .directive('simditor', simditor);\n\nsimditor.$inject = ['simditorOptions'];\n\nfunction simditor(simditorOptions) {\...
javascript
chosen
[ { "from": "system", "value": "Use double quotes instead of single\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent( 'sl-textarea', 'Integration | Component | sl textarea', {\n integr...
javascript
chosen
[ { "from": "system", "value": "Update default stargazers in demo\n" }, { "from": "human", "value": "import fetch from 'isomorphic-fetch';\n\nconst LOAD_STARGAZERS_SUCCESS = 'LOAD_STARGAZERS_SUCCESS';\n\nconst initialState = {\n stargazers: '815'\n};\n\nexport function loadStargazers() {\n retur...
javascript
chosen
[ { "from": "system", "value": "Clean up the Customizer JS. Also, the file has been renamed.\n" }, { "from": "human", "value": "( function( wp, $ ) {\n\t'use strict';\n\n\tif ( ! wp || ! wp.customize ) {\n\t\treturn;\n\t}\n\n\tvar api = wp.customize;\n\n\t//api.bind( 'ready', function() {\n\t//\tw...
javascript
chosen
[ { "from": "system", "value": "Make datasources active on start\n" }, { "from": "human", "value": "const datasource = require('../../lib/getdatasource')\n\nmodule.exports = (data, state, send, done) => {\n if (data.key.length !== 64) {\n return done(new Error(`datasource keys must be 64 chara...
javascript
chosen
[ { "from": "system", "value": "Handle Google Analytics code initializing in a module\n" }, { "from": "human", "value": "\n(function loadGapi() {\n var head = document.getElementsByTagName('head')[0];\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script....
javascript
chosen
[ { "from": "system", "value": "[Content] Footstep: Fix graphical issue where they \"flicker\" when fading away\n" }, { "from": "human", "value": "var Footstep = Entity.extend({\n alpha: 0.5,\n\n init: function (x, y, d) {\n this.posX = x + chance.integer({\n min: -2,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix i2mx namespace typo (hopefully loads now)\n\nIt was written im2x instead of i2mx." }, { "from": "human", "value": "/*\n#\n# img2musicXML.js - v0.1-Alpha\n# Apache v2 License\n#\n*/\n\n// Create img2musicXML (abbreviated as i2mx) namespace\nvar i2mx = im2x || { }...
javascript
chosen
[ { "from": "system", "value": "Game: Add properties to show about page\n" }, { "from": "human", "value": "class Game {\n constructor(gameish) {\n this.id = gameish.id;\n this.title = gameish.title;\n this.shortTitle = gameish.shortTitle;\n this.lists = gameish.lists;\n }\n}\n\nclass...
javascript
chosen
[ { "from": "system", "value": "Remove reference to ember-mocha 0.6.3\n" }, { "from": "human", "value": "var EOL = require('os').EOL;\n\nmodule.exports = {\n name: 'ember-cli-mocha',\n\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified...
javascript
chosen
[ { "from": "system", "value": "Add colours to brand config.\n" }, { "from": "human", "value": "module.exports = {\n \"name\": \"Piece Mail\",\n \"base-url\": \"\",\n \"img-url\": {\n \"local\": \"./images\",\n \"prod\": \"<%= imageLocation %>\"\n },\n \"font-stack\": \"Helvetica, arial...
javascript
chosen
[ { "from": "system", "value": "Add Ties to Overall stats\n" }, { "from": "human", "value": "import dedent from 'dedent-js';\n\nconst formatOverallStats = (data, battletag, gameMode) => {\n const stats = data['stats'][gameMode]['overall_stats'];\n const moreStats = data['stats'][gameMode]['game_...
javascript
chosen
[ { "from": "system", "value": "Remove debug segments on Dom\n" }, { "from": "human", "value": "(function(){\n angular\n .module('linguine', [\n 'flash',\n 'ui.router',\n 'ui.bootstrap',\n 'linguine.corpora',\n 'angularSpinner',\n 'linguine.analysis'\n ])\n ...
javascript
chosen
[ { "from": "system", "value": "Remove redundant alt text from 5calls header\n" }, { "from": "human", "value": "const html = require('choo/html');\n\nconst issuesLocation = require('./issuesLocation.js');\n\nmodule.exports = (state, prev, send) => {\n return html`\n <header class=\"${classStri...
javascript
chosen
[ { "from": "system", "value": "Fix buffer usage in tests as well\n" }, { "from": "human", "value": "var Buffer = require('buffer').Buffer\n\nvar http = require('../../..')\n\nmodule.exports = function (self) {\n\tself.addEventListener('message', function (ev) {\n\t\tvar url = ev.data\n\t\thttp.ge...
javascript
chosen
[ { "from": "system", "value": "Update expanding progress tests to use enzyme.\n" }, { "from": "human", "value": "/* Copyright (C) 2017 Canonical Ltd. */\n'use strict';\n\nconst React = require('react');\n\nconst ExpandingProgress = require('./expanding-progress');\n\nconst jsTestUtils = require('...
javascript
chosen
[ { "from": "system", "value": "Store inputted text in the local state\n" }, { "from": "human", "value": "'use strict';\n\nimport PfText from './PfText'\nimport PfTextInput from './PfTextInput'\nimport PfButton from './PfButton'\nimport Constants from './Constants'\n\nimport React, { Component } f...
javascript
chosen
[ { "from": "system", "value": "[base] Add the global portal provider\n" }, { "from": "human", "value": "import React from 'react'\nimport config from 'config:sanity'\nimport RootComponent from 'part:@sanity/base/root'\nimport SnackbarProvider from 'part:@sanity/components/snackbar/provider'\nimpo...
javascript
chosen
[ { "from": "system", "value": "Remove 300 ms additional delay\n" }, { "from": "human", "value": "\nvar NotificationController = SingleModelController.createComponent(\"NotificationController\");\n\nNotificationController.defineAlias(\"model\", \"notification\");\n\nNotificationController.defineMe...
javascript
chosen
[ { "from": "system", "value": "Fix indentation, remove useless console log\n" }, { "from": "human", "value": ";(function(bdgg) {\n\t\tconsole.log('ready');\n\t\tbdgg.left = (function() {\n\t\t\tvar chat, stream\n\t\t\treturn {\n\t\t\t\tinit: function() {\n\t\t\t\t\tstream = window.parent.document...
javascript
chosen
[ { "from": "system", "value": "[CON-3711] Add missing export status icon\n" }, { "from": "human", "value": "//{namespace name=backend/connect/view/main}\n\n//{block name=\"backend/connect/view/export/tab_panel\"}\nExt.define('Shopware.apps.Connect.view.export.TabPanel', {\n extend: 'Ext.tab.Pa...
javascript
chosen
[ { "from": "system", "value": "Fix annoying bug where your text can be overwritten with default text\n" }, { "from": "human", "value": "/******************************************\n Timestamp\n******************************************/\n\nfunction saveText(){\n var field = docu...
javascript
chosen
[ { "from": "system", "value": "Fix broken toggle - broken adjacent selector\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { c } from 'ttag';\n\nimport Checkbox from '../input/Checkbox';\nimport Icon from '../icon/Icon';\n\nconst label =...
javascript
chosen
[ { "from": "system", "value": "Fix ajax to target form, since its in partial\n" }, { "from": "human", "value": "$(function(){\n $('#new_share_link').click(function(e){\n e.preventDefault();\n $('#new_share_modal').modal({\n remote: '/shares/new',\n show: true\n });\n });\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add fetch for student id data on initial load\n" }, { "from": "human", "value": "import React from 'react'\nimport { AppState } from 'react-native'\nimport { connect } from 'react-redux'\n\nclass AppStateContainer extends React.Component {\n\tstate = {\n\t\tappState...
javascript
chosen
[ { "from": "system", "value": "Make account IDs shorter for easier display\n" }, { "from": "human", "value": "/* global angular */\n\nangular.module('app')\n.directive('accountName', function (Reverse) {\n\t'use strict';\n\n\tfunction link(scope, element, attributes) {\n\n\t\tscope.$watch('id', f...
javascript
chosen
[ { "from": "system", "value": "Implement loading in submit input on remote form\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatic...
javascript
chosen
[ { "from": "system", "value": "Disable turbolinks to avoid js problems\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/jav...
javascript
chosen
[ { "from": "system", "value": "Use custom error message if email is not unique\n" }, { "from": "human", "value": "const Sequelize = require('sequelize')\nconst bcrypt = require('bcrypt')\n\nmodule.exports = {\n\tmodel: {\n\t\tname: Sequelize.STRING,\n\t\temail: {\n\t\t\ttype: Sequelize.STRING,\n\...
javascript
chosen
[ { "from": "system", "value": "Refactor social accounts module (use more of ES6)\n" }, { "from": "human", "value": "'use strict';\n\nclass SocialAccounts {\n\n constructor(obj) {\n this.config = obj && obj.config;\n this.validator = obj && obj.validator;\n this.helperName ...
javascript
chosen
[ { "from": "system", "value": "Fix a typo in Dutch translation" }, { "from": "human", "value": "import Language from '../Language'\n\nexport default new Language(\n 'Dutch',\n ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'decem...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix first option not changed\n" }, { "from": "human", "value": "import Select from '../u-select.vue';\n\nexport default {\n name: 'u-select--0',\n childName: 'u-select--0-item',\n mixins: [Select],\n methods: {\n select($event) {\n ...
javascript
chosen
[ { "from": "system", "value": "Solve bug when creating new pages\n" }, { "from": "human", "value": "function loadCreator (collectionId) {\n var pageType, releaseDate;\n\n getCollection(collectionId,\n success = function (response) {\n if (!response.publishDate) {\n releaseDate = ...
javascript
chosen
[ { "from": "system", "value": "Add anchors to the value of \"NAME\" and \"URL\", respectively\n" }, { "from": "human", "value": "$(function() {\n $(\"#result\").hide();\n\n $(\"#search_button\").on(\"click\", function() {\n var name = $(\"#name\").val();\n var score = $(\"#score\").val();...
javascript
chosen
[ { "from": "system", "value": ":wrench: Remove two more required prop warnings\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport fetchData from '../../actions/fetchData';\nimport Toast from '../../components/Toast';\nimport Modals from '../Modals';\ni...
javascript
chosen
[ { "from": "system", "value": ":no_entry: Stop page repositioning after using my location\n" }, { "from": "human", "value": "(function (global) {\n 'use strict';\n var $ = global.jQuery;\n var $geoLocate = $('.geo-locate');\n var $geoLocateDenied = $('.geo-locate--denied');\n var $geoLocateE...
javascript
chosen
[ { "from": "system", "value": "Change event canplay to load audio\n" }, { "from": "human", "value": "function AudioFile() {\r\n\tthis.name = new Array();\r\n\tthis.data = new Array();\r\n\tthis.counter = 0;\r\n};\r\n\r\nAudioFile.prototype.load = function(_audioSrc, _audioName) {\r\n\tif(!this.ge...
javascript
chosen
[ { "from": "system", "value": "Add functions for get modules and configs\n" }, { "from": "human", "value": "/* global Module, Log, MM, config */\n\n/* Magic Mirror\n * Module: Manager Module\n *\n * By Rodrigo Ramìrez Norambuena https://rodrigoramirez.com\n * MIT Licensed.\n */\n\nModule.register...
javascript
chosen
[ { "from": "system", "value": "Fix tests failure on PR\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\nrequire('shelljs/global');\nset('-e');\n\nif (process.env.JOB === 'e2e-guru') {\n exec('npm run e2e');\n} else {\n exec('npm run unit');\n console.log('Starting Basic...
javascript
chosen
[ { "from": "system", "value": "Add Node <5 support by removing spread operator" }, { "from": "human", "value": "'use strict';\n\nmodule.exports =\n{\n\tbase_name\t\t: 'keywords',\n\taction_name\t\t: 'keywords/{id}',\n\n\tcreate: function() {\n\t\treturn this.action(...arguments);\n\t},\n};\n\n" ...
javascript
chosen
[ { "from": "system", "value": "Remove default anchor behavior for smooth scrolling.\n" }, { "from": "human", "value": "//\n// suuoh.com\n// Melvin Chien 2013\n//\n\n$(document).ready(function() {\n $(\"a[href^='#']\").click(function(){ \n var id = $(this).attr(\"href\");\n var posTop = $(...
javascript
chosen
[ { "from": "system", "value": "Remove destructuring for node 4 compatibility\n" }, { "from": "human", "value": "const _ = require('lodash');\n\nexports.processHeaders = function processHeaders(headerParams, options) {\n if (headerParams) {\n const customHeaders = _.isArray(headerParams) ? hea...
javascript
chosen
[ { "from": "system", "value": "Use large avatar on profile page\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport '../scss/_profile.scss';\nimport RecipeContainer from './RecipeContainer.js';\n\nclass Profile extends Compo...
javascript
chosen
[ { "from": "system", "value": "Fix the invalid use of Link component\n" }, { "from": "human", "value": "import React from 'react'\nimport classnames from 'classnames'\nimport { Link } from 'react-router'\nimport classes from './Users.scss'\nimport { userPoolId } from 'utils/settings'\n\nexport de...
javascript
chosen
[ { "from": "system", "value": "Fix menu fade mobile detection iOS bug\n" }, { "from": "human", "value": "'use strict';\n\nvar fadeMenuDirective = angular.module('ngFadeMenu', [ ] );\n\nfadeMenuDirective.directive( 'ngFadeMenu', function( $timeout, screenSize ) \n{\n\treturn {\n\t\trestrict: 'A',\...
javascript
chosen
[ { "from": "system", "value": "Change the name for the adapter\n" }, { "from": "human", "value": "var path = require('path');\n\nvar createPattern = function(path, included) {\n return {pattern: path, included: included, served: true, watched: false};\n};\n\nvar initMocha = function(files, mocha...
javascript
chosen
[ { "from": "system", "value": "Change order of env sources in getEnv()" }, { "from": "human", "value": "\"use strict\";\n\nvar use = require(\"alamid-plugin/use.js\");\n\nvar path = require(\"path\"),\n argv = require(\"minimist\")(process.argv.slice(2));\n\nfunction dynamicConfig(basePath, fi...
javascript
chosen
[ { "from": "system", "value": "Delete documents with same hash and update hash\n" }, { "from": "human", "value": "'use strict';\n\nvar async = require('async');\nvar Anyfetch = require('anyfetch');\n\n/**\n * HYDRATING FUNCTION\n *\n * @param {string} path Path of the specified file\n * @param {s...
javascript
chosen
[ { "from": "system", "value": "Add support for command line parameters\n" }, { "from": "human", "value": "'use strict';\n\nvar cp = require('child_process');\nvar log = console.log;\n\nmodule.exports = function () {\n\n module.constructor.prototype.require = function (path) {\n\n var s...
javascript
chosen
[ { "from": "system", "value": "Revert \"* Change ACL to be public by default\"\n\nThis reverts commit a264160c81298da3bcff29eff5866b23dff16933.\n" }, { "from": "human", "value": "var knox = require('knox'),\n _ = require('underscore');\n\nfunction Saver(opts) {\n\t_.extend(this, {\n\t\taws_key: ...
javascript
chosen
[ { "from": "system", "value": "Make sure action is object\n" }, { "from": "human", "value": "import {\n isUndefined,\n isObject,\n isEmpty\n} from 'lodash';\n\nimport {\n NoListenToGiven,\n NoInitialStateGiven\n} from './errors';\n\nexport default class Reducer {\n constructor(options) {\n ...
javascript
chosen
[ { "from": "system", "value": "Validate response in loadListSuccess action and throw error if invalid\n" }, { "from": "human", "value": "import {\n REGISTER_LIST,\n DESTROY_LIST,\n\n LOAD_LIST,\n LOAD_LIST_SUCCESS,\n LOAD_LIST_ERROR,\n} from './actionsTypes'\n\nexport function registerList(l...
javascript
chosen
[ { "from": "system", "value": "Swap command logging and action\n" }, { "from": "human", "value": "const Discord = require('discord.js');\nconst { token } = require('../credentials.json');\nconst CommandEngine = require('./commandEngine.js');\nconst logger = require('./logger.js');\nconst { getGui...
javascript
chosen
[ { "from": "system", "value": "Add DOM manipulation utility functions.\n" }, { "from": "human", "value": "'use strict';\n\nvar Game = require( './game' );\nvar Color = require( './math/color' );\nvar Geometry = require( './geometry/geometry' );\nvar Material = require( './materials/material' );\n...
javascript
chosen
[ { "from": "system", "value": "Hide pinning controls when embedded js-ipfs is active\n\n- there's no pinning in js-ipfs yet\n- closes #380\n" }, { "from": "human", "value": "'use strict'\n/* eslint-env browser, webextensions */\n\nconst browser = require('webextension-polyfill')\nconst html = req...
javascript
chosen
[ { "from": "system", "value": "Use 'text' input on non-touch devices\n\nAuditors: eater, cbhl\n" }, { "from": "human", "value": "(function(Perseus) {\n\nvar InputInteger = Perseus.Widget.extend({\n initialize: function() {\n this.$input = $(\"<input type='number'>\");\n },\n\n ren...
javascript
chosen
[ { "from": "system", "value": "Make eslint fail on error.\n" }, { "from": "human", "value": "#!/usr/bin/env node\nvar cli = require('eslint/lib/cli');\n\nvar path = require('path');\nvar eslintConfig = path.join(__dirname, '..', 'index.js');\n\ntry {\n var argv = process.argv;\n argv.push('--co...
javascript
chosen
[ { "from": "system", "value": "Purge of innecesary code for inChildProcess\n" }, { "from": "human", "value": "var Registry = require('./registry.js').registry();\n\nvar F_IN_CHILD_PROCESS = false;\n\nmodule.exports.inChildProcess = function(set){\n\n\tif(set === undefined){\n\t\treturn F_IN_CHILD...
javascript
chosen
[ { "from": "system", "value": "Remove hard code in dom-ready test case\n" }, { "from": "human", "value": "var MODULES_PATH = 'http://modules.seajs.org/'\nvar isLocal = location.href.indexOf('/~lifesinger/') > 0\n\nif (isLocal) {\n MODULES_PATH = 'http://' + location.host + '/~lifesinger/seajs/sp...
javascript
chosen
[ { "from": "system", "value": "Fix referring to wrong base\n" }, { "from": "human", "value": "import base from 'magnet-core/dist/base'\nimport get from 'lodash/get'\nimport isFunction from 'lodash/isFunction'\n\n// TODO: Allow pass object as parameter\n\n/**\n * A simple module to quickly convert...
javascript
chosen
[ { "from": "system", "value": "Check if the bot is sending the commands, and if so wait a little (twitch limitation)\n" }, { "from": "human", "value": "BOT.client.addListener('message' + BOT.settings.channel, function (from, message) {\n BOT.logMessage('[' + BOT.settings.channel + '] ' + from ...
javascript
chosen
[ { "from": "system", "value": "Fix condition, when no placeholder for empty value\n" }, { "from": "human", "value": "// @flow\nexport function roundValue(value: number | string | void, placeholder: boolean | void): number | string {\n if (typeof value !== 'number') {\n return placeholde...
javascript
chosen
[ { "from": "system", "value": "Update Guava sample to do user visible output.\n\nPiperOrigin-RevId: 377837192\n" }, { "from": "human", "value": "// Copyright 2020 Google LLC.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in complian...
javascript
chosen
[ { "from": "system", "value": "Define game prototype, define board attribute, and created boardify prototype function\n" }, { "from": "human", "value": "$(document).ready(function() {\n\n});\n" }, { "from": "gpt", "value": "$(document).ready(function() {\n var Game = function(givenBo...
javascript
chosen
[ { "from": "system", "value": "test: Fix doctypes impots in tests\n" }, { "from": "human", "value": "module.exports = {\n testURL: 'http://localhost/',\n moduleFileExtensions: ['js', 'jsx', 'json', 'styl'],\n setupFiles: ['<rootDir>/test/jestLib/setup.js'],\n moduleDirectories: ['src', 'node_...
javascript
chosen
[ { "from": "system", "value": "Modules(rooms): Remove unique constraint on configurations subdocuments\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies\n */\nvar mongoose = require('mongoose'),\n Schema = mongoose.Schema;\n\n/**\n * Room Schema\n */\nvar RoomSchema...
javascript
chosen
[ { "from": "system", "value": "Add JS if-statement and return-statement generators\n" }, { "from": "human", "value": "//statement blocks\n\nBlockly.Blocks['return_statement'] = {\n init: function() {\n this.setColour(160);\n this.setPreviousStatement(true);\n this.setNextStatement(true)...
javascript
chosen
[ { "from": "system", "value": "Fix reference to non-existent jQuery collection\n\nRaised on PR as comment:\n\nhttps://github.com/alphagov/notifications-admin/pull/2880/commits/e4b4be9d459b73196bb5c403cdec881f68462440#r270781103\n" }, { "from": "human", "value": "(function(Modules) {\n \"use stri...
javascript
chosen
[ { "from": "system", "value": "Fix middleware: an undefined value was being assigned in the Socket constructor\n" }, { "from": "human", "value": "'use strict';\n\nconst validate = require('./validate'),\n _ = require('lodash'),\n assert = require('assert'),\n schema = {\n properti...
javascript
chosen
[ { "from": "system", "value": "Allow a custom login logo to be displayed on login\n\nThis is to allow team logos to be shown when a user registers with a team email.\n" }, { "from": "human", "value": "/*\nCopyright 2015, 2016 OpenMarket Ltd\n\nLicensed under the Apache License, Version 2.0 (the \...
javascript
chosen
[ { "from": "system", "value": "Add className based on type\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n actions: {\n removeNotification: function() {\n this.notifications.removeNotification(this.get('notification')...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded import of dataService\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc directive\n * @name midjaApp.directive:googlechart\n * @description\n * # googlechart\n */\nangular.module('midjaApp')\n .directive('googlechart', function(data...
javascript
chosen
[ { "from": "system", "value": "Fix the createMessageId function in utility module" }, { "from": "human", "value": "// telegram.link\n//\n// Copyright 2014 Enrico Stara 'enrico.stara@gmail.com'\n// Released under the MIT license\n// http://telegram.link\n\n\n// Import depen...
javascript
chosen
[ { "from": "system", "value": "Create includes function\nCreate includes function that checks if a question is already in the questions array\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Service.extend({\n // Empty array to store favorite questions\n ...
javascript
chosen
[ { "from": "system", "value": "Add the moment.js French localization.\n" }, { "from": "human", "value": "app.translator.plural = function(count) {\n if (count >= 0 && count < 2) {\n return 'one';\n }\n else {\n return 'other';\n }\n};\n" }, { "from": "gpt", "value": "app.t...
javascript
chosen
[ { "from": "system", "value": "Split unit tests into two\n" }, { "from": "human", "value": "var abePro = require('../src/abe-protractor.js'),\n browserMock = {\n 'addMockModule': function (appName, app, data) {\n return [appName, app, data];\n }\n };\n\ndescribe('AB...
javascript
chosen
[ { "from": "system", "value": "Fix trello micro service url\n" }, { "from": "human", "value": "export const dbURI = (() => {\n if (process.env.NODE_ENV === 'dev' || process.env.NODE_ENV === 'test') {\n return 'mongodb://localhost/trelloService';\n } else {\n return 'mongodb://trellodb:270...
javascript
chosen
[ { "from": "system", "value": "ADD - Ajout de variables\n\ngit-svn-id: 826ffa9314ea4f0a0d971f1521ec677e2edc45e6@15189 e6edf6fb-f266-4316-afb4-e53d95876a76\n" }, { "from": "human", "value": "/*------------------------------------------------------------------------------------//\r\n// Client : -\r...
javascript
chosen
[ { "from": "system", "value": "[skip ci] Fix arrayconstructor for empty arrays\n" }, { "from": "human", "value": "import Expression from '../Expression';\nimport Specificity from '../Specificity';\nimport ArrayValue from '../dataTypes/ArrayValue';\nimport Sequence from '../dataTypes/Sequence';\n\...
javascript
chosen
[ { "from": "system", "value": "Add indexes to offers collection. Add language to offer schema.\n" }, { "from": "human", "value": "'use strict';\n\nvar mongoose = require('mongoose'),\n Schema = mongoose.Schema;\n\nvar OfferSchema = new Schema({\n title: Schema.Types.Mixed,\n description: Sch...
javascript
chosen
[ { "from": "system", "value": "Resolve bug with CORS, get user data\n" }, { "from": "human", "value": "import * as actionTypes from '../actionTypes/actionTypes';\nimport 'whatwg-fetch';\n\n/** ACTIONS ***\nActions define the action type, and do something based on the value of 'type' (i.e. receive...
javascript
chosen
[ { "from": "system", "value": "Add a login model hook test.\n\nThe problem I had last night was that modelName is not\navailable on a model instance.\n" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('route:login', 'Unit | Route | login', {\n // Speci...
javascript
chosen
[ { "from": "system", "value": "Fix immediate call to NS.loc\n\nLocalisation must load after Overture does, so this will not work. Must delay\ncalls to localise until later.\n" }, { "from": "human", "value": "// -------------------------------------------------------------------------- \\\\\n// Fi...
javascript
chosen
[ { "from": "system", "value": "Rename a leftover class name\n" }, { "from": "human", "value": "import Connection from './Connection.js';\n\nconst API_PATH = '/users';\n\nclass RiderCardsApi {\n createUser(userData) {\n return Connection.send(API_PATH, userData, 'POST');\n }\n}\nexport defaul...
javascript
chosen
[ { "from": "system", "value": "Use grid_on icon for QnA\n" }, { "from": "human", "value": "export default class {\n constructor($scope, auth, toast) {\n 'ngInject';\n\n $scope.buttons = [\n {\n name: 'View Code',\n icon: 'code',\n ...
javascript
chosen
[ { "from": "system", "value": "maint(Build): Update path to the webpack module federation config.\n" }, { "from": "human", "value": "/**\n * Module Federation support for Mockup.\n *\n * In this module federation setup Mockup is the main host, which loads other\n * \"remote\" bundles.\n *\n * Tho...
javascript
chosen
[ { "from": "system", "value": "Remove test for number of config properties\n\nThis is a really stupid way to test. Instead test the actual properties.\n" }, { "from": "human", "value": "define([\n 'page_config'\n],\nfunction (PageConfig) {\n describe('PageConfig', function () {\n\n var req;\...
javascript
chosen
[ { "from": "system", "value": "Remove references to unused library\n" }, { "from": "human", "value": "'use strict';\n\n/*!\n around | https://github.com/tofumatt/around\n\n HTML5 Foursquare Client\n*/\n\n// Require.js shortcuts to our libraries.\nrequire.config({\n paths: {\n async_stor...
javascript
chosen
[ { "from": "system", "value": "Use gulp local for self test" }, { "from": "human", "value": "var Gulp = require('gulp'),\n\n Linoleum = require('linoleum');\n\nvar $jsFiles = Linoleum.jsFiles;\nLinoleum.jsFiles = function() {\n return $jsFiles().concat('tasks/*.js', 'index.js');\n};\n\nrequir...
javascript
chosen
[ { "from": "system", "value": "Fix build script on windows.\n" }, { "from": "human", "value": "/*\nLeaflet building, testing and linting scripts.\n\nTo use, install Node, then run the following commands in the project root:\n\n npm install -g jake\n npm install\n\nTo check the code for erro...
javascript
chosen
[ { "from": "system", "value": "Use const and destructuring assignment" }, { "from": "human", "value": "let mix = require('laravel-mix').mix;\n\n/*\n |--------------------------------------------------------------------------\n | Mix Asset Management\n |--------------------------------------------...
javascript
chosen
[ { "from": "system", "value": "Make Casper ROOT_URL message shoutier and failier\n" }, { "from": "human", "value": "/*\n * can't use casper.cli since \"casperjs test\" treats all args as test filenames\n */\nvar root = require('system').env['ROOT_URL'];\nif (root === undefined) {\n casper.echo('...
javascript
chosen
[ { "from": "system", "value": "Enable all the browsers, but only one Firefox.\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mo...
javascript
chosen
[ { "from": "system", "value": "Check if form is dirty before going back to question list\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport CreateConnector from './CreateConnector';\nimport QuestionForm from './Form';\nimport { formValuesToR...
javascript
chosen
[ { "from": "system", "value": "Use direct transport nodemailer in dev env\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n\tdb: 'mongodb://localhost/riotevent-dev',\n\tapp: {\n\t\ttitle: 'riotevent - Development Environment'\n\t}\n};\n" }, { "from": "gpt", "val...
javascript
chosen
[ { "from": "system", "value": "Include ember-data.js.map in S3 upload\n" }, { "from": "human", "value": "module.exports = function(revision, tag, date){\n return {\n 'ember-data.js': fileObject('ember-data', '.js', 'text/javascript', revision, tag, date),\n 'ember-data.min.js': fileObject(...
javascript
chosen
[ { "from": "system", "value": "Move use strict up a level\n" }, { "from": "human", "value": "/*global chai, sinon, PortCollection, tkWorker, onconnect */\n\nvar expect = chai.expect;\n\ndescribe(\"Frame Worker Events\", function() {\n describe(\"#onconnect\", function() {\n \"use strict\";\n ...
javascript
chosen
[ { "from": "system", "value": "Update from depreciated style events\n" }, { "from": "human", "value": "Template.toolbox.events= {\n 'click .update-categories':function(){\n\n },\n 'click .give-invites':function(){\n Meteor.call('giveInvites');\n } ,\n 'click .update-user-profiles':funct...
javascript
chosen
[ { "from": "system", "value": "Use proper session id instead of whole String.match" }, { "from": "human", "value": "import { compose } from 'redux';\nimport { persistState } from 'redux-devtools';\nimport DevTools from '../containers/DevTools';\n\nexport default function configureStore(next) {\n ...
javascript
chosen
[ { "from": "system", "value": "Define production env var to allow React to strip out unnecessary checks on prod build\n" }, { "from": "human", "value": "const webpack = require('webpack');\nconst path = require('path');\nconst buildPath = path.resolve(__dirname, 'build');\nconst nodeModulesPath =...
javascript
chosen