conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update request handler; make hostname a constant\n"
},
{
"from": "human",
"value": "var os = require('os')\n , http = require('http')\n\nvar start = new Date()\n\nfunction secondsSince(when) {\n return (new Date() - when) / 1000\n}\n\nfunction uptime() {\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Make run on public IP\n"
},
{
"from": "human",
"value": "var bodyParser = require('body-parser');\nvar express = require('express');\nvar app = express();\nvar http = require('http').Server(app);\nvar io = require('socket.io')(http);\nvar statusController = require(... | javascript | chosen |
[
{
"from": "system",
"value": "ADD support for preview.js as a replacement for config.js\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport { getInterpretedFile } from './interpret-files';\n\nfunction loadConfigFiles({ configDir }) {\n const storybookConfigPath = getInterpretedF... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude GA if Do Not Track is set\n"
},
{
"from": "human",
"value": "document.addEventListener(\"DOMContentLoaded\", (event) => {\n const images = [\"hello1.jpeg\", \"hello2.jpeg\", \"hello3.jpeg\", \"hello4.jpeg\", \"hello5.jpeg\", \"hello6.jpeg\"];\n const today... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude env definition from server bundle\n\n* Exclude webpack environment variables injection from server bundle. It\nalso prevents node from reading the actual values\n"
},
{
"from": "human",
"value": "/* eslint-disable import/no-extraneous-dependencies */\n\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Save favourites with the page title\n"
},
{
"from": "human",
"value": "define(['jquery', 'backbone', 'underscore', 'favourites/models/Favourite', 'favourites/collections/Favourites'],\n function($, Backbone, _, Favourite, Favourites) {\n var FavouriteButto... | javascript | chosen |
[
{
"from": "system",
"value": "Change name of column to reflect db change\n\nName of `pulls` table `user` column changed to `owner`:\n\n"
},
{
"from": "human",
"value": "var _ = require('underscore'),\n db = require('../lib/db');\n\n// Builds an object representation of a row in the DB `pulls`... | javascript | chosen |
[
{
"from": "system",
"value": "Add loadState and saveState methods\n"
},
{
"from": "human",
"value": "function getXp(cr) {\n return parseInt(/\\([,\\d]*/g.exec(cr)[0].slice(1).replace(',', ''), 10);\n}\n\nfunction partialApply(func) {\n var args = [].slice.call(arguments, 1);\n return function... | javascript | chosen |
[
{
"from": "system",
"value": "Update second test, actually outputs audio\n"
},
{
"from": "human",
"value": "var engine = require(\"./node-core-audio\").createNewAudioEngine();\n\nengine.addAudioCallback( function(numSamples, inputBuffer) { \n\t//console.log( inputBuffer[0] );\n\tvar outputThing ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove 'about' button from CKEditor\n"
},
{
"from": "human",
"value": "CKEDITOR.plugins.addExternal( 'cortex_media_insert', '/assets/ckeditor/plugins/cortex_media_insert/' );\n\nCKEDITOR.editorConfig = function( config ) {\n config.extraPlugins = 'cortex_media_inse... | javascript | chosen |
[
{
"from": "system",
"value": "Use forms dashboard in edit user\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react'\n\n\nclass EditUserPage extends Component {\n\n render() {\n const { auth } = this.props\n return (\n <div>\n <span>Se fudeu!</... | javascript | chosen |
[
{
"from": "system",
"value": "ZON-4494: Add JS text shortening to twitter ressort text as well\n"
},
{
"from": "human",
"value": "(function($) {\n\nvar truncate_text = function(event) {\n var input = $(event.target);\n var limit = input.attr('cms:charlimit');\n var text = input.val();\n... | javascript | chosen |
[
{
"from": "system",
"value": "[fix] Connect over the correct browser channel path\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Minimum viable Browserchannel server for Node.js that works through the primus\n * interface.\n *\n * @runat server\n * @api private\n */\nmodule.exports ... | javascript | chosen |
[
{
"from": "system",
"value": "docs(Documentation): Update location that docs pages use for repository\n"
},
{
"from": "human",
"value": "module.exports = {\n cname: 'kitware.github.io',\n baseUrl: '/lightviz',\n work: './build-tmp',\n config: {\n title: 'LightViz.js',\n description: '\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect string 'event' in place of var\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar Promise = require('bluebird');\n\nvar emitThen = function (event) {\n var args = Array.prototype.slice.call... | javascript | chosen |
[
{
"from": "human",
"value": "Fix object not a function err\n"
},
{
"from": "gpt",
"value": "var Q = require('q');\nvar request = require('request');\n\nfunction search(category, query) {\n var deferred = Q.defer();\n var url = 'https://www.kimonolabs.com/api/';\n if (category && query)\... | javascript | chosen |
[
{
"from": "system",
"value": "Call Filter constructor in UglifyJSFilter\n\nThis allows passing in options like targetExtension when using this\nfilter in a Brocfile.\n"
},
{
"from": "human",
"value": "var Filter = require('broccoli-filter')\nvar UglifyJS = require('uglify-js')\n\nmodule.exports ... | javascript | chosen |
[
{
"from": "system",
"value": "Use $control as variable name\n"
},
{
"from": "human",
"value": "!function(root, name, make) {\n if (typeof module != 'undefined' && module.exports) module.exports = make()\n else if (typeof define == 'function' && define.amd) define(make)\n else root[name] = mak... | javascript | chosen |
[
{
"from": "system",
"value": "Remove `queue.next` from the `queue` object\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar aps = Array.prototype.slice;\n\nvar segue = function(cb) {\n\n var running = false;\n var queue = [];\n var nextArgs = [];\n\n var next = function() {\n\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Rename item.js to bookmark_item.js Part.2\n"
},
{
"from": "human",
"value": "import {element} from 'deku';\n\nimport BoxTemplate from './box_template';\nimport BookmarkItem from './bookmark_item';\nimport Search from './search';\n\nfunction render({props, state}) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use proprer name to create the mixin\n"
},
{
"from": "human",
"value": "const MobxMixin = function(stores) {\n let appState = {};\n\n Object.keys(stores).forEach( key => {\n const store = mobx.observable(stores[key].store);\n const actions = stores[key].acti... | javascript | chosen |
[
{
"from": "system",
"value": "Increment route count on route\n"
},
{
"from": "human",
"value": "module.exports = (function() {\n function chimneypot(opts) {\n if (!opts || !isOptionsValid(opts)) {\n throw new Error(\"Required options: port, path, secret\");\n }\n\n this.options = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add random punctuation, and should be done\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n\n var app = require('express')();\n var cors = require('cors');\n var bodyParser = require('body-parser');\n var http = require('http')\n .Server... | javascript | chosen |
[
{
"from": "system",
"value": "Add manifest to output app js\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-copy-asset-map'\n};\n"
},
{
"from": "gpt",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.export... | javascript | chosen |
[
{
"from": "system",
"value": "Handle comma deliminated (multiple) selectors per rule\n\nWhen looping through, it will add any mulitple selectors without\na content prop to an array. If it can't find any content for the\nselector - then it will throw a warning.\n\nThe warnings need to be improved, with line ... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for pit.only(), parity with it.only()\n"
},
{
"from": "human",
"value": "function install(globalObject) {\n if (!globalObject.jasmine) {\n throw new Error(\n 'It looks like you\\'re trying to install jasmine-pit before installing ' +\n 'jas... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra quotes from yaml\n"
},
{
"from": "human",
"value": "export default (str) => {\n // Parse a YAML array (to avoid the weight of a full parser library).\n return str.replace('---\\n', '').split('\\n').filter(e => e !== '').map(e => e.substr(2));\n};\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Add as a dependency (minification)\n"
},
{
"from": "human",
"value": "(function () {\n\t'use strict';\n\t/*global angular, Blob, URL */\n\t\n\tangular.module('angular.img', [\n\t]).directive('httpSrc', function ($http) {\n\t\treturn {\n\t\t\tlink: function ($scope,... | javascript | chosen |
[
{
"from": "system",
"value": "Include simulate in development env\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nvar path = require('path');\n\nmodule.exports = {\n name: 'ember-calendar',\n\n included: function(app) {\n this._super.included(app);\n\n app.im... | javascript | chosen |
[
{
"from": "system",
"value": "Add `isDevelopingAddon` to live-reload dev testing\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nvar path = require('path');\n\nmodule.exports = {\n name: 'ember-cli-transformicons',\n\n included: function included(app) {\n this._... | javascript | chosen |
[
{
"from": "system",
"value": "Enforce babel-eslint parser for ES6+\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: [\n 'eslint-config-airbnb/base',\n 'eslint-config-hyperoslo/base',\n ],\n};\n"
},
{
"from": "gpt",
"value": "module.exports = {\n parser: 'babe... | javascript | chosen |
[
{
"from": "system",
"value": "Test on adding openshift env port / ip"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\n\napp.get('/', function(req,res){\n\tres.send(\"Hello World\");\n});\n\nvar server = app.listen(3000, function(){\n\tvar host = server.ad... | javascript | chosen |
[
{
"from": "system",
"value": "Fix para que robotina no utilice sus propios mensajes como comando\n"
},
{
"from": "human",
"value": "var Discord = require('discord.io');\nvar bot = new Discord.Client({\n autorun: true,\n \n token: \"MjUzNTcyNjgwNjYwMjg3NDg5.CyCfAA.12c7GJ7PCeEgt_XYRDDlVdB6b... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up Not Found error message"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use strict';\n\nvar path = require('path');\n\n// Empty extension takes advantage of Node's default require behavior to check for\n// eslint-local-rules.js as well as an eslint... | javascript | chosen |
[
{
"from": "system",
"value": "Fix string support & non-object target\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar isExtendable = require('is-extendable');\n\nmodule.exports = Object.assign || function(obj/*, objects*/) {\n if (obj === null || typeof obj === 'undefined') {\n throw ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the 'end' type from format()\n"
},
{
"from": "human",
"value": "var util = require('util');\n\nvar mochaFormatter = {\n suite: \"describe('%s', function () {\",\n test: \"it('%s');\",\n end: '});'\n};\n\nfunction format(line, type) {\n if (type === 'en... | javascript | chosen |
[
{
"from": "system",
"value": "Test something besides the || operator in JS.\n"
},
{
"from": "human",
"value": "var assert = require('assert');\n\nrequire('./support/start')(function(command) {\n exports['test abilities endpoint'] = function() {\n assert.response(command.servers['Core']... | javascript | chosen |
[
{
"from": "system",
"value": "Add Promise support for get aggregation.\nAdd tests for getAsync.\n"
},
{
"from": "human",
"value": "// To test, rename this file to config.js and update\n// the following configuration\n//\n// To run a single driver, go to root folder and do (mysql example):\n// OR... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Jump to Bottom link\n\nFixes #1228"
},
{
"from": "human",
"value": "import {h} from 'dom-chef';\nimport select from 'select-dom';\nimport observeEl from '../libs/simplified-element-observer';\n\nfunction add() {\n\tconst meta = select('.gh-header-meta > .TableOb... | javascript | chosen |
[
{
"from": "system",
"value": "Improve naming of a variable\n"
},
{
"from": "human",
"value": "var Promise = require('es6-promise').Promise;\nvar engine = require('static-engine');\n\nmodule.exports = function (name, plugins) {\n\n return function (pages) {\n\n var promises = pages.map(... | javascript | chosen |
[
{
"from": "system",
"value": "Call `aperture.main.init()` before the window is created\n"
},
{
"from": "human",
"value": "const {app, BrowserWindow, ipcMain} = require('electron');\nconst aperture = require('../aperture').main;\n\nlet win;\n\nfunction createWindow() {\n\twin = new BrowserWindow(... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust the CI job name.\n"
},
{
"from": "human",
"value": "\nvar job_name = \"experimental\";\n\nvar CI = function() {\n this.json_url = \"https://projectodd.ci.cloudbees.com/job/\" + job_name + \"/api/json?depth=1\";\n\n $.ajax( { \n url: this.json_url,\n j... | javascript | chosen |
[
{
"from": "system",
"value": "FIX Babel reject duplicated variable name\n"
},
{
"from": "human",
"value": "class KeyMap {\n constructor() {\n this.map = new Map();\n }\n\n set(key, value) {\n let set = this.map.get(key);\n if (!set) {\n set = new Set();\n th... | javascript | chosen |
[
{
"from": "system",
"value": "Use the bundle bootstrap 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 isProductio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the examples and use the same names\n\nSigned-off-by: Fabio José <34f3a7e4e4d9fe971c99ebc4af947a5309eca653@gmail.com>\n"
},
{
"from": "human",
"value": "var express = require(\"express\");\nvar app = express();\n\nconst Unmarshaller02 = require(\"cloudevents-sdk... | javascript | chosen |
[
{
"from": "system",
"value": "Use same semantics as the AppEngine"
},
{
"from": "human",
"value": "module.exports = function wrapper(initialWait, maxTry, cb) {\n return function(message, header, deliveryInfo, job) {\n header.retries = header.retries || 0;\n job.retry = function(wait, trie... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the function name in function assignment statement\n"
},
{
"from": "human",
"value": "// Load the markdown-it regex plugin\nconst mdRegex = require('markdown-it-regexp')\n\n// Set our chord's identifier regex pattern and replacement string\nconst chordPattern... | javascript | chosen |
[
{
"from": "system",
"value": "Use \"require.resolve\" to find \"handlebars-helpers\" instead of \"require\"\n"
},
{
"from": "human",
"value": "var path = require(\"path\");\n\n// Export function to create new config (builder is passed in from outside)\nmodule.exports = function (builder) {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add HTTP method and URL to error object in case of invalid status code\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar http = require('http');\nvar util = require('util');\nvar PassThrough = require('stream').PassThrough;\n\n// A PassThrough stream that take... | javascript | chosen |
[
{
"from": "system",
"value": "Remove modern-msyslog that breaks travis build\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs'),\n morgan = require('morgan'),\n bunyan = require('bunyan'),\n stream = require('stream').PassThrough,\n bunyanMiddleware = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Add validation to error xml parse\n"
},
{
"from": "human",
"value": "var JSON5 = require('json5');\nvar xml2js = require('xml2js').parseString;\nvar lo = require(\"lodash\");\n\n\nvar reader = function(query, callback){\n\txml2js(\"<root>\" + query + \"</root>\", (... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to clean up code\n"
},
{
"from": "human",
"value": "var intersection = require('robust-segment-intersect')\nvar assert = require('assert')\nvar util = require('util')\n\nmodule.exports = function intersects(line1, line2) {\n assert(util.isArr... | javascript | chosen |
[
{
"from": "system",
"value": "Allow undescore-dangle for 'privat' methods.\n"
},
{
"from": "human",
"value": "module.exports = {\n parser: 'babel-eslint',\n extends: 'airbnb',\n globals: {\n before: true,\n beforeEach: true,\n after: true,\n afterEach: true,\n describe: true,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow OS to assign port if it was not configured\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n\nvar http = require('http')\nvar findPort = require('find-port')\nvar opn = require('opn')\nvar rc = module.require('rc')\nvar argv = require('optimist').argv... | javascript | chosen |
[
{
"from": "system",
"value": "Update about command, add credits\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst chalk = require('chalk');\nconst yargs = require('yargs');\n\n// ./modules\nconst rocketLaunch = require('./modules/rocketLaunch');\n\nvar argv = yargs\n .usage('Usage... | javascript | chosen |
[
{
"from": "system",
"value": "Make press-tip work on hover\n"
},
{
"from": "human",
"value": "import Tooltip from 'tooltip.js';\nimport './press-tip.scss';\n\nexport function PressTip() {\n 'ngInject';\n\n return {\n restrict: 'A',\n link($scope, $element, $attrs) {\n let tooltip = ... | javascript | chosen |
[
{
"from": "system",
"value": "[minor] Use fragments as middleware so we can iterate over it\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Fragment = require('./fragment')\n , dollars = require('dollars')\n , Supply = require('supply')\n , path = require('path')\n , url = require('u... | javascript | chosen |
[
{
"from": "system",
"value": "Fix start script - start application instead of playground\n"
},
{
"from": "human",
"value": "// @flow\n\nimport { AppRegistry, YellowBox } from 'react-native';\n\n// TODO: please check if it's still needed\nYellowBox.ignoreWarnings([\n 'Warning: isMounted(...) is ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to use single quotes in import"
},
{
"from": "human",
"value": "\n'use strict';\n\nvar path = require('path');\nvar fs = require('fs');\nvar through = require('through2');\nvar glob = require('glob');\n\nmodule.exports = function() {\n\n var process = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add a say hello endpoint\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\n\napp.get('/', function(req, res){\n res.send('hello world');\n});\n\napp.listen(process.env.PORT || 3000);\n"
},
{
"from": "gpt",
"valu... | javascript | chosen |
[
{
"from": "human",
"value": "Add basic searching with no restrictions/safety measures\n"
},
{
"from": "gpt",
"value": "// Dependency for CLI\nvar program = require(\"commander\");\n\n// Dependencies for fetching search results\nvar request = require(\"request\");\nvar cheerio = require(\"cheerio... | javascript | chosen |
[
{
"from": "system",
"value": "Throw error if unable to parse\n"
},
{
"from": "human",
"value": "var yaml = require('js-yaml');\nvar fs = require('fs');\nvar spawn = require('child_process').spawn;\nvar chimneypot = require('chimneypot');\n\n(function() {\n function getConfig() {\n var doc = ... | javascript | chosen |
[
{
"from": "system",
"value": "Update the regular express to be less strict.\nAnd remove duplicate definition.\n"
},
{
"from": "human",
"value": "(\r\n function () {\r\n var isDebugging = false;\r\n var re = /saas.hp(.*).com\\/agm/;\r\n\r\n function isAgmSite(url){\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Check Existence by OR Operator and Equality\n"
},
{
"from": "human",
"value": "var configuration = require('../config/configuration.json')\n\nmodule.exports = function (redisClient, accountHashID, monitorHashID, callback) {\n var tableName = configuration.TableMSAc... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade Electron API usage in example.\n"
},
{
"from": "human",
"value": "import app from 'app';\nimport {join} from 'path';\nimport BrowserWindow from 'browser-window';\n\nvar mainWindow = null;\n\napp.on('window-all-closed', () => {\n app.quit();... | javascript | chosen |
[
{
"from": "system",
"value": "Fix init for startup with no predefined connections\n"
},
{
"from": "human",
"value": "import React, { useEffect } from 'react';\nimport { Redirect } from 'react-router-dom';\nimport { connect } from 'unistore/react';\nimport initApp from './stores/initApp';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Improve broadcast performance for ws\n\nThis commit makes ws use the same buffer for all clients when\niterating over them instead of copying the data every time.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar cluster = require('cluster');\nvar ws = re... | javascript | chosen |
[
{
"from": "system",
"value": "Change focus on select example component name\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport Slider from '../src/slider'\n\nexport default class CenterModeWithFocusOnSelect extends Component {\n render() {\n const settings = ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor redundancy in book fields function\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n $(\"#book-fields\").hide();\n\n $(\"#show\").click(function(){\n $(\"#book-fields\").show();\n });\n});\n"
},
{
"from": "gpt",
"value": "... | javascript | chosen |
[
{
"from": "system",
"value": "ADD title to example usage of refs\n"
},
{
"from": "human",
"value": "module.exports = {\n stories: ['./stories/*.*'],\n refs: {\n ember: 'https://5e32a5d4977061000ca89459--storybookjs.netlify.com/ember-cli',\n cra: 'https://5e32a5d4977061000ca89459--storybo... | javascript | chosen |
[
{
"from": "system",
"value": "Make log with no color and more sense.\n"
},
{
"from": "human",
"value": "module.exports = function(casper) {\n function logger(str, sev) {\n if (!sev) {\n sev = 'INFO';\n }\n str = new Date().toString() + ':' + str;\n casper.echo(str, sev);\n }\n... | javascript | chosen |
[
{
"from": "system",
"value": "Select the first MFA device by default (especially nice when there is only one in the list)\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Component } from 'react'\nimport Select from 'react-select'\n\nexport default class MfaDeviceSelect ext... | javascript | chosen |
[
{
"from": "system",
"value": "Test Modular Inverse: Adds tests for Fermet's Modular inverse\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nconst modularInverse = require('../../../src').algorithms.math.modularInverse;\n\nconst assert = require('assert');\n\ndescribe('Modular Inverse'... | javascript | chosen |
[
{
"from": "system",
"value": "Update fullcalendar test with Heroku addresses\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\n // page is now ready, initialize the calendar...\n\n $('#calendar').fullCalendar({\n // put your options and callbacks here\n events: {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add new test case for JS files\n"
},
{
"from": "human",
"value": "import chai from 'chai';\nconst expect = chai.expect;\nimport onlyJsFiles from '../../src/resources/onlyJsFiles.js';\n\ndescribe('test onlyJsFiles', function() {\n it('should return only JS files', (... | javascript | chosen |
[
{
"from": "system",
"value": "Add note that appstate.json should be terminated with extreme prejudice\n"
},
{
"from": "human",
"value": "// Run this first!\n// Simple helper script that saves login details to a file so that you aren't\n// constantly logging in and out of Facebook (which causes i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix TypeDoc config for v0.11\n"
},
{
"from": "human",
"value": "\n// Base TypeDoc Configuration\nmodule.exports = (moduleName) => ({\n out: '../../docs/dist/api/' + moduleName,\n\n readme: 'none',\n includes: '../',\n exclude: '**/{__tests__,__test_utils... | javascript | chosen |
[
{
"from": "system",
"value": "Update to run with latest code\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assert = require('assert');\nvar markdownJsxLoader = require('../src');\nvar fs = require('fs')\n\nlet read = () => fs.readFileSync(__dirname + '/test-file.md', 'utf8')\n\ndescrib... | javascript | chosen |
[
{
"from": "system",
"value": "Add a wrapper to handle content size"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { getTheme } from '../Theme';\nimport ContentBody from './ContentBody';\nimport Co... | javascript | chosen |
[
{
"from": "system",
"value": "chore: Rename 'Preview as HTML' to 'Preview'\n"
},
{
"from": "human",
"value": "Vue.component('snapshot-item-action-menu', {\n mixins: [g_fileActionsCommon],\n props: {\n downloadUrl: {\n type: String,\n required: false,\n default: ''\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up reducer console logs.\n"
},
{
"from": "human",
"value": "import {\n UPDATE_USER,\n} from '../../actions'\n\nconst initialState = {\n isLoggedIn: false,\n displayName: 'anonymous',\n photoURL: '/img/default.png'\n}\n\nexport default function reducer (sta... | javascript | chosen |
[
{
"from": "system",
"value": "Add configure flags to for 32-bit build on 64-bit Mac OS X machine\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar bin = require('./');\nvar BinBuild = require('bin-build');\nvar logSymbols = require('log-symbols');\nvar path = require('path');\n\n/**\n * In... | javascript | chosen |
[
{
"from": "system",
"value": "Improve error message for missing styles module\n"
},
{
"from": "human",
"value": "import { helper } from '@ember/component/helper';\nimport { assert } from '@ember/debug';\n\nexport function localClass(params, hash) {\n assert('No source specified to local-class l... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify code which manipulates query string\n"
},
{
"from": "human",
"value": "/*\n Tatoeba Project, free collaborative creation of multilingual corpuses project\n\n This program is free software: you can redistribute it and/or modify\n it under the terms ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo and data structure\n"
},
{
"from": "human",
"value": "const inquirer = require('inquirer')\nconst exchangers = require('../config/exchangers.json')\n\nconst prompt = new Promise((resolve, reject) => {\n inquirer.prompt({\n type: 'checkbox',\n name: '... | javascript | chosen |
[
{
"from": "system",
"value": "Fix messages api patFix messages api path\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport BaseCollection from '../collections/BaseCollection';\nimport MessageModel from '../models/MessageModel';\n\n// TODO updateAll\n\n/**\n * Collection of event messages... | javascript | chosen |
[
{
"from": "system",
"value": "Remove jasmine-expect-jsx from karma file\n"
},
{
"from": "human",
"value": "var webpackConfig = require('./webpack.config.test');\n\nmodule.exports = function(karma) {\n\n karma.set({\n files: [\n {\n pattern: 'tests.webpack.js',\n watched: t... | javascript | chosen |
[
{
"from": "system",
"value": "Use synchronous writes in node runtime.\n\nFixes #3408\n"
},
{
"from": "human",
"value": "var i$putStr = (function() {\n var fs = require('fs');\n return function(s) {\n fs.write(1,s);\n };\n})();\n\nvar i$getLine = (function() {\n var fs = require( \"fs\" )\... | javascript | chosen |
[
{
"from": "system",
"value": "Add logging from image release script\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst { execSync } = require('child_process');\n\nconst TAG = process.env.TRAVIS_TAG;\nconst BRANCH = process.env.TRAVIS_BRANCH;\n\nif (TAG && /^v\\d+\\.\\d+\\.\\... | javascript | chosen |
[
{
"from": "system",
"value": "Call for passport Bearer strategy instead of checking token by hand\n"
},
{
"from": "human",
"value": "/*\n * If request concerns the API (a.k.a target /api/*), we shall find the user\n * associated with the given token (if any).\n * This user will then be stored in... | javascript | chosen |
[
{
"from": "system",
"value": "Fix getPosition different implementatons support\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar element = require('../valid-html-element');\n\nmodule.exports = function () {\n\tvar data = element(this).getBoundingClientRect()\n\t , body = this.ownerDocumen... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the pollInterval from the example - use the default 2000\n"
},
{
"from": "human",
"value": "var kafka = require('../kafka-node')\n\nvar consumer = new kafka.Consumer({\n\thost:'localhost',\n\tport:9092,\n\ttopic:'test',\n\tpollInterval: 1000\n})\n\nconsumer.c... | javascript | chosen |
[
{
"from": "system",
"value": "Update example for new message syntax.\n"
},
{
"from": "human",
"value": "var net = require('net');\n\n\n// Assuming the existence of some `build` method that returns a promise.\nvar sequence = build();\n\n\n// gathers rapid changes as one build\nvar timeout = null;... | javascript | chosen |
[
{
"from": "system",
"value": "Fix key names in yaml output so they're consistent with what Tokend is expecting.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst KMS = require('../../kms');\n\nmodule.exports = () => (req, res, next) => {\n const plaintext = req.body.kms_secret;\n\n con... | javascript | chosen |
[
{
"from": "system",
"value": "[FIX] Change Config to Correct createdAt\n\nFor reasons unknown, this configuration prevents the createdAt\ncolumn from changing to a future date on change.\n"
},
{
"from": "human",
"value": "\nvar Sequelize = require('sequelize');\nvar config = require(__dirname+'/... | javascript | chosen |
[
{
"from": "system",
"value": "Add a popup menu with a single menu item (a text entry)\n\nFor now it's just a text entry, but will need to adapt it to only\naccept valid text in there (floats between 0.00 and 2.00, probably).\n"
},
{
"from": "human",
"value": "// -*- mode: js; js-indent-level: 4;... | javascript | chosen |
[
{
"from": "system",
"value": "Add site footer to each documentation generator\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix '\"status\" is defined but never used'\n"
},
{
"from": "human",
"value": "module.exports = HtmlFile;\n\nfunction HtmlFile(path) {\n this.path = path;\n}\n\nHtmlFile.prototype.querySelectorAll = function(ph, style, cb) {\n var _this = this;\n return new Promis... | javascript | chosen |
[
{
"from": "system",
"value": "Load .env vars into gulp\n"
},
{
"from": "human",
"value": "/*\n gulpfile.js\n ===========\n Rather than manage one giant configuration file responsible\n for creating multiple tasks, each task has been broken out into\n its own file in gulp/tasks. Any files in... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor gulp tasks to separate concerns\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar validatePipeline = require('pipeline-validate-js');\nvar testPipeline = require('pipeline-test-node');\n\nvar config = {\n jsFiles: [\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.