conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Split data processing / checks to separate module\n" }, { "from": "human", "value": "var NO_DATA = 'no data';\n\nmodule.exports = {\n\n prepareModuleForRender: function (dashboardConfig, module) {\n var data = {\n departmentCode: dashboardConfig.department....
javascript
chosen
[ { "from": "system", "value": "Fix browser conflicts for test suite\n" }, { "from": "human", "value": "var env = require('./environment.js');\n\n// A small suite to make sure the cucumber framework works.\nexports.config = {\n seleniumAddress: env.seleniumAddress,\n\n framework: 'custom',\n f...
javascript
chosen
[ { "from": "system", "value": "Use urlReplace as opposed to event listener\n" }, { "from": "human", "value": "var hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name:'Art UK',\n prepareImgLinks:function (callback) {\n var res = [];\n $('div.credit').each...
javascript
chosen
[ { "from": "system", "value": "Send unhandled RSVP errors that don't provide an Error.\n" }, { "from": "human", "value": "/**\n * Ember.js plugin\n *\n * Patches event handler callbacks and ajax callbacks.\n */\n;(function(window, Raven, Ember) {\n'use strict';\n\n// quit if Ember isn't on the pa...
javascript
chosen
[ { "from": "system", "value": "Make input type = \"number\"\n\nThis should help display the correct keyboard on mobile devices" }, { "from": "human", "value": "import React from 'react';\nimport RIEStatefulBase from './RIEStatefulBase';\n\nexport default class RIENumber extends RIEStatefulBase {\...
javascript
chosen
[ { "from": "system", "value": "Connect returnBook method to user\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\nimport { Route, Switch } from 'react-router-dom';\nimport Navbar from './Navbar';\nimport PageFooter from './PageFooter';\nimport...
javascript
chosen
[ { "from": "system", "value": "Fix issue where app did not load for logged-out user.\n" }, { "from": "human", "value": "/* @flow */\nimport firebase from 'firebase/app'\n\n// Initiates Firebase auth and listen to auth state changes\nconst initialize = (config: Object, store: Object) => {\n fireb...
javascript
chosen
[ { "from": "system", "value": "Remove tests that test concept hierarchy\n" }, { "from": "human", "value": "\ndescribeMixin('search/types/withSearch', function() {\n\n var mockConcepts;\n\n beforeEach(function() {\n setupComponent();\n\n mockConcepts = function(concepts) {\n ...
javascript
chosen
[ { "from": "system", "value": "Make the test actually work\n" }, { "from": "human", "value": "const test = require('tape')\nconst BorrowState = require('borrow-state')\n\ntest(`read-only-safety`, (t) => {\n t.plan(4)\n let myState = new BorrowState()\n myState.block().then((state) => {\n t....
javascript
chosen
[ { "from": "system", "value": "Quit with error code when log('throw') is called\n" }, { "from": "human", "value": "var colors = require('colors');\n\nvar CargoLog = function () {\n var scope = this;\n this.verbose = false;\n return function (cargo) {\n scope.cargo = cargo;\n ...
javascript
chosen
[ { "from": "system", "value": "Set Vue-interceptors console.log to HTTP Status code.\n" }, { "from": "human", "value": "import Vue from 'vue';\nimport VueResource from 'vue-resource';\nVue.use(VueResource);\nVue.http.interceptors.push((request, next) => {\n request.credentials = true;\n nex...
javascript
chosen
[ { "from": "system", "value": "Add zip to city label\n" }, { "from": "human", "value": "export default (petition = {}) => {\n return petition.city && petition.city.data\n ? petition.city.data.name\n : '';\n};\n" }, { "from": "gpt", "value": "export default (petition = {}) => {\...
javascript
chosen
[ { "from": "system", "value": "Verify will now output all mismatches\n" }, { "from": "human", "value": "import path from 'path';\nimport objectPath from 'object-path';\nimport Q from 'q';\nimport hashFile from './hashFile';\n\nexport default function verifyFiles(cwd, script, root) {\n const defe...
javascript
chosen
[ { "from": "system", "value": "Fix missing productDir config option\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nimport 'source-map-support/register'\n\nimport yargs from 'yargs'\nimport rc from 'rc'\nimport {basename as pathBasename} from 'path'\n\nconst config = rc('lenticular')\n\...
javascript
chosen
[ { "from": "system", "value": "Fix deprecated method: res.send() to res.sendStatus()\n" }, { "from": "human", "value": "var request = require('request')\n ;\n\nmodule.exports.query = function(req,res) {\n\n var badCharsAddr = /[^A-Za-z0-9\\.\\-\\#\\s]/g;\n var addr = req.param('address') || ''...
javascript
chosen
[ { "from": "system", "value": "Enable animations in bridgeless mode on iOS\n\nReviewed By: ejanzer\n\nDifferential Revision: D21465166\n\nfbshipit-source-id: b34e8e97330b897e20d9a4b05dba1826df569e16\n" }, { "from": "human", "value": "/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n ...
javascript
chosen
[ { "from": "system", "value": "Add some pending tests to describe the API\n" }, { "from": "human", "value": "'use strict';" }, { "from": "gpt", "value": "/* global describe, it */\n'use strict';\n\ndescribe('tweet-baker', function () {\n\n it('should be a function');\n it('shoul...
javascript
chosen
[ { "from": "system", "value": "Remove path lib from external modules\n" }, { "from": "human", "value": "import babel from 'rollup-plugin-babel';\n\nexport default {\n entry: 'src/index.js',\n sourceMap: true,\n plugins: [\n babel({\n runtimeHelpers: true,\n }),\n ],\n external: [\...
javascript
chosen
[ { "from": "system", "value": "Remove external in top level rollup\n" }, { "from": "human", "value": "import commonjs from '@rollup/plugin-commonjs';\nimport glslify from 'rollup-plugin-glslify';\nimport resolve from '@rollup/plugin-node-resolve';\nimport copy from \"rollup-plugin-copy\";\n\n\nex...
javascript
chosen
[ { "from": "system", "value": "rts: Fix orientation & direction of BallTurret gun barrels.\n" }, { "from": "human", "value": "/* eslint-env es6 */\n/* global THREE */\n/* exported BallTurret */\n\nclass BallTurret extends THREE.Mesh {\n constructor() {\n const geometry = new THREE.Geometry();...
javascript
chosen
[ { "from": "system", "value": "Disable submit button while loading relations in unpublish dialog\n" }, { "from": "human", "value": "(function () {\n \"use strict\";\n\n function UnpublishController($scope, $controller, editorState, service) {\n var vm = this;\n angular.extend...
javascript
chosen
[ { "from": "system", "value": "Fix Buffer tests in <= 0.10\n" }, { "from": "human", "value": "var test = require('tap').test;\nvar browserify = require('browserify');\n\nvar vm = require('vm');\nvar path = require('path');\n\ntest('sync string encoding', function (t) {\n t.plan(2);\n var b ...
javascript
chosen
[ { "from": "system", "value": "Make sure it does not pick as well\n" }, { "from": "human", "value": "const path = require('path');\nconst expect = require('chai').expect;\nconst findProject = require('../../src/config/ios/findProject');\nconst mockFs = require('mock-fs');\nconst projects = requi...
javascript
chosen
[ { "from": "system", "value": "Return the correctly formatted error message\n" }, { "from": "human", "value": "\"use strict\";\n\nvar JSHINT = require(\"jshint\").JSHINT,\n assert = require(\"assert\"),\n glob = require(\"glob\"),\n path = require(\"path\"),\n fs = require(\"f...
javascript
chosen
[ { "from": "system", "value": "Fix the user creation script\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nrequire('../lib/fin/lib/js.io/packages/jsio')\n\njsio.path.shared = './lib/fin/js/'\njsio.path.server = './lib/fin/js/'\njsio.path.client = './lib/fin/js/'\njsio.path.fan = '.'\n\...
javascript
chosen
[ { "from": "system", "value": "Make sure Aspell plugin extends rather than overwrites config.extraPlugins\n" }, { "from": "human", "value": "//= requires \"editor\"\n\n/*\n * Includes the Aspell plugin (kindly ported from FCKeditor by Christian\n * Boisjoli) which provides spell checking without ...
javascript
chosen
[ { "from": "system", "value": "Drinks: Check the response whether null or empty\n" }, { "from": "human", "value": "(function (env) {\n \"use strict\";\n\n function getInfoBoxData(item) {\n var infoboxData = [{\n heading: 'Ingredients:'\n }];\n for (var i = 1;...
javascript
chosen
[ { "from": "system", "value": "Edit templateUrl value. Add require, link values. Add nwCategoryItemDirective.. Comment code\n" }, { "from": "human", "value": "// js/directives/nw-category-select.directive\n\n(function() {\n \"use strict\";\n\n angular.module(\"NoteWrangler\")\n .directive(\"...
javascript
chosen
[ { "from": "human", "value": "Add header comments to top of file.\n" }, { "from": "gpt", "value": "/**\n * status.js\n * chd 160218\n *\n * status: \n * function inputs: \n * 1. error.txt array of strings from XMLvalidataion \n * 2. error.txt array of strings from IMGvalidataion \n * ...
javascript
chosen
[ { "from": "system", "value": "Add offset to clickable square\n" }, { "from": "human", "value": "BEST.module('famous:examples:demos:clickable-square', 'HEAD', {\n tree: 'clickable-square.html',\n behaviors: {\n '#context': {\n 'size': [200, 200],\n 'position': f...
javascript
chosen
[ { "from": "system", "value": "Make donuts display raw values\n" }, { "from": "human", "value": "function toggleDisp(){\n var txt = document.getElementById('asText');\n var box = document.getElementById('asBoxed');\n if (txt.style.display == 'none') {\n box.style.display = 'none';...
javascript
chosen
[ { "from": "system", "value": "Apply proposals by tut2 feedback\n" }, { "from": "human", "value": "var lastField = null;\nvar currentFillColor = ''; // ???\nvar changeCounter = 0; // ???\n\nfunction setField(element) {\n // element contains the current html element\n if (element.sty...
javascript
chosen
[ { "from": "system", "value": "Fix plural form of todo when there are no todos" }, { "from": "human", "value": "import React from 'react';\nimport TodoItem from './TodoItem';\n\nexport default class extends React.Component {\n render() {\n return (\n <div>\n <button onClick={this....
javascript
chosen
[ { "from": "system", "value": "Disable the error-prone Discourse synchronization test to fix Travis.\n" }, { "from": "human", "value": "// Copyright © 2017 Michael Howell. All rights reserved.\n// The following code is covered by the AGPL-3.0 license.\n\nconst selfapi = require('selfapi');\n\ncon...
javascript
chosen
[ { "from": "system", "value": "Use .apply() in function Server(), to apply whatever number of arguments\n" }, { "from": "human", "value": "var Backbone = require('./backbone');\nvar _ = require('underscore');\nvar HTTPServer = require('express').HTTPServer;\nvar middleware = require('..').middlew...
javascript
chosen
[ { "from": "system", "value": "Disable symlink test on Windows\n" }, { "from": "human", "value": "var fstream = require('../fstream.js')\nvar notOpen = false\n\nfstream\n .Writer({\n path: 'path/to/symlink',\n linkpath: './file',\n isSymbolicLink: true,\n mode: '0755' // octal string...
javascript
chosen
[ { "from": "system", "value": "Move watch to own task\n" }, { "from": "human", "value": "var babel = require(\"gulp-babel\");\nvar gulp = require(\"gulp\");\nvar sourcemaps = require(\"gulp-sourcemaps\");\nvar plumber = require('gulp-plumber');\n\ngulp.task(\"default\", () =>\n gulp.src(\"lib/...
javascript
chosen
[ { "from": "system", "value": "Add method to retrieve route fragment to Navigator\n" }, { "from": "human", "value": "/* globals define */\n\ndefine([\n 'jquery',\n 'backbone',\n 'marionette',\n 'controllers/event-bus'\n], function ($, Backbone, Marionette, EventBus) {\n 'use strict';\n\n va...
javascript
chosen
[ { "from": "system", "value": "ADD map AND price to search result display\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nconst mapKey = process.env.key;\n\n\nclass Place extends Component {\n constructor(props) {\n super(props);\n\n // this.state = {\n // ...
javascript
chosen
[ { "from": "system", "value": "Allow Browser Sync port to be specified\n\nDefaults to the default Browser Sync port: 3000." }, { "from": "human", "value": "var gulp = require('gulp');\nvar elixir = require('laravel-elixir');\nvar argv = require('yargs').argv;\n\nelixir.config.assetsPath = 'source...
javascript
chosen
[ { "from": "system", "value": "Enable REPL reification for all versions of Node.\n" }, { "from": "human", "value": "var vm = require(\"vm\");\nvar createScript = vm.createScript;\nif (createScript.reified) {\n return;\n}\n\nvar compile = require(\"./compiler.js\").compile;\n\n// Enable import an...
javascript
chosen
[ { "from": "system", "value": "Fix console bug after 404\n" }, { "from": "human", "value": "angular.module('mewpipe')\n .factory('errorsInterceptor', errorsInterceptor);\n\nerrorsInterceptor.$inject = ['$location','$q','Config'];\n\nfunction errorsInterceptor($location,$q,Config){\n\treturn...
javascript
chosen
[ { "from": "system", "value": "Switch 'drafted' to 'draft' in projection\n" }, { "from": "human", "value": "Space.eventSourcing.Projection.extend(Donations, 'AppealsProjection', {\n\n collections: {\n appeals: 'Donations.Appeals'\n },\n\n eventSubscriptions() {\n return [{\n 'Donati...
javascript
chosen
[ { "from": "system", "value": "Modify Column to accept zero offset\n" }, { "from": "human", "value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport styles from './styles.module.css'\n\nexport const Container = ({ children }) => (\n <div className={styles.container}>{child...
javascript
chosen
[ { "from": "system", "value": "Simplify code and make it CommonJS friendly" }, { "from": "human", "value": "/*! viewportwidth.js 0.1.1 | Author: Brett Jankord, 2012 | License: MIT */\r\n/* https://github.com/bjankord/viewportwidth.js */\r\nvar getViewportWidth = function(){\r\n\r\n var vpw, w = ...
javascript
chosen
[ { "from": "system", "value": "refactor: Set age added to context\n" }, { "from": "human", "value": "/**\n * Created by Tomasz Gabrysiak @ Infermedica on 08/02/2017.\n */\n\nimport View from '../../base/view';\nimport template from './template';\n\nexport default class BasicView extends View {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove comments copied from example\n" }, { "from": "human", "value": "var config = module.exports;\n\nconfig[\"DelegateTests\"] = {\n\trootPath: '../',\n environment: \"browser\",\n extensions: [ require(\"buster-coverage\") ],\n \"buster-coverage\": {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix build: Set correct error name\n\n\nFormer-commit-id: c3290300916c3c7de9d86b6f02cbb7290fe10123" }, { "from": "human", "value": "export class CompositionError extends Error {\n constructor(classInstance, message, component) {\n super(`@${classInstance}: ${mess...
javascript
chosen
[ { "from": "system", "value": "Enable Shutdown button for a suspended VM\n\nFixes: https://github.com/oVirt/ovirt-web-ui/issues/1227\n\nAdd missing 'suspended' in the array of VM statuses for shutdown button being enabled in VM details page.\nMake the Shutdown action available for a suspended VM.\n" }, {...
javascript
chosen
[ { "from": "system", "value": "Use real on message handler\n" }, { "from": "human", "value": "'use strict';\n\nfunction QueueSeeker(pool) {\n this.db = 5;\n this.channel = 'batch:hosts';\n this.redisPrefix = 'batch:queues:';\n this.pattern = this.redisPrefix + '*';\n this.pool = po...
javascript
chosen
[ { "from": "system", "value": "Add format option to Url type, to add custom formatting/prevent admin from making link relative to the site\n" }, { "from": "human", "value": "/*!\n * Module dependencies.\n */\n\nvar util = require('util'),\n\tsuper_ = require('../Type');\n\n/**\n * URL FieldType C...
javascript
chosen
[ { "from": "system", "value": "Comment out appending message to body\n" }, { "from": "human", "value": "// $( document ).ready(function() {\nApp.game = App.cable.subscriptions.create(\"GamesChannel\", {\n connected: function() {\n // Called when the subscription is ready for use on the server...
javascript
chosen
[ { "from": "system", "value": "Use non deprecating Karma API\n" }, { "from": "human", "value": "import extend from 'extend'\nimport gulp, {tasks} from 'gulp'\nimport karma from 'karma'\nimport rump from 'rump'\n\nconst name = ::rump.taskName,\n task = ::gulp.task,\n {configs} = rump\n\n...
javascript
chosen
[ { "from": "system", "value": "Check that reasons length is greater than 0\n" }, { "from": "human", "value": "'use strict';\n\n/* Controllers */\n\nangular.module('nodeCheck.controllers', []).\n controller('AppCtrl', function($scope, $http) {\n $scope.website = {url: ''};\n $scope.displayR...
javascript
chosen
[ { "from": "system", "value": "Remove afterInstall hook that added iltorb to package.json\n" }, { "from": "human", "value": "/* eslint-env node */\nmodule.exports = {\n description: '',\n normalizeEntityName: function() {},\n afterInstall: function() {\n return this.addPackageToProject('il...
javascript
chosen
[ { "from": "system", "value": "Add items in phishing REGEX list\n" }, { "from": "human", "value": "(function() {\n'use strict';\n\nvar phishingExpressions = [\n /acusticanapoli\\.com/,\n /archer\\.fr/,\n /assurance-ameli-recouvrement\\.com/,\n /assurance-ameli-recouvrement\\.net/,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix random issue in Abecedarium\n" }, { "from": "human", "value": "\n\ndefine([\"sugar-web/activity/activity\",\"sugar-web/datastore\"], function (activity, datastore) {\n\tAbcd.activity = activity;\n\tAbcd.datastore = datastore;\n\tapp = null;\n\n\t// Manipulate t...
javascript
chosen
[ { "from": "system", "value": "Fix an issue any page is redirected to the top page when opening the cache of the login page (for example with the back button)\n\n" }, { "from": "human", "value": "import queryString from 'query-string'\n\nexport default class CrowiAuth {\n constructor(crowi) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add ifEnabled function for idea-hub and wrap main exports.\n" }, { "from": "human", "value": "/**\n * Idea Hub module initialization.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * ...
javascript
chosen
[ { "from": "system", "value": "Update blueprint to prepare for publishing.\n" }, { "from": "human", "value": "module.exports = {\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified (since that doesn't actually matter\n // to us\n },...
javascript
chosen
[ { "from": "system", "value": "Remove \"Duration -\" from duration string.\nRemove leading zero on hour in duration string.\n" }, { "from": "human", "value": "/*\n * Copyright 2011 Intel Corporation.\n *\n * This program is licensed under the terms and conditions of the\n * Apache License, versio...
javascript
chosen
[ { "from": "system", "value": "Add integration tests for weather chart and search functionality\n" }, { "from": "human", "value": "describe('Get a forecast for a city', function() {\n it('Visits the weather chart site', function() {\n cy.visit('http://localhost:8080')\n })\n})" }, ...
javascript
chosen
[ { "from": "system", "value": "Remove --cookies-file option for now.\n\nI can't figure out if there are any public APIs for working with\nthe binary cookie formats that PhantomJS now uses.\n\nNot sure if there are any functions exposed that would let us interpret\nthem correctly, and attempting to parse cook...
javascript
chosen
[ { "from": "system", "value": "Add vendor/ to Jest aliases\n" }, { "from": "human", "value": "/* eslint-disable filenames/match-regex */\n\nconst reporters = ['default'];\n\nif (process.env.CI) {\n reporters.push([\n 'jest-junit',\n {\n output: './junit_jest.xml',\n },\n ]);\n}\n\...
javascript
chosen
[ { "from": "system", "value": "Add an ID to join component\n" }, { "from": "human", "value": "const Join = () => {\n return (\n <div className=\"component\">\n <h1>Bli med i linjeforeningen!</h1>\n <p>Alle informatikere er med i linjeforeningen. Gå videre til <a href=\"https://onlin...
javascript
chosen
[ { "from": "system", "value": "Improve the clarity of the totalLength assignment\n" }, { "from": "human", "value": "define(['dojo/_base/lang', 'dojo/when'], function (lang, when) {\n\t// TODO: Make this API more extensible, possibly with an options\n\tfunction forEach(callback, instance) {\n\t\tr...
javascript
chosen
[ { "from": "system", "value": "Make sidebar wider in 2-column layout\n" }, { "from": "human", "value": "export const layoutWrapper = {\n display: \"flex\",\n justifyContent: \"space-between\",\n};\n\nexport const sideBar = {\n marginLeft: \"35px\",\n marginTop: \"25px\",\n order: \"1\",\n f...
javascript
chosen
[ { "from": "system", "value": "chore(bundle): Remove named define in AMD\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n 'browser-id3-writer': './src/browser-id3-writer.js',\n 'browser-id3-wr...
javascript
chosen
[ { "from": "system", "value": "chore(npm): Add 'text-encoding' to webpack externals\n" }, { "from": "human", "value": "var path = require('path')\n\nmodule.exports = {\n entry: [\n './lib/index.js'\n ],\n output: {\n path: path.join(__dirname, '/dist/'),\n filename: 'jose.min.js',\n ...
javascript
chosen
[ { "from": "system", "value": "Add missing dependency to LayoutCtrl\n" }, { "from": "human", "value": "angular.module(\"protonet.platform\").controller(\"LayoutCtrl\", function($scope, $state, API) {\n App.startFetcher();\n $scope.apps = App.records;\n\n $scope.$on(\"$destroy\", function() {\n...
javascript
chosen
[ { "from": "system", "value": "Fix double hashing in beforeUpdate\n" }, { "from": "human", "value": "/**\n * User\n * @description :: Model for storing users\n */\n\nmodule.exports = {\n schema: true,\n\n attributes: {\n username: {\n type: 'string',\n required: true,\n unique...
javascript
chosen
[ { "from": "system", "value": "Fix menu sorting by parent bug.\n" }, { "from": "human", "value": "foam.CLASS({\n package: 'foam.nanos.menu',\n name: 'Menu',\n\n properties: [\n {\n class: 'String',\n name: 'id'\n },\n {\n class: 'String',\n name: 'label'\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Change host and port defaults\n" }, { "from": "human", "value": "export default {\n host: process.env.HOST || 'localhost',\n mongo: {\n url: process.env.MONGO_URL || 'mongodb://localhost:27017/Demographics'\n },\n port: process.env.PORT || '8080'\n}\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Test without startup createRange jest polyfill" }, { "from": "human", "value": "\nglobal.Range = function Range() {};\n\nconst createContextualFragment = (html) => {\n const div = document.createElement('div');\n div.innerHTML = html;\n return div.children[...
javascript
chosen
[ { "from": "system", "value": "Fix for working in the main process\n" }, { "from": "human", "value": "/**\n * lifesized: Get the physical size of displays and their ppi\n */\n\nvar screen = require('screen'),\n remote = require('remote'),\n execSync = require('child_process').execSync,\n ...
javascript
chosen
[ { "from": "system", "value": "Use .min files when available.\n" }, { "from": "human", "value": "var url = require('url'),\n grunt = require('grunt');\n\nmodule.exports = {\n manifestUrl: function(manifest) {\n return function(path) {\n if(process.env.GLAZIER_ENV !== \"prod\") { return ...
javascript
chosen
[ { "from": "system", "value": "Add support for partial paths in the InMemory partials provider\n" }, { "from": "human", "value": "'use strict';\n\nconst compile = require('../compiler').compile;\n\nfunction InMemory(partials) {\n\tthis.partials = partials;\n\tthis.compiledPartials = {};\n}\n\nInM...
javascript
chosen
[ { "from": "system", "value": "Update script to include name\n" }, { "from": "human", "value": "// ==UserScript==\n// @name WT_Integration\n// @namespace https://wholetale.org/\n// @version 0.1.0\n// @description Mock WT integration\n// @author Xarthisius\n// @match ...
javascript
chosen
[ { "from": "system", "value": "FIX - changed nodeApiHost to production\n" }, { "from": "human", "value": "import defaults from 'defaults'\n\nconst API_GLOBAL = '_IMDIKATOR'\n\nconst env = process.env.NODE_ENV || 'development'\n\nconst DEFAULTS = {\n port: 3000,\n reduxDevTools: false\n}\n\ncons...
javascript
chosen
[ { "from": "system", "value": "Remove an unnecessary usage of toMatchObject()\n" }, { "from": "human", "value": "const _ = require('lodash/fp')\nconst purespec = require('..')\n\ndescribe('load()', () => {\n it('returns tests loaded from the given PureSpec module', () => {\n const actual = pu...
javascript
chosen
[ { "from": "system", "value": "Increase timeout to avoid breaking build\n" }, { "from": "human", "value": "import { expect } from 'chai';\nimport { createStream } from './helper';\n\ndescribe('build.js', () => {\n describe('Failures', () => {\n it('should stop when there is no index fil...
javascript
chosen
[ { "from": "system", "value": "fix(switch): Switch component refactored to stateful.\n" }, { "from": "human", "value": "import React from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport Switch from '@material-ui/core/Switch';\n\nconst CustomSwitch = withStyles({\n switch...
javascript
chosen
[ { "from": "system", "value": "Add exports of reducer and hydrateStore\n" }, { "from": "human", "value": "import GridConfiguration from './components/GridConfiguration';\nimport ChartConfiguration from './components/ChartConfiguration';\nimport Grid from './components/Grid';\nimport WrappedGrid f...
javascript
chosen
[ { "from": "system", "value": "Fix console warning about history import\n" }, { "from": "human", "value": "import React from 'react';\nimport { applyMiddleware, createStore } from 'redux';\nimport { Provider as ReduxProvider } from 'react-redux';\nimport { composeWithDevTools } from 'redux-devtoo...
javascript
chosen
[ { "from": "system", "value": "Call onAny listeners in dispatcher context\n" }, { "from": "human", "value": "\"use strict\";\n\nconst DiscordieError = require(\"./DiscordieError\");\nconst Constants = require(\"../Constants\");\nconst EventTypes = Object.keys(Constants.Events);\n\nconst events = ...
javascript
chosen
[ { "from": "system", "value": "Test with messages without emoji\n" }, { "from": "human", "value": "const Build = require('github-build')\n\nconst data = {\n repo: process.env.TRAVIS_REPO_SLUG,\n sha: process.env.TRAVIS_PULL_REQUEST_SHA,\n token: process.env.github_token,\n label: 'perfbench',...
javascript
chosen
[ { "from": "system", "value": "Fix displaying of Factlink Bubble\n\nSigned-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>\n" }, { "from": "human", "value": "(function () {\n function createIframe() {\n var body = document.getElementsByTagName(\"body\")[0];\n var iframe...
javascript
chosen
[ { "from": "system", "value": "Fix naming error Astronomy._behaviors to Behaviors\n" }, { "from": "human", "value": "var prototype = Astronomy.Schema.prototype;\n\nprototype.addBehavior = function(behaviorName, behaviorOptions) {\n if (!_.isString(behaviorName)) {\n return;\n }\n behaviorOp...
javascript
chosen
[ { "from": "system", "value": "Switch to file-based sourcemaps for msal.js and msal.min.js\n" }, { "from": "human", "value": "var path = require(\"path\");\nvar webpack = require(\"webpack\");\nvar UglifyJsPlugin = require('uglifyjs-webpack-plugin');\nvar package = require('./package');\nvar Fork...
javascript
chosen
[ { "from": "system", "value": "Fix Access Group's Mapper modal\n" }, { "from": "human", "value": "/*!\n Copyright (C) 2017 Google Inc.\n Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n*/\n\n(function (can, GGRC) {\n 'use strict';\n\n GGRC.Components('mapping...
javascript
chosen
[ { "from": "system", "value": "Add `this` as a fallback global for Java 8 Nashorn\n\n[closes #22]\n" }, { "from": "human", "value": ";(function (f) {\n // CommonJS\n if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n module.exports = f();\n\n // RequireJS\n } else if...
javascript
chosen
[ { "from": "system", "value": "Use this instead of query\n" }, { "from": "human", "value": "angular\n\t.module('ngSharepoint.Lists')\n\t.factory('UpdateQuery', ['$spList', 'CamlBuilder', 'WhereQuery', 'Query', function($spList, CamlBuilder, WhereQuery, Query) {\n\t\tvar UpdateQuery = function(lis...
javascript
chosen
[ { "from": "system", "value": "Add temporary fix for Comment.replies serialization\n" }, { "from": "human", "value": "import OsfSerializer from './osf-serializer';\n\nexport default OsfSerializer.extend({\n serialize(snapshot, options) { // jshint ignore:line\n // Add relationships fie...
javascript
chosen
[ { "from": "system", "value": "Change to prod db config\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n\tdb: {\n\t\tconnection: {\n\t \thost: 'localhost',\n\t\t\tuser: 'works_servers',\n\t\t\tpassword: 'iScada12',\n\t\t\tdatabase: 'works_servers',\n\t \tcharset: 'ut...
javascript
chosen
[ { "from": "system", "value": "Use es2015 module syntax for src\n" }, { "from": "human", "value": "// Loaded ready states\nconst loadedStates = ['interactive', 'complete'];\n\n// Return Promise\nconst whenDomReady = (cb, doc) => new Promise(resolve => {\n\t// Allow doc to be passed in as the lone...
javascript
chosen
[ { "from": "system", "value": "fix(compat): Change to `writeFileSync` over `writeFile`\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\nconst xml = require('../src/xml');\nconst csv = require('../src/csv');\nconst fs = require('fs');\nconst Promise = require('bluebird');\n...
javascript
chosen
[ { "from": "system", "value": "Make app component a class component\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport SearchBar from './components/search_bar';\n\nconst API_KEY = 'AIzaSyDoq3zo7iLAeVX3tGVWP9EtRyIGeFqs7BQ';\n\n// Create a new...
javascript
chosen
[ { "from": "system", "value": "Revert \"chore: add comment about import order for shadydom / shadycss.\"\n\nThis reverts commit 41c6e9aeebff5f50d5ad4c61a21add257dcae1b2.\n" }, { "from": "human", "value": "// We load the Safari fix before document-register-element because DRE\n// overrides attachS...
javascript
chosen
[ { "from": "system", "value": "[FIX] Handle the case when node is falsey\n" }, { "from": "human", "value": "export default function expandCache(cache) {\n function followPath(path) {\n return path.reduce((acc, part) => {\n if (acc && acc[part]) {\n return acc[part];\n }\n\n ...
javascript
chosen
[ { "from": "system", "value": "Make the api a bit more sane\n" }, { "from": "human", "value": "var matter = exports;\n\nmatter.parsers = require('./parsers');\nmatter.register = matter.parsers.register;\nmatter.defaults = matter.parsers.defaults;\nmatter.parse = matter.parsers.registry;\n\n// reg...
javascript
chosen