conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Handle response with 0 results\n"
},
{
"from": "human",
"value": "var apiKey = \"AIzaSyAj9GGrBLnNPImKnl7MKAuD737t1MHnMT8\";\nvar geocoder = require('node-geocoder') (\"google\", \"https\", { apiKey: apiKey });\nvar csv = require('csv');\n\nprocess.stdin\n\t.pipe(csv... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor out a Reflect call\n\n"
},
{
"from": "human",
"value": "const FIRST_ROW = 0;\nconst FIRST_COL = 0;\n\nconst CHAR_CODE_OFFSET = 65;\nconst LABEL_OFFSET = 1;\n\nconst createTile = function createTile(row = FIRST_ROW, col = FIRST_COL) {\n const tile = { row, ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove test for <link> removal\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar chai = require('chai');\nvar expect = chai.expect;\n\nvar requireHelper = require('../../require_helper');\nvar resourceAdder = requireHelper('util/resourceAdder');\n\ndescribe(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Increase scroll timeout for smoother performance\n"
},
{
"from": "human",
"value": "ngGridDirectives.directive('ngViewport', [function() {\n return function($scope, elm) {\n var isMouseWheelActive;\n var prevScollLeft;\n var prevScollTop = 0;... | javascript | chosen |
[
{
"from": "system",
"value": "Enable debug mode when running via 'npm run playground'\n\nThis should be OK because none of the rollup configs will process\nlib/initialise.js. So when running via 'npm run playground' and\ntherefore 'node -r lib/initialise.js' we can detect this and define a\nglobal __debug__... | javascript | chosen |
[
{
"from": "system",
"value": "Create log dir if not exists.\n"
},
{
"from": "human",
"value": "import winston from 'winston';\n\nconst logger = new winston.Logger({\n transports: [\n new winston.transports.File({\n level: 'info',\n filename: './logs/all-logs.log',\n handleExce... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused libraries from Gulpfile\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n // this is an arbitrary object that loads all gulp plugins in package.json.\n coffee = require('coffee-script/register'),\n $ = require(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Rename babel to transpile for consistency with socket.io repo\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar mocha = require('gulp-mocha');\nvar babel = require(\"gulp-babel\");\n\nvar TESTS = 'test/*.js';\nvar REPORTER = 'dot';\n\ngulp.task(\"d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lines only for obviously buggy diff items\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar _ = require(\"lodash\");\nvar diffParse = require(\"diff-parse\");\n\n\nmodule.exports = parseDiff;\n\n\nfunction parseDiff (string) {\n var parsed = diffParse(s... | javascript | chosen |
[
{
"from": "system",
"value": "Mark assets as `noProcess` to keep it from screwing up the PNG\n"
},
{
"from": "human",
"value": "var exec = require(\"child_process\").exec;\nvar path = require(\"path\");\n\nexports.description = \"A standard starting-point for news app development at the Seattle ... | javascript | chosen |
[
{
"from": "system",
"value": "Change prop variable names and add more default props"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport styles from './teamCard.css';\n\nconst TeamCard = ({ name, role, slack, email, isBoard, description, imageS... | javascript | chosen |
[
{
"from": "system",
"value": "Sort module files before injecting.\n\nThe fs.list() does not guarantee the files in a specific order.\r\nSort the module list before injecting them."
},
{
"from": "human",
"value": "/**\n * @file Ingress-ICE, the main script\n * @author nibogd (https://github.com/n... | javascript | chosen |
[
{
"from": "system",
"value": "Make the whole div clickable\n"
},
{
"from": "human",
"value": "import { default as React, Component } from 'react'\nimport { render } from 'react-dom'\n\nexport class List extends Component {\n constructor(props) {\n super(props);\n }\n render() {\n let it... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust selector to hit correct part of state\n"
},
{
"from": "human",
"value": "import { createSelector } from 'reselect'\nimport events from '../../core/events'\n\nconst documentCaptures = state => state.documentCaptures\nconst faceCaptures = state => state.faceCap... | javascript | chosen |
[
{
"from": "system",
"value": "Set higher limit than default one (= 50)\n"
},
{
"from": "human",
"value": "import Rx from 'rx';\n\nconst boardId = 'LydFpONf';\n\nfunction trelloSinkDriver ( input$ ) {\n return Rx.Observable.create( ( observer ) => {\n input$.subscribe( () => {\n Trello.g... | javascript | chosen |
[
{
"from": "system",
"value": "Switch default port to 443\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\nvar bodyParser = require('body-parser');\nvar controllers = require('./controllers');\n\napp.use(bodyParser.json());\napp.use(controllers);\n\napp.... | javascript | chosen |
[
{
"from": "system",
"value": "Use Windows friendly chars in printed file\n\nCloses #6\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict'\n\nvar config = require('rc')('ipp-printer', {\n name: 'ipp-printer', dir: process.cwd(), port: 3000\n})\nvar nonPrivate = require('non-priv... | javascript | chosen |
[
{
"from": "system",
"value": "Use `requestAnimationFrame` instead of redrawing immediately\n"
},
{
"from": "human",
"value": "import {store_handler} from './stores'\nimport {patch, attributes} from 'incremental-dom'\nimport {REMOVED} from './stores'\nimport {add_style} from './style'\n\nexport {... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to delete entries\n\nThis also sorts entries as they are added. These two additions will allow us to move entries via a GUI\n"
},
{
"from": "human",
"value": "class Interpolator {\n constructor() {\n this.data = [];\n }\n\n addIndexValue(... | javascript | chosen |
[
{
"from": "system",
"value": "Add sameDate function to helper function\n"
},
{
"from": "human",
"value": "export const travelObjectStartDateComparator = (travelObjectA, travelObjectB) => {\n if (travelObjectA.startDate === travelObjectB.startDate) {\n return 0;\n }\n else if (trave... | javascript | chosen |
[
{
"from": "system",
"value": "Return a value in the invalid case.\n"
},
{
"from": "human",
"value": "Application.Filters.filter('toDateString', function () {\n\n return function (input) {\n if (input) {\n var t = input.epoch_time;\n return new Date(t * 1000).toDat... | javascript | chosen |
[
{
"from": "system",
"value": "Make test asynchronous if it wants to be\n"
},
{
"from": "human",
"value": "/* global describe, it */\n\nimport {exec} from '../../../src/utils/util';\nimport assert from 'assert';\nrequire('chai').should();\n\ndescribe(\"Oi CLI\", () => {\n\n it(\"can be invoked\"... | javascript | chosen |
[
{
"from": "system",
"value": "Change the path for uploading chunks.\n"
},
{
"from": "human",
"value": "Application.Services.factory(\"mcFlow\", mcFlowService);\nfunction mcFlowService() {\n var self = this;\n self.flow = new Flow(\n {\n target: \"/upload\",\n t... | javascript | chosen |
[
{
"from": "system",
"value": "Add VariableNode and FunctionTermNode to ast\n"
},
{
"from": "human",
"value": "function KIFNode(kifExpressions) {\n this.type = 'KIFNode';\n this.expressions = this.expressions || [];\n this.expressions = this.expressions.concat(kifExpressions);\n}\n\nfunction W... | javascript | chosen |
[
{
"from": "system",
"value": "Add gwei to possible units for etherdisplay.\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\nimport PropTypes from 'prop-types'\nimport { BigNumWeiToDisplayString } from './Utils'\n\nclass EtherDisplay extends Component {\n\n constructo... | javascript | chosen |
[
{
"from": "system",
"value": "Add two examples for expect.\n"
},
{
"from": "human",
"value": "/*global describe, expect, protractor, it*/\n'use strict';\n\ndescribe('angularjs homepage', function() {\n var ptor = protractor.getInstance();\n\n it('should greet using binding', function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a note about autoloading (ProvidePlugin options)\n"
},
{
"from": "human",
"value": "let mix = require('laravel-mix');\n\n/*\n |--------------------------------------------------------------------------\n | Mix Asset Management\n |--------------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant rules from ESLint config.\n\nAlready exist in 'eslint:recommended':\n\nhttps://github.com/eslint/eslint/blob/master/conf/eslint.json\n"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": \"eslint:recommended\",\n \"env\": {\n \"b... | javascript | chosen |
[
{
"from": "system",
"value": "Add a cube so that it looks like something is actually happening :volcano:\n"
},
{
"from": "human",
"value": "import THREE from 'three';\n\n//const scene = new THREE.Scene();\n//const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0... | javascript | chosen |
[
{
"from": "system",
"value": "Add info window to map\n"
},
{
"from": "human",
"value": "var map = null;\nvar marker = null;\n\nfunction setMarker(latLng, map) {\n if (marker !== null) {\n marker.setMap(null);\n }\n\n marker = new google.maps.Marker({\n position: latLng,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use redrawProp to refresh item card class\n"
},
{
"from": "human",
"value": "import m from 'mithril';\nimport _ from 'underscore';\nimport h from '../h';\n\nconst adminItem = {\n controller(args) {\n const displayDetailBox = h.toggleProp(false, true),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow clients to set FIZZ_ENVIRONMENT variable;\n"
},
{
"from": "human",
"value": "// Namespace\nthis.Fizz = this.Fizz || { };\n\n(function() {\n\n\tfunction _isValid(value) {\n\t\treturn _environments.keys().map(function(key) {\n\t\t\t\t\treturn _environments[key];... | javascript | chosen |
[
{
"from": "system",
"value": "Update comment line for createKeyPair method"
},
{
"from": "human",
"value": "/*\n Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n This file is licensed under the Apache License, Version 2.0 (the \"License\").\n You may not use... | javascript | chosen |
[
{
"from": "system",
"value": "Make HTML a string instead of an Array\n"
},
{
"from": "human",
"value": "function userTemplate(user) {\n var buffer = [];\n buffer.push('<a href=\"' + user.html_url + '\">');\n buffer.push('<h1>' + user.login + '</h1></a>');\n buffer.push('<img src=\"' + user.a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mobile browser fade behavior\n"
},
{
"from": "human",
"value": "var scrollDown = function() {\n $(\"html, body\").animate({\n scrollTop: $(document).height()-$(window).height()\n }, \"slow\");\n}\n\nvar fadeTo = function(value) {\n $('#bottom').css(\"opaci... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dependency to jQuery library\n"
},
{
"from": "human",
"value": "(function($, window) {\n\t\"use strict\";\n\n\tvar\n\tprev = window.oops || null,\n\tcurr = function(){};\n\tcurr.prev\t= function(){ return prev; };\n\tcurr.typing = {\n\t\tisObject: function( v... | javascript | chosen |
[
{
"from": "system",
"value": "Use addAssets to add font files.\n\nSince v1.2, 2015-Sept-21:\n Backwards-incompatible change for package authors: Static assets in\n package.js files must now be explicitly declared by using addAssets\n instead of addFiles. Previously, any file that didn't have a source\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make threadMessages function easier to import\n"
},
{
"from": "human",
"value": "function threadIdFor(message) {\n const recipienList = message.recipients || [];\n\n return recipienList.concat(message.sender).\n filter(character => character).\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix rendering big project names\n"
},
{
"from": "human",
"value": "// @flow\nimport React, { PureComponent } from 'react';\nimport { StyleSheet, Platform } from 'react-native';\nimport { connect } from 'react-redux';\nimport Text from '../Text';\nimport { currentPro... | javascript | chosen |
[
{
"from": "system",
"value": "Make develop the default gulp task and remove watch task\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar nodemon = require('gulp-nodemon');\n\nvar paths = {\n projectScripts: ['./bin/www', '... | javascript | chosen |
[
{
"from": "system",
"value": "Update gulp to add Draft in localhost\n"
},
{
"from": "human",
"value": "var del = require(\"del\");\nconst gulp = require(\"gulp\");\nconst plugins = require(\"gulp-load-plugins\")();\n\nconst clean = () => {\n return del[\n './public',\n './static/img/'\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor the app type constants\n\nUse an ``Object`` instead of an ``Array`` for the app type constants. This will improve the readabllity and is more consistent. BREAKING CHANGE: ``AppTypes`` is no longer iterable.\n"
},
{
"from": "human",
"value": "var ContainerCo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issues with older versions of firefox not supporting innertext.\n"
},
{
"from": "human",
"value": "/* subscribe to newsletter modal\n*/\n\n(function() {\n 'use strict';\n\n var newsletterSubscribe = function(e) {\n if (!window.util.closest(e.target, '.js-ne... | javascript | chosen |
[
{
"from": "system",
"value": "Increase threshold and ignore anti-aliasing when comparing images\n"
},
{
"from": "human",
"value": "/*\nCopyright 2018 Google LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to get a single item from the store\n"
},
{
"from": "human",
"value": "import deepAssign from 'deep-assign'\nimport getFilter from 'feathers-query-filters'\n// import { sorter, matcher, select, _ } from 'feathers-commons'\nimport { sorter, matcher, _ } f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error when favorite list is empty\n"
},
{
"from": "human",
"value": "/* This file is part of Indico.\n * Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN).\n *\n * Indico is free software; you can redistribute it and/or\n * modify it un... | javascript | chosen |
[
{
"from": "system",
"value": "Fix NaN number of issue\n"
},
{
"from": "human",
"value": "/*jslint indent: 2, unparam: true*/\n/*global $: false, document: false, togglbutton: false*/\n'use strict';\n\ntogglbutton.render('.modal-header .content:not(.toggl)', {observe: true}, function (elem) {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Use console.groupCollapsed() in the logger plugin, where available.\n"
},
{
"from": "human",
"value": "/* istanbul ignore next */\n/*eslint no-console: 0*/\nconst noop = () => {};\n\nfunction loggerPlugin() {\n const supportsGroups = console.group && console.grou... | javascript | chosen |
[
{
"from": "system",
"value": "Test actor: Don't draw until position is set in first update cycle\n"
},
{
"from": "human",
"value": "class GuyActor extends SquareActor {\n constructor() {\n super();\n\n this.didInit = false;\n }\n\n update(u) {\n super.update(u);\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Revert channel debugging since it breaks react-native\n"
},
{
"from": "human",
"value": "function channelError() {\n throw new Error(\n 'Accessing nonexistent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel'\n );\n}\n\nex... | javascript | chosen |
[
{
"from": "system",
"value": "Add api route to update account\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst passport = require('passport');\nconst main = require('../app/controllers/main');\nconst api = require('../app/controllers/api');\nconst auth = require('../app/controllers/auth... | javascript | chosen |
[
{
"from": "system",
"value": "Change selector for .on() function to .container\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n $('#favorites-form').on('submit', function(event) {\n event.preventDefault();\n $.ajax({\n type: \"POST\",\n url: \"http://10.0.2.89:... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor page detection to avoid deplicate code\n"
},
{
"from": "human",
"value": "\nvar Common = (function () {\n\tvar instance;\n\n\tfunction init() {\n\t\tvar currentPageIsGeocacheDetailPage,\n\t\t\tcurrentPageContainsAnEditor;\n\n\t\tfunction findOutIfIAmOnAGeoc... | javascript | chosen |
[
{
"from": "system",
"value": "Use hljs.HASH_COMMENT_MODE for TAP comments\n"
},
{
"from": "human",
"value": "/*\nLanguage: Test Anything Protocol\nRequires: yaml.js\nAuthor: Sergey Bronnikov <sergeyb@bronevichok.ru>\nWebsite: https://bronevichok.ru/\n*/\n\nfunction(hljs) {\n return {\n alias... | javascript | chosen |
[
{
"from": "system",
"value": "Make basic example more a11y\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Formik, Field, Form } from \"formik\";\n\nconst sleep = ms => new Promise(r => setTimeout(r, ms));\n\nconst Basic = () => (\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change prefix for alerts api\n"
},
{
"from": "human",
"value": "import { createActionType } from 'ethical-jobs-redux';\nimport Api from 'ethical-jobs-sdk';\n\n/*\n|--------------------------------------------------------------------------\n| Action Types\n|---------... | javascript | chosen |
[
{
"from": "system",
"value": "Normalize all to spinal-case before other convertions. Added toSpaceCase.\n"
},
{
"from": "human",
"value": "var p = String.prototype;\n\n// Converts spinal-case, snake_case or space case to camelCase\np.toCamelCase = function(pascalCase) {\n\tvar str = this.toLower... | javascript | chosen |
[
{
"from": "system",
"value": "Remove method of creating global Def\n"
},
{
"from": "human",
"value": "/**\n * Created by ChengFuLin on 2015/5/12.\n */\nvar Def = require('./def'),\n Scope = require('./scope');\n\n/**\n * Constructor of DefFactory\n * @constructor\n */\nfunction DefFactory() {... | javascript | chosen |
[
{
"from": "system",
"value": "Use same identifier as previous plugin version\n"
},
{
"from": "human",
"value": "const GitBook = require('gitbook-core');\nconst DisqusThread = require('react-disqus-thread');\nconst { React, Immutable } = GitBook;\n\nconst DisqusFooter = React.createClass({\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lookup to pass in correct column number\n"
},
{
"from": "human",
"value": "var fizz_source_map = new sourceMap.SourceMapConsumer(fizzbuzz_map);\nvar test_source_map = new sourceMap.SourceMapConsumer(test_map);\nvar catch_source_map = new sourceMap.SourceMapConsu... | javascript | chosen |
[
{
"from": "system",
"value": "Use openDevTool at start application\n"
},
{
"from": "human",
"value": "const { app, BrowserWindow } = require('electron');\n\nlet mainWindow;\nfunction createWindow() {\n mainWindow = new BrowserWindow({ width: 960, height: 800 });\n mainWindow.loadURL(`file://${... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to override describe and it functions when in reloading mode\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\r\nimport {render} from 'react-dom'\r\nimport devcards from './cards'\r\nimport {CardList} from './devcards/components'\r... | javascript | chosen |
[
{
"from": "system",
"value": "Test defaults/endpoint keys exist in ENDPOINTS constants\n"
},
{
"from": "human",
"value": "import should from 'should'\nimport * as constants from './endpoints'\n\ndescribe('constants/endpoints', () => {\n it('should not export DEFAULTS', (done) => {\n constant... | javascript | chosen |
[
{
"from": "system",
"value": "Check for maximum WebGL vertex count."
},
{
"from": "human",
"value": "define(function () {\n\t\"use strict\";\n\n\tfunction BufferUtils() {\n\t}\n\n\tBufferUtils.createIntBuffer = function (indexCount, vertexCount) {\n\t\tvar indices;\n\t\tif (vertexCount < 256) { ... | javascript | chosen |
[
{
"from": "system",
"value": "Use .filter(Boolean) for removing falsies\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar extend = require('xtend/mutable')\n\nmodule.exports = CardType\n\nfunction CardType (name, config) {\n extend(this, {name: name}, config)\n}\n\nCardType.prototype.cvcLe... | javascript | chosen |
[
{
"from": "system",
"value": "Implement unit test for step4\n"
},
{
"from": "human",
"value": "/**\n * Created by eugene.karanda on 02.04.2016.\n */\n\ndescribe('PhoneListController', function () {\n\n beforeEach(module('tutorialApplication'));\n\n it('should create \"phones\" model with 3... | javascript | chosen |
[
{
"from": "system",
"value": "Set optimization runs to 200\n"
},
{
"from": "human",
"value": "const HDWalletProvider = require(\"truffle-hdwallet-provider\");\nconst privateKey = \"<PRIVATE>\";\n\nmodule.exports = {\n networks: {\n testing: {\n host: '127.0.0.1',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add ios platform instead of android\n"
},
{
"from": "human",
"value": "/* eslint-disable no-console */\nrequire('reify');\nconst shell = require('shelljs');\nconst path = require('path');\n\nconst testsPath = path.resolve(path.join(__dirname, '..', '..', 'tests'));\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove inspector left over from module tests.\n"
},
{
"from": "human",
"value": "\r\n\r\nfunction runTests(testType, BABYLON, GUI, INSPECTOR) {\r\n\r\n console.log(\"running tests\");\r\n\r\n describe(testType + ' tests', function () {\r\n\r\n it(\"shou... | javascript | chosen |
[
{
"from": "system",
"value": "Create new object with default mutator\n"
},
{
"from": "human",
"value": "import { loop, isLoop, getEffect, getModel } from './loop';\nimport { batch, none } from './effects';\n\nfunction optimizeBatch(effects) {\n switch(effects.length) {\n case 0:\n retur... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused _hydrating bubbling behavior (-8 B)\n"
},
{
"from": "human",
"value": "/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\... | javascript | chosen |
[
{
"from": "system",
"value": "Use New Relic log level info in production (default).\n"
},
{
"from": "human",
"value": "exports.config = {\n app_name : ['Midd Menu API'],\n license_key : process.env.NEW_RELIC_LICENSE_KEY,\n logging : {\n level : 'trace'\n }\n};\n"
},
{
"from": "gpt... | javascript | chosen |
[
{
"from": "system",
"value": "Support optional success callback in ajax-forms plugin\n\n[#75226372]\n"
},
{
"from": "human",
"value": "(function($) {\n\n /**\n * Downloads data and uses it to dynamically create set of select options.\n * url - URL used to dynamically obtain select ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Polyfill to standalone build, bring exports on par with lib build\n"
},
{
"from": "human",
"value": "import 'isomorphic-fetch';\n\n// Configuration\nexport {default as render} from './render';\nexport {default as configure} from './configure';\nexport {default a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix `blur` and `focus` events.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar read = require(\"./listener/read\").read\nvar readers = require(\"./listener/read\").readers\nvar Input = require(\"./signal\").Input\nvar receive = require(\"./signal\").receiv... | javascript | chosen |
[
{
"from": "system",
"value": "Add more missing globals to module exports (w2alert, w2confirm, w2prompt)\n"
},
{
"from": "human",
"value": "/***********************************************************\n* Compatibility with CommonJS and AMD modules\n*\n********************************************... | javascript | chosen |
[
{
"from": "system",
"value": "Remove import of fixed-data-table javascript library\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, l... | javascript | chosen |
[
{
"from": "system",
"value": "Check for both env variables.\n"
},
{
"from": "human",
"value": "require('dotenv').config()\nconst http = require('http')\nconst url = require('url')\nrequire('isomorphic-fetch')\n\nconst log = require('./log')\nconst auth = require('./auth')\nconst playlist = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to filter issue by summary (WAL-197)\n"
},
{
"from": "human",
"value": "import template from './issues-helpdesk.html';\n\nexport default function issuesHelpdesk() {\n return {\n restrict: 'E',\n template: template,\n controller: IssuesHelpdeskControl... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor code to match sass preset\n"
},
{
"from": "human",
"value": "import postCSSModulesValues from 'postcss-modules-values'\nimport ExtractTextPlugin from 'extract-text-webpack-plugin'\n\nexport default {\n name: 'css-modules',\n configure ({ pages = [], build... | javascript | chosen |
[
{
"from": "system",
"value": "Correct the case for Twitter\n"
},
{
"from": "human",
"value": "// @flow\nimport * as React from 'react'\nimport Button from 'components/common/Button'\nimport { A } from './styles'\n\nconst TwitterButton = ({ url }: { url: string }) => {\n return (\n <A href={u... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite RouteContext as a function constructor instead of a class\n"
},
{
"from": "human",
"value": "export default class RouteContext {\n constructor(routes, route) {\n let routeIndex = routes.indexOf(route)\n this.parentRoutes = routes.slice(0, routeIndex)\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove checking and reverting from evolve.\n"
},
{
"from": "human",
"value": "genotower.geneticAlgorithm = {\n\n\n evolve : function () {\n var bestTiles = genotower.map.tiles.slice(),\n bestScore = genotower.generation.scoreFitness(),\n be... | javascript | chosen |
[
{
"from": "system",
"value": "Add import statements for UserDogs and PlayDates; define componentDidMount() with AsyncStorage statement for userID; add onPress for Profile and PlayDates and Logout along with TochableOpacity\n"
},
{
"from": "human",
"value": "import React, { Component } from 'reac... | javascript | chosen |
[
{
"from": "system",
"value": "Substitute a square for one entry\n"
},
{
"from": "human",
"value": "const WIDTH = 800;\nconst HEIGHT = 600;\n\nconst GRID_SIZE = 25;\n\nvar setup = function() {\n createCanvas(WIDTH, HEIGHT);\n background(0);\n noFill();\n stroke(255);\n strokeWeight(1);\n}\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Use handlebars.js instead of runtime\n\nDue to a whacky bug with handlebars minified version, use full stuff.\n\nThis is 100kb greater. Have to fix this when they fix this issue\n"
},
{
"from": "human",
"value": "/* global require, module */\n\nvar EmberApp = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Use body instead of json attribute\n"
},
{
"from": "human",
"value": "// Push records from JSON to Data Service\nvar fs = require('fs');\nvar request = require('request');\n\nvar argv = require('yargs')\n .usage('Usage: $0 [options] <input records> <destination URL... | javascript | chosen |
[
{
"from": "system",
"value": "Support method passed as a function\n"
},
{
"from": "human",
"value": "// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n'use strict';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Enable ESLint rules that are already passing\n\n* no-multi-spaces: error on multiple spaces in a row\n* no-unused-expressions: error on unused expressions, probably an error\n or a typo"
},
{
"from": "human",
"value": "module.exports = {\n env: {\n browser: tru... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to set allowClear in alchemyPageSelect\n\nSometimes we do not want to allow to clear the selection.\n"
},
{
"from": "human",
"value": "$.fn.alchemyPageSelect = function(options) {\n var pageTemplate = HandlebarsTemplates.page\n\n return this.select2({\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Remove class after editing details\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n\tsession: Ember.inject.service( 'session' ),\n\n\tactions: {\n\n\t\tauthenticate() {\n\n\t\t\tif( $( 'form' ).hasClass( 'sh... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log to make linter happy\n"
},
{
"from": "human",
"value": "import $ from 'jquery';\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n extraText: '',\n move: false,\n manage: false,\n options: ['move contributors', 'manage p... | javascript | chosen |
[
{
"from": "system",
"value": "Change var to const for module require statements\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar pump = require('pump');\nvar sass = require('gulp-sass');\nvar uglify = require('gulp-uglify');\n\nvar config = {\n\t\"pug\": {\n\t\t\"src\": \"./ap... | javascript | chosen |
[
{
"from": "system",
"value": "Define mocked connection with expectations for \"on\" method\n"
},
{
"from": "human",
"value": "var assert = require('chai').assert;\nvar nodemock = require('nodemock');\n\nvar utils = require('./test-utils');\n\nvar express = require('express');\nvar socketAdaptor ... | javascript | chosen |
[
{
"from": "system",
"value": "Update indentation of variable assigment\n"
},
{
"from": "human",
"value": "var\n\tutil = require('util'),\n\tgulp = require('gulp'),\n\tcolors = require('gulp/node_modules/gulp-util').colors,\n\tjshint = require('gulp-jshint'),\n\tjscs ... | javascript | chosen |
[
{
"from": "system",
"value": "Use let in the markup test suite\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('lodash');\nvar bluebird = require('bluebird');\nvar fs = bluebird.promisifyAll(require('fs'));\nvar glob = require('glob');\nvar hljs = require... | javascript | chosen |
[
{
"from": "system",
"value": "Add client-side JS files to JSHint task\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n require('matchdep').filter('grunt-*').forEach(grunt.loadNpmTasks);\n\n grunt.initConfig({\n\n jshint: {\n all: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update grunt file to run coverage reports\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js', '... | javascript | chosen |
[
{
"from": "system",
"value": "Remove `ready` callback from module definition\n\nIt is now up to the user to wait to call `register` until\n`document,body` exists.\n"
},
{
"from": "human",
"value": "$(document).ready(function () {\n\tINTERCEPT = (function () {\t\n\t\tvar selectors = {},\n\t\t\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Add uglify grunt task for js minification\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n var mozjpeg = require('imagemin-mozjpeg');\n\n grunt.initConfig({\n imagemin: {\n dynamic: {\n files: [{\n expand: true, ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.