conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add JSX as a resolvable extension\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n context: path.resolve(__dirname),\n entry: {\n app: './index.js',\n },\n output: {\n ...
javascript
chosen
[ { "from": "system", "value": "Change waitForDataAndSetState name into waitDataAndSetState\n" }, { "from": "human", "value": "import { makeCancelable, cancelAll } from '../helpers/promises';\n\nexport function cancelAllPromises(component) {\n if (!component.cancelablePromises) return;\n return ...
javascript
chosen
[ { "from": "system", "value": "Fix skip computePath if not changing parent\n" }, { "from": "human", "value": "import makeDebug from 'debug';\nimport fp from 'mostly-func';\nimport path from 'path';\nimport { getParentDocument, shortname } from '../helpers';\n\nconst debug = makeDebug('playing:con...
javascript
chosen
[ { "from": "system", "value": "Add comment which notes that the provider endpoint is a backbone.js collection endpoint as well.\n" }, { "from": "human", "value": "var path = require('path');\nvar _ = require('underscore')._;\n\nmodule.exports = function(app, settings) {\n var providers = {};\n...
javascript
chosen
[ { "from": "system", "value": "Remove test for hubot-scripts.json since the file has been removed\n" }, { "from": "human", "value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar assert = require('yeoman-generator').assert;\nvar helpers = require('yeoman-g...
javascript
chosen
[ { "from": "system", "value": "Allow notes to be created\n" }, { "from": "human", "value": "import uuid from 'node-uuid';\nimport Controller from 'cerebral';\nimport Model from 'cerebral-baobab';\n\n// TODO: load the initial state of the app from localStorage here\nconst model = Model({\n lanes:...
javascript
chosen
[ { "from": "system", "value": "Add slash to service detail route\n" }, { "from": "human", "value": "import Router from 'react-router';\nlet Route = Router.Route;\n\nimport ServiceOverlay from '../components/ServiceOverlay';\nimport ServicesPage from '../pages/ServicesPage';\n\nlet servicesRoutes ...
javascript
chosen
[ { "from": "system", "value": "Add start of non-ctm support for images.\n\nStill work and testing to do.\n" }, { "from": "human", "value": "/**\n * main.script.js\n *\n * Custom, additional scripts\n */\n\n// Only serve JavaScript to 'Cutting the Mustard' browsers\nif(enhance.ctm()){\n\n\t// Exec...
javascript
chosen
[ { "from": "system", "value": "Use util.log in main process\n\nIncludes timestamps.\n" }, { "from": "human", "value": "'use strict';\n\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\nvar ipc = require('ipc');\nvar config = require('./config');\n\nipc.on('load-schedule'...
javascript
chosen
[ { "from": "system", "value": "Use ES6 class for Entry\n" }, { "from": "human", "value": "'use strict';\n\nfunction Entry(relativePath, basePath, mode, size, mtime) {\n this.mode = mode;\n\n this.relativePath = relativePath;\n this.basePath = basePath;\n this.size = size;\n this.mtime = mtim...
javascript
chosen
[ { "from": "system", "value": "Fix the name of the variables to use Client instead of Server.\n\nR=hansmuller@google.com, hansmuller\n\nReview URL: https://codereview.chromium.org/859153003\n" }, { "from": "human", "value": "#!mojo mojo:js_content_handler\n// A JavaScript version of the C++ echo ...
javascript
chosen
[ { "from": "system", "value": "Add limit on entry passwords\n" }, { "from": "human", "value": "import helpers from '../helpers';\nimport user from '../models';\nimport bcrypt from 'bcrypt';\n\nconst User = user.User;\n\nmodule.exports = {\n create(req, res) {\n const username = req.body.usern...
javascript
chosen
[ { "from": "system", "value": "[Refactor] Set status to default to true\n" }, { "from": "human", "value": "var Sequelize = require(\"sequelize\");\n\nmodule.exports = function(sequelize, tableConfig) {\n return sequelize.define('UserUrl', {\n email: {\n type: Sequelize.STRING,\n all...
javascript
chosen
[ { "from": "system", "value": "Fix errors causing assertions to faile in IE.\n" }, { "from": "human", "value": "import helpers from '../lib/helpers';\nimport skate from '../../src/skate';\n\ndescribe('ignoring', function () {\n it('should ignore a flagged element', function () {\n var called ...
javascript
chosen
[ { "from": "system", "value": "Add playCard functionality and reducerHandler\n" }, { "from": "human", "value": "import createReducer from 'redux/utils/createReducer';\nimport { List } from 'immutable';\nimport { DRAW_CARD } from './deck';\nimport { CardModel } from './card';\n\nconst initialState...
javascript
chosen
[ { "from": "system", "value": "Make report table more clear\n" }, { "from": "human", "value": "// packages\nconst moment = require('moment')\nconst Table = require('cli-table2')\n\n// input 'HH:mm', output moment object\nconst composeDateObject = (timeString) => {\n const hour = timeString.split...
javascript
chosen
[ { "from": "system", "value": "Determine API_URL based on hostname\n" }, { "from": "human", "value": "import fetch from 'isomorphic-fetch'\n\nconst API_URL = process.env.REACT_APP_RAILS_API_URL\n\nconst headers = () => {\n const token = JSON.parse(localStorage.getItem('token'))\n\n return {\n ...
javascript
chosen
[ { "from": "system", "value": "Add support for ARRAY and ENUM in TypeMapper\n\nFixed missing semicolon\n" }, { "from": "human", "value": "import { GraphQLInt, GraphQLString, GraphQLBoolean, GraphQLFloat } from 'graphql';\n\nexport function toGraphQL(sequelizeType, sequelizeTypes) {\n if (sequeli...
javascript
chosen
[ { "from": "system", "value": "Change default number of rows shown in addressing widget to 3\n" }, { "from": "human", "value": "pref(\"extensions.{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}.description\", \"chrome://mailredirect/locale/mailredirect.properties\");\npref(\"extensions.mailredirect.copyTo...
javascript
chosen
[ { "from": "system", "value": "Disable submit button on event create form after inital submit\n\n* Added Javascript to disable the submit button on the new event form\n* This keeps people from submitting the form multiple times accidentally\n\n* https://trello.com/c/8dEWuDuB\n" }, { "from": "human", ...
javascript
chosen
[ { "from": "system", "value": "Remove jQuery from blog post articles.\n" }, { "from": "human", "value": "function initTwitter() {\n\t$(\".twitter-timeline\").height($(\"#pictureOfMe\").height()+20);\n}\n\n$(window).resize(function() {\n\t$(\".twitter-timeline\").height($(\"#pictureOfMe\").height(...
javascript
chosen
[ { "from": "system", "value": "Add comment RE: eager error creation without throwing.\n" }, { "from": "human", "value": "import { Promise } from 'rsvp';\n\nimport { nextTick } from './-utils';\n\nexport default function(callback, options = {}) {\n let timeout = 'timeout' in options ? options.tim...
javascript
chosen
[ { "from": "system", "value": ":construction: Load all bugs on mount\n\nWe can load all bugs on mount, but this could mean unnecessary requests\nFrom a test 76 requests | ~21KB transferred | Finish: ~30s " }, { "from": "human", "value": "import React, { Component } from 'react';\nimport FilterCo...
javascript
chosen
[ { "from": "system", "value": "Add offerings to the courses when fetching\n" }, { "from": "human", "value": "var _ = require('lodash')\nvar Promise = require(\"bluebird\")\n\nwindow.courseCache = {}\n\nfunction getCourse(clbid) {\n\treturn new Promise(function(resolve, reject) {\n\t\tif (_.contai...
javascript
chosen
[ { "from": "system", "value": "Revert \"fix: ensure a scope is used\"\n\nThis reverts commit 3fbfbb1b2687de3d7c056a6790ad735b19eb9254.\n\nNo longer necessary, this is now fixed in vatesfr/xo-server@8c7d254244fdf0438ab8f0bf9ee7c082f7318f09\n" }, { "from": "human", "value": "import { Strategy } fro...
javascript
chosen
[ { "from": "system", "value": "Add some hummingbird logic for testing\n" }, { "from": "human", "value": "var https = require('https');\nvar Slack = require('slack-client');\n\nvar token = process.env.SLACK_TOKEN;\nvar autoReconnect = true;\nvar autoMark = true;\n\nvar slack = new Slack(token, aut...
javascript
chosen
[ { "from": "system", "value": "Fix default option value of styles\n" }, { "from": "human", "value": "'use strict';\n\nvar piedmont = require('piedmont'),\n process = require('process');\n\nmodule.exports = function (grunt) {\n\n // Please see the Grunt documentation for more information regar...
javascript
chosen
[ { "from": "system", "value": "Fix movies service usage in movie-details.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('mementoMovieApp')\n .controller('MovieDetailsCtrl', function ($scope, $stateParams, Auth, Movie, Profile) {\n Movie.get($stateParams.id)\n .then(f...
javascript
chosen
[ { "from": "system", "value": "Set absolute path to public files\n" }, { "from": "human", "value": "'use strict';\n\n\n// Grab important stuff from the environment:\n\nvar ARDUINO = process.env.ARDUINO;\nvar PORT = process.env.PORT || 56267;\n\n\n// Connect the controller to the device:\n\nvar Fl...
javascript
chosen
[ { "from": "system", "value": "Update listening port for heroku\n" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\n\n// Environment\nrequire('./config/environment.js')(app, express);\n\n// TCAPI Support Middleware\napp.use(require('./middleware/crossdomain...
javascript
chosen
[ { "from": "system", "value": "Remove berniebuilders, callforbernie, and bernie2016states\n" }, { "from": "human", "value": "export const slacks = {\n // afam4bernie: {\n // title: 'African Americans For Bernie',\n // description: 'A community of African American activists and al...
javascript
chosen
[ { "from": "system", "value": "Use the prepare method before output\n" }, { "from": "human", "value": "// Dependencies\nvar Parser = require(\"../lib\")\n , EngineTools = require(\"engine-tools\")\n , Typpy = require(\"typpy\")\n , SameTime = require(\"same-time\")\n ;\n\n// Constants\nconst ...
javascript
chosen
[ { "from": "system", "value": "Add comment on what the cypress test is testing\n" }, { "from": "human", "value": "/// <reference types=\"cypress\" />\n\ncontext('Actions', () => {\n beforeEach(() => {\n cy.visit('http://localhost:8000')\n })\n\n it('All + elements are clickable', () => {\n ...
javascript
chosen
[ { "from": "system", "value": "Disable debug logging in socket.io\n" }, { "from": "human", "value": "// Load required modules\r\nvar http = require(\"http\"); // http server core module\r\nvar express = require(\"express\"); // web framework external module\r\nvar io ...
javascript
chosen
[ { "from": "system", "value": "Handle game results with no point spread outcome\n" }, { "from": "human", "value": "const crypto = require('crypto');\nconst jp = require('jsonpath');\nconst NFLWeek = require('./NFLWeek');\n\nmodule.exports.call = json => jp\n .query(JSON.parse(json), '$..items[?(...
javascript
chosen
[ { "from": "system", "value": "Test IE10 instead of IE9\n" }, { "from": "human", "value": "exports.config = {\n sauceUser: process.env.SAUCE_USERNAME,\n sauceKey: process.env.SAUCE_ACCESS_KEY,\n framework: 'jasmine2',\n sauceSeleniumAddress: 'localhost:4444/wd/hub',\n baseUrl: 'htt...
javascript
chosen
[ { "from": "system", "value": "Enable fuzziness + AND phrases when searching text\n" }, { "from": "human", "value": "const fp = require('lodash/fp')\n\nconst elastic = require('./index')\n\nconst toBody = message =>\n fp.pick([\n 'timestamp',\n 'from',\n 'to',\n 'text',\n ], message...
javascript
chosen
[ { "from": "system", "value": "Change source map to inline-source-map\n" }, { "from": "human", "value": "const webpack = require('webpack');\nconst webpackMerge = require('webpack-merge');\nconst common = require('./webpack.common');\n\nmodule.exports = webpackMerge(common, {\n devtool: 'eval',\...
javascript
chosen
[ { "from": "system", "value": "Make some pages private routes\n" }, { "from": "human", "value": "import React from 'react';\nimport {BrowserRouter as Router, Route} from 'react-router-dom';\n\nimport LandingPage from '../Landing';\nimport SignInPage from '../SignIn'\nimport ViewActivitiesPage fro...
javascript
chosen
[ { "from": "system", "value": "Delete function getString in DatePlus\n\nIt is to add extension\n" }, { "from": "human", "value": "\n// ----------------------------------------------------------------\n// Util Class\n\nclass DatePlus {\n constructor(_date = new Date()) {\n this.date = new Date...
javascript
chosen
[ { "from": "system", "value": "Fix parent app package.json resolution\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nvar walkSync = require('walk-sync');\nvar relative = require('require-relative');\nvar merge = require('merge');\n\nmodule.exports = {\n name: 'ember...
javascript
chosen
[ { "from": "system", "value": "Remove console logs from blog link binding\n" }, { "from": "human", "value": "$(document).on('ready', function() {\n\n $('nav a').on('click', function(event) {\n event.preventDefault();\n var targetURI = event.target.dataset.pagePartial;\n $.ajax({\n ...
javascript
chosen
[ { "from": "system", "value": "Add script for running sonar client against multiple commits for a repo\n" }, { "from": "human", "value": "const NodeGit = require(\"nodegit\");\nconst mongoose = require(\"../db/db\");\n\nmodule.exports = {};" }, { "from": "gpt", "value": "const NodeGit...
javascript
chosen
[ { "from": "system", "value": "Make sure our module can be required\n" }, { "from": "human", "value": "module.exports = {\n DOTHAT: require('./lib/dothat/dothat.js')\n};\n" }, { "from": "gpt", "value": "module.exports = {\n SN3218: require('./lib/common/sn3218.js').SN3218,\n ...
javascript
chosen
[ { "from": "system", "value": "Make sure app is not defined twice\n\nCurrent code throws the following error,\r\n```js\r\nIdentifier 'app' has already been declared\r\n/home/vagrant/s2bv4-ui-core/addons/reporting-engine/node_modules/ember-cli-datepicker-bootstrap/index.js:21\r\n let app = findHost.call(th...
javascript
chosen
[ { "from": "system", "value": "perf: Drop this.cacheable() call as obsolete\n" }, { "from": "human", "value": "var loaderUtils = require('loader-utils');\nvar YAML = require('yaml');\n\nmodule.exports = function (source) {\n this.cacheable && this.cacheable();\n var res = YAML.parse(source);\n ...
javascript
chosen
[ { "from": "system", "value": "Update the server listening message too\n" }, { "from": "human", "value": "require('app-module-path').addPath(__dirname);\n\nvar express = require('express');\nvar passport = require('passport');\nvar session = require('express-session');\n\nvar app = express();\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix check undefined instead of null\n" }, { "from": "human", "value": "var hslToHex = require('tie-dye/hslToHex');\n\nfunction hashbow(input, saturation, lightness) {\n\n var toColor, sum;\n saturation = saturation || 100;\n lightness = lightness || 50;\n\n if (...
javascript
chosen
[ { "from": "system", "value": "Change include to exclude to maintain compat" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-place-autocomplete',\n contentFor: function(type, config) {\n var content = '';\n if (type === 'body-foo...
javascript
chosen
[ { "from": "system", "value": "Refactor to improve bundle size\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = toString\n\n// Get the text content of a node.\n// Prefer the node’s plain-text fields, otherwise serialize its children,\n// and if the given value is an array, seri...
javascript
chosen
[ { "from": "system", "value": "Allow users to set the per_page option to 0\n" }, { "from": "human", "value": "'use strict';\n\nvar assign = require('object-assign');\n\nhexo.config.archive_generator = assign({\n per_page: hexo.config.per_page,\n yearly: true,\n monthly: true\n}, hexo.config.ar...
javascript
chosen
[ { "from": "system", "value": "Convert the BrowserWindow object to a chrome window object instead of using getMostRecentBrowserWindow\n" }, { "from": "human", "value": "var WindowUtils = require(\"sdk/window/utils\");\nvar windows = require(\"sdk/windows\").browserWindows;\n\nwindows.on(\"open\",...
javascript
chosen
[ { "from": "system", "value": "Fix root API server route path (don't show non-rendering template)\n" }, { "from": "human", "value": "var _ = require('underscore');\nvar cons = require('consolidate');\nvar path = require('path');\nvar SocketHook = require('./lib/socket-hook');\n\nvar _config = req...
javascript
chosen
[ { "from": "system", "value": "Change http -> https.\nLatest browser need https\n" }, { "from": "human", "value": "module.exports = {\n\n website: {\n assets: \"./assets\",\n css: [\n \"facebook.css\"\n ],\n js: [\n \"http://connect.facebook.ne...
javascript
chosen
[ { "from": "system", "value": "Add reply back of /bot/message/ with body\n" }, { "from": "human", "value": "var express = require('express');\nvar bodyParser = require('body-parser');\n\nvar app = express();\nvar port = process.env.PORT || 5000;\n\napp.use(bodyParser.urlencoded({ extended: true }...
javascript
chosen
[ { "from": "system", "value": "Read document and list attachments\n" }, { "from": "human", "value": "const request = require('request');\nconst fs = require('fs');\n\nconst DL_DIR = 'downloads';\n\nconst ENDPOINT = 'http://117.56.91.94/KMPublic/searchresult/searchservice.aspx'\n + '?region=docum...
javascript
chosen
[ { "from": "system", "value": "Update to work with a layout\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar Elixir = require('laravel-elixir');\nvar inky = require('inky');\nvar prettify = require('gulp-prettify');\nvar fs = require('fs');\nvar siphon = require('siphon-media-q...
javascript
chosen
[ { "from": "system", "value": "Add disabled and name property\n" }, { "from": "human", "value": "/** @jsx dom */\nimport dom from 'magic-virtual-element';\n\nconst propTypes = {\n\tclass: {\n\t\ttype: 'string'\n\t},\n\tonClick: {\n\t\ttype: 'function'\n\t},\n\ttype: {\n\t\ttype: 'string'\n\t}\n};...
javascript
chosen
[ { "from": "system", "value": "Update doc: changing command isn't a thing\n" }, { "from": "human", "value": "// Description:\n// Returns a randomly selected url to something in an s3 bucket.\n//\n// Dependencies:\n// aws-sdk\n// random.js\n// sprintf\n//\n// Configuration:\n// AWS_ACCES...
javascript
chosen
[ { "from": "system", "value": "Add flight to GeoJSON view\n" }, { "from": "human", "value": "const readTask = require('./src/read-task');\nconst taskToGeoJSON = require('./src/task-to-geojson');\nconst viewGeoJSON = require('./src/view-geojson');\n\nlet task = readTask(`${__dirname}/fixtures/2017...
javascript
chosen
[ { "from": "system", "value": "Use just the bare es6 promise implementation in `promise`." }, { "from": "human", "value": "'use strict';\n\nvar Promise = require('promise');\n\nvar Deferred = function Deferred() {\n\tif (!(this instanceof Deferred)) { return new Deferred(); }\n\n\tvar self = this...
javascript
chosen
[ { "from": "system", "value": "Change order of the menu imems\n" }, { "from": "human", "value": "'use strict';\nconst ipcRenderer = global.require('electron').ipcRenderer;\nconst remote = require('electron').remote;\nconst app = remote.app;\nconst Menu = remote.Menu;\nconst MenuItem = remote.Menu...
javascript
chosen
[ { "from": "system", "value": "Throw on invalid predicate even if array is empty" }, { "from": "human", "value": "'use strict';\nmodule.exports = function (arr, predicate, ctx) {\n\tif (typeof Array.prototype.findIndex === 'function') {\n\t\treturn arr.findIndex(predicate, ctx);\n\t}\n\n\tvar lis...
javascript
chosen
[ { "from": "system", "value": "Make package UMD (Univeral Module Definition) compatible\n\nWrap main logic so that it can be loaded by CommonJS (node and\nbundlers like webpack), AMD (RequireJS), and browser script.\n\nUMD template:\nhttps://github.com/ForbesLindesay/umd/blob/master/template.js\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Change default height to better fit in a tonic view port\n\n450 seems to work better than 500px.\n" }, { "from": "human", "value": "// tonic-d3 - index.js\n// wrapper for d3 to make is easier to embed d3 charts in tonic\n// based off of https://tonicdev.com/tonic/d3...
javascript
chosen
[ { "from": "system", "value": "Update example and move to Istanbul\n" }, { "from": "human", "value": "var distance = require('turf-distance');\n\n/**\n * Takes a {@link Point} feature and a {@link FeatureCollection} of Point features and returns the Point feature from the FeatureCollection closes...
javascript
chosen
[ { "from": "system", "value": "Add class/style merging behavior for functional SVG components" }, { "from": "human", "value": "const svgo = require('svgo');\nconst loaderUtils = require('loader-utils');\nconst compiler = require('vue-template-compiler');\nconst transpile = require('vue-template-e...
javascript
chosen
[ { "from": "system", "value": "fix: Use correct paths in cli after restructure\n" }, { "from": "human", "value": "/* eslint-disable no-console */\nconst Runner = require('jscodeshift/dist/Runner');\nconst chalk = require('chalk');\nconst { omit } = require('lodash');\nconst { resolve } = require(...
javascript
chosen
[ { "from": "system", "value": "Improve error handling for service retrieval\n" }, { "from": "human", "value": "var request = require('request');\nvar async = require('async');\nvar Service = require('./service.js');\n\nmodule.exports = function(uri){\n this.uri = uri;\n\n this.getServices =...
javascript
chosen
[ { "from": "system", "value": "Fix error on includes addon\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n\n name: 'ember-validation',\n\n isDevelopingAddon: function() {\n return true;\n }\n\n};\n" }, { "from": "gpt", "value": "...
javascript
chosen
[ { "from": "system", "value": "Add jsdoc comments in source\n" }, { "from": "human", "value": "var ReadStream = require('fs').ReadStream\nvar Stream = require('stream')\n\nmodule.exports = function destroy(stream) {\n if (stream instanceof ReadStream) {\n return destroyReadStream(stream)\n }...
javascript
chosen
[ { "from": "system", "value": "Handle empty responses from `getos`\n\nFixes #6, #7, #8.\n" }, { "from": "human", "value": "'use strict';\nconst execa = require('execa');\nconst getos = require('getos');\nconst pify = require('pify');\n\nmodule.exports = () => {\n\tif (process.platform !== 'linux'...
javascript
chosen
[ { "from": "system", "value": "Return `null` if extension or MIME type doesn't exist\n" }, { "from": "human", "value": "'use strict';\n\nvar endsWith = require('underscore.string').endsWith;\nvar extList = require('ext-list');\nvar path = require('path');\n\n/**\n * Get the file extension and MIM...
javascript
chosen
[ { "from": "system", "value": "Remove console.log left from debug\n" }, { "from": "human", "value": "CenterScout.factory('gradeData', ['$http', '$q', function($http, $q) {\n var grades = null;\n\n return function() {\n var deferred = $q.defer();\n\n console.log(deferred);\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add hashing the password on save\n\nSigned-off-by: Ian Macalinao <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@ian.pw>\n" }, { "from": "human", "value": "var bcrypt = require('bcrypt-nodejs');\n\nmodule.exports = function(schema, options) {\n /**\n * Checks if a pass...
javascript
chosen
[ { "from": "system", "value": "Send the directory of the entry file into rework-npm as cwd" }, { "from": "human", "value": "var importcss = require('rework-npm')\n , rework = require('rework')\n , variables = require('rework-vars')\n , read = require('fs').readFileSync\n\nmodule.exports = func...
javascript
chosen
[ { "from": "system", "value": "Make sure the sort of menu items is \"order\"\n" }, { "from": "human", "value": "var Q = require('q');\nvar keystone = require('keystone');\n\nconst MENUS = ['main', 'footer'];\nvar app;\n\nfunction reload() {\n var MenuItem = keystone.list('Menu item');\n var...
javascript
chosen
[ { "from": "system", "value": "Use our logger for Sequelize logging\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\nvar Sequelize = require('sequelize');\nvar fs = require('fs');\nvar path = require('path');\n\nvar db = require('../conf').db;\n\n// sequelize's API ...
javascript
chosen
[ { "from": "system", "value": "Add db config for actors\n" }, { "from": "human", "value": "/*jshint maxstatements:50 */\n\n'use strict';\n\nexports = module.exports = function (db) {\n\n if (!db) {\n // Default database provider: Neo4j\n var neo4j = require('neo4j');\n var...
javascript
chosen
[ { "from": "system", "value": "Remove ref to unused ws\n" }, { "from": "human", "value": "Bacon = require('baconjs');\nd3 = require('d3');\n\nSailGauge = require('./lib/sailgauge.js');\nrequire('./lib/baconslidingtimewindow.js');\nnavi = require('./lib/naviutils.js');\nWebSocket = require('ws');\...
javascript
chosen
[ { "from": "system", "value": "Fix return types for update and remove\n" }, { "from": "human", "value": "\nimport { NativeModules } from 'react-native';\n\nconst NativeRnRecord = NativeModules.RnRecord;\n\nexport default class RnRecord {\n id: Number;\n\n save(): Promise<Number> {\n ...
javascript
chosen
[ { "from": "system", "value": "Check that scope is an array\n" }, { "from": "human", "value": "var deep = require('deep-get-set');\n\nexports.register = function(plugin, options, next) {\n plugin.servers[0].ext('onPreAuth', function(request, next) {\n var i, matches, result, scope, _i, _len, ...
javascript
chosen
[ { "from": "system", "value": "Add back the ಠ_ಠ face\n\nI like to judge people who don't use evergreen browsers and I'd hope the code checking for support does as well." }, { "from": "human", "value": "var detection = 'class ಠ extends Array{constructor(j=`a`,...c){const q=(({u: e})=>{return {[`${...
javascript
chosen
[ { "from": "system", "value": "Make the 2 failing tests pass\n" }, { "from": "human", "value": "describe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists', function(){\n expect(Captcha).toBeDefined();\n });\n var captcha = new ...
javascript
chosen
[ { "from": "system", "value": "Split mergeStream into its own function\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\nvar split = require('split');\nvar argv = require('minimist')(process.argv.slice(2));\n\nmodule.exports = function () {\n if (!argv.hasOwnProperty...
javascript
chosen
[ { "from": "system", "value": "Add 'html' to HTML-Minifier `inputFormats`\n\nAllows HTML to be processed through the minifier." }, { "from": "human", "value": "'use strict';\n\nvar minify = require('html-minifier').minify;\nvar merge = require('merge');\n\nexports.name = 'html-minifier';\nexports...
javascript
chosen
[ { "from": "system", "value": ":new: Add config to override exclusion of regenerator transform\n" }, { "from": "human", "value": "module.exports = function(context, givenOpts) {\n var opts = Object.assign({\n exclude: [],\n targets: {\n node: 0,\n },\n }, givenOpts)\n opts.exclud...
javascript
chosen
[ { "from": "system", "value": "Allow to overwrite BASE_PATH via pluginsConfig\n" }, { "from": "human", "value": "var fs = require(\"fs\");\nvar path = require(\"path\");\n\nmodule.exports = {\n website: {\n assets: \".\",\n html: {\n \"body:start\": function(current) {\n \n ...
javascript
chosen
[ { "from": "system", "value": "Add a new `.lazy` modifier to mimic behavior of v1\n" }, { "from": "human", "value": "import Vue from 'vue';\n\nexport var version = '2.0.0';\n\nvar compatible = (/^2\\./).test(Vue.version);\nif (!compatible) {\n Vue.util.warn('VueFocus ' + version + ' only support...
javascript
chosen
[ { "from": "system", "value": "Use _.fromPairs instead of zipObject\n\nChanged in lodash 4.0.0:\nhttps://github.com/lodash/lodash/wiki/Changelog#v400\n" }, { "from": "human", "value": "var _ = require('lodash');\n\nmodule.exports = function (data, options) {\n \n options = _.extend({\n mutat...
javascript
chosen
[ { "from": "system", "value": "Update Index (Add PO Textile Job Order)\n" }, { "from": "human", "value": "\nmodule.exports = {\n core: {\n Product: require('./src/core/product'),\n Fabric: require('./src/core/fabric'),\n Buyer: require('./src/core/buyer'),\n Supplie...
javascript
chosen
[ { "from": "system", "value": "Fix optional duration for connection accesses\n" }, { "from": "human", "value": "const { DataTypes } = require('sequelize');\n\nmodule.exports = function (sequelize) {\n const ConnectionAccesses = sequelize.define(\n 'ConnectionAccesses',\n {\n id: {\n ...
javascript
chosen
[ { "from": "system", "value": "Check if dataset exist on `head` node\n\ndocument.body migth not be present if scripts are loaded in <head/>\n" }, { "from": "human", "value": "module.exports=dataset;\n\n/*global document*/\n\n\n// replace namesLikeThis with names-like-this\nfunction toDashed(name)...
javascript
chosen
[ { "from": "system", "value": "Support for setting PORT from environment\n" }, { "from": "human", "value": "const Server = require('./server/server');\nconst Login = require('./server/login');\nconst settings = require('./settings');\r\n\nconst server = new Server(new Login());\nserver.start(set...
javascript
chosen
[ { "from": "system", "value": "Fix compatibility when vue-loader option `esModule` is true.\n\n> The esModule option is now true by default.\n\nhttps://vue-loader.vuejs.org/en/options.html#esmodule\nhttps://github.com/vuejs/vue-loader/tree/v13.0.0\n" }, { "from": "human", "value": "var CodeMirror...
javascript
chosen
[ { "from": "system", "value": "Use --debug flag for compileDebug option.\n\nThe debug option will break CLI browserify builds by logging\ndirectly to stdout.\n" }, { "from": "human", "value": "var ejs = require('ejs')\n , through = require('through')\n\nmodule.exports = function(file, options) {...
javascript
chosen
[ { "from": "system", "value": "Remove options arg from exec.\n\n\tmodified: index.js\n" }, { "from": "human", "value": "// Start by requiring IOU to shim up the Promise constructor.\n\nvar\nPROC = require('child_process'),\nPromise = require('iou').Promise;\n\n\nexports.exec = function exec(...
javascript
chosen
[ { "from": "system", "value": "Fix configured paths for partials\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 var bootstrapLess = require.resolve(\"boots...
javascript
chosen
[ { "from": "system", "value": "Implement A Current Time Middleware\n" }, { "from": "human", "value": "var createMiniHarp = function() {\n var connect = require('connect'),\n argv = require(\"minimist\")(process.argv.slice(2)),\n app = connect(),\n port = argv.port || 4000;\n\n co...
javascript
chosen
[ { "from": "system", "value": "Clear interval when response ends" }, { "from": "human", "value": "module.exports = exports = sseMiddleware;\n\n/**\n * Middleware that adds support of Server Sent Events\n * @param __\n * @param res\n * @param next\n * @void\n */\nfunction sseMiddleware(__, res, ne...
javascript
chosen