conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Declare js variables and remove seconds\n"
},
{
"from": "human",
"value": "var qwait = angular.module('qwait', []);\n\nqwait.config(function ($sceProvider) {\n // TODO: This is a security issue! Remove in final version and do sane interpolation\n $sceProvider.... | javascript | chosen |
[
{
"from": "system",
"value": "Put in sync with what Node.js 12.18+ does\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: ['usecases/usecase/lib/common',\n 'usecases/usecase/lib/es2015', 'usecases/usecase/lib/es2017'],\n parserOptions: {\n ecmaVersion: 2017,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Firefox profile: Disable WebRTC, DNS prefetch and IPv6, safebrowsing; Enable socks remote DNS\n"
},
{
"from": "human",
"value": "user_pref(\"network.proxy.backup.ftp\", \"\");\nuser_pref(\"network.proxy.backup.ftp_port\", 0);\nuser_pref(\"network.proxy.backup... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo causing strangeness in transition to photo-card schema mode \n\n"
},
{
"from": "human",
"value": "import { task } from 'ember-concurrency';\nimport { tracked } from '@glimmer/tracking';\nimport BaseIsolatedLayoutComponent from '../base-isolated-layout';\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add onclick handler to toggle soft wrap\n"
},
{
"from": "human",
"value": "'use babel'\n/** @jsx etch.dom */\n\nimport etch from 'etch'\nimport stateless from 'etch-stateless'\n\nconst IndicatorAnchor = stateless(etch, ({wrapped}) => {\n let light = ''\n if (wrapp... | javascript | chosen |
[
{
"from": "system",
"value": "Disable all tests but not the first one\n"
},
{
"from": "human",
"value": "import Acronyms from './acronym';\n\ndescribe('Acronyms are produced from', ()=>{\n it('title cased phrases', () => {\n expect(Acronyms.parse('Portable Network Graphics')).toEqual('PNG');... | javascript | chosen |
[
{
"from": "system",
"value": "Change to removed widget namespace in views\n"
},
{
"from": "human",
"value": "/* ************************************************************************\n\n ${Name}\n\n Copyright:\n 2010 Deutsche Telekom AG, Germany, http://telekom.com\n\n ****************... | javascript | chosen |
[
{
"from": "system",
"value": "Use only android and ios browser for autoprefixer\n"
},
{
"from": "human",
"value": "var ExtractText = require('extract-text-webpack-plugin');\nvar LessClean = require('less-plugin-clean-css');\nvar HtmlFile = require('html-webpack-plugin');\nvar webpack = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Fix double/triple fetching of random quote\n\nSince the quote is fetched during ssr, it doesn't have to be fetched on\nthe client. Only fetch using prepare when there is no quote. The \"new\nrandom quote\" button will still work.\n\nThis fixes the annoying flicker when the rand... | javascript | chosen |
[
{
"from": "system",
"value": "Add command action for player's commands and refactor\n"
},
{
"from": "human",
"value": "import Vue from \"vue\";\nimport Vuex from \"vuex\";\n\nVue.use(Vuex);\n\nconst store = new Vuex.Store({\n state: {\n messages: [],\n playerName: \"\",\n inputText: \"... | javascript | chosen |
[
{
"from": "system",
"value": "Configure webpack to spit `scripts.js` into the \"example_site\".\n\nThis is a temporary solution to make the dev experience a bit cleaner. Until we figure out if / where the example-site should live / be committed, webpack will look to spit out the bundle up a director, into \... | javascript | chosen |
[
{
"from": "system",
"value": "Add content hash to file name of bundles\n"
},
{
"from": "human",
"value": "const CleanWebpackPlugin = require('clean-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n\tmode: 'production',\n\tentry: {\n\t\tmain: './src/js/main.js',\n\t\tportfo... | javascript | chosen |
[
{
"from": "system",
"value": "Change plugin order of execution\n"
},
{
"from": "human",
"value": "// --------------------\n// Sequelize extra\n// --------------------\n\n// modules\nvar Sequelize = require('sequelize'),\n\tsequelizeDefiner = require('sequelize-definer'),\n\tsequelizeHierarchy = ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor properties that have been deprecated\n"
},
{
"from": "human",
"value": "module.exports = {\n isOneToOneRelation: function (relation) {\n return relation instanceof relation.ownerModelClass.OneToOneRelation;\n },\n\n throwError: function (message) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move externalLink DOM traversal to function\n\nSimplify external link tracker by moving DOM traversal into a named\nfunction.\n"
},
{
"from": "human",
"value": "(function() {\n \"use strict\";\n GOVUK.analyticsPlugins = GOVUK.analyticsPlugins || {};\n GOVUK.analy... | javascript | chosen |
[
{
"from": "system",
"value": "Remove application extensions from optimized image\n\n"
},
{
"from": "human",
"value": "'use strict';\nconst execBuffer = require('exec-buffer');\nconst gifsicle = require('gifsicle');\nconst isGif = require('is-gif');\n\nmodule.exports = opts => buf => {\n\topts = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add data method to model\n"
},
{
"from": "human",
"value": "var Obstruct = require('obstruct');\nvar minivents = require('minivents');\nvar createGetter = require('./lib/createGet');\nvar createSetter = require('./lib/createSet');\nvar merge = require('./lib/merge')... | javascript | chosen |
[
{
"from": "system",
"value": "Remove possibility to overwrite default options\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assign = require('object-assign');\nvar debug = require('debug')('duosass');\nvar sass = require('node-sass').renderSync;\n\n/**\n * Compile Sass to CSS\n *\n * @... | javascript | chosen |
[
{
"from": "system",
"value": "Add a return value to overwritten res.json() for chaining.\n\nThis commit adds the return value, i.e. the `res`-object, to the overwritten `res.json()` method to allow chaining like 'res.json({ hello: 'world', body: 'This is pretty printed json' }).end();"
},
{
"from": ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug introduced in a353681\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fs = require(\"fs\");\n\nif (fs.existsSync('./build/Release/cppmap.node')) {\n module.exports = require('./build/Release/cppmap').WeakValueMap;\n} else if (fs.existsSync('./bu... | javascript | chosen |
[
{
"from": "system",
"value": "Change default fork num to cpu_num / 2 + 1.\n"
},
{
"from": "human",
"value": "\nmodule.exports = {\n\tdomain_name: \"kekeke.com\",\n\tbind_port: 8000,\n\twork_dir: './work_dir',\n\tdst_dir: './dst_dir',\n\tfork_num: 8,\n\tidle_time: 5 * 60 * 1000,\n\tbuffer_size: 6... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Append modified_field to the user_feilds of energy point rule\n"
},
{
"from": "human",
"value": "// Copyright (c) 2018, Frappe Technologies and contributors\n// For license information, please see license.txt\n\nfrappe.ui.form.on('Energy Point Rule', {\n\trefr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant company create step\n"
},
{
"from": "human",
"value": "const { client } = require('nightwatch-cucumber')\nconst { defineSupportCode } = require('cucumber')\nconst { set, get, assign } = require('lodash')\n\ndefineSupportCode(({ Given, When }) => {\n... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Fix isModuleNotFound crash in Node.js v12\n"
},
{
"from": "human",
"value": "// Whether given error is an error thrown by require internals in case module\n// (at given path) was not found\n\n\"use strict\";\n\nvar pathToken = \":path\", pattern;\n\ntry { requi... | javascript | chosen |
[
{
"from": "system",
"value": "Change lifetime to 1 week"
},
{
"from": "human",
"value": "'use strict';\nvar Memcached = require('memcached'),\n replify = require('replify'),\n Promise = require('rsvp').Promise;\n\n\nmodule.exports = function(connection) {\n\n var memcachedstore = new Memc... | javascript | chosen |
[
{
"from": "system",
"value": "Correct remote path for error page\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar fs = require('fs');\nvar isUrl = require('is-url');\n\nvar notFound = function (settings, store) {\n return function (req, res, next) {\n res.statusCode = 404;... | javascript | chosen |
[
{
"from": "system",
"value": "Change handling of a path\n\nVery insignificant change.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar cardsets = require('./libs/cardsets');\nvar path = require('path');\n\nvar app = express();\nvar httpServer = app.listen(process.env.POR... | javascript | chosen |
[
{
"from": "system",
"value": "Convert indentation to 2 spaces\n"
},
{
"from": "human",
"value": "AT.prototype.atOauthHelpers = {\n oauthService: function() {\n return AccountsTemplates.oauthServices();\n },\n};"
},
{
"from": "gpt",
"value": "AT.prototype.atOauthHelpers =... | javascript | chosen |
[
{
"from": "system",
"value": "Make it run on Node 4\n\n[ci skip]"
},
{
"from": "human",
"value": "let del = require('del');\n\ndel(['public/**']).then(function () {\n console.log('/public dir is deleted');\n});\n"
},
{
"from": "gpt",
"value": "var del = require('del');\n\ndel(['pu... | javascript | chosen |
[
{
"from": "system",
"value": "Update ngconstant for app version\n"
},
{
"from": "human",
"value": "\"use strict\";\n// DO NOT EDIT THIS FILE, EDIT THE GRUNT TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE\nangular.module('publisherApp')\n\n.constant('ENV', 'dev')\n\n.constant('VERSION... | javascript | chosen |
[
{
"from": "system",
"value": "Handle null env load setting\n"
},
{
"from": "human",
"value": "/** @babel */\n\nimport {spawnSync} from 'child_process'\n\nconst ENVIRONMENT_VARIABLES_TO_PRESERVE = new Set(['NODE_ENV', 'NODE_PATH'])\n\nexport default function updateProcessEnv (launchEnv) {\n let ... | javascript | chosen |
[
{
"from": "system",
"value": "Build mat lib relative path\n"
},
{
"from": "human",
"value": "const path = require('path');\r\nconst webpack = require('webpack');\r\nconst HardSourceWebpackPlugin = require('hard-source-webpack-plugin');\r\n\r\nmodule.exports = {\r\n context: path.resolve(__dir... | javascript | chosen |
[
{
"from": "system",
"value": "Effects: Refactor transfer back compat to avoid bad nested return\n\nDownload builder replaces return statements while concatenating a\nbundle, but fails to deal with this nested return. Since this module\nis already deprecated, pulling the return to the top level makes\nmore s... | javascript | chosen |
[
{
"from": "system",
"value": "Replace trailing newlines with spaces\n"
},
{
"from": "human",
"value": "import Trie from 'triejs';\nimport { forEach, addIndex, toLower } from 'ramda';\n\nconst forEachIndex = addIndex(forEach);\n\n/**\n * Remove trailing newlines\n */\nexport const normalize = (ra... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing global object to fix broken reference assignment\n"
},
{
"from": "human",
"value": "var Namespace = (function (global) {\n\n 'use strict';\n\n return {\n\n /**\n * Creates a global object in a single line.\n * // example\n * Namespace.cr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the comment duplicating the code"
},
{
"from": "human",
"value": "/**\n * Composes single-argument functions from right to left.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing functions fr... | javascript | chosen |
[
{
"from": "system",
"value": "Change root component to MonsterFinder\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Route, IndexRoute, Redirect } from 'react-router';\n\nimport App from './components/App';\nimport FriendListApp from './containers/FriendListApp/FriendList... | javascript | chosen |
[
{
"from": "system",
"value": "change: Set tls_verify as null string\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) Ajay Sreedhar. All rights reserved.\n *\n * Licensed under the MIT License.\n * Please see LICENSE file located in the project root for more information.\n */\n\n/**\n * @... | javascript | chosen |
[
{
"from": "system",
"value": "Add a method: File object specified argument, returns FileReader object\n"
},
{
"from": "human",
"value": "(function (exports) {\n 'use strict';\n\n function BrowserMusicPlayer () {\n var AudioContext = window.AudioContext || window.webkitAudioContext;\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary variable (saldoList) from constants.js\n"
},
{
"from": "human",
"value": "export const BASE = 'https://online.ntnu.no/';\nexport const API_BASE = `${BASE}api/v1/`;\nexport const API_AUTH = 'auth/';\nexport const API_USERS = 'usersaldo/';\nexport c... | javascript | chosen |
[
{
"from": "system",
"value": "Add proptype validation to MetaInformation component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { map } from 'lodash';\n\nconst MetaInformation = (props) => (\n <div className=\"container\">\n {props.title ? <h4 className=\"heading\">{... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Heroku re-direct for localhost\n\n"
},
{
"from": "human",
"value": "var express = require('express');\n\n// Create our app\nvar app = express();\nconst PORT = process.env.PORT || 3100;\n\napp.use(function (req, resp, next) {\n if(req.headers['x-forwarded-p... | javascript | chosen |
[
{
"from": "system",
"value": "Add no-ops for Meteor.publish, methods, and onConnection if no webapp\n"
},
{
"from": "human",
"value": "// Only create a server if we are in an environment with a HTTP server\n// (as opposed to, eg, a command-line tool).\n//\nif (Package.webapp) {\n if (process.en... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce test coverage target for statements\n"
},
{
"from": "human",
"value": "const TEST_TYPE = ((argv) => {\n let match = argv[argv.length - 1].match(/npm\\/test-(\\w+).js/);\n\n return match && match[1] || '';\n})(process.argv);\n\nfunction configOverrides(t... | javascript | chosen |
[
{
"from": "system",
"value": "Put correction tool into context-menu-spell-check.\n"
},
{
"from": "human",
"value": "import { EditAnnotationCommand } from 'substance'\nimport SpellError from './SpellError'\nimport CorrectionTool from './CorrectionTool'\nimport SpellCheckCommand from './SpellCheck... | javascript | chosen |
[
{
"from": "system",
"value": "Use css instead of scss as output format\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n 'use strict';\n\n grunt.initConfig({\n // Create the webfont files:\n webfont: {\n icons: {\n s... | javascript | chosen |
[
{
"from": "system",
"value": "Allow the user to set the working directory.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { exec } = require('child_process');\n\nconst get = () => {\n return new Promise((resolve, reject) => {\n exec('git symbolic-ref --short HEAD', (err, std... | javascript | chosen |
[
{
"from": "system",
"value": "Update regex and path resolution for test image files.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar fs = require('fs');\n\nvar mimetypes = {\n '.gif': 'image/gif',\n '.jpeg': 'image/jpeg',\n '.jpg': 'image/jpeg',\n '.jpe': 'image/jpeg... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for promise and nodejs style callback\n"
},
{
"from": "human",
"value": "var basicAuth = require('basic-auth');\n\nvar unauthorized = function(res, realm) {\n var realm = realm || 'Authorization Required';\n res.set('WWW-Authenticate', 'Basic realm=' + realm... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for variable declaration exports\n"
},
{
"from": "human",
"value": "module.exports = function (babel) {\n var exportIds = [];\n var t = babel.types;\n return new babel.Transformer(\"babel-jsm-plugin\", {\n ExportNamedDeclaration: {\n enter: fu... | javascript | chosen |
[
{
"from": "system",
"value": "Add useStrict to the blacklist.\n\nEmber-CLI does this automatically.\n"
},
{
"from": "human",
"value": "var Transpiler = require('./transpiler');\n\nmodule.exports = {\n\tname: 'ember-cli-6to5',\n\tincluded: function(app) {\n\t\tthis._super.included.apply(this, arg... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"Revert \"trigger update\"\"\"\n\nThis reverts commit fa72dbdf0955256a6c9e1f9bd10c0327b35795fa.\n"
},
{
"from": "human",
"value": "var ids = ['yeka52', 'maboyong', 'datouma', 'gaizhilizcw', 'tianhao', 'qinnan', 'lianghuan', 'talich', \n'loveletter',... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment about the Middleware stack\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst express = require(\"express\");\nconst app = express();\n\nconst isProduction = process.env.NODE_ENV === \"production\";\n\n/* MIDDLEWARE */\n\napp\n .use(require(\"h... | javascript | chosen |
[
{
"from": "system",
"value": "Use $meteorUtils.autorun instead of Tracker.autorun in $session\n"
},
{
"from": "human",
"value": "'use strict';\nvar angularMeteorSession = angular.module('angular-meteor.session', []);\n\nangularMeteorSession.factory('$session', [\n function () {\n return func... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug in node 0.10 (and presumably other browsers) where the zero-width space is erroneously trimmed."
},
{
"from": "human",
"value": "'use strict';\n\nvar bind = require('function-bind');\nvar define = require('define-properties');\nvar replace = bind.call(Func... | javascript | chosen |
[
{
"from": "system",
"value": "Remove iOS callbacks from wrapper\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport { NativeEventEmitter, NativeModules } from 'react-native';\nconst { RNPusherPushNotifications } = NativeModules\nconst rnPusherPushNotificationsEmitter = new NativeEventEmit... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for setting path as part of options object as well as as a function parameter\n"
},
{
"from": "human",
"value": "var path = require('path'),\n static = require('serve-static');\n\nmodule.exports = {\n setup: function (app, assetpath, options) {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use RN’s projectRoots resolver to set the correct configDir\n"
},
{
"from": "human",
"value": "module.exports = {\n plugins: [\n [require('babel-plugin-dotenv'), {\n replacedModuleName: 'react-native-dotenv'\n }],\n ],\n};\n"
},
{
"from": "gpt",... | javascript | chosen |
[
{
"from": "system",
"value": "Fix build when included in an addon\n\nWhen this addon is deeply nested this.app does not exist so it is\nnecessary to walk up the addon tree to find the top level app where\nconfiguration resided.\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use stric... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in `babel` generator\n\nFixes gh-137\n"
},
{
"from": "human",
"value": "'use strict';\nvar generators = require('yeoman-generator');\n\nmodule.exports = generators.Base.extend({\n writing: function () {\n this.fs.copy(\n this.templatePath('babelrc'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix pages containing multiple tab sets\n"
},
{
"from": "human",
"value": "jQuery(function($) {\n $('.tabify .tabs a').bind('click', function() {\n var href = $(this).attr('href');\n var tabContent = $(href);\n $('.tabify .tabs a').removeClass('active'); //... | javascript | chosen |
[
{
"from": "system",
"value": "Return an empty string when no matches are found, e.g. Firefox\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar window = require('global/window')\nvar document = require('global/document')\nvar toArray = require('to-array')\n\nvar PREFIXES = /-(webkit|ms)-/\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow require paths starting from the root\n\n"
},
{
"from": "human",
"value": "var path = require('path');\n\nmodule.exports = {\n context: path.join(__dirname, \"src\"),\n\n entry: { main: \"./main\" },\n devtool: \"source-map\",\n output: {\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Use crypto.randomBytes instead of Math.random.\n\nMath.random is not cryptographically secure. Since that the number one\ngoogle result for \"node random string\" is this, it needs to be secure.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar charsNumbers ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle \\ on Windows, normalize to /\n"
},
{
"from": "human",
"value": "var es = require('event-stream');\nvar path = require('path');\nvar gutil = require('gulp-util');\nvar concat = require('gulp-concat');\nvar header = require('gulp-header');\nvar footer = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Use superagent to request track information from vimeo video\n"
},
{
"from": "human",
"value": "var ytdl = require('youtube-dl-vimeo');\nvar url = 'http://vimeo.com/93491987';\nvar echojs = require('echojs');\nvar fs = require('fs'),\nrequest = require('superagent')... | javascript | chosen |
[
{
"from": "system",
"value": "Use the url pathname so we don't include query args\n"
},
{
"from": "human",
"value": "exports.create = function(logger) {\n\n return function(req, res, next) {\n var rEnd = res.end;\n\n // To track response time\n req._rlStartTime = new Date();\n\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Print out the unsupported object when encountered.\n"
},
{
"from": "human",
"value": "// Load the node-ffi extensions\nrequire('./ffi-extend')\n\n// The main exports is the casting function\nmodule.exports = $\n$._ = $ // legacy. TODO: remove by 0.1.0\n\n// export t... | javascript | chosen |
[
{
"from": "system",
"value": "Support provide a URI Object\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar parseURI = require('parse-uri')\nvar encode = require('punycode2/encode')\n\n// Illegal characters (anything which is not in between the square brackets):\nvar ILLEGALS = /[^a-z0-9\\... | javascript | chosen |
[
{
"from": "system",
"value": "Comment the code that duplicates the files\n"
},
{
"from": "human",
"value": "'use strict';\nvar pkg = require('./package');\nvar gutil = require('gulp-util');\nvar through = require('through2');\nvar path = require('path');\nvar File = require('vinyl');\n\n// const... | javascript | chosen |
[
{
"from": "system",
"value": "Use regex to test date condition instead\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n\"use strict\";\n\nconst moment = require(\"moment\");\nconst sugar = require(\"sugar\");\nconst chalk = require(\"chalk\");\nconst exec = require(\"child_process\").e... | javascript | chosen |
[
{
"from": "system",
"value": "Add early exit for typeof not \"function\""
},
{
"from": "human",
"value": "'use strict';\n\nvar fnToStr = Function.prototype.toString;\n\nmodule.exports = function isCallable(value) {\n\ttry {\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn... | javascript | chosen |
[
{
"from": "system",
"value": "Move \".\" and \"/\" into symbol/keyword\n"
},
{
"from": "human",
"value": "var Tokenizer = require(\"tokenizer\")\n\nmodule.exports = function (cb) {\n var t = new Tokenizer(cb)\n\n t.addRule(/^:([A-Za-z_=+\\-*&?!$%|<>][A-Za-z0-9_=+\\-*&?!$%|<>]*)$/, \"keyword\")... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for null values"
},
{
"from": "human",
"value": "module.exports = function() {\n var args = Array.prototype.slice.call(arguments);\n var cursor = args[0];\n var keys = args.slice(1);\n\n for(var i = 0; i < keys.length; i++) {\n cursor = cur... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the replacement of the hyphen becaue if the title includes a - it broke the links\n"
},
{
"from": "human",
"value": "var toc = require('markdown-toc');\n\nmodule.exports = {\n book: {\n assets: './assets',\n css: [\n \"atoc.css\"\n ],... | javascript | chosen |
[
{
"from": "system",
"value": "Allow opts in any position\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar extend = require('xtend');\n\n\nvar fillopts = function (wrapped, opts) {\n opts = extend(wrapped.opts, opts);\n wrapped = wrapped.wrapped || wrapped;\n\n var fn = function (... | javascript | chosen |
[
{
"from": "system",
"value": "Add indicator attribute row, column helpers\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport Realm from 'realm';\n\n/**\n * An abstract object which contains metadata describing an indicator row or col... | javascript | chosen |
[
{
"from": "system",
"value": "Include filename in reported output.\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar standard = require('standard')\nvar format = require('util').format\nvar loaderUtils = require('loader-utils')\nvar snazzy = require('snazzy')\n\nmodule.exports = function st... | javascript | chosen |
[
{
"from": "system",
"value": "Add an ! to hello world\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst config = require('./config.json');\nconst fs = require('fs');\n\nconst http = require('http');\nconst https = require('https');\n\nlet httpsOptions = {\n key: fs.readFileSync(config.k... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to enable loose mode\n"
},
{
"from": "human",
"value": "const {BABEL_ENV, NODE_ENV} = process.env\n\nconst defaultOptions = {\n lodash: true,\n modules: BABEL_ENV === 'cjs' || NODE_ENV === 'test' ? 'commonjs' : false,\n targets: {\n browsers: ['IE 1... | javascript | chosen |
[
{
"from": "system",
"value": "Use lowdb on change event\n"
},
{
"from": "human",
"value": "var server = require('json-server')\n\nvar port = process.env.PORT || 3000 \n\nfunction reset() {\n server.low.load('data.json')\n}\n\nserver.low.autoSave = false\nserver.low.on('update', reset)\nserver.l... | javascript | chosen |
[
{
"from": "system",
"value": "Remove moot empty file check\n\nCloses #153\nCloses #152\n"
},
{
"from": "human",
"value": "'use strict';\nconst dargs = require('dargs');\nconst execa = require('execa');\nconst gutil = require('gulp-util');\nconst through = require('through2');\n\nmodule.exports =... | javascript | chosen |
[
{
"from": "system",
"value": "Support for Leaflet v 1.0\n\nFixes https://github.com/mapbox/leaflet-pip/issues/19"
},
{
"from": "human",
"value": "/* global L */\n'use strict';\nvar gju = require('geojson-utils');\n\nvar leafletPip = {\n bassackwards: false,\n pointInLayer: function(p, laye... | javascript | chosen |
[
{
"from": "system",
"value": "Add asserts to check that cleanup did occur\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport setupMirage from '../helpers/setup-mirage';\nimport { moduleFor, test } from 'ember-qunit';\n\nconst {\n run\n} = Ember;\n\nmoduleFor('copyable', 'Inte... | javascript | chosen |
[
{
"from": "system",
"value": "Change let to var in sms route\n"
},
{
"from": "human",
"value": "\"use strict\";\nconst express = require('express');\nconst twilio = require('twilio');\nconst bodyParser = require('body-parser');\n\nconst app = express();\n\n// Run server to listen on port 8000.\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix route to json file\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst { $ } = Ember;\n\nexport default Ember.Route.extend({\n model() {\n return $.getJSON('/telling-stories/acceptance.json');\n },\n\n setupController(controller, model) ... | javascript | chosen |
[
{
"from": "system",
"value": "Add plugins to included configs\n"
},
{
"from": "human",
"value": "\"use strict\"\n\nvar rules = {\n \"no-yield-in-race\": require(\"./lib/rules/no-yield-in-race\"),\n \"yield-effects\": require(\"./lib/rules/yield-effects\"),\n \"no-unhandled-errors\": require(\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix case where child is null\n"
},
{
"from": "human",
"value": "'use strict'\nimport React, { Children } from 'react'\nimport classNames from 'classnames'\n\n/* eslint-disable react/prop-types */\nexport default function Box (props) {\n const c = classNames('box', ... | javascript | chosen |
[
{
"from": "system",
"value": "Make reverse proxy forward requests to AppEngine console as well\n"
},
{
"from": "human",
"value": "// this proxy will route requests to /api to backend\n// and all the other requests to frontend\n\nconst backendDevServerPort = 8080;\nconst frontendDevServerPort = 3... | javascript | chosen |
[
{
"from": "system",
"value": "Fix not movable map after drag zoom (web)\n"
},
{
"from": "human",
"value": "export default function dragZoom(map) {\n\t\n\tconst $map = map._container;\n\t\n\tlet isDoubleTap = false;\n\tlet isDragging = false;\n\t\n\tlet startZoom = 0;\n\tlet startY = 0;\n\t\n\t$m... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test to work with ngNotify\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('angularBasicAuthExample.login module', function() {\n var scope;\n\n // Mock unavailable modules\n angular.module('ngMessages', []);\n angular.module('angularBasicAuthEx... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust to new rebasing behavior"
},
{
"from": "human",
"value": "/*\n * CSSMIN: Compress CSS files\n */\nmodule.exports = {\n /*\n * TARGET: Concats and minified library css\n */\n installLibCss: {\n options: {\n compatibility: 'ie8'... | javascript | chosen |
[
{
"from": "system",
"value": "Update to default route path and response\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\n\nexports.routes = function() {\n\n var appPath = path.resolve(__dirname + '/public');\n\n return {\n\n 'get' : {\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix how Request methods are called (pass them a 'this' arg)\n\nNeeded so `this` is set to the right context when running\n"
},
{
"from": "human",
"value": "var debug = require( 'debug' )( 'wpcom-vip' );\nvar Request = require( './lib/util/request' );\n\n//... | javascript | chosen |
[
{
"from": "system",
"value": "Use pushState for the Backbone Router."
},
{
"from": "human",
"value": "module.exports = (function() {\n var Router = require('router');\n\n require('lib/config');\n require('lib/helpers');\n\n window.App = {};\n\n App.Router = new Router();\n\n App.User = _.c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug so that if the user fails to press change room the app does not break\n"
},
{
"from": "human",
"value": "//handles message function\nvar SubmitView = Backbone.View.extend({\n\n events: {\n 'submit' : 'handleSubmit',\n 'change #lang' : 'changeLanguage'... | javascript | chosen |
[
{
"from": "system",
"value": "Use === instead of ==\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = class PivotBuffer {\n constructor(size) {\n this.size = size;\n this.$buffer = new Buffer(size);\n \n this.$buffer.fill(0);\n\n this.$cur... | javascript | chosen |
[
{
"from": "system",
"value": "Implement main lookup hash from vendor site\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\n\nvar request = require('request');\nvar cheerio = require('cheerio');\n\napp.get('/', function(req, res) {\n res.sendFile('./con... | javascript | chosen |
[
{
"from": "system",
"value": "Remove flowstate .use and .yield.\n"
},
{
"from": "human",
"value": "exports = module.exports = function(IoC, store, logger) {\n var flowstate = require('flowstate');\n \n \n var dispatcher = new flowstate.Manager(store);\n \n return Promise.resolve(dispatcher... | javascript | chosen |
[
{
"from": "system",
"value": "Handle clean YouTube ids instead of the full URL\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar getYouTubeID = require('get-youtube-id');\n\nmodule.exports = function(url){\n var id = getYouTubeID(url);\n\n return {\n default: {\n url: 'http://img... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.