conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add boardsMenu reducer to the store\n"
},
{
"from": "human",
"value": "import { reducer as formReducer } from 'redux-form';\nimport { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\n\nimport { \n\torganization,\n\tstarredBoard,\... | javascript | chosen |
[
{
"from": "system",
"value": "Use default barStyle in starter app\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { registerComponent } from 'react-native-playground';\nimport {\n StyleSheet,\n Text,\n View,\n} from 'react-native';\n\nclass App extends React.Component {\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for no user states\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2015 Mark Eschbach\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy ... | javascript | chosen |
[
{
"from": "system",
"value": "Set up test support for travis.\n"
},
{
"from": "human",
"value": "const webpackConfig = require('../webpack/webpack.test.config');\nconst path = require('path');\n\nmodule.exports = (config) => {\n\tconfig.set({\n\t\tframeworks: ['mocha', 'sinon-chai'],\n\t\treport... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reference to the routes folder of the files module.\n"
},
{
"from": "human",
"value": "// Create the application and define middleware.\n\n'use strict';\n\nvar express = require('express');\nvar bodyParser = require('body-parser');\n\nvar router = require('./../... | javascript | chosen |
[
{
"from": "system",
"value": "Update root route to point to new checkouts page\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\nrouter.get('/checkouts/new', function(req, res, next) {\n res.render('index', { title: 'Express' });\n});\n\nmod... | javascript | chosen |
[
{
"from": "system",
"value": "Add unit tests for canvas validation\n"
},
{
"from": "human",
"value": "describe('Support module', function () {\n var S = GameOfLife.Support;\n\n describe('For parsing canvas', function () {\n it('throws InvalidArgument if given other than canvas element', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Add an explanation detailing behavior of doneCountBuilder.\n"
},
{
"from": "human",
"value": "window.respokeTestConfig = {\n baseURL: 'http://testing.digiumlabs.com:3001'\n};\nrespoke.log.setLevel('silent');\nwindow.doneOnceBuilder = function (done) {\n var ca... | javascript | chosen |
[
{
"from": "system",
"value": "Add a note on env configuration\n"
},
{
"from": "human",
"value": "module.exports = function(scope, argv) {\n return {\n install: function (done) {\n scope.applyConfig({\n create: {\n Image: \"niallo/strider:latest\",\n },\n st... | javascript | chosen |
[
{
"from": "system",
"value": "Fix function names being lost in binding\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { reduceAsync, identity } = require('../utilities');\nconst { rpcHandlers } = require('../rpc');\n\n// Returns a reducer function that takes the schema as input and ou... | javascript | chosen |
[
{
"from": "system",
"value": "Fix import for api script\n"
},
{
"from": "human",
"value": "/* eslint no-console:0 */\n\n/**\n * Spawns an embedded neovim instance and returns Neovim API\n */\n\nconst cp = require('child_process');\nconst attach = require('../attach');\n// const inspect = require... | javascript | chosen |
[
{
"from": "system",
"value": "Update meow options to be in line with v4.0.0\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict';\n\n// foreign modules\n\nconst meow = require('meow');\n\n// local modules\n\nconst error = require('../lib/error.js');\nconst logger = require('../li... | javascript | chosen |
[
{
"from": "system",
"value": "Replace cheerio's deprecated toArray() with get()\n"
},
{
"from": "human",
"value": "'use strict';\n\nexports.name = \"echidna.editor-ids\";\n\nexports.check = function (sr, done) {\n var editorIDs = sr.$('dd[data-editor-id]').map(function(index, element) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix merging objects with prototypes\n"
},
{
"from": "human",
"value": "function merge(...args) {\n let output = null,\n items = [...args];\n while (items.length > 0) {\n const nextItem = items.shift();\n if (!output) {\n output ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix month in list name.\n"
},
{
"from": "human",
"value": "angular.module('shoppingList').controller(\n 'ShoppingListController', ['$scope', '$window', function($scope, $window) {\n 'use strict';\n\n var blankItem = {\n name: '',\n category: '',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test to use ∞\n"
},
{
"from": "human",
"value": "import {formatBytes, formatRPDuration} from 'utils/formatting';\n\ndescribe('Formatting helpers', () => {\n describe('formatBytes', () => {\n it('returns null when passed a falsey value', () => {\n const ... | javascript | chosen |
[
{
"from": "system",
"value": "Build fixes.\nRemoved the unused utility class.\n"
},
{
"from": "human",
"value": "import alertsSvc from './Alerts.js';\nimport auditLogsSvc from './AuditLogs.js';\nimport authSvc from './Authorization.js';\nimport exportSvc from './ExportService.... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to return raw data from transition handler\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport matchRoutePattern from 'match-route-pattern'\n\nimport type {\n Screen,\n Transition,\n TransitionHandler,\n Location,\n QueryParameters\n} from '../types'... | javascript | chosen |
[
{
"from": "system",
"value": "Send HTTP response on TCP channel\n\nThe load testing tools don't support plain TCP.\n\nOHM-556\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst BodyStream = require('./body-stream')\n\nexports.handleBodyRequest = (conn) => {\n new BodyStream(1024).pipe(con... | javascript | chosen |
[
{
"from": "system",
"value": "Add headless option to e2e android\n"
},
{
"from": "human",
"value": "const _ = require('lodash');\nconst exec = require('shell-utils').exec;\n\nconst android = _.includes(process.argv, '--android');\nconst release = _.includes(process.argv, '--release');\nconst ski... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Remove unnecessary call to findDOMNode\n"
},
{
"from": "human",
"value": "/* eslint-env browser */\nimport {findSingleNode, getFindDOMNode} from './helpers';\n\nlet findDOMNode = findDOMNode || (global && global.findDOMNode);\n\nfunction haveComponentWithXpath(... | javascript | chosen |
[
{
"from": "system",
"value": "Add branches and issues to the api\n"
},
{
"from": "human",
"value": "import Client from './client'\nimport PullRequests from './pulls'\nimport Repositories from './repos'\nimport PageLinks from './paging'\n\nexport default function (config) {\n return new Client(c... | javascript | chosen |
[
{
"from": "system",
"value": "Add import for variables file, set a const API_KEY as the data from variables file.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport ReactDom from 'react-dom';\nimport YTSearch from 'youtube-api-search';\nimport SearchBar from './... | javascript | chosen |
[
{
"from": "system",
"value": "Add any key test and ESC constant\n"
},
{
"from": "human",
"value": "// Kind of like a singleton\nconst Keyboard = {\n \"KEY_UP\": 38,\n \"KEY_DOWN\": 40,\n \"KEY_LEFT\": 37,\n \"KEY_RIGHT\": 39,\n \"KEY_W\": 87,\n \"KEY_A\": 65,\n \"KEY_D\": 6... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the requirement no longer being used\n"
},
{
"from": "human",
"value": "/* global atom:true */\nconst _ = require('underscore-plus');\nconst clipboard = atom.clipboard;\n\nmodule.exports =\nclass KillRing {\n constructor(limit=16) {\n this.buffer = [];\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve perfomance on large DOMs when container is not whole document.\n"
},
{
"from": "human",
"value": "(function(ns) {\n\n var namespaces = [this];\n\n var attachBehavior = function($element, behavior) {\n var fn = namespaces;\n\n behavior.rep... | javascript | chosen |
[
{
"from": "system",
"value": "Rename variable for more consitency\n"
},
{
"from": "human",
"value": "const chai = require('chai');\nconst chaiAsPromised = require('chai-as-promised');\nconst nock = require('nock');\n\nchai.use(chaiAsPromised);\nchai.should();\nconst expect = chai.expect;\n\ncons... | javascript | chosen |
[
{
"from": "system",
"value": "Test that function returns and object\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar configMergeLoader = require('../index.js');\n\ndescribe('configMergeLoader', function() {\n it('should return an function', function() {\n assert.equal(... | javascript | chosen |
[
{
"from": "system",
"value": "Use _.defer instead of setTimeout\n"
},
{
"from": "human",
"value": "import $ from 'jquery';\nimport Radio from 'backbone.radio';\nimport nprogress from 'nprogress';\nimport Application from '../common/application';\nimport LayoutView from './layout-view';\n\nlet ro... | javascript | chosen |
[
{
"from": "system",
"value": "Update hierarchical state machine example\n"
},
{
"from": "human",
"value": "import Finity from '../../src';\n\nconst submachineConfig = Finity\n .configure()\n .initialState('substate1')\n .getConfig();\n\nconst stateMachine = Finity\n .configure()\n .init... | javascript | chosen |
[
{
"from": "system",
"value": "Test for simple save/reload of a List\n\nGotcha: there is no test DB separation yet, running the tests will drop\nthe entire collection before each test.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar request = require(\"supertest\");\n\nvar app = require... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Stream title alignment issue on Android\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React, { PureComponent } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { Narrow, Stream } from '../types';\nimport StreamIcon fr... | javascript | chosen |
[
{
"from": "system",
"value": "Add line break code at end of marked custom parser result\n"
},
{
"from": "human",
"value": "import marked from 'marked';\nimport htmlclean from 'htmlclean';\nimport he from 'he';\n\nconst renderer = new marked.Renderer();\n\nrenderer.listitem = (text) => {\n if (/... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for async address book\n"
},
{
"from": "human",
"value": "describe('Address Book', function() {\n\tvar addressB,\n\t\tthisContact;\n\n\tbeforeEach(function() {\n\t\taddressB = new addressBook();\n\t\tthisContact = new Contact();\n\t});\n\n\tit('should be ab... | javascript | chosen |
[
{
"from": "system",
"value": "Add the api_key to the query only if we're not authenticated some other way\n"
},
{
"from": "human",
"value": "App.Store = DS.Store.extend({\n findQuery: function(type, id){\n id = id || {};\n id.api_key = App.API_KEY;\n\n return this._super(type, id);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove .nyc_output to prevent this dir from getting too large.\n"
},
{
"from": "human",
"value": "/**\n * `npm run ci:clean`\n *\n * Cross-platform script to remove report directory for CI.\n */\nconst process = require('process');\nconst script = require('./script'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix IE8 error when converting NodeList to Array\n"
},
{
"from": "human",
"value": "var computedStyle = require('computed-style');\n\nmodule.exports = function(container) {\n if (!container) { return; }\n\n var children = [].slice.call(container.children, 0).fi... | javascript | chosen |
[
{
"from": "system",
"value": "Use performance.now for better accuracy\n"
},
{
"from": "human",
"value": "var RESET_TIME = 3000;\nvar timeout;\nvar lastPress = Date.now();\nvar average = 0;\nvar iterations = 1;\n\nchrome.browserAction.onClicked.addListener(function() {\n var elapsedTime = Date.n... | javascript | chosen |
[
{
"from": "system",
"value": "Change baseUrl to listen to port 3000; remove seleniumAddress and define seleniumServerJar instead to get selenium running\n"
},
{
"from": "human",
"value": "// @AngularClass\n\nexports.config = {\n baseUrl: 'http://localhost:8080/',\n\n allScriptsTimeout: 11000,\... | javascript | chosen |
[
{
"from": "system",
"value": "Add noop importer to isExportsOrModuleAssignment tests\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix @debounce to work correctly with multiple instances.\n"
},
{
"from": "human",
"value": "// Debounce decorator for methods.\n//\n// See: https://github.com/wycats/javascript-decorators\nexport const debounce = (duration) => (target, name, descriptor) => {\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Support JSOM as js module\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar deferred = require('deferred')\n , fs = require('fs')\n , extname = require('path').extname\n\n , hasNodeSheBang = RegExp.prototype.test.bind(/^#![\\u0021-\\uffff]+(?:\\/node... | javascript | chosen |
[
{
"from": "system",
"value": "Add a method to add posts to the post manager that also categorizes them by taxonomy.\n"
},
{
"from": "human",
"value": "var _ = require('lodash-node/modern')\n\n// TODO: consider passing the taxonomy types to the constructor\nfunction PostManager() {\n this.posts ... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude filter expression from selector\n"
},
{
"from": "human",
"value": "'use strict'\n\n/**\n * @license\n * node-scrapy <https://github.com/eeshi/node-scrapy>\n * Copyright Stefan Maric, Adrian Obelmejias, and other contributors <https://github.com/eeshi/node-sc... | javascript | chosen |
[
{
"from": "system",
"value": "Allow you to call other handler from a handler\n"
},
{
"from": "human",
"value": "var Statuses = require('../internalConstants').Statuses;\n\nfunction when(handlers) {\n handlers || (handlers = {});\n\n var status = this.status;\n var handler = handlers[status.to... | javascript | chosen |
[
{
"from": "system",
"value": "Use bodyParser.json() instead of bodyParser itself.\n\nSee: http://stackoverflow.com/questions/24330014/bodyparser-is-deprecated-express-4\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar bodyParser = require('body-parser');\nvar methodOverr... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional 'let' decleration for inner loop and clean up\n"
},
{
"from": "human",
"value": "define(['../math.js', '../../app/directives/graph_sketcher/GraphUtils.js'], function(m, graphUtils) {\n return {\n numOfPts: 100,\n\n lineStyle: function... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for recent changes to typescript plugin\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nmodule.exports = {\n extends: [ \"@vue/typescript\", \"./typescript.js\" ],\n parser: require.resolve(\"vue-eslint-parser\"),\n parserOptions: {\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Use absolute path for output folder of webpack\n"
},
{
"from": "human",
"value": "'use strict';\nvar webpack = require('webpack');\nvar path = require('path');\n\nmodule.exports = {\n entry: ['babel-polyfill', './src/js/reactTest.jsx'],\n output: {\n path: './p... | javascript | chosen |
[
{
"from": "system",
"value": "Webpack: Add source maps and uglifyjs\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack')\n\nmodule.exports = {\n module: {\n rules: [\n {\n test: /\\.html$/,\n use: 'raw-loader'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use eslint inside of webpack\n"
},
{
"from": "human",
"value": "var webpack = require(\"webpack\");\n\n/* eslint-disable no-undef */\nvar environment = process.env[\"NODE_ENV\"] || \"development\";\n\nmodule.exports = {\n\tentry: \"./src/game\",\n\toutput: {\n\t\tpa... | javascript | chosen |
[
{
"from": "system",
"value": "Use source maps in developer mode.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar CopyWebpackPlugin = require('copy-webpack-plugin');\n\nmodule.exports = {\n entry: [\n './js/index.js'\n ],\n output: {\n path: path.join(__dirname, 'dist... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sourcemap for dev mode\n"
},
{
"from": "human",
"value": "module.exports = {\n entry: {\n javascript: \"./app/app.jsx\"\n },\n\n output: {\n path: __dirname,\n filename: \"bundle.js\"\n },\n\n resolve: {\n extensions: [... | javascript | chosen |
[
{
"from": "system",
"value": "Add renderer setting for electron\n"
},
{
"from": "human",
"value": "'use strict';\nconst webpack = require('webpack');\n\nconst env = process.env.NODE_ENV || 'development';\nconst isDev = env === 'development';\n\nconst devtool = isDev ? '#inline-source-map' : null... | javascript | chosen |
[
{
"from": "system",
"value": "Expand test case for getBestName\n"
},
{
"from": "human",
"value": "describe(\"Test the organismDetails file\", function() {\n\n it(\"Test for getBestName\", function() {\n expect(getBestName({})).toBe('');\n });\n});"
},
{
"from": "gpt",
"value": "... | javascript | chosen |
[
{
"from": "system",
"value": "Use toString instead of asString in asColorLike\n\nTo avoid the double `typeof color === 'string'` check\n"
},
{
"from": "human",
"value": "/**\n * @module ol/colorlike\n */\nimport {asString} from './color.js';\n\n\n/**\n * @param {ol.Color|ol.ColorLike} color Colo... | javascript | chosen |
[
{
"from": "system",
"value": "Add all directories under lib to eslint config\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nrequire('shelljs/global');\nrequire('colors');\n\nvar async = require('async'),\n ESLintCLIEngine = require('eslint').CLIEngine,\n\n LINT_SOURCE_DIRS = [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix version and improve help message.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\nconst program = require('commander')\nconst PipelineRunner = require('../pipeline/runner')\n\nprogram\n .version('scry-css 0.2.0')\n .usage('[options] <type> <dir> <fi... | javascript | chosen |
[
{
"from": "system",
"value": "Update middleware loader to ignore any files with a leading '_'.\n"
},
{
"from": "human",
"value": "var fs = require('fs'),\n\tpath = require('path')\n\tfiles = fs.readdirSync(__dirname);\n\n// load in each file within this directory and attach it to exports\nfiles.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix init scripts and add NODE_PATH\n"
},
{
"from": "human",
"value": "\"use strict\"\n\nlet express = require(\"express\");\nlet bodyParser = require('body-parser');\nlet cors = require('cors');\nlet app = express();\nlet { exec } = require('child_process')\n\napp.u... | javascript | chosen |
[
{
"from": "system",
"value": "Make Raven compatible with CommonJS\n"
},
{
"from": "human",
"value": "// Expose Raven to the world\nwindow.Raven = Raven;\n\n})(window);\n"
},
{
"from": "gpt",
"value": "\n// Expose Raven to the world\nif (typeof define === 'function' && define.amd) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Load all datasets by default\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux'\nimport SearchBar from 'material-ui-search-bar'\nimport _ from 'lodash'\n\nimport './index.css'\nimport SearchResults fro... | javascript | chosen |
[
{
"from": "system",
"value": "Read document structure dynamically to be able to react on structural changes.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar View = require(\"substance-application\").View;\nvar $$ = require(\"substance-application\").$$;\nvar Data = require(\"substance-... | javascript | chosen |
[
{
"from": "system",
"value": "Disable file logging by default\n"
},
{
"from": "human",
"value": "//Winston Logger Module\nconst winston = require('winston');\n\nlet logLevel = \"info\"; //default\nif (process.env.NODE_ENV === \"production\") {\n logLevel = \"error\"; //logs error\n}\nelse if ... | javascript | chosen |
[
{
"from": "system",
"value": "Move require statements to the run command\n\nYuidoc now requires an internet connection to work, and since this addon\nis required even if you're not using it at the moment, it was preventing\nusers to work offline.\n\nTODO: Fix yuidoc itself. Having local assets would also fi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong input component order\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport LoadingContainer from '../containers/LoadingContainer';\nimport PathResultsContainer from '../containers/PathResultsContainer';\nimport ErrorMessageContainer from... | javascript | chosen |
[
{
"from": "system",
"value": "Use a full URL for socket.io.\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar Codesearch = function() {\n return {\n socket: null,\n delegate: null,\n connect: function(delegate) {\n if (Codesearch.socket !== null)\n return;\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Convert Unix path to Windows path in jshint command (in node_modules)\n\nStory #103\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar exec = require('child_process').exec;\n\nfunction fail() {\n\tprocess.stdout.write(\n\t\t'Style check failed (see the above ou... | javascript | chosen |
[
{
"from": "system",
"value": "Update MaterialLayout unit test with chai-jquery\n"
},
{
"from": "human",
"value": "\n describe('layout tests', function () {\n\n it('Should have MaterialLayout globally available', function () {\n expect(MaterialLayout).to.be.a('function');\n });\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add check to ensure truncate does not error\n\n- check if input exists before acting on it\n- silences thrown error\n\t- spirit of template filter, do nothing rather than fail if input is incorrect\n"
},
{
"from": "human",
"value": "/**\n * Return a truncated versio... | javascript | chosen |
[
{
"from": "system",
"value": "Add rowLength to slider label\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nclass RowSizeControls extends Component {\n render() {\n return (\n <div style={{textAlign: 'center'}}>\n <label>Images per row</label>\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug in removing cid img without attachments\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(html, attachments) {\n attachments.forEach(function(attachment) {\n attachment.applied = false;\n\n var regexps = [\n (attachm... | javascript | chosen |
[
{
"from": "system",
"value": "[UPDATE] Fix return acc when not push a state\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst _ = require('lodash')\n\nconst hasLoop = (flow) => {\n if (Array.isArray(flow)) {\n return _validate(flow)\n } else if (flow.states) {\n return _validate(f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix imports that broke when running in strict mode\n\nThe badly place semicolon triggered \"undefined variable\" errors.\n"
},
{
"from": "human",
"value": "var debug = require('debug')('metalsmith-copy'),\n path = require('path'),\n cloneDeep = require('lodash... | javascript | chosen |
[
{
"from": "system",
"value": "Add constructor arguments. Fix deprecated API. Add findById, removeById and count methods.\n"
},
{
"from": "human",
"value": "var easymongo = require('easymongo');\n\nmodule.exports = function(options) {\n var mongo = new easymongo(options);\n\n return {\n find... | javascript | chosen |
[
{
"from": "system",
"value": "Change window to global for Node.js\n"
},
{
"from": "human",
"value": "\nseajs.on('compiled', function(mod) {\n if (mod.uri.indexOf('jquery.js') > -1) {\n window.jQuery = window.$ = mod.exports\n }\n})\n\nseajs.on('compile', function(mod) {\n if (mod.uri.index... | javascript | chosen |
[
{
"from": "system",
"value": "Fix improper case from 'KeyBindings' to keybindings causing build failures on linux.\n"
},
{
"from": "human",
"value": "/*=include modules/accessor.js */\n/*=include modules/ajax.js */\n/*=include modules/calculation_colums.js */\n/*=include modules/clipboard.js */\... | javascript | chosen |
[
{
"from": "system",
"value": "Modify default deserialize user function\n"
},
{
"from": "human",
"value": "\nvar tools = module.exports = exports = {},\n debug = require('debug')('turnkey');\n\ntools.default_cfg = function() {\n var cfg = {\n // Required Options ---------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'password' type for a field with a token value.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst gulp = require('gulp');\nconst helper = require('gulp/helper');\n\ngulp.task('configure:sandbox', cb => {\n const isNotEmpty = helper.validators.isNotEmpty... | javascript | chosen |
[
{
"from": "system",
"value": "machete: Split DOM element selection and style reset\n"
},
{
"from": "human",
"value": "export class Machete {\n // TODO: Implement polyfills\n\n /**\n * Utility function to get an element from the DOM.\n * It is needed because everytime we get an elem... | javascript | chosen |
[
{
"from": "system",
"value": "Use updated prettier ESLint config\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n\nmodule.exports = {\n root: true,\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 2020,\n s... | javascript | chosen |
[
{
"from": "system",
"value": "Add sizes to make it easier @medias\n"
},
{
"from": "human",
"value": "const theme = {\n color: {\n grey: '#DDDDDD',\n black: '#111111',\n },\n font: {\n sans: `'Lora', sans-serif`,\n serif: `'Raleway', serif`,\n },\n};\n\nexport default theme;\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Add \"EN\" as a valid department shorthand\n\nfor the EN/LI 250 course."
},
{
"from": "human",
"value": "const departments = new Map(Object.entries({\n\tAR: 'ART',\n\tAS: 'ASIAN',\n\tBI: 'BIO',\n\tCH: 'CHEM',\n\tCS: 'CSCI',\n\tEC: 'ECON',\n\tES: 'ENVST',\n\tHI: 'HIS... | javascript | chosen |
[
{
"from": "system",
"value": "Fix title handling for multiple tags\n"
},
{
"from": "human",
"value": "(() => {\n const $input = document.querySelector('#pull_request_body');\n if (!$input || $input.textLength > 0) {\n return;\n }\n\n jiraLinks = [];\n document.querySelectorAll('.commit-m... | javascript | chosen |
[
{
"from": "system",
"value": "Remove braces for one line functions\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nexport const Checkbox = ({ id, nodes, onToggle }) => {\n const node = nodes[id]\n const { key, childIds, checked } = node\n\n const handleChange = () => {\n on... | javascript | chosen |
[
{
"from": "system",
"value": "Use jquery-rails bind() in place of live()\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('#upload_form').change(function () {\n $('#upload_form_label').hide(); \n $('#upload_form').hide(); \n $('#upload_progress').show(); \n $('#... | javascript | chosen |
[
{
"from": "system",
"value": "Use initialState in Modal reducer spec\n"
},
{
"from": "human",
"value": "import reducer from './';\n\ndescribe('Modal reducer', () => {\n let initialState;\n let state;\n let actionType;\n let payload;\n\n const callReducer = () => reducer(state, { type: actio... | javascript | chosen |
[
{
"from": "system",
"value": "Change webpack devtool to source-map.\n"
},
{
"from": "human",
"value": "// webpack config file for develop sugar.js\n\nmodule.exports = {\n\t'entry': './src/main/index',\n\t'output': {\n\t\t'path': './bundle',\n\t\t'library': 'Sugar',\n\t\t'libraryTarget': 'umd',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change expiration to 90 days\n"
},
{
"from": "human",
"value": "daysUntilExpiration = function() {\n var daysToWait = 1;\n var daysAgo = new Date();\n daysAgo.setDate(daysAgo.getDate()-daysToWait);\n return daysAgo;\n}"
},
{
"from": "gpt",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "[CookiesInfo] Fix setting close event error that ocurred when alert was not placed in view\n"
},
{
"from": "human",
"value": "/**\n * Created by ogiba on 20.08.2017.\n */\n\nwindow.addEventListener(\"DOMContentLoaded\", function () {\n setupScrollListener();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make yes/no function definitions rather than function executions\n"
},
{
"from": "human",
"value": "angular.module( 'moviematch.match', [] )\n\n.controller( 'MatchController', function( $scope, Match ) {\n $scope.movie = {};\n $scope.session = {};\n $scope.user =... | javascript | chosen |
[
{
"from": "system",
"value": "Change around so config is loaded when changed\n"
},
{
"from": "human",
"value": "// relay_force_routing\n\n// documentation via: haraka -h plugins/relay_force_routing\n\nexports.register = function() {\n this.register_hook('get_mx', 'force_routing');\n this.d... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust audio button position, size\n"
},
{
"from": "human",
"value": "function AudioButton() {\n var that = this;\n this.position = {\n x: 15.5,\n y: 0.5\n };\n\n if (typeof localStorage.soundActivated === 'undefined') {\n localStorage.soundActivated = ... | javascript | chosen |
[
{
"from": "system",
"value": "Modify baseStyles & centerStyles for a better centering of the content without flexbox\n"
},
{
"from": "human",
"value": "export const baseStyles = {};\n\nexport const centerStyles = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n};\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Make cards have h2s not h1s\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { Card } from '../UI';\nimport styles from './ImageCard.css';\n\nexport default class ImageCard extends React.Component {\n\n render() {\n const { on... | javascript | chosen |
[
{
"from": "system",
"value": "Add Remediation Points to issues\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function (err, data) {\n\n if (err) {\n return 'Debug output: %j' + data + '\\n' + JSON.stringify(err);\n }\n\n if (!data.length) {\n return;\n }\n\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Add acquire/release to worker info\n"
},
{
"from": "human",
"value": "var AppWorkerInfo = function(appSpec, listenPort, logFilePath, exitPromise) {\n this.appSpec = appSpec;\n this.listenPort = listenPort;\n this.logFilePath = logFilePath;\n this.exitPromise = e... | javascript | chosen |
[
{
"from": "system",
"value": "Add lumberg meme to pug bomb replies\n"
},
{
"from": "human",
"value": "module.exports = function(robot){\n\n\tvar pugBombReplies = [\n\t\t'There will be no more of that. Take your {{number}} pugs elsewhere.',\n\t\t'Nope. Nobody needs to see that many pugs.',\n\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix [object Object] in sendLocale extendable\n\n#494"
},
{
"from": "human",
"value": "const { APIMessage } = require('discord.js');\nconst { Extendable } = require('klasa');\nconst { TextChannel, DMChannel, GroupDMChannel, User } = require('discord.js');\n\nmodule.e... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for my last menu fix.\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.nanos.menu',\n name: 'SubMenu',\n extends:... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.