conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix target of dashboard controller tests\n" }, { "from": "human", "value": "define([\n 'client/client_bootstrap',\n 'extensions/controllers/dashboard'\n],\nfunction (bootstrap, DashboardController) {\n describe('client bootstrap', function () {\n\n var config;...
javascript
chosen
[ { "from": "system", "value": "Reset redux state on log out\n" }, { "from": "human", "value": "\nimport { combineReducers } from 'redux'\nimport { routerReducer } from 'react-router-redux'\n\nimport * as c from './constants'\nimport * as auth from './auth'\n\nfunction receiveTodos (state = [], ac...
javascript
chosen
[ { "from": "system", "value": "Refactor navbar top to setup menu active item by url\n" }, { "from": "human", "value": "(function construct() {\n 'use strict';\n\n angular.module('OMDBApp')\n .directive('navbarTop', function() {\n return {\n templateUrl: 'app/components/navbar-top/n...
javascript
chosen
[ { "from": "system", "value": "Update dependency node-sass to v4.10.0" }, { "from": "human", "value": "Package.describe({\r\n name: 'angular-scss-compiler',\r\n version: '0.3.3',\r\n summary: 'Angular Scss Compiler Package',\r\n git: 'https://github.com/Urigo/angular-meteor/tree/master/atmosp...
javascript
chosen
[ { "from": "system", "value": "Switch back to legacy decorators\n\nFor https://github.com/matrix-org/matrix-react-sdk/pull/3961" }, { "from": "human", "value": "module.exports = {\n \"sourceMaps\": true,\n \"presets\": [\n [\"@babel/preset-env\", {\n \"targets\": [\n ...
javascript
chosen
[ { "from": "system", "value": "Convert CompareTree Query into an ES6 class\n\nRelated issues:\nhttps://github.com/vigetlabs/microcosm/issues/305\n" }, { "from": "human", "value": "import Emitter from '../emitter'\n\nimport { get, inherit } from '../utils'\n\nimport { getKeyPaths, getKeyStrings } ...
javascript
chosen
[ { "from": "system", "value": "Refactor to avoid dynamic module resolution\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array/uint8\...
javascript
chosen
[ { "from": "system", "value": "Add link to go back to index\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { fetchPost } from '../actions';\n\nclass PostsShow extends Component {\n componentDidMount() {\n const { id...
javascript
chosen
[ { "from": "system", "value": "[Router] Add router get all tasks\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\n// Lấy danh sách events \nvar eventController = require('../../controllers/api/EventController');\nrouter.route('/events').get(e...
javascript
chosen
[ { "from": "system", "value": "Add data: response to be manipulated in front end\n" }, { "from": "human", "value": "var base = require('./base.js');\n\nexports.assemble = {\n addSchedule: \n function (parameters) {\n var userEventEntry = {\n availability: JSON....
javascript
chosen
[ { "from": "system", "value": "Improve comments in vtkjs example\n" }, { "from": "human", "value": "$.ajax({url: 'capitals.json'}).done(function (capitals) {\n // Create a map object with reasonable center and zoom level\n var map = geo.map({\n node: '#map',\n center: {x: 0, y: 0},\n z...
javascript
chosen
[ { "from": "system", "value": "[feat]: Add endpoint to remove user from group\n" }, { "from": "human", "value": "import express from 'express';\nimport GroupController from '../controllers/GroupController';\n\nconst router = express.Router();\nrouter.post('/api/group', GroupController.createGroup...
javascript
chosen
[ { "from": "system", "value": "Fix out of bounds with current AI\n" }, { "from": "human", "value": "const characters = require('./characters');\n\nconst directions = ['up', 'down', 'left', 'right'];\n\nexports.start = function() {\n loop();\n};\n\nfunction loop() {\n setTimeout(loop, 500);\...
javascript
chosen
[ { "from": "system", "value": "Edit Swewify transition to only target transform property\n\n" }, { "from": "human", "value": "//@flow\n\nimport styled from \"styled-components\";\n\nconst random = (severity = 1): number => (Math.random() - 0.5) * severity;\nconst randomTranslate = (n: number, s):...
javascript
chosen
[ { "from": "system", "value": "Allow passing in data to a query action" }, { "from": "human", "value": "/**\n * Model which handles \"special\" actions against the query\n * Ex.: selections, swap axis, mdx\n */\nvar QueryAction = Backbone.Model.extend({\n initialize: function(args, options) {\...
javascript
chosen
[ { "from": "system", "value": "Add SearchButton component to Header component\n" }, { "from": "human", "value": "import React from 'react';\nimport styled from 'styled-components';\nimport theme from 'theme';\nimport Hamburger, { Bar } from 'components/Hamburger';\n\nconst Logo = styled.h1`\n ...
javascript
chosen
[ { "from": "system", "value": "Make google-jsonapi not have a wrapper div\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n didInsertElement() {\n Ember.$.getScript('https://www.google.com/jsapi', function() {\n window....
javascript
chosen
[ { "from": "system", "value": "Disable click binding in page.js\n\nRight now, page.js should only be setting the dashboard based on the\nURL, not handling any actual routing, since most of the pages are being\nloaded from Django.\n" }, { "from": "human", "value": "'use strict';\n\nvar page = requ...
javascript
chosen
[ { "from": "system", "value": "Fix url to main module\n" }, { "from": "human", "value": "var expect = require('expect.js');\nvar webmakeMw = require('../lib/webmake-middleware');\n\ndescribe('webmake middleware', function() {\n describe('configuration function', function() {\n it('should be a...
javascript
chosen
[ { "from": "system", "value": "Add ADD_ROW and REMOVE_ROW transaction type\n" }, { "from": "human", "value": "module.exports = {\n SET: Symbol('SET'),\n DEL: Symbol('DEL')\n};\n" }, { "from": "gpt", "value": "module.exports = {\n ADD_ROW: Symbol('ADD_ROW'),\n REMOVE_ROW: Symbol('R...
javascript
chosen
[ { "from": "system", "value": "Remove redundant injection in header entry dirctive.\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"headerEntry\", [\"$document\", function($document) {\n\t\treturn {\n\t\t\tscope: {\n\t\t\t\talign: \"@\",\n\t\t\t\tl...
javascript
chosen
[ { "from": "system", "value": "Add note to spendingHabits to check if date picker works\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport moment from 'moment';\nimport Input from './Input';\n\nexport default class SpendingHabits extends Component {\n\n construc...
javascript
chosen
[ { "from": "system", "value": "Fix challengeTypes object incorrect key names\n" }, { "from": "human", "value": "window.common = (function({ common = { init: [] } }) {\n common.init.push(function($) {\n $('#report-issue').on('click', function() {\n var textMessage = [\n 'Challenge ...
javascript
chosen
[ { "from": "system", "value": "Remove need to call paramsFor on self\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n\nconst {\n isPresent\n} = Ember;\n\nexport default Ember.Route.extend(...
javascript
chosen
[ { "from": "system", "value": "Remove `return {}` from FFI function" }, { "from": "human", "value": "\"use strict\";\n\nexports[\"assert'\"] = function (message) {\n return function (success) {\n return function () {\n if (!success) throw new Error(message);\n return {};\n };\n ...
javascript
chosen
[ { "from": "system", "value": "Fix After You test description\n" }, { "from": "human", "value": "'use strict';\n\nconst assert = require('./../../assert');\nconst common = require('./../../common');\n\nlet battle;\n\ndescribe('Berserk', function () {\n\tafterEach(function () {\n\t\tbattle.destroy...
javascript
chosen
[ { "from": "system", "value": "Remove an obsolete method extension\n\nThis method hasn't existed in a while, and its purpose (including\nthe related tags when loading a discussion via API) has already\nbeen achieved by extending the backend.\n" }, { "from": "human", "value": "import { extend } fr...
javascript
chosen
[ { "from": "system", "value": "Reduce the amount of cars since collision detections does not work properly with this many cars for some reason.\n" }, { "from": "human", "value": "TRAFFICSIM_APP.game = TRAFFICSIM_APP.game || {};\n\nTRAFFICSIM_APP.game.VehicleController = function (worldController)...
javascript
chosen
[ { "from": "system", "value": "Send 10 events to Ruby at a time\n" }, { "from": "human", "value": "const execFile = require('child_process').execFile;\n\nexports.handler = function(event, context) {\n const chunkSize = 5;\n\n var records = event.Records;\n var context = context;\n\n console.l...
javascript
chosen
[ { "from": "system", "value": "Test if the resource directory exists before reading it\n" }, { "from": "human", "value": "const fs = require('fs-extra');\n\nconst RESOURCE_FOLDER = __dirname + '/../resources/';\nconst DESTINATION_FOLDER = __dirname + '/../out/';\n\n/**\n * Gives the list of resou...
javascript
chosen
[ { "from": "system", "value": "Fix function arguments when unknown function\n" }, { "from": "human", "value": "var quote = require(\"./tools/quote\"),\n functions;\n\nmodule.exports = function transpile(val) {\n if(typeof(val) === \"string\") {\n return \"env[\" + quote(val) + \"]\";...
javascript
chosen
[ { "from": "system", "value": "Use ref callbacks to get component instance\n" }, { "from": "human", "value": "/**\n * @fileoverview Test helpers for mounting/unmounting components.\n *\n * This module has side effects.\n */\n\nimport ReactDOM from 'react-dom';\nimport $ from 'jquery';\n\nconst _c...
javascript
chosen
[ { "from": "system", "value": "Fix: Increase Height of 'About' window even more\n" }, { "from": "human", "value": "const about = module.exports = {\n init,\n win: null\n}\n\nconst config = require('../../config')\nconst electron = require('electron')\n\nfunction init () {\n if (about.win) {\n ...
javascript
chosen
[ { "from": "system", "value": "Update ballot pdf link to point to this years general election ballots\n" }, { "from": "human", "value": "// Takes a polling id like: \"25-03\"\nexport function officialBallotPdfLink(pollingId) {\n const id = pollingId.replace('-', '')\n\n // return `https://olvr....
javascript
chosen
[ { "from": "system", "value": "Remove as fetch ones for now\n" }, { "from": "human", "value": "const fs = require('fs')\nconst path = require('path')\nconst promisify = require('util').promisify\nconst writeFile = promisify(fs.writeFile)\nconst globby = require('globby')\n\n;(async () => {\n con...
javascript
chosen
[ { "from": "system", "value": "Reorganize different parts of the Preloader\n" }, { "from": "human", "value": "\"use strict\";\n\n// Preloads all images on the page by adding them to an invisible container\n// tag\nvar Preloader = {\n preload: function () {\n // Coin images\n var coinImages...
javascript
chosen
[ { "from": "system", "value": "Fix getting wireframe property of instance instead of the material\n" }, { "from": "human", "value": "/**\n * CG Space Invaders\n * CG45179 16'17\n *\n * @author: Rui Ventura ( ist181045 )\n * @author: Diogo Freitas ( ist181586 )\n * @author: Sara Azinhal ( ist18170...
javascript
chosen
[ { "from": "system", "value": "Add zen object for zendesk config\n" }, { "from": "human", "value": "const axios = require('axios')\n\nconst config = require('../../../config')\n\nfunction createZenDeskMessage ({\n email,\n title,\n description = '',\n browser,\n feedbackType,\n}) {\n return...
javascript
chosen
[ { "from": "system", "value": "Add comment that displays tableRow object shape\n" }, { "from": "human", "value": "const ADD_TABLE_ROW = \"ADD_TABLE_ROW\"\n\nconst addTableRow = (tableName, tableRow) => {\n return {\n type: ADD_TABLE_ROW,\n tableName,\n tableRow\n }\n}\n\n/*\n\ntableRow...
javascript
chosen
[ { "from": "system", "value": "Add stubs for put and post in ember data source.\n" }, { "from": "human", "value": "/*\n * DataSource abstraction inspired by these sources:\n * http://jzajpt.github.com/2012/01/24/emberjs-app-architecture-data.html\n * https://github.com/escalant3/ember-data-tast...
javascript
chosen
[ { "from": "system", "value": "Use setProperty instead of handleClick to work with Thing\n" }, { "from": "human", "value": "/**\n * OnOffDetail\n *\n * A bubble showing the on/off state of a thing\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If ...
javascript
chosen
[ { "from": "system", "value": "Rewrite jsx-curly-brace-presence tests with template literals\n" }, { "from": "human", "value": "/**\n * @fileoverview Validate closing tag location in JSX\n * @author Ross Solomon\n */\n'use strict';\n\n// -----------------------------------------------------------...
javascript
chosen
[ { "from": "system", "value": "Fix tests to look in the right place\n\nThis is a pretty limited test anyway, but now it correctly grabs only\nthe first title on the component.\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inl...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary sufix index when require errors package\n" }, { "from": "human", "value": "const apiError = require('../errors/index').apiError\n\nconst invalidParameter = (err, req, res, next) => {\n if (err.message !== 'invalid_parameter') {\n return next(e...
javascript
chosen
[ { "from": "system", "value": "Add comment string to vip model\n" }, { "from": "human", "value": "const mongoose = require('mongoose')\n\nconst schema = mongoose.Schema({\n id: {\n type: String,\n unique: true\n },\n invalid: Boolean,\n name: String,\n fname: String,\n servers: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add jscs task to grunt file and clean up files to adhere to jscs rules.\n\nresolves #1920\n\n- updates all files to conform to style settings.\n" }, { "from": "human", "value": "// Loader to create the Ember.js application\n/*global require */\n\nwindow.App = requir...
javascript
chosen
[ { "from": "system", "value": "Support loading mimic inside <head> tag\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Mimic from 'ui/components/Mimic';\n\nconst root = document.createElement('mimic-div');\nroot.style.width = '100%';\nroot....
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary operation when sorting users\n" }, { "from": "human", "value": "var _ = require(\"lodash\");\n\nmodule.exports = Chan;\n\nChan.Type = {\n\tCHANNEL: \"channel\",\n\tLOBBY: \"lobby\",\n\tQUERY: \"query\"\n};\n\nvar id = 0;\n\nfunction Chan(attr) {\n...
javascript
chosen
[ { "from": "system", "value": "Tweak YUI `root` to not use \"/build/\" in URLs\n" }, { "from": "human", "value": "var isProduction = process.env.NODE_ENV === 'production',\n version = require('../package').version;\n\nmodule.exports = {\n version: '3.9.1',\n\n config: JSON.stringify...
javascript
chosen
[ { "from": "system", "value": "Add comments back to file" }, { "from": "human", "value": "/* globals module */\n\nvar EOL = require('os').EOL;\n\nmodule.exports = {\n description: 'Register test helpers',\n\n afterInstall: function( options ) {\n // Import statement\n var firs...
javascript
chosen
[ { "from": "system", "value": "Include source maps when doing Glimmer debug stripping\n" }, { "from": "human", "value": "'use strict';\n\nconst babel = require('broccoli-babel-transpiler');\nconst stripGlimmerUtils = require('babel-plugin-strip-glimmer-utils');\nconst debugMacros = require('babel...
javascript
chosen
[ { "from": "system", "value": "Fix scrollLeft/scrollTop warning in latest Chrome\n\nChrome gives the warnings\n\n```\nbody.scrollLeft is deprecated in strict mode. Please use 'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only if in quirks mode.\nbody.scrollTop is deprecated in strict m...
javascript
chosen
[ { "from": "system", "value": "Fix line length > 80 characters\n" }, { "from": "human", "value": "ChannelInfo = BlazeComponent.extendComponent({\n onCreated: function () {\n },\n\n onRendered: function () {\n var self = this;\n\n self.$channelInfo = self.$('.channel-info');\n self.$ch...
javascript
chosen
[ { "from": "system", "value": "Add role on signup user create\n" }, { "from": "human", "value": "var bcrypt = require( 'bcrypt' );\nvar appModels = require( '../models' );\nvar systemError = require( '../utils' ).systemError;\n\n\nexports.isEmailInUse = function ( email, callback ) {\n\n appMo...
javascript
chosen
[ { "from": "system", "value": "Convert to recursion to be more functional\n" }, { "from": "human", "value": "module.exports = function (number) {\n 'use strict';\n var MIN = 0, MAX = 4999, crossingTransformation, transform = number;\n crossingTransformation = [\n {decimal: 1000, roman: 'M'}...
javascript
chosen
[ { "from": "system", "value": "Change moment localisation towards 2.8+ spec\nAdd ability to use unix timestamps as dates\n" }, { "from": "human", "value": "(function (dust, moment) {\n \n dust.helpers = dust.helpers || {};\n \n dust.helpers.formatDate = function(chunk, context, bodies...
javascript
chosen
[ { "from": "system", "value": "Select by default from document.\n" }, { "from": "human", "value": "\"use strict\";\n\nconst typpy = require(\"typpy\");\n\n/**\n * elmSelect\n * Select DOM elements and optionally call a function.\n *\n * @name elmSelect\n * @function\n * @param {String|Element|Nod...
javascript
chosen
[ { "from": "system", "value": "Use koala to serve save-the-date file\n" }, { "from": "human", "value": "var express = require('express')\nvar app = express();\nvar cool = require('cool-ascii-faces');\n\napp.set('port', (process.env.PORT || 5000))\napp.use(express.static(__dirname + '/public'))\n\...
javascript
chosen
[ { "from": "system", "value": "Fix indentation\n@SimulatedGREG it certainly was supposed to be 2. No idea why it was 8, sorry for that\n" }, { "from": "human", "value": "var https = require('https');\nvar fs = require('fs');\nvar path = require('path');\nvar URL = require('url');\n\nvar gui_type ...
javascript
chosen
[ { "from": "system", "value": "Test for valid output price pass\n" }, { "from": "human", "value": "/*\n * nupricer\n * https://github.com/ramseydsilva/nupricer\n *\n * Copyright (c) 2014 Ramsey D'silva\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar errors = require('./errors');\...
javascript
chosen
[ { "from": "system", "value": "Use a basic for loop\n" }, { "from": "human", "value": "module.exports = Ready;\n\nfunction Ready() {\n var listeners = [];\n var args = null;\n\n function onReady(callback) {\n if (typeof callback === \"function\") {\n if (args) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add possibility to define teg’s home path with environment variable\n" }, { "from": "human", "value": "const fs = require('fs')\nconst path = require('path')\n\nconst getTemplateFiles = (template) => new Promise((resolve, reject) => {\n const templatePath = `${getU...
javascript
chosen
[ { "from": "system", "value": "Improve file path detection for chai-spies\n\nThis changes the previous RegEx replacement to instead use Node's require pattern to correctly find the chai-spies.js file. `path.resolve` has also been removed as `require.resolve` always returns an absolute path." }, { "fr...
javascript
chosen
[ { "from": "system", "value": "Make it compatible with Gulp 4" }, { "from": "human", "value": "var fs = require('fs');\nvar detectIndent = require('detect-indent');\n\nmodule.exports = function (gulp, config) { \n config = config || {};\n if(typeof gulp === 'undefined') {\n throw new Error(\...
javascript
chosen
[ { "from": "system", "value": "Enable version in -h output\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar cli = require('cli');\nvar fs = require('fs');\nvar path = require('path');\nvar cwd = process.cwd();\nvar options = cli.parse({\n append: ['a', 'append to t...
javascript
chosen
[ { "from": "system", "value": "Fix version number not returning.\n" }, { "from": "human", "value": "var Path = require('path'),\n FS = require('fs');\n\nmodule.exports = {\n getVersion: function () {\n var packagePath = Path.join(process.cwd(), 'package.json');\n try {\n FS.statSync(...
javascript
chosen
[ { "from": "system", "value": "Update opts and projection params.\n\nDefault opts to empty object\nDefault projection to empty object\nWrap update in $set\n" }, { "from": "human", "value": "module.exports = function repository(db) {\n return {\n save: (collection, data, response) => {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix muddle not found issue for font-awesome-styles\n\n- this happens in webpack 2\n" }, { "from": "human", "value": "require(\"style!css!sass!./font-awesome-styles!./font-awesome.config.js\");\n" }, { "from": "gpt", "value": "require(\"style!css!sass!./f...
javascript
chosen
[ { "from": "system", "value": "Add basic declaration and statement aggregates\n" }, { "from": "human", "value": "'use strict'\n\nvar _ = require('lodash')\nvar babel = require('babel')\n\nmodule.exports = function jsstats(jsString) {\n if (typeof jsString !== 'string') {\n throw new TypeError...
javascript
chosen
[ { "from": "system", "value": "Include new numberOfDecimals function into the main build\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = {\n makeRandomAlphanumericalString: require(\"./source/make-random-alphanumerical-string\"),\n addOneTimeListener: requ...
javascript
chosen
[ { "from": "system", "value": "[ReactNative][SyncDiff] Allow renderToHardwareTextureAndroid to be used outside of setNativeProps\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style ...
javascript
chosen
[ { "from": "system", "value": "Break down possible transformer errors for debugability\n" }, { "from": "human", "value": "var _ = require('underscore');\nvar path = require('path');\n\nmodule.exports = function (transformer) {\n transformer = _.clone(transformer);\n if (_.isString(transformer))...
javascript
chosen
[ { "from": "system", "value": "Check that actions are attached to App.js\n" }, { "from": "human", "value": "'use strict';\nlet path = require('path');\nlet assert = require('yeoman-generator').assert;\nlet helpers = require('yeoman-generator').test;\n\ndescribe('react-webpack-redux:action', () =>...
javascript
chosen
[ { "from": "system", "value": "Switch port checking to regex\n" }, { "from": "human", "value": "var si = require(\"../../lib/style-injector\");\nvar messages = require(\"../../lib/messages\");\n\nvar methods = new si();\n\nvar options = si.options;\n\ndescribe(\"finding free ports\", function () ...
javascript
chosen
[ { "from": "system", "value": "Replace console log with proper logging and trim output\n" }, { "from": "human", "value": "// install: npm install\n// run: gulp\n\nvar gulp = require('gulp');\nvar watch = require('gulp-watch');\nvar exec = require('child_process').exec;\nvar log = require('gulplog...
javascript
chosen
[ { "from": "system", "value": "Add key detection skeleton for username autocomplete and emoji preview\n" }, { "from": "human", "value": "'use strict';\n\nimport React from 'react/addons';\nimport Actions from \"actions/UIActions\";\nimport 'styles/SendMessage.scss';\n\nclass SendMessage extends R...
javascript
chosen
[ { "from": "system", "value": "Fix protocol in tcp client\n" }, { "from": "human", "value": "var assert = require('assert');\nvar baseErr = 'geteventstore-promise - TCP client - ';\n\nmodule.exports = function(config) {\n\t//Assert configuration\n\tassert(config, baseErr + 'config not provided');...
javascript
chosen
[ { "from": "system", "value": "Add image link parameter to player constructor function\n" }, { "from": "human", "value": "function Game(){\n this.$track = $('#racetrack');\n this.finishLine = this.$track.width() - 54;\n}\n\nfunction Player(id){\n this.player = $('.player')[id - 1];\n this.pos...
javascript
chosen
[ { "from": "system", "value": "Allow enabling OR disabling resource blocking when calling fetchPageContent\n" }, { "from": "human", "value": "/* eslint no-console: 0 */\n'use strict';\n\nconst phantom = require('phantom');\n\n\nfunction* blockResourceLoading(page) {\n yield page.property('onRe...
javascript
chosen
[ { "from": "system", "value": "Allow set loadItems and onBeforeRequest with component props\n" }, { "from": "human", "value": "import { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\n\nimport collectListInitialState from './collectListInitialState';\n\nimport * as act...
javascript
chosen
[ { "from": "system", "value": "Move css files after sass change\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar config = require('../config').watch;\n\ngulp.task('default', ['browser-sync'], function() {\n gulp.watch(config.sass, ['sass']);\n gulp.watch(config.javascript...
javascript
chosen
[ { "from": "system", "value": "Remove stub text for deployment message\n" }, { "from": "human", "value": "var moment = require('moment');\nrequire('moment-duration-format');\n\nmodule.exports = {\n willDeploy: function(context) {\n return Promise.resolve({\n slack: {\n startDeploy...
javascript
chosen
[ { "from": "system", "value": "Fix highlighter to append hljs class to code tags even though unsupported syntax is given\n" }, { "from": "human", "value": "import hljs from 'highlight.js';\n\nexport default function highlightCode(text) {\n try {\n const doc = new DOMParser().parseFromString(t...
javascript
chosen
[ { "from": "system", "value": "Change double quotes to single quotes.\n" }, { "from": "human", "value": "module.exports = function(config) {\n config.set({\n basePath: '../',\n\n files: [\n 'https://maps.googleapis.com/maps/api/js?sensor=false',\n 'test/lib/angu...
javascript
chosen
[ { "from": "system", "value": "Extend MainView from erste.View instead of erste.Component\n" }, { "from": "human", "value": "\nimport SigninView from './signin/signin-view';\nimport { Component } from 'erste';\n\nexport default class MainView extends Component {\n constructor(vm) {\n su...
javascript
chosen
[ { "from": "system", "value": "Make muting rerender properly when getting updates.\n\nIf you have two browsers open for the same account, muting in one\nbrowser will now be reflected in the other browser. This got\nregressed when changing the approach from collapsing to hiding.\nThe new code should be less ...
javascript
chosen
[ { "from": "system", "value": "Stop auto fetching if view no more visible\n" }, { "from": "human", "value": "/*global window: true */\ndefine(\n [\n 'text!templates/repoList.html',\n 'underscore',\n 'jquery',\n 'backbone'\n ],\n function (template, _, $, Backb...
javascript
chosen
[ { "from": "system", "value": "Check that the page has loaded when reporting on errors, and wait 1000ms\n" }, { "from": "human", "value": "import vo from 'vo';\nimport got from 'got';\nimport nightmare from 'nightmare';\n\nfunction* checkIsLive(url) {\n yield got(url, { timeout: 1000, retries:...
javascript
chosen
[ { "from": "system", "value": "Allow handleExceptions to be false in non production environments\n" }, { "from": "human", "value": "module.exports = function (namespace, data) {\n var out = [\n data.timestamp(),\n data.level.toUpperCase(),\n namespace\n ];\n\n if (data.message) out.pu...
javascript
chosen
[ { "from": "system", "value": "Fix invalid ref, improve error message\n" }, { "from": "human", "value": "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nvar patches = require('./patches');\nvar clone = requ...
javascript
chosen
[ { "from": "system", "value": "fix(props): Convert GroupedActivityFeed length to number in jsx\n" }, { "from": "human", "value": "const React = require(\"react\");\nconst {connect} = require(\"react-redux\");\n\nconst {GroupedActivityFeed} = require(\"components/ActivityFeed/ActivityFeed\");\ncon...
javascript
chosen
[ { "from": "system", "value": "Add in some demo stub data\n" }, { "from": "human", "value": "'use-strict';\n\n \n \nfunction cmsController($scope) {\n\n /*\n * $scope initializers\n */\n $scope.categories = [{title:'hey'}];\n\n $scope.saveCategory = function(category) {\n\n };\n\n}\n\nm...
javascript
chosen
[ { "from": "system", "value": "Change prototype ref using to Brahma.ref()\n" }, { "from": "human", "value": "function() {\r\n\tvar name, internals;\r\n\t(\"string\"===typeof arguments[0]) ? (name=arguments[0],internals=arguments[1]||[]) : (name=false,internals=arguments[0]||[]);\r\n\t\r\n\tvar mo...
javascript
chosen
[ { "from": "system", "value": "Add array find + includes polyfill\n" }, { "from": "human", "value": "// ES2015 APIs used by developer tools integration\nimport 'core-js/es6/map';\nimport 'core-js/es6/promise';\nimport 'core-js/fn/array/fill';\nimport 'core-js/fn/array/from';\nimport 'core-js/fn/o...
javascript
chosen
[ { "from": "system", "value": "Fix debug API with standalone build and recent versions of webpack\n\nRecent versions of webpack define the 'DEBUG' variable to\ntrue or false depending on options.debug, so 'DEBUG.events.logFilter'\nin 'lib/logger' was transpiled to '(false).events.logFilter'.\n\nResolve this ...
javascript
chosen
[ { "from": "system", "value": "Add unit testing on oauth\n" }, { "from": "human", "value": "var expect = require('chai').expect;\nvar assert = require('chai').assert;\nvar sinon = require('sinon');\n\nvar Withings = require('../dist/Withings').Withings;\n\nvar options;\nvar client;\nvar error = n...
javascript
chosen
[ { "from": "system", "value": "Test case for retries in mocha\n" }, { "from": "human", "value": "/* eslint-env mocha */\n'use strict'\n\nconst expect = require('chai').expect\n\ndescribe('test', () => {\n describe('node', () => {\n before(function (done) {\n this.timeout(6 * 1000)\n ...
javascript
chosen
[ { "from": "system", "value": "Fix projection bug on progress\n" }, { "from": "human", "value": "\"use strict\";\n\n//Load dependencies\nvar applicationStorage = process.require(\"core/applicationStorage.js\");\n\n/**\n * Get the projection for guild\n * @param query\n */\nmodule.exports.get = fu...
javascript
chosen
[ { "from": "system", "value": "Remove extra import from apply page\n" }, { "from": "human", "value": "import React, { Component } from 'react'\n\nimport { Link } from '../../../components'\n\nclass ApplyInfo extends Component {\n render() {\n return (\n <div>\n <p>We're accepting ...
javascript
chosen
[ { "from": "system", "value": "Add an id to the results.\n" }, { "from": "human", "value": "const fetch = require('node-fetch')\nconst url = 'https://api.tumblr.com/v2/tagged?tag=pitbull&api_key=fuiKNFp9vQFvjLNvx4sUwti4Yb5yGutBN4Xh10LXZhhRKjWlV4'\n\nmodule.exports = (pluginContext) => {\n return...
javascript
chosen