conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add gulp task to deploy jsDocs\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n jsdoc = require('gulp-jsdoc'),\n docsSrcDir = './assets/js/**/*.js',\n docsDestDir = './docs/js',\n jsDocTask;\n\njsDocTask = function() {\n return gulp.src(...
javascript
chosen
[ { "from": "system", "value": "Update Gulp file to use es6 syntax." }, { "from": "human", "value": "var gulp = require(\"gulp\");\nvar sass = require(\"gulp-sass\");\nvar postcss = require(\"gulp-postcss\");\nvar autoprefixer = require(\"autoprefixer\");\nvar cssnano = require(\"cssnano\");\nvar ...
javascript
chosen
[ { "from": "system", "value": "Update Dimensions when window resizes\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2015-present, Nicolas Gallagher.\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * @flow\n */\n\nimport ExecutionEnvironment from 'fbjs/lib/E...
javascript
chosen
[ { "from": "system", "value": "Move ESI url prefix to variable\n" }, { "from": "human", "value": "import module from '../../module'\nimport command from '../../components/command'\nimport loader from '../../components/loader'\nimport axios from 'axios'\nimport humanize from '../../utils/humanize'...
javascript
chosen
[ { "from": "system", "value": "Update answer content before initializing rich text\n" }, { "from": "human", "value": "const $answer = $('.answer')\nconst {makeRichText} = require('./rich-text-editor')\n\nconst save = ($elem, async = true) => $.post({\n url: '/save',\n data: {text: $elem.htm...
javascript
chosen
[ { "from": "system", "value": "Add a new dank joke\n\nDem jokes" }, { "from": "human", "value": "/**\n * Prints a random programmer joke.\n * @author Vitor Cortez <vitoracortez+github@gmail.com>\n */\nvar jokeMeUpBoy = function() {\n const jokes = getListOfJokes();\n let rand = Math.floor(M...
javascript
chosen
[ { "from": "system", "value": "Update login controller to display dialog on error\n" }, { "from": "human", "value": "define(function() {\n var LoginController = function($location, AuthenticationService) {\n\n // reset login status\n AuthenticationService.clearCredentials...
javascript
chosen
[ { "from": "system", "value": "Fix overflow menu reopening immediately after selecting an item\n\nWas caused by mouseout toggling, instead of closing\n" }, { "from": "human", "value": "import React, { Component, PropTypes, cloneElement } from 'react';\nimport styles from './OverFlowMenu.module.sc...
javascript
chosen
[ { "from": "system", "value": "Add currency to cash register selectors" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { createSelector } from 'reselect';\nimport { pageStateSelector } from './pageSelectors';\n\nimport currency from ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Modify GithubApi to be able to set an OAuth token when instantiating\"\n\nThis reverts commit 2197aa8a6246348070b9c26693ec08fc44f02031.\n" }, { "from": "human", "value": "let Octokat = require('octokat');\nlet octo = new Octokat({});\n\nclass GithubApi {\n ...
javascript
chosen
[ { "from": "system", "value": "Add common React rules to preset\n" }, { "from": "human", "value": "module.exports = {\n extends: [\"./index.js\", \"plugin:react/recommended\"],\n env: {\n browser: true\n },\n plugins: [\n \"react\"\n ],\n parserOptions: {\n ...
javascript
chosen
[ { "from": "system", "value": "Update exports loader to Webpack 3 syntax\n\nCloses #67." }, { "from": "human", "value": "import webpack from \"webpack\";\nimport path from \"path\";\n\nexport default {\n module: {\n rules: [\n {\n test: /\\.((png)|(eot)|(woff)|(woff2)|(ttf)|(svg)|...
javascript
chosen
[ { "from": "system", "value": "Use rest param instead of slice\n" }, { "from": "human", "value": "'use strict';\n\nlet spawn = require('cross-spawn');\n\nmodule.exports = function spawnAsync() {\n let args = Array.prototype.slice.call(arguments, 0);\n let child;\n let promise = new Promise((fu...
javascript
chosen
[ { "from": "system", "value": "Make use server port is set\n" }, { "from": "human", "value": "// Load configurations file\nvar config = require('../configs/config.json');\n\n// Validate settings\nif (!config.mpd || !config.mpd.host || !config.mpd.port) {\n throw new Error(\"You must specify MP...
javascript
chosen
[ { "from": "system", "value": "Use class syntax for creating error\n" }, { "from": "human", "value": "/**\n AuthGW Custom Errors\n @author tylerFowler\n**/\n\n/**\n @name InvalidRoleError\n @desc Thrown when a role is given that is not in the list of roles\n @param { String } invalidRole\n**...
javascript
chosen
[ { "from": "system", "value": "Allow SIRIUS_PROXY_PATH override by global var\n" }, { "from": "human", "value": "export const TZ = 'Europe/Prague'\n\nexport const SIRIUS_PROXY_PATH = process.env.SIRIUS_PROXY_PATH\n" }, { "from": "gpt", "value": "export const TZ = 'Europe/Prague'\n\nex...
javascript
chosen
[ { "from": "system", "value": "Put package name in the storybook\n" }, { "from": "human", "value": "import { configure } from '@storybook/vue';\n\n// automatically import all files ending in *.stories.js\nconst req = require.context('../stories', true, /\\.stories\\.js$/);\nfunction loadStories()...
javascript
chosen
[ { "from": "system", "value": "Move auto release timeout to if check in acquire." }, { "from": "human", "value": "var acquires = {};\nvar Responder = require('cote').Responder;\n\nvar autoReleaseTimeout = 30000;\nvar counts = {\n acquires: 0,\n releases: 0\n};\n\nfunction acquire(req, cb) {...
javascript
chosen
[ { "from": "system", "value": "Exit from a setImmediate callback\n" }, { "from": "human", "value": "var app = require('electron').app\n\napp.on('ready', function () {\n app.exit(123)\n})\n\nprocess.on('exit', function (code) {\n console.log('Exit event with code: ' + code)\n})\n" }, { "...
javascript
chosen
[ { "from": "system", "value": "Fix pin pull resistor config\n" }, { "from": "human", "value": "const gpio = require('raspi-gpio')\n\nmodule.exports = class Switch {\n constructor (pinId) {\n this.nInput = new gpio.DigitalInput(pinId, gpio.PULL_UP)\n }\n\n on (changeListener) {\n this.nIn...
javascript
chosen
[ { "from": "system", "value": "Rename Pullquotes --> Semantic Pullquotes\n" }, { "from": "human", "value": "// Pullquotes\ndocument.addEventListener(\"DOMContentLoaded\", function(event) {\n function pullQuote(el){\n var parentParagraph = el.parentNode;\n parentParagraph.style.position = '...
javascript
chosen
[ { "from": "system", "value": "Change native messaging to keep the host running persistently, maintaining an open port\n" }, { "from": "human", "value": "'use strict';\n\nconst application = 'io.github.deathcap.nodeachrome';\n\nfunction decodeResponse(response, cb) {\n console.log('decodeRespons...
javascript
chosen
[ { "from": "system", "value": "Include ember-cli-babel polyfil to fix tests\n" }, { "from": "human", "value": "/* eslint-env node */\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n var app = new EmberAddon(defaults, {\n // Add opti...
javascript
chosen
[ { "from": "system", "value": "Add mime type option in karma file!\n" }, { "from": "human", "value": "var webpackConfig = require('./webpack.config');\n\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n frameworks: ['mocha', 'chai'],\n files: [\n 'test/**/*.ts'...
javascript
chosen
[ { "from": "system", "value": "Use Date function to help parse timezone.\n" }, { "from": "human", "value": "const moment = require('moment');\n\nexport const dateFormat = (utcDate) => {\n return moment(utcDate, 'YYYY-MM-DD hh:mm:ss z').format('LLL');\n};\n" }, { "from": "gpt", "value...
javascript
chosen
[ { "from": "system", "value": "Remove languages that don't have colors\n" }, { "from": "human", "value": "var request = require('request');\nvar yaml = require('js-yaml');\n\nmodule.exports = function (callback) {\n var languagesURL = 'https://raw.githubusercontent.com/github/linguist/master/lib...
javascript
chosen
[ { "from": "system", "value": "Use void 0 to get the undefined value.\n" }, { "from": "human", "value": "/**\n * isUndefined\n * Checks if a value is undefined or not.\n *\n * @name isUndefined\n * @function\n * @param {Anything} input The input value.\n * @returns {Boolean} `true`, if the input ...
javascript
chosen
[ { "from": "system", "value": "Fix typos in French translation of the example\n" }, { "from": "human", "value": "export const messages = {\n post: {\n name: 'Article',\n all: 'Articles',\n list: {\n search: 'Recherche',\n title: 'Titre',\n ...
javascript
chosen
[ { "from": "system", "value": "Write a (documenting) test that describes the \"lots-case\".\n" }, { "from": "human", "value": "import {describe, it} from 'mocha';\nimport {\n assertThat, equalTo,\n} from 'hamjest';\n\nconst toSrcDestPairs = (files, {sourcePath, destinationPath}) =>\n files.map(...
javascript
chosen
[ { "from": "system", "value": "Fix menu in template list\n" }, { "from": "human", "value": "import { provideHooks } from 'redial'\nimport { connect } from 'react-redux'\n\nimport * as MobilizationActions from '~mobilizations/action-creators'\nimport * as MobilizationSelectors from '~mobilizations...
javascript
chosen
[ { "from": "system", "value": "Change for socket connection on Heroku\n" }, { "from": "human", "value": "var app = angular.module(\"blogApp\", []);\nvar posts = [];\n\napp.config(function($routeProvider)\n{\n\t$routeProvider\n\t\t.when('/', {\n\t\t\ttemplateUrl: 'views/home.html',\n\t\t\tcontroll...
javascript
chosen
[ { "from": "system", "value": "Add accessToken to profile before done\n" }, { "from": "human", "value": "'use strict';\nvar cp = require('child_process');\nvar child = cp.fork(__dirname + '/child.js');\nvar passport = require('passport');\nvar DropboxOAuth2Strategy = require('passport-dropbox-oau...
javascript
chosen
[ { "from": "system", "value": "Update name of callback functions\n" }, { "from": "human", "value": "import \"es6-symbol\";\nimport \"weakmap\";\n\nimport svgLoader from \"./loader.js\";\nimport Icon from \"./components/Icon.js\";\nimport Sprite from \"./components/Sprite.js\";\nimport Theme from ...
javascript
chosen
[ { "from": "system", "value": "Fix test wasn't actually testing\n" }, { "from": "human", "value": "let ivm = require('isolated-vm');\nlet isolate = new ivm.Isolate;\n\nfunction makeContext() {\n\tlet context = isolate.createContextSync();\n\tlet global = context.globalReference();\n\tglobal.setSy...
javascript
chosen
[ { "from": "system", "value": "Optimize & fix table painting script" }, { "from": "human", "value": "$(function () {\r\n // paint tables with dnnGrid classes\r\n var table = \".employeeDetails #employeeDisciplines table\";\r\n $(table).addClass (\"dnnGrid\").css (\"border-collapse\", \"...
javascript
chosen
[ { "from": "system", "value": "Improve Flow type of the navigation\n" }, { "from": "human", "value": "// @flow\n\nexport type Navigation = {\n navigate: (screen: string, parameters?: Object) => void,\n state: {\n params: Object,\n },\n};\n" }, { "from": "gpt", "value": "// @flow...
javascript
chosen
[ { "from": "system", "value": "Refactor mouse events in resizeable columns\n" }, { "from": "human", "value": "import Ember from \"ember\";\n\nconst { $, inject, run } = Ember;\n\nexport default Ember.Service.extend({\n fastboot: inject.service(),\n\n init() {\n this._super(...arguments);\n ...
javascript
chosen
[ { "from": "system", "value": "[loaders] Add documentation for a bunch of functions.\n" }, { "from": "human", "value": "import loadersWithAuthentication from \"./loaders_with_authentication\"\nimport loadersWithoutAuthentication from \"./loaders_without_authentication\"\n\nexport default (accessT...
javascript
chosen
[ { "from": "system", "value": "Fix HTML escaping in renderer crashing on non-string values\n" }, { "from": "human", "value": "var DOM = (function(){\n var entityMap = {\n \"&\": \"&amp;\",\n \"<\": \"&lt;\",\n \">\": \"&gt;\",\n '\"': '&quot;',\n \"'\": '&#39;',\n \"/\": '&#x2F...
javascript
chosen
[ { "from": "system", "value": "Fix wrong exchange of cartbox-domelement\n" }, { "from": "human", "value": "var onReady = require('kwf/on-ready');\nvar $ = require('jQuery');\nvar getKwcRenderUrl = require('kwf/get-kwc-render-url');\n\nonReady.onRender('.kwcClass',function(el) {\n var url = get...
javascript
chosen
[ { "from": "system", "value": "Add data fetching for testing out Redis\n" }, { "from": "human", "value": "import graphql from 'babel-plugin-relay/macro'\nimport { createFragmentContainer } from 'react-relay'\n\nimport Dashboard from 'js/components/Dashboard/DashboardComponent'\n\nexport default c...
javascript
chosen
[ { "from": "system", "value": "Refactor good stop sending logs to remote server\n\nComments in lib/config.js still show how to send\nlogs to remote server. But, it is not used.\n" }, { "from": "human", "value": "var Fs = require('fs');\n\nvar config = module.exports = {};\n\n// Configuring TLS\n...
javascript
chosen
[ { "from": "system", "value": "Rename router file part iii.\n" }, { "from": "human", "value": "/**\n * Load all the Views.\n */\n\nrequire([\n 'models/user',\n 'controllers/home',\n 'outer'\n], function (User, Home, Router) {\n\n var users = [new User('Barney'),\n new User('Cartman'),\n ...
javascript
chosen
[ { "from": "system", "value": "Tests: Make the first dummy test pass\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('Controller: MainCtrl', function () {\n\n // load the controller's module\n beforeEach(module('quakeStatsApp'));\n\n var MainCtrl,\n scope;\n\n // Initialize th...
javascript
chosen
[ { "from": "system", "value": "Revert \"only cache templates in production\"\n\nThis reverts commit 4e2bf7d48d60bba8b4d4497786e4db0ab8f81bef.\n" }, { "from": "human", "value": "'use strict';\nconst fs = require('fs');\nconst Promise = require('bluebird');\nconst readFile = Promise.promisify(fs.re...
javascript
chosen
[ { "from": "system", "value": "Enable validations on CC form\n" }, { "from": "human", "value": "Spree.createEncryptedAdyenForm = function(paymentMethodId) { \n document.addEventListener(\"DOMContentLoaded\", function() {\n var checkout_form = document.getElementById(\"checkout_form_payment\")...
javascript
chosen
[ { "from": "system", "value": "Reset error message when dialog re-opened.\n" }, { "from": "human", "value": "//\n// nav-controller.js\n// Contains the controller for the nav-bar.\n//\n\n(function () {\n 'use strict';\n\n angular.module('movieFinder.controllers')\n .controller('Na...
javascript
chosen
[ { "from": "system", "value": "Fix weird error messages about play() and pause()\n\n" }, { "from": "human", "value": "let lastPachiIndex = -1\nlet lastCaptureIndex = -1\n\nlet captureSounds = Object.keys(new Int8Array(5)).map(x => new Audio(`./data/capture${x}.mp3`))\nlet pachiSounds = Object.key...
javascript
chosen
[ { "from": "system", "value": "Fix that URL--we just have to update Kibana." }, { "from": "human", "value": "var express = require('express');\nvar app = express();\n\napp.use('/game', express.static(__dirname + '/public'));\n\nvar server = app.listen(3000, function () {\n var host = server.addr...
javascript
chosen
[ { "from": "system", "value": "Change getPointFromIp & getCityFromIp methods signature" }, { "from": "human", "value": "var geoip = require('geoip');\n\nfunction Point(latitude, longitude) {\n this.latitude = latitude;\n this.longitude = longitude;\n}\n\nmodule.exports = {\n /*\n * R...
javascript
chosen
[ { "from": "system", "value": "fix(bootstrapping): Fix a bug where checking process.env.NODE_ENV was not safe enough\n\nthe check for process variable existence threw an error in some build systems which do not take care\n\nof the process global variable such as angular cli.\n" }, { "from": "human", ...
javascript
chosen
[ { "from": "system", "value": "Fix module require chicken-egg problem\n" }, { "from": "human", "value": "//Get required modules\nvar Connection = require( 'ssh2' );\nvar domain = require( 'domain' );\n\n//Add my libs\nvar handlers = require( './handlers.js' );\n\n//Auxiliary function to ini...
javascript
chosen
[ { "from": "system", "value": "Expand the tree view by defualt\n" }, { "from": "human", "value": "'use babel';\n\nexport default class Parser {\n\n source: null\n editor: null\n\n parse(source, editor) {\n this.source = source;\n this.editor = editor;\n return this.scan();\n }\n\n s...
javascript
chosen
[ { "from": "system", "value": "Change events to \"input\" and \"change\"\n" }, { "from": "human", "value": "// jquery.linkem.js\n// Copyright Michael Hanson\n// https://github.com/mybuddymichael/jquery-linkem\n\n(function( $ ) {\n\n $.fn.linkem = function() {\n var linked = this;\n this.on...
javascript
chosen
[ { "from": "system", "value": "Remove 'required' validation from 'description' field\n" }, { "from": "human", "value": "// npm dependencies\nconst mongoose = require('mongoose');\n\n// defines Product model\n// contains 3 fields (title, description, and price)\nlet Product = mongoose.model('Produ...
javascript
chosen
[ { "from": "system", "value": "Update console log error text\n" }, { "from": "human", "value": "/*jslint browser: true, white: true, plusplus: true */\n/*global angular, console, alert*/\n\n(function () {\n 'use strict';\n var app = angular.module('status', ['ui.bootstrap', 'chieffancypants.loa...
javascript
chosen
[ { "from": "system", "value": "chore(Desktop): Fix resolution of native Node modules\n\nSee https://github.com/electron-userland/electron-forge/pull/2449\n" }, { "from": "human", "value": "const plugins = require('./webpack.plugins')\nconst webpack = require('webpack')\n\nmodule.exports = {\n /*...
javascript
chosen
[ { "from": "system", "value": "Use the correct process.config variable\n" }, { "from": "human", "value": "var util = require('util');\nvar Socket = require('net').Socket;\n\n/* Make sure we choose the correct build directory */\nvar directory = process.config.default_configuration === 'Debug' ? '...
javascript
chosen
[ { "from": "system", "value": "Change markup so that main el is outside of container, can take a full width bg color\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\n/* global styles for app */\nimport './styles/app.scss';\n\n/* application components */\nimport { H...
javascript
chosen
[ { "from": "system", "value": "Fix initializer for Ember 2.15+\n" }, { "from": "human", "value": "/**\n * Simple initializer that implements the mutationObserverMixin \n * in all the Components. It uses a flag defined in the app \n * environment for it.\n */\n\nimport Ember from 'ember';\nimport ...
javascript
chosen
[ { "from": "system", "value": "Check for lotteries data before trying to process them.\n" }, { "from": "human", "value": "/**\n * Created by mgab on 14/05/2017.\n */\nimport React,{ Component } from 'react'\nimport Title from './common/styled-components/Title'\n\nimport Lottery from './Lottery'\n...
javascript
chosen
[ { "from": "system", "value": "Fix header not being validated if 'auth.header' option is not given.\n\nIn authenticate middleware.\n" }, { "from": "human", "value": "import handleAdapter from '../handleAdapter'\n\nexport default (config) => {\n\tif ( ! config.enabled) return (req, res, next) => {...
javascript
chosen
[ { "from": "system", "value": "Add ability to set state of subheader\n" }, { "from": "human", "value": "import { getColor } from './helpers';\nimport { StyleSheet, View, Text } from 'react-native';\nimport { TYPO, THEME_NAME } from './config';\nimport React, { Component, PropTypes } from 'react';...
javascript
chosen
[ { "from": "system", "value": "Remove unused variable that caused linter warning\n" }, { "from": "human", "value": "import History from '../../../src/history'\n\ndescribe('History::setLimit', function() {\n const action = n => n\n\n it('sets the correct size given Infinity', function() {\n c...
javascript
chosen
[ { "from": "system", "value": "Fix empty history issue, when we never could go back\n" }, { "from": "human", "value": "phoxy._ClickHook =\n{\n _: {},\n};\n\nphoxy._ClickHook._.click =\n{\n InitClickHook: function()\n {\n document.querySelector('body').addEventListener('click', function(...
javascript
chosen
[ { "from": "system", "value": "Make it so that the Structure Maintainer includes roads as well.\n" }, { "from": "human", "value": "module.exports = function() {\n console.log(\"Maintaining Structures... \" + Game.getUsedCpu());\n var newCandidates = [],\n links = [],\n spawns ...
javascript
chosen
[ { "from": "system", "value": "Update form definition in tests to demonstrate functionality\n" }, { "from": "human", "value": "define(function () {\n return [\n {\n \"default\": {\n name: \"TestForm\",\n label: \"TestForm\",\n _elements: [\n {\n \...
javascript
chosen
[ { "from": "system", "value": "Update bluprint to install latest telling-stories-dashboard\n" }, { "from": "human", "value": "/*jshint node:true*/\n\nvar existsSync = require('exists-sync');\n\nmodule.exports = {\n description: 'Install telling-stories dependencies',\n\n normalizeEntityName: fu...
javascript
chosen
[ { "from": "system", "value": "front-end: Add game logic on game controller\n" }, { "from": "human", "value": "define([\n\n 'Backbone',\n\n //Collection\n 'app/collections/games'\n\n], function(\n\n Backbone,\n\n Games\n\n){\n\n var GameController = Backbone.View.extend({\n\n events: {\n...
javascript
chosen
[ { "from": "system", "value": "Hide sidenav when selecting team\n" }, { "from": "human", "value": "const Backbone = require('backbone');\nrequire('backbone.marionette');\nconst Repository = require('../../domain/repository');\nconst TeamItemViewTemplate = require('../template/team-item-view-templ...
javascript
chosen
[ { "from": "system", "value": "Fix issue with brackets in generated queries.\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n define(\n [\n 'lodash',\n 'jquery'\n ],\n function (_, $) {\n return function (baseUrl, aj...
javascript
chosen
[ { "from": "system", "value": "Add timer and remove confirm buttonk, overall cleanup for better ux\n" }, { "from": "human", "value": "var studentSignUp = function(timeslot_id){\n var data = {};\n data.subject = $(\"#subject-input\").val();\n $(\"#modal_remote\").modal('hide');\n $.ajax({\n ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"set only forEach globally for Array.prototyp if not exists (ie8 fallback)\"\"\n\nThis reverts commit 86586d27805750e77dd598669d12336be35c4d51.\n" }, { "from": "human", "value": "var _ = require('underscore');\n\n_.extend(Array.prototype, {\n //d...
javascript
chosen
[ { "from": "system", "value": "Add `toOpponentPiece` method for NullPiece\n\n* return undefined. because NullPiece can't captured.\n" }, { "from": "human", "value": "import Base from './base';\nimport * as CONST from '../constants/pieceTypes';\n\nexport default class NullPiece extends Base {\n c...
javascript
chosen
[ { "from": "system", "value": "Move eslint in to test grunt task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.config.init({\n pkg: grunt.file.readJSON('package.json')\n });\n\n grunt.loadNpmTasks('grunt-eslint');\n grunt.config('eslint', {\n dist: {\n ...
javascript
chosen
[ { "from": "system", "value": "Prepend \"3.\" since the function returns the decimals.\n" }, { "from": "human", "value": "var PI = require(\"../lib\");\n\n// Two decimals\nconsole.log(PI(3));\nconsole.log(PI(16));\n\n// 100 decimals\nconsole.log(PI(100));\n" }, { "from": "gpt", "value...
javascript
chosen
[ { "from": "system", "value": "Fix transpiling issue in tests\n" }, { "from": "human", "value": "/*!\n * React Native Autolink\n *\n * Copyright 2016-2019 Josh Swan\n * Released under the MIT license\n * https://github.com/joshswan/react-native-autolink/blob/master/LICENSE\n */\n\nimport Adapter ...
javascript
chosen
[ { "from": "system", "value": "Add update to useReducer comments\n\nCo-Authored-By: Chris Petty <637933a5c948ed3d23257417b9455449bf8cfd77@gmail.com>" }, { "from": "human", "value": "import { useReducer, useCallback } from 'react';\nimport getReducer from '../pages/dataTableUtilities/reducer/getRe...
javascript
chosen
[ { "from": "system", "value": "Bring back `--no-sandbox` for Travis CI compatibility\n" }, { "from": "human", "value": "const serverEndpoints = require('./server')\n\nmodule.exports = function(config) {\n config.set({\n basePath: '..',\n frameworks: ['detectBrowsers', 'mocha', 'chai'],\n ...
javascript
chosen
[ { "from": "system", "value": "Add Drop.Views object to hold React components\n" }, { "from": "human", "value": "//= require ./core\n//= require ./config\n//= require_self\n//= require_tree ./routers\n//= require_tree ./views\n//= require_tree ./models\n\n(function () {\n\n\tvar Drop = window.Dro...
javascript
chosen
[ { "from": "system", "value": "Add bower package to project\n\nBelieve this will fix issue #3, plus is desired behaviour anyway because you need the installing Ember project to have sweetalert2 installed via bower." }, { "from": "human", "value": "module.exports = {\n normalizeEntityName: functi...
javascript
chosen
[ { "from": "system", "value": "Set private properties directly in initialize(), no need to call setters.\n" }, { "from": "human", "value": "var GradientStop = Base.extend({\n\tbeans: true,\n\n\t// TODO: support midPoint? (initial tests didn't look nice)\n\tinitialize: function(color, rampPoint) {...
javascript
chosen
[ { "from": "system", "value": "Patch for Event handler (second try) :)\n\nReal patch for event handler...\n" }, { "from": "human", "value": "\"use babel\";\n\nimport { Emitter } from 'atom'\nexport default class EventHandlerHelper\n{\n constructor()\n {\n this.emitter = new Emitter();\n }\n...
javascript
chosen
[ { "from": "system", "value": "Fix typo in counter app" }, { "from": "human", "value": "export default `import { h, app } from \"hyperapp\"\n\napp({\n init: 0,\n view: state =>\n h(\"div\", {}, [\n h(\"h1\", {}, state),\n h(\"button\", { onclick: state => state - 1 }, \"subtract\")...
javascript
chosen
[ { "from": "system", "value": "Use url path instead of full url for threads\n" }, { "from": "human", "value": "var Vue = require('vue');\n\nvar CommentService = require('./services/comment-service.js');\n\nvar template = require('./list.html');\n\nnew Vue({\n el: '#platon-comment-thread',\n ...
javascript
chosen
[ { "from": "system", "value": "Revert \"reverted change of couchdb host\"\n\nThis reverts commit 6d60341ba077ef645c1f2f6dbf8a4030e07b2812.\n" }, { "from": "human", "value": "\nvar App = Ember.Application.create();\n\nApp.Boards = ['common', 'intermediate', 'advanced'];\n\nApp.Host = \"http://loca...
javascript
chosen
[ { "from": "system", "value": "Fix path offline detection (don't catch readdir() errors)\n" }, { "from": "human", "value": "const debug = require('debug')\nconst log = debug('app:media:fileScanner:getFiles')\nconst { promisify } = require('util')\nconst { resolve } = require('path')\nconst fs = r...
javascript
chosen
[ { "from": "system", "value": "Clean up view name in render performance tree\n" }, { "from": "human", "value": "/**\n A tree structure for assembling a list of render calls so they can be grouped and displayed nicely afterwards.\n\n @class ProfileNode\n**/\nvar ProfileNode = function(start, pay...
javascript
chosen
[ { "from": "system", "value": "Add initializaton of Cloud Firestore instance for use accross all scripts.\n" }, { "from": "human", "value": "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance wi...
javascript
chosen
[ { "from": "system", "value": "Fix editor crashing when adding log deposit\n" }, { "from": "human", "value": "import * as PIXI from 'pixi.js';\nimport PlaceTool from './placetool';\nimport {createLogDepositGraphics} from '../game/logdeposit';\n\nexport default class DepositTool extends PlaceTool ...
javascript
chosen
[ { "from": "system", "value": "Remove db from props in template\n\nNow that I have a React Native project where I take db and friends from\ncontext, I find that the automatic db in propTypes is a hassle to\ndelete, so I've removed it for now.\n" }, { "from": "human", "value": "'use strict';\n\nim...
javascript
chosen
[ { "from": "system", "value": "Add cpus directive unit test\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n describe('directives module', function () {\n var $compile,\n $rootScope,\n DropletMock;\n beforeEach(module('directives'));\n ...
javascript
chosen
[ { "from": "system", "value": "Fix copy paste typo in the comments" }, { "from": "human", "value": "module.exports = {\n build: {\n vendor: ['vue-apollo', 'apollo-client']\n },\n router: {\n middleware: 'apollo'\n },\n plugins: [\n // Will inject the plugin in the $root app and also...
javascript
chosen
[ { "from": "system", "value": "Use currenUser instead of getting it from session\n" }, { "from": "human", "value": "import Ember from \"ember\";\nimport config from \"../config/environment\";\n\nexport default Ember.Service.extend({\n session: Ember.inject.service(),\n rollbar: Ember.inject.ser...
javascript
chosen
[ { "from": "system", "value": "Check for permission only in external calls\n\n" }, { "from": "human", "value": "const auth = require('@feathersjs/authentication');\nconst globalHooks = require('../../../hooks');\nconst { ScopeService } = require('./ScopeService');\nconst { lookupScope, checkScope...
javascript
chosen
[ { "from": "system", "value": "Implement case for arithmetic sequences\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = {\n\taritGeo: function(numlist) {\n\t\tif (!Array.isArray(numlist)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (numlist.length === 0) {\n\t\t\treturn 0;\n\t\t}\n\...
javascript
chosen
[ { "from": "system", "value": "Update router to default to slide control\n" }, { "from": "human", "value": "/* jslint node: true */\n'use strict';\n\nvar AUTHORIZED_URLS = [\n '/index.html'\n];\nvar HOST = '0.0.0.0';\nvar PORT = 9917;\n\nfunction handleIo(socket) {\n socket.on('slide-update', f...
javascript
chosen
[ { "from": "system", "value": "Use address when there is no location\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react';\nimport { IMAGES_ROOT } from '../constants/Constants';\nimport shouldPureComponentUpdate from 'react-pure-render/function';\nimport selectn ...
javascript
chosen
[ { "from": "system", "value": "Add check for message exist in ncUtilsFlash.flashMessage (SAAS-822)\n\nAdded condition for ncUtilsFlash.flashMessage function.\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n\n angular.module('ncsaas')\n .factory('ncUtilsFlash', ['Flash', ncU...
javascript
chosen
[ { "from": "system", "value": "Throw error if factory is not found\n" }, { "from": "human", "value": "FactoryBoy = {};\nFactoryBoy._factories = [];\n\nFactory = function (name, collection, attributes) {\n this.name = name;\n this.collection = collection;\n this.attributes = attributes;\n};\n\n...
javascript
chosen