conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Include js routes in frontend\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically\n// be include...
javascript
chosen
[ { "from": "system", "value": "Reorder exports and added widgets export\n" }, { "from": "human", "value": "//Neutrine version\nexport {version} from \"./src/version.js\";\n\n//Import global styles\nimport \"./src/style.scss\";\n\n//Export helpers\nexport * from \"./src/global.js\";\nexport * from...
javascript
chosen
[ { "from": "system", "value": "Add security so only selected value can be within the accesstoken (_id, email & name)\n" }, { "from": "human", "value": "/* global requireShared */\n\nconst signToken = requireShared(\"utilities/signToken\");\n\n\nmodule.exports = (req, res) => {\n if (req.sessio...
javascript
chosen
[ { "from": "system", "value": "Use triggerHandler() instead of trigger()" }, { "from": "human", "value": "/**\n * Events.\n *\n * @mixin\n * @namespace Bolt.events\n *\n * @param {Object} bolt - The Bolt module.\n */\n(function (bolt) {\n 'use strict';\n\n /*\n * Bolt.events mixin conta...
javascript
chosen
[ { "from": "system", "value": "Add description for media HTML\n\nThis allows getting the HTML for a given attachment image" }, { "from": "human", "value": "import DS from 'ember-data';\nimport BaseModel from './base';\n\nexport default BaseModel.extend({\n title: DS.attr('rendered'),\n media_de...
javascript
chosen
[ { "from": "system", "value": "Fix so the Subscribe button sends the right podcast ID\n" }, { "from": "human", "value": "$(function() {\n function getCookie(name) {\n var cookieValue = null;\n if (document.cookie && document.cookie != '') {\n var cookies = document.coo...
javascript
chosen
[ { "from": "system", "value": "fix(default-selected-tutorial): Set Default selected tutorial if none are initially selected\n" }, { "from": "human", "value": "import {bindable, inject} from 'aurelia-framework';\nimport {Server} from 'backend/server';\nimport {Profile} from 'services/profile'\nimp...
javascript
chosen
[ { "from": "system", "value": "Include only the compiled NoFlo version\n" }, { "from": "human", "value": "var exported = {\n noflo: require('../../src/lib/NoFlo.coffee')\n};\n\nif (window) {\n window.require = function (moduleName) {\n if (exported[moduleName]) {\n return exported[modul...
javascript
chosen
[ { "from": "system", "value": "[example] Create an action with address and user loaded.\n" }, { "from": "human", "value": "import {actionBuilder} from '../../actions/entity-actions-builder';\nimport {loadUserSvc, saveUserSvc} from '../services/user-service';\n\nconst loadAction = actionBuilder({n...
javascript
chosen
[ { "from": "system", "value": "Use result key from formula response\n" }, { "from": "human", "value": "var _ = require('underscore');\nvar WidgetModel = require('../widget_model');\n\nmodule.exports = WidgetModel.extend({\n\n // TODO: The response format has probably changed\n parse: function(r...
javascript
chosen
[ { "from": "system", "value": "IBM-109: Remove quotes from url query string\n" }, { "from": "human", "value": "(function () {\n const UNAUTHORIZED = 401;\n const REQUEST_FINISHED = 4;\n var keycloakRedirect = {\n authenticate: (config, client, window) => {\n if (config.backend === void...
javascript
chosen
[ { "from": "system", "value": "Fix default shortcut key: VK_G becomes G" }, { "from": "human", "value": "pref(\"extensions.tinyurlgen.createpreviewbydefault\", false);\r\npref(\"extensions.tinyurlgen.exposedestination\", true);\r\npref(\"extensions.tinyurlgen.showcontextoptionforpage\", true);\r\...
javascript
chosen
[ { "from": "system", "value": "Send events to be prevented by default\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react';\n\nexport default function (WrappedComponent) {\n class KeyStrokeSupport extends Component {\n\n static propTypes = {\n cancel: Pr...
javascript
chosen
[ { "from": "system", "value": "Fix Loop dependency in OrbitControls\n\n" }, { "from": "human", "value": "import {Vector3} from 'three';\nimport {ThreeOrbitControls} from './lib/ThreeOrbitControls';\n\nexport class OrbitModule {\n constructor(params = {}) {\n this.params = Object.assign({\n ...
javascript
chosen
[ { "from": "system", "value": "Replace all occurrences of dot, not just the first\n" }, { "from": "human", "value": "trackerdash.views.ResultTablePane = Backbone.View.extend({\n el: '.result-table-pane',\n\n initialize: function (settings) {\n this.results = settings.percentErrorByDa...
javascript
chosen
[ { "from": "system", "value": "Svgo: Remove unused property `_multiPass`, `settings.multipass` is used instead.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar SvgFile = require('./svg-file');\n\nclass Svgo extends require('./worker-messenger') {\n constructor() {\n super('js/svgo-w...
javascript
chosen
[ { "from": "system", "value": "Add update store packet code\n" }, { "from": "human", "value": "module.exports = {\n // Packet constants\n PLAYER_START: \"1\",\n PLAYER_ADD: \"2\",\n PLAYER_ANGLE: \"2\",\n PLAYER_UPDATE: \"3\",\n PLAYER_ATTACK :\"4\",\n LEADERBOAD: \"5\",\n ...
javascript
chosen
[ { "from": "system", "value": "Clear the layout delay timer when unplugging the cards list view." }, { "from": "human", "value": "module.exports = Zeppelin.CollectionView.extend({\n tagName: 'ol',\n\n className: 'cards-list list-unstyled clearfix',\n\n subscriptions: {\n 'cardsList:layout':...
javascript
chosen
[ { "from": "system", "value": "Make cite definition more robust\n" }, { "from": "human", "value": "\"use strict\";\n\n// Provides several classes frequently used in Arethusa\n\nangular.module('arethusa.util').service('commons', [\n function ArethusaClasses() {\n // Used to define plugin setti...
javascript
chosen
[ { "from": "system", "value": "Update unit test to match the change within KeyBoard Manager.\n" }, { "from": "human", "value": "describe('Keyboard module', function() {\n\n\n describe('KeyboardManger', function() {\n // Inject the Keyboard module for this test\n beforeEach(module...
javascript
chosen
[ { "from": "system", "value": "Fix upgrade: Check for empty items first\n" }, { "from": "human", "value": "/** @namespace H5PUpgrades */\nvar H5PUpgrades = H5PUpgrades || {};\n\nH5PUpgrades['H5P.Agamotto'] = (function ($) {\n return {\n 1: {\n 3: function (parameters, finished) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use history spreadsheet to get votes per party for the last vote.\n\n@martinstabe can you please populate the relevant column in said spreadsheet:\n => /db/source/parties-history.csv\n" }, { "from": "human", "value": "'use strict';\n\nconst fs = require('fs');...
javascript
chosen
[ { "from": "system", "value": "Add update API call for classes\n" }, { "from": "human", "value": "\nclasses.$inject = ['$http'];\n\nfunction classes($http) {\n var url = 'http://fiasps.unitec.edu:' + PORT + '/api/Classes';\n var service = {\n postClass: postClass,\n get: get\n...
javascript
chosen
[ { "from": "system", "value": "Add routes to user controller.\n\nAdds the post, put, and patch routes to the user controller as defined\nat the whiteboard on July 14th. Responses are still test output.\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Rout...
javascript
chosen
[ { "from": "system", "value": "Add optional fields argument to list and read\n" }, { "from": "human", "value": "var systemError = require( '../utils' ).systemError;\n\n\nexports.MongooseDataManager = function ( model ) {\n return {\n create: function ( data, callback ) {\n mo...
javascript
chosen
[ { "from": "system", "value": "Add user's names to review\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nclass Review extends Component {\n constructor(props) {\n super(props);\n this.renderReviews = this.renderReviews.bind(this);\n }\n renderReviews() {\...
javascript
chosen
[ { "from": "system", "value": "Fix for resize logo with safari\n" }, { "from": "human", "value": "import { defaultImage } from '../constants/collectives';\nimport { imagePreview } from '../lib/utils';\n\nexport default ({ src, style = {}, height }) => {\n style.height = style.height || height;\n...
javascript
chosen
[ { "from": "system", "value": "Add in stuff at the top of the file\n" }, { "from": "human", "value": "require('normalize.css');\nrequire('styles/App.css');\n\nimport React from 'react';\n\nlet yeomanImage = require('../images/yeoman.png');\n\nclass AppComponent extends React.Component {\n constr...
javascript
chosen
[ { "from": "system", "value": "Include es6 lints and fixes\n\nOtherwise we may not catch a feature-set violation against node v6.\n" }, { "from": "human", "value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"commonjs\": true,\n \"es2021\": true,\n \"no...
javascript
chosen
[ { "from": "system", "value": "Create an additional file with version number attach to the name.\n\nSuppose you would be better off using 'copy', but the project is so small that it\nreally doesn't matter much. More of so just cuts down dependencies.\n" }, { "from": "human", "value": "module.expo...
javascript
chosen
[ { "from": "system", "value": "Add convention restriction to Admin\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n\nexport default Ember.Route.extend(AuthenticatedRouteMixin, {\n model: fun...
javascript
chosen
[ { "from": "system", "value": "Cut indiehackers parser | Add hackernews parser\n" }, { "from": "human", "value": "\n// The schedule object saves the times at which each source bundle should be updated\n// Documentation on how to write crontab: http://crontab.org/\n\nconst schedules = [\n // {\n ...
javascript
chosen
[ { "from": "system", "value": "Include only open cases in wisepill view\n" }, { "from": "human", "value": "function(doc) {\n if(doc.doc_type === \"CommCareCase\" && doc.type === \"wisepill_device\") {\n emit([doc.name], null);\n }\n}\n" }, { "from": "gpt", "value": "funct...
javascript
chosen
[ { "from": "system", "value": "Fix permissions for release tracking script\n" }, { "from": "human", "value": "module.exports = {\n /**\n * Application configuration section\n * http://pm2.keymetrics.io/docs/usage/application-declaration/\n */\n apps: [\n {\n name: 'blair',\n ...
javascript
chosen
[ { "from": "system", "value": "Index: Use relative path to read package.json\n" }, { "from": "human", "value": "var fs = require('fs');\r\nvar version = \"0.0.0\";\r\n\r\nfs.readFile(\"package.json\", \"utf-8\", readPackageJson);\r\nfunction readPackageJson(err, data) {\r\n\tif (err) {\r\n\t\tcon...
javascript
chosen
[ { "from": "system", "value": "Add TODO to createDecision route\n" }, { "from": "human", "value": "import { Router } from 'express'\nimport bodyParser from 'body-parser'\nimport Decision from './classes/Decision.js'\nvar router = Router()\n\nrouter.use(bodyParser.urlencoded({ extended: true }))\n...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary quotes from object declaration\n" }, { "from": "human", "value": "const express = require('express');\nconst logger = require('morgan');\nconst bodyParser = require('body-parser');\n\nconst auth = require('./service/auth');\nconst changelogsRoutes...
javascript
chosen
[ { "from": "system", "value": "Return content page resource.\nPreviously returning empty object for create which prevented the use of $ prefixed methods.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular.module('app.states')\n .run(appRun);\n\n /** @ngInject */\n ...
javascript
chosen
[ { "from": "system", "value": "Update failing Jest test to use new global.\n" }, { "from": "human", "value": "/**\n * Internal dependencies\n */\nimport { sendAnalyticsTrackingEvent } from '../';\n\ndescribe( 'sendAnalyticsTrackingEvent', () => {\n\tit( 'sends a tracking event', () => {\n\t\t// e...
javascript
chosen
[ { "from": "system", "value": "Append friendly query name to gql request\n\nReviewed By: jstejada\n\nDifferential Revision: D23665236\n\nfbshipit-source-id: c89018597ab327d6339f96d556ab81edfdb97b3f\n" }, { "from": "human", "value": "/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n *...
javascript
chosen
[ { "from": "system", "value": "Remove required flag for videoTotalTime attribute\n" }, { "from": "human", "value": "/**\n* ViewData.js\n*\n* @description :: This model represents the data for all the video statistics.\n* @docs :: http://sailsjs.org/#!documentation/models\n*/\n\nmodule.expo...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix `port of undefined` error\n" }, { "from": "human", "value": "import http from 'http';\nimport express from 'express';\nimport bodyParser from 'body-parser';\nimport cors from 'cors';\nimport { makeExecutableSchema } from 'graphql-tools';\nimport { graphqlE...
javascript
chosen
[ { "from": "system", "value": "Stop Q from triggering lint errors\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n var sourceFiles = ['Gruntfile.js', 'lib/*.js', '*.js'];\n\n grunt.loadNpmTasks('grunt-mocha-test');\n grunt.loadNpmTasks('grunt-contrib-jshint');\n grunt....
javascript
chosen
[ { "from": "system", "value": "Add name initialization test case\n" }, { "from": "human", "value": "import { expect } from 'chai';\n\nimport Sheet from 'Src/sheet';\n\nimport sheet1x1 from 'Test/fixtures/sheet-1x1';\n\n\ndescribe('Sheet', () => {\n let sheet;\n\n it('should have data property',...
javascript
chosen
[ { "from": "system", "value": "Add with-position WeatherReport endpoint that matches groupId through MobileUser relation.\n" }, { "from": "human", "value": "module.exports = function(Weatherreport) {\n\tWeatherreport.handleChangeError = function(err) {\n\t\tconsole.warn(\"Cannot update change rec...
javascript
chosen
[ { "from": "system", "value": "Disable password change on the client\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('sentryApp')\n .config(stateConfig);\n\n stateConfig.$inject = ['$stateProvider'];\n\n function stateConfig($stateP...
javascript
chosen
[ { "from": "system", "value": "Clean bower js files now since we will be copying these from the main repo\n" }, { "from": "human", "value": "var del = require('del');\nvar _ = require('lodash');\n\nfunction clean(target, done) {\n\tvar dir = './' + target;\n\tvar deleteList = [dir + '/*'];\n\tdel...
javascript
chosen
[ { "from": "system", "value": "Move constants outside of component as they didn't really need to be in there\n" }, { "from": "human", "value": "import Event from './event';\n\nconst Day = ({ events }) => {\n\n const DAY_NAMES = [ 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag', 'Søn...
javascript
chosen
[ { "from": "system", "value": "Add css to grunt watch.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n concat: {\n options: {\n separator: ';',\n },\n dist: {\n src: ['js/a...
javascript
chosen
[ { "from": "system", "value": "Set back original jshint path\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\tgrunt.initConfig({\n\t\tjshint: {\n\t\t\toptions: {\n\t\t\t\tjshintrc: '.jshintrc'\n\t\t\t},\n\t\t\tfiles: [\n\t\t\t\t'Gruntfile.js',\n\t\t\t\t'package.json',\n\t\...
javascript
chosen
[ { "from": "system", "value": "Fix navbar anim to mouseover\n" }, { "from": "human", "value": "$(function() {\n $(\"#menu-toggle\").click(function(e) {\n e.preventDefault()\n $(\"#wrapper\").toggleClass(\"toggled\")\n })\n\n var timer\n $(window).on('mousemove', function...
javascript
chosen
[ { "from": "system", "value": "Switch to standard reporter for mocha\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar istanbul = require('gulp-istanbul');\nvar mocha = require('gulp-mocha');\nvar jscs = require('gulp-jscs');\nvar jshint = require('gulp-jshint');\n\ngulp.task('p...
javascript
chosen
[ { "from": "system", "value": "Fix for broken unit test\n" }, { "from": "human", "value": "/**\n * Author: Jeff Whelpley\n * Date: 1/21/15\n *\n * Testing out batter\n */\nvar name = 'lib/batter';\nvar taste = require('taste');\nvar batter = taste.target(name);\n\ndescribe('UNIT ' + name, f...
javascript
chosen
[ { "from": "system", "value": "Implement buildCSS task, builds emoji.css with all images base64 encoded as styles\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n // Do grunt-related things in here\n grunt.initConfig({\n pkg : grunt.file.readJSON('package.json...
javascript
chosen
[ { "from": "system", "value": "Add task for standalone file (includes dependencies)\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n grunt.initConfig({\n uglify: {\n main: {\n files: {\n 'ng-stomp.min.js': ['ng-stomp.js']\n }\n }\n }...
javascript
chosen
[ { "from": "system", "value": "Use wildcard in Gulp minify task.\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp'),\n\tnodemon = require('gulp-nodemon'),\n\tuglify = require('gulp-uglify'),\n\tsass = require('gulp-sass'),\n\tminifyCSS = require('gulp-minify-css'),\n\t...
javascript
chosen
[ { "from": "system", "value": "Modify .scss files to compile\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar autoprefixer = require('gulp-autoprefixer');\nvar uglify = require('gulp-uglify');\nvar pump = require('pump');\nvar cleanCSS = requir...
javascript
chosen
[ { "from": "system", "value": "Add set and init command to ap-npm\n" }, { "from": "human", "value": "import commander from 'commander';\nimport containerInit from './init';\nimport fs from 'fs';\nimport path from 'path';\n\ncommander\n .command('serve')\n .alias('s')\n .description('serve ap-n...
javascript
chosen
[ { "from": "system", "value": "Make sure errors result in a non-zero exit code\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nimport path from 'path';\nimport yargs from 'yargs';\n\nimport { downloadSchema, generate } from '.';\n\nyargs\n .command(\n 'download-schema <server>',\n ...
javascript
chosen
[ { "from": "system", "value": "Use new octal syntax in comment\n" }, { "from": "human", "value": "\"use strict\";\nlet platform = require('git-node-platform');\nlet jsGit = require('../.')(platform);\nlet fsDb = require('git-fs-db')(platform);\nlet fs = platform.fs;\nlet run = require('gen-run');...
javascript
chosen
[ { "from": "system", "value": "Add Chapter 05, exercise 3\n" }, { "from": "human", "value": "var agePerCentury = {};\n\nancestry.forEach(function(person) {\n var century = Math.ceil(person.died / 100);\n if (!(century in agePerCentury))\n agePerCentury[century] = [];\n\n agePerCen...
javascript
chosen
[ { "from": "system", "value": "Check for when push to buffer is false and break if so\n" }, { "from": "human", "value": "\n'use strict';\n\nconst assert = require ('assert');\nconst Duplex = require('stream').Duplex;\n\n/**\n * Creates in memory writable and readable stream\n * @return {MemDuplex...
javascript
chosen
[ { "from": "system", "value": "Remove unused variable in CRNA\n" }, { "from": "human", "value": "const mergeDirs = require('merge-dirs').default;\nconst helpers = require('../../lib/helpers');\nconst path = require('path');\nconst shell = require('shelljs');\nconst latestVersion = require('latest...
javascript
chosen
[ { "from": "system", "value": "Remove my debugging statement... again\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.or...
javascript
chosen
[ { "from": "system", "value": "Fix bug when calling `setupCalendar`\n" }, { "from": "human", "value": "import setupCalendar from './utils/setup';\r\nimport Calendar from '@/components/Calendar';\r\nimport DatePicker from '@/components/DatePicker';\r\n\r\n// Export components individually\r\nexpor...
javascript
chosen
[ { "from": "system", "value": "Change text on leave modal cancel button\n\nissue #3106\n" }, { "from": "human", "value": "var LeaveEditorController = Ember.Controller.extend({\n args: Ember.computed.alias('model'),\n\n actions: {\n confirmAccept: function () {\n var args =...
javascript
chosen
[ { "from": "system", "value": "Allow Postgres DB driver to return the list of tables\n" }, { "from": "human", "value": "async function postgres_sql(args) {\n/*\ndescription(\"Postgres function\")\nbase_component_id(\"postgres_server\")\nload_once_from_file(true)\nonly_run_on_server(true)\n*/\n ...
javascript
chosen
[ { "from": "system", "value": "Update a sample of pagination\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar assert = require('assert');\nvar pagination = require('pagination');\nvar SearchPaginator = pagination.SearchPaginator;\n\n\nvar objectList = [\n { name: 'Taro', age: 11 },\...
javascript
chosen
[ { "from": "system", "value": "Revert \"Attempt to fix fading of splash image\"\n\nThis reverts commit c7bf9d431e13746db551cd983420258f92d554a0.\n" }, { "from": "human", "value": "$(document).ready(function() {\n $(\"#splash\").hide();\n $(\"footer\").hide();\n if ($(\"#splash\").length > 0) {...
javascript
chosen
[ { "from": "system", "value": "Switch to Telemetry data for experiment usage counts\n\nIssue #1039\n" }, { "from": "human", "value": "export default {\n experimentsURL: '/api/experiments.json',\n usageCountsURL: '/api/experiments/usage_counts.json'\n};\n" }, { "from": "gpt", "value"...
javascript
chosen
[ { "from": "system", "value": "Remove non-standard keywords and add missing ones\n" }, { "from": "human", "value": "define(function (require) {\n 'use strict';\n var $ = require('jquery');\n var monaco = require('monaco');\n var cpp = require('vs/basic-languages/src/cpp');\n\n // W...
javascript
chosen
[ { "from": "system", "value": "Select the Local Folders on startup instead of last selected account\n" }, { "from": "human", "value": "function startup() {\n // Set the time zone to UTC.\n var env = Components.classes[\"@mozilla.org/process/environment;1\"]\n .getServ...
javascript
chosen
[ { "from": "system", "value": "Load JSON files in parallel\n\nThis should help remove disk as a bottleneck\n" }, { "from": "human", "value": "var map = require('through2-map');\nvar fs = require('fs');\n\nmodule.exports.create = function create_json_parse_stream(dataDirectory) {\n return map.obj...
javascript
chosen
[ { "from": "system", "value": "Handle the case where statements end in comma instead of semi-colon\n" }, { "from": "human", "value": "var fs = require('fs');\n\nfunction qmlize(text) {\n\t// replace reserved keyword as with \"as\"\n\ttext = text.replace(/([\\,\\{]\\s*)(as)(\\s*:)/gm, '$1\"$2\"$3'...
javascript
chosen
[ { "from": "system", "value": "Add isAnonymous property to anonymous user\n" }, { "from": "human", "value": "var express = require('express');\nvar User = require('../schemas/userSchema.js');\n\nvar app = express();\n\napp.get('/users', function (req, res, next) {\n if (req.isAuthenticated()) {\...
javascript
chosen
[ { "from": "system", "value": "Use local body reference instead of document.body.\n" }, { "from": "human", "value": ";(function() {\n var div, body = document.body\n if (body.style.flex == null && document.body.style.webkitFlex == null) {\n div = document.createElement(\"div\")\n div.clas...
javascript
chosen
[ { "from": "system", "value": "Use parsed types for creating objects\n" }, { "from": "human", "value": "'use strict'\n\nconst ExtDate = require('./src/date')\nconst Bitmask = require('./src/bitmask')\n\nconst { parse } = require('./src/parser')\n\nconst types = [\n 'Date', 'Year', 'Season', 'Int...
javascript
chosen
[ { "from": "system", "value": "Support for the exclude option\n" }, { "from": "human", "value": "var Transform = require('broccoli-transform');\nvar RSVP = require('rsvp');\nvar requirejs = require('requirejs');\nvar mkdirp = require('mkdirp');\nvar fs = require('fs');\nvar path = require('path')...
javascript
chosen
[ { "from": "system", "value": "Remove extraneous code from debugging" }, { "from": "human", "value": "'use strict';\n\nexports.register = function (plugin, options, next) {\n\n plugin.ext('onPreResponse', function (request, reply) {\n var res = request.response;\n if (res.source && typeof ...
javascript
chosen
[ { "from": "system", "value": "Add out parameter to avoid GC garbage\n\nFixes #1\n" }, { "from": "human", "value": "var lerp = require('lerp-array');\n\nfunction interpolateArrays(arrays, t) {\n if (t >= 1) {\n return arrays[arrays.length - 1];\n }\n if (arrays.length == 1) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use gulp-util.log instead of console.warn" }, { "from": "human", "value": "var es = require('event-stream');\nvar gutil = require('gulp-util');\nvar path = require('path');\nvar ect = require('ect');\n\nmodule.exports = function (opt) {\n opt = opt || {};\n if (!o...
javascript
chosen
[ { "from": "system", "value": "Fix bugs in previous commit" }, { "from": "human", "value": "var pkgs = ['item_paginator', 'search_paginator', 'template_paginator', 'template'];\nvar pagination = require('./lib/pagination.js');\nvar util = require('util');\nrequire('./lib/item_paginator')(paginati...
javascript
chosen
[ { "from": "system", "value": "Fix view routing in DatasetSelectCtrl\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc function\n * @name ocwUiApp.controller:DatasetSelectCtrl\n * @description\n * # DatasetSelectCtrl\n * Controller of the ocwUiApp\n */\nangular.module('ocwUiApp')...
javascript
chosen
[ { "from": "system", "value": "Allow different storage.cache to be configured for client\n" }, { "from": "human", "value": "/*jshint node:true*/\n/**\n * Strips away sensitive data from gmeConfig, use before sending it to the client.\n * @author pmeijer / https://github.com/pmeijer\n */\n\nfuncti...
javascript
chosen
[ { "from": "system", "value": "Update to simpler module generation.\n" }, { "from": "human", "value": "(function() {\n \"use strict\";\n/* global define, Ember */\ndefine('ember', [], function() {\n \"use strict\";\n\n return {\n 'default': Ember\n };\n});\n\ndefine('ember/computed', [], f...
javascript
chosen
[ { "from": "system", "value": "Add path to script in FileService\n" }, { "from": "human", "value": "const fs = require('fs')\nconst path = require('path')\n\nclass FileService {\n get scripts() {\n const folderContent = fs.readdirSync(path.join(this.configService.folderPath, 'scripts'))\n ...
javascript
chosen
[ { "from": "system", "value": "Support usage inside paralle babel inside inline-hbs\n\nFixes #444.\n\nember-cli-htmlbars-inline-precompile becomes parallelizable if all the AST transforms inside it are parallelizable. The protocol is supports is *nearly* the same as the one used by broccoli-babel-transpiler ...
javascript
chosen
[ { "from": "system", "value": "Debug resume from connection not Client\n" }, { "from": "human", "value": "const AbstractHandler = require('./AbstractHandler');\nconst Constants = require('../../../../util/Constants');\n\nclass ResumedHandler extends AbstractHandler {\n handle(packet) {\n cons...
javascript
chosen
[ { "from": "system", "value": "Set to async mode by default\n" }, { "from": "human", "value": "import { foreach } from './src/foreach.js';\n\nexport var bindings = {\n foreach: foreach\n};\n" }, { "from": "gpt", "value": "import { foreach } from './src/foreach.js';\n\nexport var bind...
javascript
chosen
[ { "from": "system", "value": "Change list type for a faster script selection\n" }, { "from": "human", "value": "#! /usr/bin/env node\n/* eslint import/no-dynamic-require: 0 */\n\nconst log = require('winston');\nconst inquirer = require('inquirer');\nconst search = require('./lib/search');\ncons...
javascript
chosen
[ { "from": "system", "value": "Check arguments after controller fetches message\n" }, { "from": "human", "value": "'use strict';\n\nconst SlackBot = require('./src/SlackBot');\nconst GitHubApiClient = require(\"./src/GitHubApiClient\");\nconst PullRequests = require('./src/PullRequests');\nconst ...
javascript
chosen
[ { "from": "system", "value": "Hide BarChart legend by default\n" }, { "from": "human", "value": "export const properties = {\n orientation: \"vertical\",\n stroke: {\n width: \"1px\"\n }\n}\n" }, { "from": "gpt", "value": "export const properties = {\n orientation:...
javascript
chosen
[ { "from": "system", "value": "Add a failing test for objects with quoted keys.\n" }, { "from": "human", "value": "import check from './support/check';\n\ndescribe('objects', () => {\n it('adds curly braces immediately around a single-line object', () => {\n check(`\n a b: c, d: e\n `...
javascript
chosen
[ { "from": "system", "value": "Add the new error to interface\n" }, { "from": "human", "value": "module.exports = {\r\n NotFound: require(\"./lib/NotFoundError.js\"),\r\n Http: require(\"./lib/HttpError.js\"),\r\n Custom: require(\"./lib/CustomError.js\"),\r\n is: require(\"./lib/is.j...
javascript
chosen
[ { "from": "system", "value": "Return a Buffer rather than a string\n\nThis was throwing the following error.\r\n\r\n```\r\n[gulp] Using file /REDACTED/Gulpfile.js\r\n[gulp] Working directory changed to /REDACTED\r\n[gulp] Running 'js'...\r\n[gulp] Finished 'js' in 4.16 ms\r\n\r\n/REDACTED/node_modules/gulp-...
javascript
chosen
[ { "from": "system", "value": "Exclude tests usinig importHref from Polymer 3\n" }, { "from": "human", "value": "window.VaadinComboBoxSuites = [\n 'vaadin-combo-box.html',\n 'toggling-dropdown.html',\n 'overlay-position.html',\n 'selecting-items.html',\n 'form-input.html',\n 'filtering.html...
javascript
chosen
[ { "from": "system", "value": "Add a warning when the package is not linked\n" }, { "from": "human", "value": "// @flow\n\nconst RNI18n = require('react-native').NativeModules.RNI18n;\nconst I18nJs = require('i18n-js');\n\nI18nJs.locale = RNI18n.languages[0];\nexport const getLanguages = RNI18n.g...
javascript
chosen
[ { "from": "system", "value": "Initialize the color picker on startup but hide it, so the editor get the correct color.\n" }, { "from": "human", "value": "var session = null, picker;\n\n// instead of windows.onload\n$(document).ready( function() {\n // hide iphone/ipad URL bar\n setTimeout(...
javascript
chosen
[ { "from": "system", "value": "Remove extraneous configuration in test setup.\n" }, { "from": "human", "value": "require.config({\n baseUrl: 'js/lib',\n paths: {\n 'test': '../../..',\n 'mocha': 'mocha/mocha',\n 'chai': 'chai/chai'\n },\n packages: [\n { name: 'md5', location: '.....
javascript
chosen
[ { "from": "system", "value": "Watch task not re-symlinking template indexes\n\nThe watch task does that now.\n" }, { "from": "human", "value": "'use strict';\n(() => {\n const debounce = (func, wait, immediate) => {\n let timeout;\n return () => {\n const context = this;\n const...
javascript
chosen