conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix bug in tree pruning caused by change in dev module flagging\n" }, { "from": "human", "value": "'use strict'\nvar validate = require('aproba')\nvar flattenTree = require('./flatten-tree.js')\n\nfunction isNotPackage (mod) {\n return function (parentMod) { return...
javascript
chosen
[ { "from": "system", "value": "Remove MonitorModel HashID from AccountModel:MonitorModel:hashID\n" }, { "from": "human", "value": "var configuration = require('../config/configuration.json')\n\nmodule.exports = function (redisClient, accountHashID, monitorHashID, callback) {\n multi = redisClien...
javascript
chosen
[ { "from": "system", "value": "Change error message when config file is invalid syntax\n" }, { "from": "human", "value": "var path = require('path');\nvar fs = require('fs');\n\nvar execute = function(pluginName, configFilePathStr, callback) {\n if (!pluginName) {\n callback(new Error('Input ...
javascript
chosen
[ { "from": "system", "value": "Throw error if html not passed in\n" }, { "from": "human", "value": "var cheerio = require('cheerio');\nvar ParseContext = require('./ParseContext');\nvar callbackify = require('./callbackify');\n\nfunction parse (html, filter, callback) {\n var $ = cheerio.load(ht...
javascript
chosen
[ { "from": "system", "value": "Make blank the default, add external\n" }, { "from": "human", "value": "/** Describes the dependencies for each library-specific template\n * Note that the first entry will be the default.\n * THE OBJECT NAME MUST BE THE SAME AS THE FOLDER NAME\n */\n\nmodule.export...
javascript
chosen
[ { "from": "system", "value": "Drop explicit handling of absolute URLs\n" }, { "from": "human", "value": "var path = require('path');\n\nfunction isFileURL(url) {\n return url.substr(0, 5) === 'file:';\n}\nexports.isFileURL = isFileURL;\n\n/* Remove scheme prefix from file URLs, so that they are...
javascript
chosen
[ { "from": "system", "value": "Add some defaults on the error handler to prevent undefined errors\n" }, { "from": "human", "value": "import AbstractLambdaPlugin from './abstract-lambda-plugin'\nimport PluginHook from '../enums/hooks'\nimport LambdaType from '../enums/lambda-type'\n\nexport defaul...
javascript
chosen
[ { "from": "system", "value": "Remove platform distinction in source\n" }, { "from": "human", "value": "/**\n * Gauss [Node]\n * Copyright(c) 2012 Fredrick Galoso\n * LICENSE: MIT/X11\n */\n\nvar Vector = require('./vector'),\n TimeSeries = require('./timeseries');\n\n/**\n * Library version\n...
javascript
chosen
[ { "from": "system", "value": "Change case on Host to host.\n" }, { "from": "human", "value": "var Host = require('./Host'),\n hosts = [],\n hostnames = {};\n\nmodule.exports = {\n add: function(options) {\n var host = new Host(options);\n\n host.hostnames.forEach(function(...
javascript
chosen
[ { "from": "system", "value": "Remove explicit AMD name for greater portability.\n\nSee http://requirejs.org/docs/api.html#modulename." }, { "from": "human", "value": "// Public object\nSockJS = (function(){\n var _document = document;\n var _window = window;\n ...
javascript
chosen
[ { "from": "system", "value": "Check for token before creating supervisor\n" }, { "from": "human", "value": "#!/usr/bin/env node\nvar slackbot = require('botkit').slackbot;\nvar minimist = require('minimist');\nvar args = minimist(process.argv.slice(2));\nvar listeners = require('./listeners');\n...
javascript
chosen
[ { "from": "system", "value": "Disable Express' view components (we use our own)\n" }, { "from": "human", "value": "/**\n\n server\n\n The backbone of the server module. In development, this runs proxied through\n BrowserSync server.\n\n @param {Object} options Options passed on to \"globals\...
javascript
chosen
[ { "from": "system", "value": "Include route aliases in our test conditions.\n" }, { "from": "human", "value": "var app = require( 'express' )();\nvar switchyard = require( './../../lib/switchyard.js' );\n\nswitchyard( app, __dirname + '/controllers' );\n\nmodule.exports = app.listen( 40595, func...
javascript
chosen
[ { "from": "system", "value": "Use PAPERTRAIL_HOSTNAME env var instead of creating the hostname manually\n" }, { "from": "human", "value": "'use strict';\n\nconst winston = require('winston'),\n DEBUG = process.env.DEBUG,\n LOGGING_LEVEL = DEBUG ? 'debug' : 'info',\n transports = [];\n\nrequir...
javascript
chosen
[ { "from": "system", "value": "Return empty array when findAll returns undefined from DB\n" }, { "from": "human", "value": "'use strict';\n\nvar SQliteAdapter = require('services/sqlite_adapter');\n\nvar Container = function() {\n SQliteAdapter.call(this, 'containers');\n this.schemaAttrs = ['i...
javascript
chosen
[ { "from": "system", "value": "Use syntax that doesnt make uglify explode\n" }, { "from": "human", "value": "export default {\n mounted () {\n window.location.reload()\n },\n render () {}\n}\n" }, { "from": "gpt", "value": "module.exports = {\n mounted: () => {\n window.loca...
javascript
chosen
[ { "from": "system", "value": "[FEATURE] Add RippleAddress class method to create a user hosted wallet.\n" }, { "from": "human", "value": "var Sequelize = require('sequelize');\nvar db = require('../../config/initializers/sequelize');\n\nvar RippleAddress = sequelize.define('ripple_address', {\n ...
javascript
chosen
[ { "from": "system", "value": "Add a note to do coverage later.\n" }, { "from": "human", "value": "/**\n * Entry point for defining Gulp tasks.\n */\n\n// Pull in the tasks from the gulp-tasks directory.\nrequire('require-dir')('./gulp-tasks');\n\n// \"pretest-with-coverage\": \"npm run pretest\"...
javascript
chosen
[ { "from": "system", "value": "Make build script more flexible\n" }, { "from": "human", "value": "var gulp = require('gulp')\nvar babel = require('gulp-babel')\nvar sourcemaps = require('gulp-sourcemaps')\n\ngulp.task('build', function() {\n return gulp.src('upgrade-object.js')\n .pipe(source...
javascript
chosen
[ { "from": "system", "value": "Reduce clickable area to just the command title.\n" }, { "from": "human", "value": "var session = require(\"zed/session\");\n\n/**\n * Inputs: lines, cursor\n */\nmodule.exports = function(info) {\n var pos = info.inputs.cursor;\n var lines = info.inputs.lines...
javascript
chosen
[ { "from": "system", "value": "Use full class name for Context class\n" }, { "from": "human", "value": "/**\n * @fileoverview A JS interface to the Rhino parser.\n */\n\n/**\n * Parse a script resource and return its AST tree.\n * @param resource {Resource} an instance of org.helma.repository.Res...
javascript
chosen
[ { "from": "system", "value": "Correct the precedence when rendering accessiblity badges\n" }, { "from": "human", "value": "/* @flow */\nimport React from 'react';\nimport Badge from './Badge';\n\ntype P = {\n level: {\n aaa?: bool,\n aa?: bool,\n aaLarge?: bool,\n }\n}\nconst Accessib...
javascript
chosen
[ { "from": "system", "value": "Return socket.io to the main bundle\n" }, { "from": "human", "value": "// Socket.io singleton\n//\n// Usage:\n// var socket = require('./socket');\n// socket.on('myevent', fn)\n\nvar socket = null;\nvar setupMessages = require('./messages');\nvar queue = {};\n\n...
javascript
chosen
[ { "from": "system", "value": "Add new methods to base social class\n" }, { "from": "human", "value": "var _ = require('lodash');\n\n/**\n * Create base social instance\n * @param {Object} [_config]\n * @constructor\n */\nfunction BaseSocial(_config) {\n this._config = {};\n\n _.forOwn(_config,...
javascript
chosen
[ { "from": "system", "value": "Remove dot from snapsvg name.\n" }, { "from": "human", "value": "//= require 'snap.svg'\n//= require ./pizza/pizza\n//= require_tree ./pizza\n" }, { "from": "gpt", "value": "//= require snapsvg\n//= require ./pizza/pizza\n//= require_tree ./pizza\n" } ...
javascript
chosen
[ { "from": "system", "value": "Clean up initialValues for TaskForm\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { View } from 'react-native';\nimport { TaskForm } from '../components';\nimport { AddEditTaskStyles } from '../styles/containers';\n\nexport def...
javascript
chosen
[ { "from": "system", "value": "[doc] Use `version` CLI option in `cli-sample`\n" }, { "from": "human", "value": "console.time('start');\nvar flatiron = require('../../lib/flatiron'),\n app = flatiron.app;\n\napp.use(flatiron.plugins.cli, {\n dir: __dirname,\n usage: [\n 'Simple app exampl...
javascript
chosen
[ { "from": "system", "value": "[cli] Create outputs message to console.\n" }, { "from": "human", "value": "/*!\n * Module dependencies.\n */\n\nvar console = require('./console');\n\n/**\n * Command line create command.\n *\n * For now, forward to the original PhoneGap Build create.\n *\n * Optio...
javascript
chosen
[ { "from": "system", "value": "Remove the use of mapDispatchToProps\n\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react'\nimport { connect } from 'react-redux'\n\nimport { incrementCounter, decrementCounter, incrementCounterAsync } from '../../actions/counter'\...
javascript
chosen
[ { "from": "system", "value": "Make goLayerVisibility a directive of type A\n" }, { "from": "human", "value": "goog.provide('go_layervisibility_directive');\n\ngoog.require('go');\ngoog.require('goog.asserts');\n\ngoModule.directive('goLayerVisibility', [\n\n /**\n * @return {angular.Directive...
javascript
chosen
[ { "from": "system", "value": "Support single queue argument when creating working\n" }, { "from": "human", "value": "var mongo = require('mongoskin');\nvar job = require('./job');\nvar Queue = require('./queue');\nvar Worker = require('./worker');\n\nmodule.exports = Connection;\n\nfunction Conn...
javascript
chosen
[ { "from": "system", "value": "Add color as an optional property\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Loader from 'react-loader';\n\nimport { oneOrManyChildElements } from '../../prop-types';\n\nexport default cl...
javascript
chosen
[ { "from": "system", "value": "Fix load in minimized JS for the clickOut directive\n" }, { "from": "human", "value": "/**\n * @author Evgeny Shpilevsky <evgeny@shpilevsky.com>\n * @date 9/27/13\n */\nangular.module(\"enlitePack\").directive(\"clickOut\", function ($document) {\n\n return ...
javascript
chosen
[ { "from": "system", "value": "Fix uploadToServer can't be null\n" }, { "from": "human", "value": "module.exports = function(params) {\n const { crashReporter } = require('electron');\n const os = require('os');\n const platformRelease = os.release();\n const arch = os.arch();\n const { uplo...
javascript
chosen
[ { "from": "system", "value": "Set the return type for Entry to the RHS\n" }, { "from": "human", "value": "import _Node from \"./node\"\nimport {Context, ContextTypes, Doc, ParserStateOption} from \"./node\"\nexport default class Entry extends _Node {\n /** @type {?_Node} */\n get key() {\n...
javascript
chosen
[ { "from": "system", "value": "Update comments to properly run the test" }, { "from": "human", "value": "function hex2bin(s) {\n // discuss at: http://phpjs.org/functions/hex2bin/\n // original by: Dumitru Uzun (http://duzun.me)\n // example 1: bin2hex('44696d61');\n // returns 1: 'Dima'...
javascript
chosen
[ { "from": "system", "value": "DOC: Add arrow to indicate current doc version.\n" }, { "from": "human", "value": "function insert_version_links() {\n var labels = ['dev', '0.4', '0.3'];\n\n document.write('<ul class=\"versions\">\\n');\n\n for (i = 0; i < labels.length; i++){\n do...
javascript
chosen
[ { "from": "system", "value": "Remove pointer problems by making shallow copy before parsing schema\n" }, { "from": "human", "value": "import {fields} from './elements/index';\n\n/**\n * Parse an object into a {@link Field}.\n * @param {String} id The ID for the field.\n * @param {Object}...
javascript
chosen
[ { "from": "system", "value": "Remove padding for Apple touch icons.\n" }, { "from": "human", "value": "// Generate favicons from source file\n\nmodule.exports = function(grunt) {\n grunt.config('favicons', {\n options: {\n 'trueColor': false,\n 'precomposed': true...
javascript
chosen
[ { "from": "system", "value": "Fix the names of the test cases\n\n ref #37\n" }, { "from": "human", "value": "'use babel'\n\nimport PromptViewList from '../lib/prompt-view-list';\n\ndescribe('PromptViewList', () => {\n describe('when setSelectedItem is called', () => {\n it('changes the sele...
javascript
chosen
[ { "from": "system", "value": "Decrease example timeout timers to 1000\n\nMocha tests will timeout if timers are set to 2000.\n" }, { "from": "human", "value": "import * as types from '../constants/error';\n\n/**\n * @function rejectPromiseWithGlobalError ✨\n * @description This function demonstr...
javascript
chosen
[ { "from": "system", "value": "categories: Add tests for search field filling\n" }, { "from": "human", "value": "import { currentURL } from '@ember/test-helpers';\nimport { module, test } from 'qunit';\n\nimport { setupApplicationTest } from 'cargo/tests/helpers';\n\nimport { visit } from '../hel...
javascript
chosen
[ { "from": "system", "value": "Update to other app credentials\n" }, { "from": "human", "value": "\nexports.register = function (plugin, options, next) {\n\n plugin.auth.strategy('github', 'bell', {\n provider: 'github',\n password: 'password',\n isSecure: false,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix a bug where non category content was navigating\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('app.common').directive('ckMenuLevel', ckMenuLevel);\n\nfunction ckMenuLevel() {\n\treturn {\n\t\trestrict: 'AE',\n\t\treplace: true,\n\t\ttransclu...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix the stupid route's bug" }, { "from": "human", "value": "// Routes\nimport Layout from '@/components/Layout'\nimport Welcome from '@/components/Welcome'\nimport Login from '@/components/auth/Login'\nimport UpdateProfile from '@/components/auth/UpdateProfile...
javascript
chosen
[ { "from": "system", "value": "Allow admin to delete stuff.\n" }, { "from": "human", "value": "'use strict'\nmodule.exports = function (newDoc, oldDoc, userCtx, secObj) {\n const ouch = (err) => { throw err }\n if (userCtx.roles.indexOf('teacher') === -1 && userCtx.roles.indexOf('_admin') === -...
javascript
chosen
[ { "from": "system", "value": "Add a proper example as of the new API design.\n" }, { "from": "human", "value": "\nvar connect = require( 'connect' ),\n flick = require( '..' ),\n handler = flick(),\n app = connect();\n\nhandler.use( 'romac/romac.github.com', gitPull );\n\nfunction gitPu...
javascript
chosen
[ { "from": "system", "value": "Add comment about UI-side timeout timer\n" }, { "from": "human", "value": "function count(sessionTimeoutInSeconds) {\n setTimeout(show, sessionTimeoutInSeconds * 1000);\n}\n\nfunction show() {\n $('#renew-session').slideDown();\n}\n\nexport default function sessio...
javascript
chosen
[ { "from": "system", "value": "Add test case for hoisting a single function\n" }, { "from": "human", "value": "hoist_funs_when_handling_if_return_rerversal: {\n options = { if_return: true, hoist_funs: false };\n input: {\n \"use strict\";\n\n ( function() {\n if ( ...
javascript
chosen
[ { "from": "system", "value": "Make sure list of domains is initialized\n" }, { "from": "human", "value": "module.exports = function(slackapp, config) {\n /*\n As of Botkit 0.6.8, we can't guarantee that our OAuth callback will have the last write on the team\n and set the businessUnitId. Beca...
javascript
chosen
[ { "from": "system", "value": "Update cdn host to use ssl\n" }, { "from": "human", "value": "/* global require, module */\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n var app = new EmberApp(defaults, {\n dotEnv: {\n clientAllowed...
javascript
chosen
[ { "from": "system", "value": "Enable `throwUnlessParallelizable` flag to prevent regressions\n" }, { "from": "human", "value": "'use strict';\n\n/* eslint-env node */\n\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n let stripTestSel...
javascript
chosen
[ { "from": "system", "value": "Reset list view after showing panel\n\nSigned-off-by: Max Brunsfeld <78036c9b69b887700d5846f26a788d53b201ffbb@gmail.com>\n" }, { "from": "human", "value": "'use babel';\n\nimport LineEndingListView from './line-ending-list-view';\n\nlet lineEndingTile = null;\n\nexp...
javascript
chosen
[ { "from": "system", "value": "Put Fixed and Smoothed aliases back in for now\n" }, { "from": "human", "value": "/**\n * @author Richard Davey <rich@photonstorm.com>\n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.t...
javascript
chosen
[ { "from": "system", "value": "Update services by gsim aesthetics\n\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport { connectFromRoute } from '../routes'\nimport { sparqlConnect } from '../sparql/configure-sparql'\nimport { LOADED } from 'sparql-connect'\nimpor...
javascript
chosen
[ { "from": "system", "value": "Add device icon to User.devices()\n" }, { "from": "human", "value": "var extend = require('extend');\nvar Hoek = require('hoek');\n\nmodule.exports = function(client) {\n var User = function(_obj, _accessToken) {\n extend(this, _obj);\n this.accessToken = _ac...
javascript
chosen
[ { "from": "system", "value": "Handle document.head not being ready yet.\n" }, { "from": "human", "value": "// ==UserScript==\n// @name Hide offline presence dot on old reddit\n// @namespace https://mathemaniac.org\n// @version 1.0.1\n// @description Hides the offline presence do...
javascript
chosen
[ { "from": "system", "value": "Remove todo from List unpublished gears\n" }, { "from": "human", "value": "'use strict';\n\n// Configuring the Articles module\nangular.module('linkGearRequests').run(['Menus',\n\tfunction(Menus) {\n // Set top bar menu items\n\t\tMenus.addMenuItem('topbar', ...
javascript
chosen
[ { "from": "system", "value": "Fix a race condition in clearTables\n" }, { "from": "human", "value": "const mysql = require(\"mysql\");\nconst { withPromiseLogging } = require(\"../testing/logging\");\n\n// Run an array of functions returning Promises sequentially.\n// Function N+1 will be execut...
javascript
chosen
[ { "from": "system", "value": "Check correct selector when running tests\n" }, { "from": "human", "value": "var url = 'http://127.0.0.1:8080/test.html';\n\ncasper.options.waitTimeout = 60000;\n\ncasper.test.begin('Run the Elm tests', function suite(test) {\n casper.start(url).then(function() {\n...
javascript
chosen
[ { "from": "system", "value": "Add zoom support to chart" }, { "from": "human", "value": "var selector = (document.getElementById(\"cf_crash_signature_edit_container\")) ? \"cf_crash_signature_edit_container\" : \"field-value-cf_crash_signature\";\nvar querystring = \"\";\ndocument.querySelectorA...
javascript
chosen
[ { "from": "system", "value": "Add Bay Area to list of locations\n" }, { "from": "human", "value": "export const Locations = {\n OTHER: \"Other\",\n PRESET_LOCATIONS: [\n \"Seattle, WA\",\n \"Redmond, WA\",\n \"Kirkland, WA\",\n \"Bellevue, WA\",\n \"Tacoma, WA\",\n \"Olympia,...
javascript
chosen
[ { "from": "system", "value": "Move emmity config to upper level\n" }, { "from": "human", "value": "import gulp from \"gulp\";\nimport plumber from \"gulp-plumber\";\nimport pug from \"gulp-pug\";\nimport posthtml from \"gulp-posthtml\";\nimport prettify from \"gulp-prettify\";\nimport gulpIf fro...
javascript
chosen
[ { "from": "system", "value": "Add semi-colon and use dot notation.\n" }, { "from": "human", "value": "//Filter experiment or computation templates\n\nApplication.Filters.filter('byMediaType', function () {\n return function (items, values) {\n var matches = [];\n if (items) {\n ...
javascript
chosen
[ { "from": "system", "value": "Clear observable cursor using dedicated mobx method\n" }, { "from": "human", "value": "import { Tracker } from 'meteor/tracker';\nimport { action } from 'mobx';\n\nexport default (actionPrefix = '', storeAttribute, handle, cursor) => {\n\n if (handle.ready()) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix login controller to go to correct route.\n" }, { "from": "human", "value": "Application.Controllers.controller('login',\n [\"$scope\", \"$state\", \"User\", \"alertService\", \"mcapi\", \"Nav\", \"pubsub\", \"model.projects\", \"projectFiles\",\n funct...
javascript
chosen
[ { "from": "system", "value": "Revert \"Reorder dashboard time filter buttons\"\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport DashButton from './DashButton';\n\n//Custom all purpose dashboard button\nclass DashRangeButtons extends Rea...
javascript
chosen
[ { "from": "system", "value": "Hide settings toggle when there are no settings\n" }, { "from": "human", "value": "var TitleBar = Backbone.View.extend({\n template: require(\"templates/title_bar\"),\n\n initialize: function() {\n this.listenTo(this.model, \"change:name\", this.setName);\n },...
javascript
chosen
[ { "from": "system", "value": "Fix permission issue : dojoId was not defined for certain calls (notify)\n" }, { "from": "human", "value": "var async = require('async');\nvar _ = require('lodash');\n\n/**\n * Verify than the specified user is having the permission passed as a param\n * Considering...
javascript
chosen
[ { "from": "system", "value": "Expand comments, ensure process doesn't crash when there's an error that results in a failed (experimental) live reload. This commit also removes unused reliance on 'this' context in the private loadHelpers() utility.\n" }, { "from": "human", "value": "/**\n * Modu...
javascript
chosen
[ { "from": "system", "value": "Bring setup and teardown to beforeEach and afterEach hooks to make sure they run always\n" }, { "from": "human", "value": "describe(\"submitTopic\", function(){\n it(\"creates a topic\", function(){\n // Setup\n sinon.stub(Meteor, 'userId', function () { retu...
javascript
chosen
[ { "from": "system", "value": "[zmarkdown] Solve a bug on code visitor\n" }, { "from": "human", "value": "/**\n * This plugin adds a class precising the language\n * to code blocks (.hljs-code-div).\n */\n\nconst visit = require('unist-util-visit')\n\nmodule.exports = () => (tree) => {\n visit(t...
javascript
chosen
[ { "from": "system", "value": "Fix path resolving for absolute paths\n" }, { "from": "human", "value": "/**\n * Ensures that the label package file actually exists\n * @param {String} path - path to the json file label package\n * @return {Bool || Error} this is a try-catch where the er...
javascript
chosen
[ { "from": "system", "value": "Remove dictionary and array for now.\n" }, { "from": "human", "value": "/**\n * Types Supported By Schemas\n */\n\nmodule.exports = [\n\n // // ================================================\n // // Waterline 0.13:\n // 'string',\n // 'number',\n // 'boolean'...
javascript
chosen
[ { "from": "system", "value": "Use all `_id` parts for `compoundId`\n" }, { "from": "human", "value": "/**\n * @class CM_Model_Abstract\n * @extends Backbone.Model\n */\nvar CM_Model_Abstract = Backbone.Model.extend({\n\n _class: 'CM_Model_Abstract',\n\n idAttribute: '_compoundId',\n\n initial...
javascript
chosen
[ { "from": "system", "value": "Update MaterialTooltip unit test with chai-jquery\n" }, { "from": "human", "value": "\n describe('tooltip tests', function () {\n\n it('Should have MaterialTooltip globally available', function () {\n expect(MaterialTooltip).to.be.a('function');\n });\n\...
javascript
chosen
[ { "from": "system", "value": "Fix possible omission of posts when filtering feed\n" }, { "from": "human", "value": "var createXMLTransformer = require('./xml-transformer');\nvar log = require('./util').log;\nvar patterns = require('./util').patterns;\nvar track = require('./util').track;\n\nfunc...
javascript
chosen
[ { "from": "system", "value": "Use https for artworks on BOS\n" }, { "from": "human", "value": "//\n// FRAMES\n//\n\n// Rename plugins to extensions\ndb.Frame.update({}, { $rename: { 'plugins': 'extensions'}}, {multi: 1});\n\n// Replace embedded current artwork with a relationship\ndb.Frame.find(...
javascript
chosen
[ { "from": "system", "value": "Add comments to the load current user filter\n" }, { "from": "human", "value": "\"use strict\";\n\n/*global nodeca, _*/\n\nvar me_in_fields = [\n '_uname',\n 'locale'\n];\n\nvar me_out_fields = [\n '_uname'\n];\n\n\n// fetch current user info\n// fired before eac...
javascript
chosen
[ { "from": "system", "value": "Reduce fontSize so that it's not too big..\n" }, { "from": "human", "value": "export default {\n data: () => ({\n videoHeight: 0\n }),\n\n mounted () {\n this.setHeight()\n\n window.addEventListener('resize', this.setHeight)\n },\n\n beforeDestroy () {...
javascript
chosen
[ { "from": "system", "value": "Add proper exporting of programStrings\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { authStrings } from './authStrings';\nimport { buttonStrings } from './buttonStrings';\nimport { generalStrings ...
javascript
chosen
[ { "from": "system", "value": "Enable ES7 async functions in jest\n\nReviewed By: voideanvalue\n\nDifferential Revision: D2840780\n\nfb-gh-sync-id: b86eed0078115d41e4400074f41244e4ae688762\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserve...
javascript
chosen
[ { "from": "system", "value": "Add content parametr to script" }, { "from": "human", "value": "function showOriFancybox(status) {\n jQuery.fancybox({\n 'type': 'inline',\n 'content': '#update',\n 'autoScale': false,\n 'autoDimensions': false,\n 'width': '800'...
javascript
chosen
[ { "from": "system", "value": "Use includes instead of indexOf\n" }, { "from": "human", "value": "'use strict';\n\nconst path = require('path');\nconst fs = require('fs');\nconst camelCase = require('camelcase');\n\nfunction getPackageDeps() {\n const pkgFile = fs.readFileSync('./package.json');...
javascript
chosen
[ { "from": "system", "value": "Update to sync with master.\n" }, { "from": "human", "value": "import * as React from \"react\";\nimport * as moment from \"moment-timezone\";\n\nimport tz from \"./tz\";\n\n\nclass TZChooser {\n getDefaultProps() {\n return {name: \"tzchooser\"};\n }\n getIni...
javascript
chosen
[ { "from": "system", "value": "Support promise emitter in memoizeWatcher\n" }, { "from": "human", "value": "'use strict';\n\nvar noop = require('es5-ext/lib/Function/noop')\n , extend = require('es5-ext/lib/Object/extend')\n , memoize = require('memoizee')\n , ee = require('event-emit...
javascript
chosen
[ { "from": "system", "value": "Set isDestroying before triggering destroying Event\n" }, { "from": "human", "value": "pageflow.delayedDestroying = {\n initialize: function() {\n this._destroying = false;\n },\n\n destroyWithDelay: function() {\n var model = this;\n\n this.trigger('des...
javascript
chosen
[ { "from": "system", "value": "Clean tmp directory before tests.\n" }, { "from": "human", "value": "'use strict';\n\nconst loadGruntTasks = require('load-grunt-tasks');\nconst rollupPluginBabel = require('rollup-plugin-babel');\n\n\nmodule.exports = function register(grunt) {\n loadGruntTasks(gr...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect holiday color in popover (full/half days)\n" }, { "from": "human", "value": "import React from 'react';\nimport moment from 'moment';\nimport { Label } from 'react-bootstrap';\nimport { getDevHolidaysAfter } from './working-days-utils';\n\nexport defau...
javascript
chosen
[ { "from": "system", "value": "Load only Meshes of the scene imported\n" }, { "from": "human", "value": "'use strict';\n\nconst THREE = require('three');\n\nfunction Ground (scene) {\n THREE.Object3D.call(this);\n\n const objectLoader = new THREE.ObjectLoader();\n const scope = this;\n object...
javascript
chosen
[ { "from": "system", "value": "Add to download links ng-csv\n" }, { "from": "human", "value": "var path \t\t= require('path');\nvar rootPath \t= path.normalize(__dirname + '/../../');\n\nmodule.exports \t= {\n local: {\n baseUrl: 'http://localhost:3051',\n db: 'mongodb://localhos...
javascript
chosen
[ { "from": "system", "value": "Refactor jasmin config to es6\n" }, { "from": "human", "value": "/*global jasmine, require, process*/\nvar Jasmine = require('jasmine'),\n\tSpecReporter = require('jasmine-spec-reporter'),\n\tjrunner = new Jasmine(),\n\tfilter;\nprocess.argv.slice(2).forEach(functio...
javascript
chosen
[ { "from": "system", "value": "Update the example to j2c the new 0.8+ API.\n\n`j2c.scoped` is gone, Class names are now localized unless `:global()` -ized" }, { "from": "human", "value": "import React from 'react';\nimport j2c from 'j2c';\n\nconst styles = j2c.scoped({\n container: {\n 'text...
javascript
chosen
[ { "from": "system", "value": "TBR: Remove dependency on crypto, since that adds about 1M.\n\nChange-Id: I30bfb3c33445bf36cbf23adcc748fd4b324dc92e\n" }, { "from": "human", "value": "var crypto = require('crypto');\n\nmodule.exports = {\n shortName: shortName,\n firstShortName: firstShortName,\n...
javascript
chosen
[ { "from": "system", "value": "Save loaded sections in array\n" }, { "from": "human", "value": "$(document).ready(function(){\n $(document).scroll(function() {\n $(\"section\").each(function(){\n $this = $(this);\n if (isScrolledIntoView($this) === true) {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove Shogi name space and export default.\n" }, { "from": "human", "value": "import Shogi from '../shogi';\n\nShogi.Piece = class Piece {\n constructor(type, x, y) {\n this.type = type;\n this.x = x;\n this.y = y;\n }\n\n promote() {\n this.type = t...
javascript
chosen
[ { "from": "system", "value": "Remove default value for `movable`, `isPlaced`\n\n* This default value set by Piece base class.\n" }, { "from": "human", "value": "import _ from 'lodash';\nimport * as CONST from './constants/pieceTypes';\nimport { getClass } from './pieces/index';\n\nexport default...
javascript
chosen
[ { "from": "system", "value": "Fix issue with deletewatcher causing application crash\n" }, { "from": "human", "value": "import BaseWatcher from './BaseWatcher';\n\nclass DeleteWatcher extends BaseWatcher {\n constructor(bot) {\n super(bot);\n }\n\n /**\n * The method this wat...
javascript
chosen
[ { "from": "system", "value": "Fix Travis issue with Karma pt.3\n" }, { "from": "human", "value": "// const webpack = require('webpack');\n\nmodule.exports = (config) => {\n config.set({\n browsers: ['Chrome'], // run in Chrome\n singleRun: true, // just run once by default\n frameworks...
javascript
chosen
[ { "from": "system", "value": "Remove extra reference to karma-phantomjs-launcher plugin.\n" }, { "from": "human", "value": "/**\n * Created by Sean on 1/3/2015.\n */\n\nmodule.exports = function(config) {\n config.set({\n basePath: '.',\n frameworks: ['dart-unittest'],\n\n ...
javascript
chosen