conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make sure we always print the result if it exists.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n'use strict';\n\nvar MakeUp = require('../index');\n\nvar argv = require('minimist')(process.argv.slice(2));\n\nvar options = {\n dirs: argv._,\n integrati... | javascript | chosen |
[
{
"from": "system",
"value": "Update canvas (test dependency only).\n"
},
{
"from": "human",
"value": "Package.describe({\n name: \"froatsnook:bardcode\",\n version: \"1.1.0\",\n summary: \"Draw 1-D barcodes to Canvases (client and server)\",\n git: \"https://github.com/froatsnook/ba... | javascript | chosen |
[
{
"from": "system",
"value": "Remove invalid. It was for testing\n"
},
{
"from": "human",
"value": "var auto = require('auto-package')\nvar content = auto.content\nvar policystat = require('./lib')\nvar psPrettyName = policystat.name.pretty\nvar license = policystat.openSource.license.spdx\n\nco... | javascript | chosen |
[
{
"from": "system",
"value": "Fix global policies case sensitive\n\nSigned-off-by: Alexandre Bodin <70f0c7aa1e44ecfca5832512bee3743e3471816f@gmail.com>\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst assert = require('assert');\nconst path = require('path');\nconst fse = require('fs-ex... | javascript | chosen |
[
{
"from": "system",
"value": "Add loader for images to legacy framework\n"
},
{
"from": "human",
"value": "export function support(dependencies) {\n\n let isLegacy = Object.getOwnPropertyNames(dependencies).filter(name => {\n return name.indexOf('corespring-legacy') === 0;\n }).length > 0;\... | javascript | chosen |
[
{
"from": "system",
"value": "Trim each line of markdown hack\n"
},
{
"from": "human",
"value": "// Overwrite this file in your application /app/assets/javascripts/comfortable_mexican_sofa/admin/application.js\n//= require requirejs/require\n//= require require_config\n\nwindow.CMS.wysiwyg = fun... | javascript | chosen |
[
{
"from": "system",
"value": "Add a Hotkey to Edit the Current Page\n"
},
{
"from": "human",
"value": "pageflow.app.addInitializer(function(options) {\n var KEY_A = 65;\n\n $(document).on('keydown', function(event) {\n if (pageflow.features.isEnabled('atmo') && event.altKey && event.which =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove props to AddPoll component\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nclass LessonData extends React.Component {\n constructor(props){\n super(props);\n \n this.state = {\n // state here\n // lessons data\n // pol... | javascript | chosen |
[
{
"from": "system",
"value": "Change $Identity so that it can be used as part of an html identifier\n"
},
{
"from": "human",
"value": "/* eslint no-unused-vars: 0 */\n\n/***********************************/\n/** data-calculate-row-identities **/\n/***********************************/\ngridState.... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade map from 3.0 to 3.25\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React from 'react';\nimport { GoogleMap } from 'react-google-maps';\nimport ScriptjsLoader from 'react-google-maps/lib/async/ScriptjsLoader';\nimport { latLon } from '../../../types/... | javascript | chosen |
[
{
"from": "system",
"value": "Convert temperatures to degrees Celsius.\n"
},
{
"from": "human",
"value": "/* global angular, console */\n\n(function () {\n 'use strict';\n\n angular\n .module('plotWidget')\n .controller('PlotWidgetController', PlotWidgetController);\n\n Pl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix routing bug in groups module\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Configuring the Groups module\nangular.module('groups').run(['Menus', function (Menus) {\n\t// Add the dropdown manage groups\n\tMenus.addSubMenuItem('topbar', 'admin', {\n\t\tti... | javascript | chosen |
[
{
"from": "system",
"value": "Change data logging origin fix revert\n"
},
{
"from": "human",
"value": "/**\n * The Logging layer module.\n *\n * @return LoggingLayer class (extends CartoDBLayerClass)\n */\ndefine([\n 'abstract/layer/CartoDBLayerClass',\n], function(CartoDBLayerClass) {\n\n 'us... | javascript | chosen |
[
{
"from": "system",
"value": "Declare command function before use\n"
},
{
"from": "human",
"value": "//Get the required shit together\nconst config = require(\"./config.json\");\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\nconst MSS = require(\"./functions/\")... | javascript | chosen |
[
{
"from": "system",
"value": "Change enhanced-resolve to promisified version\n"
},
{
"from": "human",
"value": "'use strict'\nconst fs = require('fs');\nconst parsePackageString = require('npm-package-arg');\nconst enhancedResolve = require('enhanced-resolve');\nconst InstallationUtils = require... | javascript | chosen |
[
{
"from": "system",
"value": "Add limit on stats service\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n//Load dependencies\nvar applicationStorage = process.require(\"core/applicationStorage\");\n\n/**\n * Insert a stat object\n * @param tier\n * @param raid\n * @param stat\n * @param ca... | javascript | chosen |
[
{
"from": "system",
"value": "Fix unused title in profiles controller\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n /* ngInject */\n function ProfilesController(NavbarConfig, ProfileService) {\n var ctl = this;\n initialize();\n\n function in... | javascript | chosen |
[
{
"from": "system",
"value": "Handle both synchronous and asynchronous processing\n"
},
{
"from": "human",
"value": "import Velocity from 'velocity-animate';\n\nexport default function vq(el, props, opts = null) {\n if (!opts) {\n opts = props.o;\n props = props.p;\n }\n opts = clone(op... | javascript | chosen |
[
{
"from": "system",
"value": "Remove type declaration for module\n\n"
},
{
"from": "human",
"value": "//@flow\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { Provider } from \"react-redux\";\nimport { Route } from \"react-router\";\nimport { ConnectedRouter as Rout... | javascript | chosen |
[
{
"from": "system",
"value": "Fix one more cap error\n"
},
{
"from": "human",
"value": "var triflow = require('./core/index');\ntriflow.element = require('./Element/index');\n\nmodule.exports = triflow;\n"
},
{
"from": "gpt",
"value": "var triflow = require('./core/index');\ntriflow.... | javascript | chosen |
[
{
"from": "system",
"value": "Use consistent module export syntax (es6).\n"
},
{
"from": "human",
"value": "import injectify from './injectify.js';\n\nmodule.exports = function injectifyLoader(source, inputSourceMap) {\n if (this.cacheable) {\n this.cacheable();\n }\n\n const { code, map }... | javascript | chosen |
[
{
"from": "system",
"value": "Use ol.has.TOUCH to check if the device support touch events\n"
},
{
"from": "human",
"value": "// FIXME DocumentTouch is deprecated, see:\n// https://developer.mozilla.org/en-US/docs/Web/API/DocumentTouch\n/* global DocumentTouch */\n\nimport $ from 'jquery';\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Move updating preview text to its own function\n"
},
{
"from": "human",
"value": "'use strict';\nvar GameDataCreator = require('../gamedata');\nvar PointView = require('../prefabs/pointview');\n\nfunction Editor() {}\nEditor.prototype = {\n create: function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change version tag to include v\n\nAs discussed in imagemin/gifsicle-bin#55, some imagemin bin packages prepend their version\ntags with v and some don't. This PR changes the behavior of this package to prepend tags\nwith`v`, as do the majority of packages. This reduces the pro... | javascript | chosen |
[
{
"from": "system",
"value": "Allow connect call to be chained\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar mubsub = require('mubsub');\n\nvar monq = module.exports = {};\n\nmonq.Job = require('./job');\nmonq.Queue = require('./queue');\nmonq.Worker = require('./wo... | javascript | chosen |
[
{
"from": "system",
"value": "NEW: Add link to the pull request that fix the issue.\n"
},
{
"from": "human",
"value": "var scrapinode = require('./../main.js')();\n\n// Issue with this page similar to https://github.com/tmpvar/jsdom/issues/290\n// Works great with cheerio\nvar url = 'http://www.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing url module bug\n"
},
{
"from": "human",
"value": "export * from './filters';\nexport * from './formatters';\nexport * from './supports';\nexport * from './common';\nexport * from './url';\n"
},
{
"from": "gpt",
"value": "export * from './filt... | javascript | chosen |
[
{
"from": "system",
"value": "Define process.env.NODE_ENV for vue-loader, which will be added later\n"
},
{
"from": "human",
"value": "var path = require('path')\n\nvar projectRoot = path.resolve(__dirname, '../')\n\nmodule.exports = {\n entry: {\n \"vue-typer\": path.join(projectRoot, 'src/... | javascript | chosen |
[
{
"from": "system",
"value": "Configure favicons to a fixed folder\n\n"
},
{
"from": "human",
"value": "const webpack = require(`webpack`);\nconst FaviconsWebpackPlugin = require('favicons-webpack-plugin')\n\nexports.modifyWebpackConfig = ({ config }) =>\n config.plugin(`Favicon`, FaviconsWebpa... | javascript | chosen |
[
{
"from": "system",
"value": "Use `nextTick` to avoid time shifting issues.\n"
},
{
"from": "human",
"value": "import { Promise } from 'rsvp';\n\nimport { nextTick } from './-utils';\n\nexport default function(callback, options = {}) {\n let timeout = 'timeout' in options ? options.timeout : 10... | javascript | chosen |
[
{
"from": "system",
"value": "Remove whitespace from campaign text area\n"
},
{
"from": "human",
"value": "class CampaignView {\n constructor(){\n\n }\n\n getIndex(campaigns) {\n console.log('Campaign View: Get index');\n var campaignHTML = `<h1>Campaign Index<h1>`;\n\n for(let i = 0... | javascript | chosen |
[
{
"from": "system",
"value": "Fix para modelo de posicioanmento autal\n"
},
{
"from": "human",
"value": "angular.module('sislegisapp').factory('ReuniaoResource',\n\t\tfunction($resource, BACKEND) {\n\t\t\treturn $resource(BACKEND + '/reuniaos/:ReuniaoId', {\n\t\t\t\tReuniaoId : '@id'\n\t\t\t}, {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint errors in prime-factors\n"
},
{
"from": "human",
"value": "'use strict';\n\nexports.for = function (n) {\n var prime_factors = [];\n var possible_factor = 2;\n while (possible_factor * possible_factor <= n) {\n while (n % possible_factor === 0) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in prefilling IDE.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar ace = require('brace');\nrequire('brace/theme/tomorrow');\nrequire('brace/mode/javascript');\n\nvar React = require('react/addons');\n\nvar IdeComponent = React.createClass({\n edi... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up nicely upon $destruction.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('ngClipboard', []).\n value('ZeroClipboardConfig', {\n path: '//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/1.2.3/ZeroClipboard.swf'\n }).\n directive('clipC... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up variables a bit\n"
},
{
"from": "human",
"value": "var p5 = require('p5');\n\nconsole.log(pulsarConfig);\n\nvar sketch = function (p) {\n\n var Receiver = require('./Receiver.js');\n var receiver = new Receiver();\n\n var Processor = require('./Processor... | javascript | chosen |
[
{
"from": "system",
"value": "Add new function to reset seed\n"
},
{
"from": "human",
"value": "import Chance from 'chance'\nimport { VALUE_DEFAULT_STRING_LENGTH } from './constants'\n\nconst chanceInstance = new Chance()\n\nexport const randomByte = ({chance = chanceInstance}) => {\n return ch... | javascript | chosen |
[
{
"from": "system",
"value": "Use HTTPS rather than SSH to clone Particle firmware repository.\n"
},
{
"from": "human",
"value": "var path = require(\"path\");\n\nvar outputDirectory = path.resolve(\"./output\");\nvar libsDirectory = path.resolve(\"./libs\");\nvar tempDirectory = path.resolve(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Load the main scss file from packages to generate the styles for the demo code.\n"
},
{
"from": "human",
"value": "const path = require(`path`);\n\nconst sass2css = require(`../lib/sass2css.js`);\n\nmodule.exports = (packageName) => {\n const packagePath = path.joi... | javascript | chosen |
[
{
"from": "system",
"value": "Add semi-colon at end of function\n"
},
{
"from": "human",
"value": "const toggleValue = (currentValue, value1, value2) => {\n if (currentValue === value1) {\n return value2;\n }\n\n return value1;\n}\n\nexport { toggleValue as default };\n"
},
{
"from... | javascript | chosen |
[
{
"from": "system",
"value": "Add actual directory path for data.txt.\n"
},
{
"from": "human",
"value": "var SimpleEmail = require('./SimpleNEParser');\n\nSimpleEmail.fromPath('data.txt', function(email) {\n// console.log(email);\n});\n\nSimpleEmail.fromString('nowai from string', function(emai... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Use `Buffer.from` in place of `new Buffer`\"\n\nThis reverts commit f71200b84f46293f0963ea4195d82da75303556d.\n\nMany Node users are not on Node 6 yet.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar amqp = require('amqplib/callback_api');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for add string method return value\n"
},
{
"from": "human",
"value": "var Trie = require('../app/trie');\n\ndescribe('Trie', function() {\n var trie;\n\n beforeEach(function() {\n trie = new Trie();\n });\n\n it('should be an object', function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add $inject -- to prevent minifiers\n"
},
{
"from": "human",
"value": "(function() {\n\tvar CustomersController = function($scope) {\n\t\t$scope.sortBy = 'name';\n \t\t$scope.reverse = false;\n \t\t$scope.customers = [{name:'John', city:'London', joined:'2014-12-0... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for '[HMR] You need to restart the application!' on server sided err\n"
},
{
"from": "human",
"value": "import app from './server';\nimport http from 'http';\n\nconst server = http.createServer(app);\n\nlet currentApp = app;\n\nserver.listen(process.env.PORT || ... | javascript | chosen |
[
{
"from": "system",
"value": "Use always secure tracking script\n"
},
{
"from": "human",
"value": "(function() {\n if (window.location.hostname.indexOf('localhost') > -1) {\n return;\n }\n\n var script = document.createElement('script');\n window.counter = 'https://chrisdeluca.goatcounter... | javascript | chosen |
[
{
"from": "system",
"value": "Add join between Subscroptions and Users\n"
},
{
"from": "human",
"value": "RocketChat.cache.Rooms.hasMany('Subscriptions', {\n\tfield: 'usernames',\n\tlink: {\n\t\tlocal: '_id',\n\t\tremote: 'rid',\n\t\ttransform(room, subscription) {\n\t\t\treturn subscription.u.u... | javascript | chosen |
[
{
"from": "system",
"value": "Use promises instead of callbacks in test\n"
},
{
"from": "human",
"value": "var nocache = require('..')\n\nvar assert = require('assert')\nvar connect = require('connect')\nvar request = require('supertest')\n\ndescribe('nocache', function () {\n it('sets headers ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix SectionLayoutRenderer blockMap prop type.\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport { ContentLayoutEngine, BlockTypeMap } from '../index';\n\nexport default class SectionLayoutRenderer extends Component {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Remove redundant transformations and fix locale transformations\n"
},
{
"from": "human",
"value": "import { omit, pick } from 'lodash/object'\nimport { find, reduce } from 'lodash/collection'\n\n/**\n * Default transformer methods for each kind of entity.\n * F... | javascript | chosen |
[
{
"from": "system",
"value": "Remove section from child of section\n"
},
{
"from": "human",
"value": "/**\n * ColonelKurtz Example\n */\n\nimport './example.scss'\nimport ColonelKurtz from '../src/Colonel'\nimport MediumBlock from '../addons/medium'\nimport HtmlEmbedBlock from '../addons/html-em... | javascript | chosen |
[
{
"from": "system",
"value": "Update to PageRouter export components file\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {\n BrowserRouter as Router,\n Route,\n Switch\n} from 'react-router-dom';\nimport firebase from 'firebase';\nimport { NavigationBar } from '../Navig... | javascript | chosen |
[
{
"from": "system",
"value": "Correct BEM class in spec\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { shallow } from 'enzyme';\nimport Section from './section';\n\ndescribe('Section', () => {\n let wrapper, children;\n\n beforeEach(() => {\n wrapper = shallow(\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Put dt in the wrong spot!\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar config = require('../config');\nvar Backbone = require('backbone');\nvar User = require('./user');\n\nvar World = module.exports = Backbone.Model.extend({\n initialize: function () {\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix possible uncaught exception in retreiving messages\n"
},
{
"from": "human",
"value": "define([\n\t'underscore',\n\t'controller'\n], function (_, Controller) {\n\t\n\tvar AccountController = Controller.extend({\n\t\t\n\t\thanders: {\n\t\t\t'account:add' : 'create... | javascript | chosen |
[
{
"from": "system",
"value": "Add total monthly amount to clients container\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport ClientCard from '../views/ClientCard'\nimport { Container } from 'semantic-ui-react'\nimport styled from 'styled-components'\n\nconst St... | javascript | chosen |
[
{
"from": "system",
"value": "Set spawn to false to manipulate configuration\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = {\n files: configuration.srcFiles.concat(configuration.testFiles),\n // Take care of linting and maintainability\n tasks: [\n \"esli... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error introduced in 13fa7ba.\n"
},
{
"from": "human",
"value": "var config = require('../config');\nvar raven = require('raven');\n\nvar client = config.log.url ? new raven.Client( config.log.url ) : false;\n\n// Simple message\nexports.message = function... | javascript | chosen |
[
{
"from": "system",
"value": "Use router to navigate to home page\n\nUse router to navigate to home page, otherwise the route in the URL\nisn't correct and leads to unexpected behavior.\n"
},
{
"from": "human",
"value": "isic.views.TermsAcceptanceView = isic.View.extend({\n events: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "[minor] Remove duplicate \"use strict\" statement\n"
},
{
"from": "human",
"value": "'use strict';\n\n'use strict';\n\nconst Base = require('./base');\n\n/**\n * ApplicationCharge resource.\n *\n * @public\n */\nclass ApplicationCharge extends Base {\n /**\n * Cr... | javascript | chosen |
[
{
"from": "system",
"value": "Site: Fix not finding .env on live\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst express = require('express')\nrequire('dotenv').config({path: '../.env'})\n\nconst app = express()\nconst port = process.env.SITE_PORT\n\napp.use(express.static('public'))\n\... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Change default audio state to play sound\n"
},
{
"from": "human",
"value": "import settings from 'electron-settings';\nimport {\n SET_APP_SETTINGS,\n SET_AUDIO_OFF,\n SET_AUDIO_ON,\n SET_ELECTRON_SETTINGS\n} from './types';\n\nconst initialState = {\n aud... | javascript | chosen |
[
{
"from": "system",
"value": "Check that options declares Google Fonts before building component\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react'\n\nmodule.exports = (options: any) =>\n React.createClass({\n displayName: 'GoogleFont',\n\n render () {\n // Create... | javascript | chosen |
[
{
"from": "system",
"value": "Add test that checks duplicate keys work\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports.run = function (test, Heap) {\n test('should insert items into the heap', function (t) {\n var heap = new Heap();\n heap.insert(1, null);\n heap.ins... | javascript | chosen |
[
{
"from": "system",
"value": "Return immediately on error as per old behaviour\n"
},
{
"from": "human",
"value": "var IPHistory = (function() {\n 'use strict';\n\n function makeRequest() {\n var request = {login_history: 1, limit: 50};\n BinarySocket.send(request);\n }\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure most recent export file is published.\n"
},
{
"from": "human",
"value": "import { Meteor } from 'meteor/meteor';\n\nimport exportFiles from '../collection.js';\n\nMeteor.publish('exportFiles.all', function publishExportFilesAll() {\n let cursor;\n if (th... | javascript | chosen |
[
{
"from": "system",
"value": "Load all settings instead of explicit list for first login\n"
},
{
"from": "human",
"value": "import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { get } from '@ember/object';\nimport C from 'ui/utils/constants';\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug in history\n"
},
{
"from": "human",
"value": "angular.module('pmsiplan').directive('resourceHistory', ['AngularDataStore', function(AngularDataStore) {\n return {\n templateUrl: 'partials/directive/resource-history.html',\n scope: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Prepare to pass OAuth token.\n"
},
{
"from": "human",
"value": "define([\"jquery\", \"underscore\", \"backbone\"], function($, _, Backbone) {\n\tvar Utils = {};\n\n\tUtils.logIn = function() {\n\t\t$.ajax({\n\t\t\turl: '/service/me/login',\n\t\t\tasync: false,\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error in `ep06`\n"
},
{
"from": "human",
"value": "@license\n// Copyright (c) 2014 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the follo... | javascript | chosen |
[
{
"from": "system",
"value": "Replace p with pre in playground\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n var oldLog = console.log;\n console.log = function (message) {\n var body = document.querySelector(\"body\");\n var p = document.createElemen... | javascript | chosen |
[
{
"from": "system",
"value": "Update /admin/debug/clear with new logging semantics\n"
},
{
"from": "human",
"value": "// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentati... | javascript | chosen |
[
{
"from": "system",
"value": "Handle location.host being null (FIND-733)\n\n[rev. matthew.gordon]\n"
},
{
"from": "human",
"value": "define([\n 'underscore',\n 'js-whatever/js/location'\n], function (_, location) {\n \"use strict\";\n\n function supported (configuration, attributes) ... | javascript | chosen |
[
{
"from": "system",
"value": "Use the slim jquery file\n"
},
{
"from": "human",
"value": "const minimist = require('minimist');\nconst options = minimist(process.argv.slice(2));\nconst isProduction = options.env === 'production';\n\nlet config = {\n console_options: options,\n isProduction: is... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary code; Server handles this filtering case\n"
},
{
"from": "human",
"value": "export const reduceGraphComplexity = (cy) => {\n const compartmentChildren = cy.nodes('[class=\"compartment\"]').children();\n compartmentChildren.filterFn((ele) => ele.... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix lib js files\"\n\nThis reverts commit 059ea63\n"
},
{
"from": "human",
"value": "const minimist = require('minimist');\nconst options = minimist(process.argv.slice(2));\nconst isProduction = (() => {\n const env = options.env;\n\n return env === undef... | javascript | chosen |
[
{
"from": "system",
"value": "Remove fat arrow function expressions\n"
},
{
"from": "human",
"value": "const Amqp = require('amqplib/callback_api');\n\nmodule.exports = function Channel(url, opts, done) {\n Amqp.connect(url, opts, (err, conn) => {\n if (err) return done(err);\n\n conn.cre... | javascript | chosen |
[
{
"from": "system",
"value": "Make makeDelayedTask return fn with same signature\n\n- now returns a Promise returning fn that resolves to whatever the original function does\n- allow any args to be passed to the delayed function\n"
},
{
"from": "human",
"value": "/**\n * Higher order function to... | javascript | chosen |
[
{
"from": "system",
"value": "Add shortcut function to navigate to URL fragment\n\nCalled by event listener\n"
},
{
"from": "human",
"value": "import * as Backbone from 'backbone';\nimport SearchBoxView from '../views/searchBox-view.js';\nimport SearchResultsView from '../views/searchResults-vie... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"Uncaught exception: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed\"\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar bunyan = require('bunyan');\nvar Source = require('../node/nodes/source');\n\nfunction AnalysisLogger(str... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reference to ampClientIDOptIn in setupAnalytics utility.\n"
},
{
"from": "human",
"value": "/**\n * Internal dependencies\n */\nimport { wpApiFetch } from './wp-api-fetch';\n\nconst defaultSettings = {\n\taccountID: 100,\n\tpropertyID: 200,\n\tprofileID: 300,... | javascript | chosen |
[
{
"from": "system",
"value": "Fix key collisions in interaction logger"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc service\n * @name vegalite-ui.logger\n * @description\n * # logger\n * Service in the vegalite-ui.\n */\nangular.module('vleApp')\n .service('Logger', function... | javascript | chosen |
[
{
"from": "system",
"value": "[DASH-2397] Move refreshData to the bottom of the method\n"
},
{
"from": "human",
"value": "import Reflux from 'reflux';\nimport _ from 'lodash';\n\nimport { CheckListStoreMixin, HostingMixin, WaitForStoreMixin, StoreLoadingMixin } from '../../mixins';\n\nimport Ses... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite lib error with ES6\n"
},
{
"from": "human",
"value": "module.exports = {\n lrc_notfound: '抱歉, 没找到歌词',\n account_missing: '请先设置豆瓣账户再操作: $ douban.fm config',\n setup_fail: '啊哦,启动出错了,请检查配置文件 ~/.douban.fm.profile.json',\n love_fail: '未知曲目无法加心',\n normal: '出... | javascript | chosen |
[
{
"from": "system",
"value": "Add default value for config\n"
},
{
"from": "human",
"value": "import configJson from '../../../../config.json'; // root path json config\n\nconst config = 'production' === process.env.NODE_ENV ? configJson.production : configJson.development;\n\nexport const GOOGL... | javascript | chosen |
[
{
"from": "system",
"value": "Remove tag since it isn't useful for this recipe\n"
},
{
"from": "human",
"value": "self.addEventListener('push', function(event) {\n event.waitUntil(self.registration.showNotification('ServiceWorker Cookbook', {\n body: 'Alea iacta est',\n tag: 'push',\n })... | javascript | chosen |
[
{
"from": "system",
"value": "Remove moment deprecation on builds page\n\nSee https://github.com/moment/moment/issues/1407 for more details. All that was needed was to manually instantiate a new Date() object\n"
},
{
"from": "human",
"value": "import { timeAgoInWords, safe } from 'travis/utils/h... | javascript | chosen |
[
{
"from": "system",
"value": "Fix React Router after upgrade\n"
},
{
"from": "human",
"value": "var <%= scriptAppName %> = require('./<%= scriptAppName %>');\nvar React = require('react');\nvar {DefaultRoute, Route, Routes} = require('react-router');\n\nReact.renderComponent((\n <Routes locatio... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded maxlength attr from 'stickerManagerRole' field in Guild Model\n"
},
{
"from": "human",
"value": "const mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nconst guildSchema = Schema({\n\tid: {type: String, unique: true, required: true... | javascript | chosen |
[
{
"from": "system",
"value": "Change solution of get config from config file\n"
},
{
"from": "human",
"value": "var logger = require('log4js').getLogger('APP_LOG');\n\nfunction verifiyMessage(config, receiver, message, botname, sender, password) {\n\n\t//If miss message, return error message\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Cannot read property 'error' of undefined"
},
{
"from": "human",
"value": "/**\n * Created by Fonov Sergei on 23.12.16.\n */\n\n'use strict'\n\nconst req = require('tiny_request')\n\nfunction sendreq(name, jsonData){\n return new Promise((resolve, reject) =>... | javascript | chosen |
[
{
"from": "system",
"value": "Set cookie expiration to 365 days (was session)\n"
},
{
"from": "human",
"value": "(function($) {\n\n\tvar notificationBar = {\n open: function(barId, barCloseId, cookie) {\n $('#' + barId).slideDown();\n\n $('#' + barCloseId).on('click', function() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix login issue with token\n"
},
{
"from": "human",
"value": "LoginController.$inject = ['$rootScope', '$location', 'auth', \n 'role', 'toaster', 'TbUtils'];\n\nfunction LoginController ($rootScope, $location, auth, role, toaster, TbUt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix exception when saving dashboards\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar codex = require('../codex');\nvar Boom = require('boom');\nvar Dashboard = require('../models/Dashboard');\n\nmodule.exports = codex.controller(Dashboard, {\n get: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix gulp exit process with test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp'),\n jshint = require('gulp-jshint'),\n karma = require('karma').server;\n\nvar KARMA_CONFIG = '/karma.conf.js';\n\ngulp.task('lint', function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a condition to throw parse error on empty AST\n"
},
{
"from": "human",
"value": "const stack = require('../stack');\nconst evaluate = require('../evaluate');\nconst stdlib = require('../../stdlib');\nconst parse = require('../../parser/parse');\n\nclass BaseRunt... | javascript | chosen |
[
{
"from": "system",
"value": "Disable the Inspector panel patch (needs to be fixed on the platform)\n"
},
{
"from": "human",
"value": "/* See license.txt for terms of usage */\n\n\"use strict\";\n\nmodule.metadata = {\n \"stability\": \"experimental\"\n};\n\nconst { Cu, Ci } = require(\"chrome\... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Set expense to two decimals before saving it to db\n\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n// import $ from 'jquery';\n\nexport default Ember.Component.extend({\n expense: {\n sum: '',\n category: '',\n name: ''\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "build: Remove autoupdate message when update is available\n"
},
{
"from": "human",
"value": "import { autoUpdater } from 'electron-updater';\nimport {\n ON_ACCEPT_UPDATE,\n SEND_GENERAL_ALERT\n} from '../events';\n\nexport default function updater(win) {\n const ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle `null` and `undefined` output\n"
},
{
"from": "human",
"value": "import error from './tools/error';\n\nconst assign = require('object-assign');\nconst map = require('1-liners/map');\n\nexport default (templateFunction) => {\n if (typeof templateFunction !== ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.