conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "TwitterFollowFly: Add support for URLs with trailing slash\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name Twitter Best\n// @namespace localhost\n// @description Get best tweets from profile\n// @include /^https://twitter\\.com/[a-zA-Z0-9... | javascript | chosen |
[
{
"from": "system",
"value": "Add in more unit tests.\n"
},
{
"from": "human",
"value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('service:multi-store', 'Unit | Service | multi store', {});\n\ntest('it exists', function(assert) {\n let service = this.subject();\n assert.... | javascript | chosen |
[
{
"from": "system",
"value": "Add progress bar to / for consistency.\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar IndexController = function($scope, analytics, navigation, progressbar, search) {\n\t$scope.searchQuery = \"\";\n\n\t$scope.search = function() {\n\t\tif ($scope.searchQuer... | javascript | chosen |
[
{
"from": "system",
"value": "Use crypto stream (prevent memory exhaustion on raspbian)\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar fs = require('fs'),\n crypto = require('crypto');\n\n\nmodule.exports = function (file_path, callback){\n var shasum = crypto.createHash('md5');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix custom emote parsing in polls\n"
},
{
"from": "human",
"value": "var PollModule = function () {\n};\n\nPollModule.prototype.Message = function(message)\n{\n if(message.deletable)\n {\n message.delete();\n }\n var keyword = \"poll\";\n var p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for reverse sorting. Styling fixes\n"
},
{
"from": "human",
"value": "ko.bindingHandlers.sortBy = {\n init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {\n var asc = true;\n element.style.cursor = 'pointer';\n\n ele... | javascript | chosen |
[
{
"from": "system",
"value": "Add check for affiliation and dimension to validation control\n\n#203\n"
},
{
"from": "human",
"value": "export default function isValid(extended) {\n var drawInstructions =\n JSON.stringify(this.drawInstructions).indexOf(\"null\") == -1;\n\n if (extended) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use lib instead of src for skatejs dom diff.\n"
},
{
"from": "human",
"value": "import vdom from 'skatejs-dom-diff/src/vdom/element';\nexport default vdom;\n"
},
{
"from": "gpt",
"value": "import vdom from 'skatejs-dom-diff/lib/vdom/element';\nexport def... | javascript | chosen |
[
{
"from": "system",
"value": "Use \"npm ci\" instead of \"npm i\"\n"
},
{
"from": "human",
"value": "var vow = require('vow'),\n vowNode = require('vow-node'),\n childProcess = require('child_process'),\n fs = require('fs'),\n exec = vowNode.promisify(childProcess.exec),\n readFil... | javascript | chosen |
[
{
"from": "system",
"value": "Add autofocus on the first input text or textarea\n"
},
{
"from": "human",
"value": "$(function() {\n\n // toggle on/off switch\n $(document).on('click', '[data-toggle]', function() {\n targetHide = $(this).data('toggle-hide')\n targetShow = $(this).data('to... | javascript | chosen |
[
{
"from": "system",
"value": "Add env variables for heroku deployment\n"
},
{
"from": "human",
"value": "var userApi = require('./user');\nvar fableApi = require('./fable');\nvar mongoose = require('mongoose');\nvar credentials = require('./credentials');\n\nmodule.exports = function(app){\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from hashHistory to browserHistory\n"
},
{
"from": "human",
"value": "import 'babel-polyfill';\nimport React from 'react';\nimport moment from 'moment';\nimport { render } from 'react-dom';\nimport { hashHistory } from 'react-router';\nimport { AppContainer }... | javascript | chosen |
[
{
"from": "system",
"value": "Edit higher order function solution\n"
},
{
"from": "human",
"value": "function repeat(operation, num) {\n if(num == 1 || num == 0){\n return operation();\n }\n return repeat(operation(), num-1);\n}\n\n// Do not remove the line below\nmodule.exports = repeat\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use Minimongo to perform modifications\n"
},
{
"from": "human",
"value": "Astro.utils.storage.applyModifier = function(doc, modifier) {\n // Apply $set modifier.\n if (modifier.$set) {\n _.each(modifier.$set, function(fieldValue, fieldPattern) {\n Astro.ut... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to verify it handles errors correctly\n"
},
{
"from": "human",
"value": "import createCredentialsAuthenticator from '../../src/authenticators/credentials'\n\nbeforeEach(() => {\n fetch.resetMocks()\n})\n\nit('fetches from given endpoint using default confi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary global variable named GLOBAL\n\nSummary:\nWe are defining an alias for the global variable in React Native called `GLOBAL`, which is not used at all at Facebook and it doesn't seem it's used externally either. This alias is not standard nor common in the JS e... | javascript | chosen |
[
{
"from": "system",
"value": "Add Array of responsive dates for navDates display\n"
},
{
"from": "human",
"value": "/* global GuardianAPI, NYTAPI, DomUpdater */\n\nfunction fillZero(num) {\n return num < 10 ? `0${num}` : num;\n}\n\n\nfunction formatGuardianDate(date) {\n return `${date.getFull... | javascript | chosen |
[
{
"from": "system",
"value": "Make a -1 value for \"No\"\n"
},
{
"from": "human",
"value": "var helpful_yes = document.querySelector( '.helpful_yes' );\nvar helpful_no = document.querySelector( '.helpful_no' );\nvar helpful_text = document.querySelector( '.helpful__question' );\n\nfunction thank... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicates code and update app variable.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n\tdb: 'mongodb://localhost/codeaux-dev',\n\tapp: {\n\t\ttitle: 'Codeaux - Development Environment'\n\t},\n\tfacebook: {\n\t\tclientID: process.env... | javascript | chosen |
[
{
"from": "system",
"value": "Fix updating to github gist\n"
},
{
"from": "human",
"value": "Template.viewGist.helpers({\n description: function () {\n return JSON.parse(this.content).description\n },\n files: function () {\n console.log(JSON.parse(this.content).files)\n const array ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove raquo so that it not necessary to sanitize html\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('edge.app.controllers').controller('<%= controllerName %>Controller', function () {\n var <%= controllerName.toLowerCase() %> = this;\n <%... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra space in indent"
},
{
"from": "human",
"value": "var mean = function (numArr) {\n if(!Object.prototype.toString.call(numArr) === \"[object Array]\"){ \n return false;\t\n }\n \n\t return numArr.reduce(function(previousVal, currentVal){r... | javascript | chosen |
[
{
"from": "system",
"value": "Include avatar and language in serviceData when user signs in to Twitter\n"
},
{
"from": "human",
"value": "(function () {\n\n Accounts.oauth.registerService('twitter', 1, function(oauthBinding) {\n var identity = oauthBinding.get('https://api.twitter.com/1.1/ac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lint issues with Login component\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nexport default class Login extends React.Component {\n render() {\n return (\n <form>\n <div className=\"form-group\">\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test after version in package.json has been corrected\n"
},
{
"from": "human",
"value": "import { test } from 'qunit';\nimport moduleForAcceptance from 'croodle/tests/helpers/module-for-acceptance';\n\nmoduleForAcceptance('Acceptance | build info');\n\ntest('ver... | javascript | chosen |
[
{
"from": "system",
"value": "Modify the adapter to only catch 400 and 422 responses as model validation errors\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.RESTAdapter.extend({\n namespace: 'api',\n\n ajaxError: function(_, response) {\n return new D... | javascript | chosen |
[
{
"from": "system",
"value": "Make stylistic changes to test file\n"
},
{
"from": "human",
"value": "'use strict';\nvar path = require('path');\nvar assert = require('yeoman-assert');\nvar helpers = require('yeoman-test');\n\ndescribe('generator-drizzle:app', function () {\n before(function (do... | javascript | chosen |
[
{
"from": "system",
"value": "Switch sample to use a GET instead of POST handler\n"
},
{
"from": "human",
"value": "var injector = require('../');\n\nvar app = injector();\n\napp.value('port', 8080);\n\napp.post('/greet/:name/:age', function(req, res) {\n res.write('hello ' + req.params.name ... | javascript | chosen |
[
{
"from": "system",
"value": "Reposition tooltips when window is resized\n"
},
{
"from": "human",
"value": "define(\n [\"jquery\"],\n function($) {\n function Tutorial(steps, content) {\n var _this = this;\n var currentIdx;\n\n function show(idx) {\n var step = steps[i... | javascript | chosen |
[
{
"from": "system",
"value": "Add click action to project item template when clicking Join\n"
},
{
"from": "human",
"value": "Template.projectItem.helpers({\n canJoinProject: function(userId, projectId) {\n var projectOwnerOrMember = Projects.find({ $or:\n [{\n 'owner.userId': u... | javascript | chosen |
[
{
"from": "system",
"value": "Use lodash includes when testing for http string.\n"
},
{
"from": "human",
"value": "'use strict';\n\nif ($ === undefined) {\n throw 'Gelato requires jQuery as a dependency.'\n} else {\n window.jQuery = window.$ = $;\n}\n\nif (_ === undefined) {\n throw 'Gelato r... | javascript | chosen |
[
{
"from": "system",
"value": "Change username input to use blueprint\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { Button, Container, Input } from 'rebass';\nimport { actions } from '../../redux/players';\n\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing `var` declaration for \"use strict\";"
},
{
"from": "human",
"value": "var clipboard = {};\n\nclipboard.copy = (function() {\n var _intercept = false;\n var _data; // Map from data type (e.g. \"text/html\") to value.\n\n document.addEventListener(\"co... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mermaid plugin config inclusion\n\nConfig changed a lot while adding piwik\n"
},
{
"from": "human",
"value": "module.exports = { \"root\": \"./protocol-spec\" };\n\n// Only add piwik if we're building on the CI and deploying\nif (process.env.CI) {\n module.expo... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce concurrency level to 3 for accomodating acient thinkpad\n"
},
{
"from": "human",
"value": "let dotAnsel = `${process.env.HOME}/.ansel`;\n\nif (process.env.ANSEL_DEV_MODE)\n dotAnsel = `${process.env.INIT_CWD}/dot-ansel`;\n\nexport default {\n characters: '0... | javascript | chosen |
[
{
"from": "system",
"value": ":arrow_up: Upgrade package to latest ucompiler API\n"
},
{
"from": "human",
"value": "'use babel'\n\nimport {transform} from 'babel-core'\nimport Path from 'path'\n\nexport const compiler = true\nexport const minifier = false\nexport function process(contents, {file... | javascript | chosen |
[
{
"from": "system",
"value": "Use object literal syntax instead of Object constructor\n"
},
{
"from": "human",
"value": "module.exports = {\n Some: (value) => Object({ value, hasValue: true }),\n None: Object()\n}\n"
},
{
"from": "gpt",
"value": "module.exports = {\n Some: (value)... | javascript | chosen |
[
{
"from": "system",
"value": "Hide hint when a valid email is input\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Mailcheck from 'mailcheck';\n\nexport default Ember.Component.extend({\n type: 'email',\n name: 'email',\n value: '',\n placeholder: '',\n suggestion: ''... | javascript | chosen |
[
{
"from": "system",
"value": "Use List from NativeBase to display job types in ChooseJobTypeScreen\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Container, Content } from 'native-base';\n\nimport JobTypeCard from './jobTypeCard';\nimport GlobalStyle from ... | javascript | chosen |
[
{
"from": "system",
"value": "Correct placeholder for input field\n"
},
{
"from": "human",
"value": "import mixin from 'reactjs-mixin';\nimport React from 'react';\n\nimport FilterInputText from './FilterInputText';\nimport QueryParamsMixin from '../mixins/QueryParamsMixin';\nimport ServiceFilte... | javascript | chosen |
[
{
"from": "system",
"value": "Add branch tag to saucelabs runs\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar specs = JSON.parse(fs.readFileSync('tests/end2end/specs.json'));\n\nvar browser_capabilities = JSON.parse(process.env.SELENIUM_BROWSER_CAPABILITIES);\nbrowser_capabiliti... | javascript | chosen |
[
{
"from": "system",
"value": "Set default buffer size to 64M"
},
{
"from": "human",
"value": "'use strict';\n\nconst ProgramError = require('./error/ProgramError');\n\nclass SortOptions\n{\n\tconstructor(options = {})\n\t{\n\t\tthis.path = 'sort';\n\t\tthis.unique = false;\n\t\tthis.numeric = fa... | javascript | chosen |
[
{
"from": "system",
"value": "Update relative path for favicon\n"
},
{
"from": "human",
"value": "module.exports = {\n plugins: [\n {\n resolve: `gatsby-source-filesystem`,\n options: {\n name: `content`,\n path: `${__dirname}/../content`,\n },\n },\n {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Litho version for Docusaurus\n\nReviewed By: muraziz\n\nDifferential Revision: D27236872\n\nfbshipit-source-id: ccab5ed8a444cbf1027070a0261c108c307642f7\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * Licens... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicated _.each loop on sections\n\nLooks like the original line got retained after\nthe move to \"noConflict\" underscore\n"
},
{
"from": "human",
"value": "DV.model.Chapters = function(viewer) {\n this.viewer = viewer;\n this.loadChapters();\n};\n\nDV.m... | javascript | chosen |
[
{
"from": "system",
"value": "Add an option for shorter datatable pages\n"
},
{
"from": "human",
"value": "$(function () {\n $.extend(true, $.fn.dataTable.defaults, {\n \"stateSave\": true,\n \"autoWidth\": false,\n \"pagingType\": \"full_numbers\",\n \"lengthMenu\": [[25, 50, 100, ... | javascript | chosen |
[
{
"from": "system",
"value": "Make the JS file more readable by moving the comments.\n"
},
{
"from": "human",
"value": "/* jQuery.instance\n * ---------------\n *\n * Quick guide:\n *\n * var $one = $(\"#sidebar\").instance();\n * var $two = $(\"#sidebar\").instance();\n * $one.abc = 42;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for description, arguments & returns\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar docs = require('../docs/src/js/docs');\nvar expect = require('chai').expect;\nvar sinon = require('sinon');\nvar stub = sinon.stub;\nvar utils = require('./helpers... | javascript | chosen |
[
{
"from": "system",
"value": "Make normal WebGL the default renderer\n"
},
{
"from": "human",
"value": "\nconst os = require('os')\n\nconst prefix = 'webjcs:'\n\nclass Settings {\n constructor (defaults = {}) {\n this.defaults = defaults\n }\n\n set (key, value) {\n window.localStorage.... | javascript | chosen |
[
{
"from": "system",
"value": "language-settings: Define language list item style locally.\n\nThis list is doing something idiosyncratic, following a particular iOS\nsettings-UI convention; so it won't necessarily follow our normal\nstyle for a list.\n\nThis commit just copies the global style in, without ye... | javascript | chosen |
[
{
"from": "system",
"value": "Check for fn in .on(), bail early in .off()\n"
},
{
"from": "human",
"value": "export default class Emitter {\n constructor() {\n this._events = {}\n }\n\n _event(name) {\n return (this._events[name] = this._events[name] || new Set())\n }\n\n on(name, fn)... | javascript | chosen |
[
{
"from": "system",
"value": "Expand top-level EO namespace members\n"
},
{
"from": "human",
"value": "import EO from './ember_orbit/main';\nimport Model from './ember_orbit/model';\nimport attr from './ember_orbit/attr';\nimport hasOne from './ember_orbit/relationships/has_one';\nimport hasMany... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Skype postDeploy hook name\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst skReply = require('./reply');\nconst skParse = require('./parse');\n\nmodule.exports = function skSetup(api, bot, logError) {\n\n api.post('/skype', request => {\n let arr =... | javascript | chosen |
[
{
"from": "system",
"value": "Update favorite preset button state automatically\n"
},
{
"from": "human",
"value": "import {\n event as d3_event,\n select as d3_select\n} from 'd3-selection';\n\nimport { t } from '../util/locale';\nimport { svgIcon } from '../svg';\n\nexport function uiPres... | javascript | chosen |
[
{
"from": "system",
"value": "Add a new Domain factory that returns a $resource\n"
},
{
"from": "human",
"value": "app.service('Domains', ['$rootScope', '$q', '$resource', '$log',\n function($rootScope, $q, $resource, $log) {\n var service = {};\n\n return service;\n }\n]);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use callbacks for run schedule script (node exit before resolve)\n"
},
{
"from": "human",
"value": "const initialize = require('../src/util/initialization.js')\nconst connectDatabase = require('../src/util/connectDatabase.js')\nconst ScheduleRun = require('../src/st... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify comments list behavior so API requests are consistent with other types of records.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst {\n Route,\n inject: { service }\n} = Ember;\n\nexport default Route.extend({\n currentUser: service... | javascript | chosen |
[
{
"from": "system",
"value": "Delete now deletes from database (4/16).\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar cors = require('cors');\nvar bodyParser = require('body-parser');\nvar nano = require('nano')('http://localhost:5984');\nvar todo = nano.db.use('todo')... | javascript | chosen |
[
{
"from": "system",
"value": "Remove $options from userFeed query\n"
},
{
"from": "human",
"value": "import gql from 'graphql-tag';\n\nconst contentFragment = gql`\n fragment ContentForFeed on Content {\n entryId: id\n title\n channelName\n status\n meta {\n siteId\n da... | javascript | chosen |
[
{
"from": "system",
"value": "Remove iframe and restore from hiding style\n"
},
{
"from": "human",
"value": "/* global tabID */\n\"use strict\";\nconst existingIframe = document.querySelector(\"iframe#dom-distiller-result-iframe\");\nif(existingIframe) {\n existingIframe.remove();\n} else {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add new capitalized version of loging in with linked in"
},
{
"from": "human",
"value": "// Meteor.loginWithLinkedin = function (options, callback) {\n// var credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(callback);\n// Linke... | javascript | chosen |
[
{
"from": "system",
"value": "Sort the journal entries, so that unpublished entries are on top\n"
},
{
"from": "human",
"value": "Meteor.publish('journalEntries', function (limit, skip) {\n var filter = {}\n var options = {\n fields: {\n 'title': 1,\n 'teaser': 1,\n 'publishe... | javascript | chosen |
[
{
"from": "system",
"value": "Change 404 route to index\n"
},
{
"from": "human",
"value": "CenterScout.config(function($routeProvider) {\n $routeProvider.when('/', {\n controller: 'HomeController',\n templateUrl: 'views/home.html'\n });\n\n $routeProvider.when('/home', {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use min version in test to make sure no compilation errors exist\n"
},
{
"from": "human",
"value": "var config = module.exports;\n\nconfig[\"fruitmachine\"] = {\n\trootPath: '../',\n\tenvironment: \"browser\",\n\tsources: [\n\t\t'build/fruitmachine.js',\n\t\t'node_m... | javascript | chosen |
[
{
"from": "system",
"value": "BrainyQuote: Check if the result is a category or not.\n\nQueries such as \"quote mining\", \"financial quotations\", or \"lame quotes\" should not show up.\n"
},
{
"from": "human",
"value": "function ddg_spice_brainy_quote (api_result) {\n if (api_result.error) ... | javascript | chosen |
[
{
"from": "system",
"value": "Use the autocomplete lookup instead of traversing DOM elements\n"
},
{
"from": "human",
"value": "//= require jquery.autocomplete\n\n(function ($) {\n\n $.fn.ministerSelect = function (options) {\n var settings = $.extend({\n inputClass: 'minist... | javascript | chosen |
[
{
"from": "system",
"value": "Trim tab size for readability\n"
},
{
"from": "human",
"value": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nclass QueryResultsSelector extends React.Component {\n state = {\n selectedQueryIndex: 0,\n }\n render() {\n const { options,... | javascript | chosen |
[
{
"from": "system",
"value": "Remove process.emitWarning because it breaks AppVeyor builds\n\nSee Level/leveldown#660\n"
},
{
"from": "human",
"value": "var warned = false\n\nfunction testCommon (options) {\n var factory = options.factory\n var test = options.test\n var clear = !!options.clea... | javascript | chosen |
[
{
"from": "system",
"value": "Add const and var rules to lit config\n"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": \"./index.js\",\n \"parser\": \"babel-eslint\",\n \"env\": {\n \"browser\": true\n },\n \"plugins\": [\n \"lit\", \"html\"\n ],\n \"globals\": {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sentence buttons on reloaded random sentence\n\nCloses #1658.\n"
},
{
"from": "human",
"value": "/**\n * Tatoeba Project, free collaborative creation of multilingual corpuses project\n * Copyright (C) 2009 HO Ngoc Phuong Trang <tranglich@gmail.com>\n *\n * This... | javascript | chosen |
[
{
"from": "system",
"value": "Add timezone output to the momentjs dates\n"
},
{
"from": "human",
"value": "var moment = require('moment');\n\nvar coupon = require('./coupon');\nvar stripe = require('./stripe');\nvar BulkDelete = require('./bulk-delete');\nvar faye = require('./faye');\n\n$(docum... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint import resolver path.\n"
},
{
"from": "human",
"value": "var path = require('path');\n\nmodule.exports = {\n env: {\n es6: true,\n browser: true,\n node: true,\n },\n parserOptions: {\n sourceType: 'module',\n ecmaVersion: 7,\n ecmaFe... | javascript | chosen |
[
{
"from": "system",
"value": "Copy user before update (WAl-383)\n"
},
{
"from": "human",
"value": "import template from './auth-init.html';\n\nexport const authInit = {\n template,\n controller: class AuthInitController {\n constructor(usersService, $state, ENV, ncUtilsFlash) {\n // @n... | javascript | chosen |
[
{
"from": "system",
"value": "Configure ESLint to support ES2017\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: \"eslint:recommended\",\n rules: {\n \"no-console\": 0,\n quotes: [\"error\", \"backtick\"],\n semi: [\"error\", \"never\"]\n },\n env: {\n node: true... | javascript | chosen |
[
{
"from": "system",
"value": "Add eslint rule for js2-mode\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"es6\": true,\n \"node\": true\n },\n \"plugins\": [\"node\"],\n \"extends\": [\"eslint:recommended\", \"plugin:node/recommended\"],\n \"parserOptions\": {\... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure that there is at least one p inside abstract.\n"
},
{
"from": "human",
"value": "import { unwrapChildren } from '../util/domHelpers'\n\nconst ABSTRACT_META = ['object-id','sec-meta', 'label', 'title'].reduce((m, n) => { m[n] = true; return m}, {})\nconst A... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing require for underscore.\n"
},
{
"from": "human",
"value": "var app = require('server'),\n tl = require('tl');\n\napp.get('/:scheme/:mapfile_64/:z/:x/:y.*', function(req, res) {\n /*\n * scheme: (xyz|tms|tile (tms))\n *\n * format:\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add update optional breach field\n"
},
{
"from": "human",
"value": "/**\n * Sustainable Solutions (NZ) Ltd. 2020\n * mSupply Mobile\n */\n\nimport Realm from 'realm';\n\nexport class TemperatureLog extends Realm.Object {}\n\nTemperatureLog.schema = {\n name: 'Tempe... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spotify for older player versions.\n"
},
{
"from": "human",
"value": ";(function() {\n \"use strict\";\n\n var BaseController = require(\"BaseController\");\n\n new BaseController({\n siteName: \"Spotify\",\n playPause: \"[title='Pause'],[title='Play']\... | javascript | chosen |
[
{
"from": "system",
"value": "connect: Add a \"fixme\" version, `connectFlowFixMe`.\n"
},
{
"from": "human",
"value": "/* @flow strict-local */\nimport type { ComponentType, ElementConfig } from 'react';\nimport { connect as connectInner } from 'react-redux';\n\nimport type { GlobalState } from ... | javascript | chosen |
[
{
"from": "system",
"value": "Define the lesson plan form type only on page load.\n"
},
{
"from": "human",
"value": "function LessonPlanEntryFormType(pickers) {\n var self = this;\n this.pickers = pickers;\n pickers.forEach(function(picker) {\n picker.onSelectionCompleted = function() { se... | javascript | chosen |
[
{
"from": "system",
"value": "Add named variables for clarity\n"
},
{
"from": "human",
"value": "(function(global) {\n\n \"use strict\";\n\n global.GOVUK.Modules.RadioSlider = function() {\n\n this.start = function(component) {\n\n $(component)\n .on('click', function() {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix destination paths for tests\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n basePath: '',\n frameworks: ['jasmine'],\n files: [\n 'dest/taggd.js',\n 'tests/functions.js',\n 'tests/units/*.js',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to headless chrome from chrome\n"
},
{
"from": "human",
"value": "const webpack = require('./webpack.config')\n\nmodule.exports = config => {\n config.set({\n frameworks: ['mocha', 'chai'],\n files: [\n { pattern: 'test/components/*.js', watched: ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove calls to `path.resolve` with no root directory\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport {exec} from 'node-promise-es6/child-process';\n\nasync function cli(fixture, env = null) {\n const child = await exec(\n 'jasmine',\n {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Enable map controls, switch to terrain view\n"
},
{
"from": "human",
"value": "(function () {\n\n function initialize_map() {\n\n var map_element = document.getElementById(\"map-drilldown-canvas\");\n if (!map_element) return false;\n\n // start with the d... | javascript | chosen |
[
{
"from": "system",
"value": "Use private functions for implementation details of Event module\n"
},
{
"from": "human",
"value": "module.exports = {\n on: function(name, callback, context) {\n var events = this._getEvents(name) || [];\n\n this._events[name] = events.concat({\n callba... | javascript | chosen |
[
{
"from": "system",
"value": "Add hex prefix to signed transaction\n"
},
{
"from": "human",
"value": "import Tx from 'ethereumjs-tx'\nimport ethUtil from 'ethereumjs-util'\nimport web3 from './web3client'\nimport { coinbase, another, keys } from './keys'\n\n\nexport function signTransaction(rawT... | javascript | chosen |
[
{
"from": "system",
"value": "Call getUserFeed() when current user url is changed\n"
},
{
"from": "human",
"value": "var githubFeed = ({\n feedUrl: \"\",\n\n loadFeedUrl: function() {\n var self = this;\n chrome.storage.local.get(\"current_user_url\", function(data) {\n self.feedUrl... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dead code in example"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nimport AsyncSelect from '../../src/Async';\nimport { colourOptions } from '../data';\n\ntype State = {\n inputValue: string,\n};\n\nconst filterColors = (input... | javascript | chosen |
[
{
"from": "system",
"value": "Store configuartion data in a variable\n"
},
{
"from": "human",
"value": "/*-----------------------------------------------------------------\n\nModular - JS Extension\nMade by @esr360\nhttp://github.com/esr360/Modular/\n\t\n-----------------------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Make npm link work with babel-loader.\n"
},
{
"from": "human",
"value": "const\n\t{ mix } = require('laravel-mix'),\n\twebpack = require('webpack');\n\nmix\n\t.webpackConfig({\n\t\tplugins: [\n\t\t\tnew webpack.ProvidePlugin({\n\t\t\t\t$: 'jquery',\n\t\t\t\tjQuery: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix complaints about strict mode during build\n"
},
{
"from": "human",
"value": "/**\n * This file contains custom webpack plugins.\n */\n\n// This plugin modifies the generated webpack code to execute a module within the DLL bundle\n// in addition to preserving the... | javascript | chosen |
[
{
"from": "system",
"value": "Format logged objects to indicate their type\n"
},
{
"from": "human",
"value": "// Thanks in part to https://stackoverflow.com/questions/11403107/capturing-javascript-console-log\n(function(global) {\n 'use strict';\n\n var originalConsoleLogger = console.log;... | javascript | chosen |
[
{
"from": "system",
"value": "Change PORT to WEB_PORT env var\n\nconflicts with `PORT` variable injected by Marathon making it unusable in bridge mode."
},
{
"from": "human",
"value": "\nvar config = {\n defaultPort: process.env.PORT || 3000,\n defaultLogLength: process.env.LOGLENGTH || 64,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Rename promise to resolver, which is what it is anyway\n"
},
{
"from": "human",
"value": "/**\n * @license Copyright (c) 2010-2011 Brian Cavalier\n * LICENSE: see the LICENSE.txt file. If file is missing, this file is subject\n * to the MIT License at: http://www.op... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic validations to the Company model"
},
{
"from": "human",
"value": "import * as dh from '/imports/both/docs-helpers.js';\nimport { Class as Model } from 'meteor/jagi:astronomy';\n\nCompanies = new Mongo.Collection('companies');\n\nCompany = Model.create({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add delay on nick checking request\n"
},
{
"from": "human",
"value": "'use strict';\n\n\n/**\n * client\n **/\n\n/**\n * client.common\n **/\n\n/**\n * client.common.auth\n **/\n\n/**\n * client.common.auth.register\n **/\n\n\n/*global nodeca*/\n\n\n/**\n * cli... | javascript | chosen |
[
{
"from": "system",
"value": "Modify model for add hash\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Vote = new Schema({\n\tip: String\n});\n\nvar Options = new Schema({\n\tname: String,\n\tvote: [Vote]\n});\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix label render issue due to typo\n"
},
{
"from": "human",
"value": "import canvas from 'canvas';\nimport Game from 'lib/game';\nimport Prop from 'props/prop';\nimport Button from 'props/button';\n\nexport default class Screen extends Prop {\n constructor(cta, lab... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.