conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Tweak version compare warning to be more general\n" }, { "from": "human", "value": "var rtddata = require('./rtd-data');\n\n\nfunction init(data) {\n var rtd = rtddata.get();\n\n /// Out of date message\n\n if (data.is_highest) {\n return;\n }\n\n...
javascript
chosen
[ { "from": "system", "value": "Add ssl mode for connecting to postgrep db\n" }, { "from": "human", "value": "'use strict';\n\n/* DEPENDENCIES */\nvar usherBot = require('./usherbot');\n\n// Load local dev environment variables from .env\nif( process.env.NODE_ENV == \"DEV\" ) {\n\tvar dotenv = req...
javascript
chosen
[ { "from": "system", "value": "Put generators at top of targets (experimenting w/ convention)\n" }, { "from": "human", "value": "var path = require('path');\nvar _ = require('lodash');\nvar packageJSON = require('../json/package.json.js');\nvar sailsrc = require('../json/sailsrc');\n\n\n\n/**\n *...
javascript
chosen
[ { "from": "system", "value": "Apply selectizejs only in single selects\n" }, { "from": "human", "value": "$(function () {\n // Replace the <textarea class=\"ckeditor\"> with a CKEditor\n // instance, using default configuration.\n CKEDITOR.replaceClass = 'ckeditor';\n\n //bootstrap W...
javascript
chosen
[ { "from": "system", "value": "Rename asset part and remove image root\n" }, { "from": "human", "value": "/**\n * Load configuration objects\n */\nimport path from 'path'\nimport * as databaseConfig from './database'\nimport * as redisConfig from './redis'\nimport * as awsConfig from './aws'\n\n/...
javascript
chosen
[ { "from": "system", "value": "Use the modern files/assets APIs\n" }, { "from": "human", "value": "Package.describe({\n name: 'quark:electron',\n summary: \"Electron\",\n version: \"0.1.3\",\n git: \"https://github.com/rissem/meteor-electron\"\n});\n\nNpm.depends({\n connect: '2.11.0',\n \"...
javascript
chosen
[ { "from": "system", "value": "Add documentation link and git url" }, { "from": "human", "value": "Package.describe({\n summary: 'A standard library for node.js that abstracts differences among cloud providers'\n});\n\nPackage.on_use(function(api) {\n api.add_files(['lib/pkgcloud.js'], 'server'...
javascript
chosen
[ { "from": "system", "value": "Use check, random, and reactive-var\n" }, { "from": "human", "value": "Package.describe({\n\tname:\"lepozepo:cloudinary\",\n\tsummary: \"Upload files to Cloudinary\",\n\tversion:\"4.2.1\",\n\tgit:\"https://github.com/Lepozepo/cloudinary\"\n});\n\nNpm.depends({\n\tcl...
javascript
chosen
[ { "from": "system", "value": "Clean Up the Contributing Documentation and Process: Part VII.XXXIII\n\n* Fix the css/custom.css issues." }, { "from": "human", "value": "module.exports = function(grunt) {\n\trequire(\"time-grunt\")(grunt);\n\tgrunt.initConfig({\n\t\tpkg: grunt.file.readJSON(\"pack...
javascript
chosen
[ { "from": "system", "value": "Add iter task to Grunt\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n require('load-grunt-tasks')(grunt);\n\n grunt.initConfig({\n\n sass: {\n dist: {\n files: {\n 'css/main.css': 'sass/main.sass'\n }\n ...
javascript
chosen
[ { "from": "system", "value": "Integrate jshint in CI process.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n var pkg = grunt.file.readJSON('package.json');\n\n (function () {\n var taskName;\n for(taskName in pkg.devDependencies) {\n if(tas...
javascript
chosen
[ { "from": "system", "value": "Update grunt to watch for sass changes\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\tgrunt.loadNpmTasks('grunt-contrib-watch');\n\tgrunt.loadNpmTasks('grunt-contrib-sass');\n\tgrunt.initConfig({\n\t\twatch: {\n\t\t\tsass: {\n\t\t\t\tfiles:...
javascript
chosen
[ { "from": "system", "value": "Remove false threshold for now\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n qunit: {\n options: {\n \"--web-security\": \"no\",\n coverage: {\n src: [\"js/grande.js\"],\n inst...
javascript
chosen
[ { "from": "system", "value": "Update grunt file to generate coverage reports\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.j...
javascript
chosen
[ { "from": "system", "value": "Make sourcemaps from grunt build\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.loadNpmTasks('grunt-contrib-uglify');\n grunt.loadNpmTasks('grunt-contrib-concat');\n grunt.initConfig({\n concat: {\n 'build/pointerevents.css'...
javascript
chosen
[ { "from": "system", "value": "Set mocha tests timeout to 5s.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function (grunt) {\n // Show elapsed time at the end\n require('time-grunt')(grunt);\n // Load all grunt tasks\n require('load-grunt-tasks')(grunt);\n\n // Proje...
javascript
chosen
[ { "from": "system", "value": "Rename `release` task to `bump`.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n // Configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n jscs: {\n options: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add grunt task to minify css\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n\t/* Load Plugins */\n\n\tgrunt.loadNpmTasks('grunt-contrib-less');\n\tgrunt.loadNpmTasks('grunt-contrib-watch');\n\tgrunt.loadNpmTasks('grunt-contrib-compress');\n...
javascript
chosen
[ { "from": "system", "value": "Package the type definitions in the npm module.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n clean: {\n dist: [\"dist\"]\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Use only one test task\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n grunt.initConfig({\n clean: ['tmp/'],\n 'module-graph': {\n simple: {\n src: ['tests/assets/*.js'],\n dest: 'tmp...
javascript
chosen
[ { "from": "system", "value": "Handle server GET /api/items error\n" }, { "from": "human", "value": "import fetch from '../server/fetch';\n\nexport const REQUEST_ITEMS = 'REQUEST_ITEMS';\nfunction requestItems () {\n return {\n type: REQUEST_ITEMS,\n };\n}\n\nexport const RECEIVE_ITEMS_SUCCE...
javascript
chosen
[ { "from": "system", "value": "Fix missing dependencies in simplebar-react bundle\n" }, { "from": "human", "value": "import resolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport babel from 'rollup-plugin-babel';\nimport license from 'rollup-plugin-lice...
javascript
chosen
[ { "from": "system", "value": "Return value instead of null\n" }, { "from": "human", "value": "Kwf.Form.ShowField = Ext.extend(Ext.form.Field,\n{\n defaultAutoCreate : {tag: 'div', cls: 'kwf-form-show-field'},\n /**\n * {value} wenn kein objekt übergeben, sonst index aus objekt\n */...
javascript
chosen
[ { "from": "system", "value": "Structure - Edit depedencies path\n" }, { "from": "human", "value": "import Configuration from '../helpers/Configuration'\nimport Scene from '../components/Scene'\nimport Camera from '../components/Camera'\nimport Renderer from '../components/Renderer'\nimport Post...
javascript
chosen
[ { "from": "system", "value": "Fix issue with nested headers on page in admin area\n" }, { "from": "human", "value": "'use strict';\n\n(function ($) {\n var showBanner = function (content) {\n if (content) {\n $('header').after(content)\n }\n }\n\n var getBannerHost = function () {\...
javascript
chosen
[ { "from": "system", "value": "Add sanitation of provided name, formatting.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n /*\n Create template pages and their associated assets\n Run from the command line as follows: grunt create --name=$var\n */\n...
javascript
chosen
[ { "from": "system", "value": "Set up options structure, require dateSlug\n" }, { "from": "human", "value": "/*\n * grunt-deploy\n * https://github.com/kevinschaul/strib-deploy\n *\n * Copyright (c) 2013 Kevin Schaul\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = fu...
javascript
chosen
[ { "from": "system", "value": "fix(resolve): Fix resolving to assumed but presently not available node module relatively\n" }, { "from": "human", "value": "import resolve from \"resolve\";\n\nconst cache = {};\n\nexport default function (basedir, filename, extensions) {\n\tconst cached = cache[ba...
javascript
chosen
[ { "from": "system", "value": "Make component more solid when receiving new props\n" }, { "from": "human", "value": "import React from 'react';\n\nconst METHODS_TO_BIND = ['onImageError'];\n\nclass Image extends React.Component {\n constructor() {\n super(...arguments);\n\n METHODS_TO_BIND...
javascript
chosen
[ { "from": "system", "value": "Fix help handler for 404 message\n" }, { "from": "human", "value": "import { getLogger } from \"./logger\";\nconst logger = getLogger();\n\nconst helpTextHandlers = {\n [MISSING_404_TEXT]: showMissing404Text\n};\n\nfunction showMissing404Text () {\n logger.info(`\...
javascript
chosen
[ { "from": "system", "value": "Reduce the number of values required and put into scope.\n" }, { "from": "human", "value": "'use strict';\n\n/**@ngInject*/\nfunction FormInput() {\n return {\n restrict: 'E',\n templateUrl: '/partials/common/form_input.html',\n scope: {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix generating the first address for a pocket.\n" }, { "from": "human", "value": "/**\n * @fileOverview PocketCreateCtrl angular controller\n */\n\ndefine(['./module', 'darkwallet'], function (controllers, DarkWallet) {\n 'use strict';\n controllers.controller('Po...
javascript
chosen
[ { "from": "system", "value": "[core] Use __dirname instead of process.cwd()\n" }, { "from": "human", "value": "import ls from '../ls'\n\nconst dir = process.cwd()\n\ndescribe('ls', () => {\n it('lists all files', async () => {\n const files = await ls(dir)\n expect(files).not.toEqual([])\...
javascript
chosen
[ { "from": "system", "value": ":wrench: Fix export in right place\n" }, { "from": "human", "value": "import Arrow from './arrow'\nimport Atm from './atm'\nimport Attributes from './attributes'\nimport Bag from './bag'\nimport Bubbles from './bubbles'\nimport Cart from './cart'\nimport Checkmark f...
javascript
chosen
[ { "from": "system", "value": "Update to move enqueueTask -> enqueue\n\nPer https://issues.corp.twilio.com/browse/DEVED-3483, enqueueTask() no longer works – the lib now expects .enqueue()" }, { "from": "human", "value": "// Download the Node helper library from twilio.com/docs/node/install\n// T...
javascript
chosen
[ { "from": "system", "value": "Github: Add a max option in Github Jobs.\n" }, { "from": "human", "value": "function ddg_spice_github_jobs(api_result) {\n if (api_result.length == 0) return;\n\n var jobs = api_result;\n var query = DDG.get_query();\n var re = /(?:\\s*(?:i\\s+|we\\s+)?(...
javascript
chosen
[ { "from": "system", "value": "Change title of panel to \"Actions\" from \"Action logger\"\n" }, { "from": "human", "value": "import React from 'react';\nimport addons from '@storybook/addons';\nimport ActionLogger from './containers/ActionLogger';\nimport { ADDON_ID, PANEL_ID } from '.';\n\nexpo...
javascript
chosen
[ { "from": "system", "value": "[usecase][XWALK-3566] Update the desc of Test Steps in TypedArray\n\nImpacted tests(approved): new 0, update 1, delete 0\nUnit test platform: [Android]\nUnit test result summary: pass 1, fail 0, block 0\n" }, { "from": "human", "value": "var step = '<font class=\"fo...
javascript
chosen
[ { "from": "system", "value": "Make \"every\" the default aggregate option\n" }, { "from": "human", "value": "define('app/models/rule', ['ember'],\n //\n // Rule Model\n //\n // @returns Class\n ///\n function () {\n\n 'use strict';\n\n return Ember.Object.extend...
javascript
chosen
[ { "from": "system", "value": "Add styles to button and button text, will move to top right\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nimport {\n StyleSheet,\n Text,\n View,\n TouchableHighlight,\n} from 'react-native';\n\nclass Story extends Component{\n\...
javascript
chosen
[ { "from": "system", "value": "Add Spanish to list of available languages\n" }, { "from": "human", "value": "import Settings from 'utils/Settings';\n\nimport cs from './lang/cs';\nimport en from './lang/en';\nimport nl from './lang/nl';\nimport sk from './lang/sk';\n\nconst ALL = [\n cs,\n en,\...
javascript
chosen
[ { "from": "system", "value": "Refactor banner options to include visibility variable\n" }, { "from": "human", "value": "import React from 'react'\n\nfunction bannerClassName(level) {\n var output = 'general-banner alert'\n switch (level) {\n case 'notice': return output += ' alert-...
javascript
chosen
[ { "from": "system", "value": "Use reddit search when searching by author etc.\n" }, { "from": "human", "value": "window.onload = function(){\n\n var searchForm = document.getElementById(\"search\");\n\n if(searchForm){\n searchForm.action=\"https://www.google.com/search\"; //overrid...
javascript
chosen
[ { "from": "system", "value": "Add catch for google login and clean up google login file\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport firebase from 'firebase'\nimport { googleAuthProvider } from '../config/constants'\nimport googleLogo from '../images/auth_s...
javascript
chosen
[ { "from": "system", "value": "Add email field to subscription db model.\n" }, { "from": "human", "value": "'use strict';\n\nconst BaseRepository = require('@gfcc/mongo-tenant-repository/BaseRepository');\n\nclass SubscriptionRepository extends BaseRepository {\n getSchemaDefinition() {\n ret...
javascript
chosen
[ { "from": "system", "value": "Add active class to nav toggle logic\n" }, { "from": "human", "value": "(function(){\n \"use strict\";\n\n $(\"[data-toggle-nav]\").on(\"click\", function () {\n var el = $(this),\n target = $(el.attr(\"data-toggle-nav\"));\n\n target.toggleCl...
javascript
chosen
[ { "from": "system", "value": "Change how we detect gifs for production data." }, { "from": "human", "value": "import React from 'react'\n\nclass ImageRegion extends React.Component {\n\n renderAttachment() {\n const { content } = this.props\n let size = 'optimized'\n if (!this.attachme...
javascript
chosen
[ { "from": "system", "value": "Update error message when `currentStep` is dynamic\n" }, { "from": "human", "value": "function createErrorMessage(missingProperty) {\n return `\\`${missingProperty}\\` must be provided. This should be ensured by the build process.\n\nIf you\\'re seeing this message...
javascript
chosen
[ { "from": "system", "value": "Add exceptions to eslint config\n" }, { "from": "human", "value": "module.exports = {\n 'env': {\n 'browser': true,\n 'es6': true,\n 'node': true,\n },\n 'parser': 'babel-eslint',\n 'plugins': ['react', 'jsx-a11y', 'import'],\n 'r...
javascript
chosen
[ { "from": "system", "value": "Fix to google page object example\n" }, { "from": "human", "value": "var searchCommands = {\n submit: function() {\n this.waitForElementVisible('@submitButton', 3000)\n .click('@submitButton')\n .api.pause(1000);\n return this; // Return page object...
javascript
chosen
[ { "from": "system", "value": "Use host instead of hostname\n\n\nFormer-commit-id: 40b779195685a054d6247559f4f3fed5ac39d985\nFormer-commit-id: 426cf513caae3bca89af65bfdcfe1e5751b917d1\nFormer-commit-id: 8577ea950f5083c9f65a589b2ac1bacb1646f749" }, { "from": "human", "value": "/**\n * Created by c...
javascript
chosen
[ { "from": "system", "value": "Reset input if value is \"\"\n" }, { "from": "human", "value": "Validator = {};\n\nValidator.addValidator = function (index, el) { // This function is called in $().each(). The first arg will be an index. Though we dont need it\n\t$el = $(el);\n\t// Add function by ...
javascript
chosen
[ { "from": "system", "value": "Change passenger schema to have a single ticket\n- instead of multiple tickets\n" }, { "from": "human", "value": "exports.up = function(knex, Promise) {\n return knex.schema.createTable('passengers', table => {\n table.increments('id')\n .unsigned()\n .pri...
javascript
chosen
[ { "from": "system", "value": "Add message when no search results. Begin filter functionality.\n" }, { "from": "human", "value": "/**\n * Search functionality for filtering tiles.\n *\n * Matt Weeks\n */\n\nfunction stuff() {\n\tvar $frame = $('#projectScroller');\n\tremoveEDR(document.getElement...
javascript
chosen
[ { "from": "system", "value": "Store Piece object in `isHoldingPiece`.\n" }, { "from": "human", "value": "import Shogi from '../src/shogi';\n\nconst InitialState = {\n board: Shogi.Board.board,\n isHoldingPiece: false\n};\n\nconst ShogiReducer = (state = InitialState, action) => {\n return sta...
javascript
chosen
[ { "from": "system", "value": "API: Use IS_PRODUCTION instead of duplicate logic\n\nSigned-off-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee6dbfc9507dffd22@gmail.com>\n" }, { "from": "human", "value": "// @flow\n\nimport qs from 'query-string'\n\nlet root: string\n\nexport function setApiRoot(url:...
javascript
chosen
[ { "from": "system", "value": "Change the timer to 1 second\n" }, { "from": "human", "value": "function like(e) {\n\tsetTimeout(function() {\n\t\tTi.API.info(\"like\");\n\t\te.source.backgroundColor = (e.source.backgroundColor === Alloy.Globals.defaultColor) ? Alloy.Globals.likedColor : Alloy.Glo...
javascript
chosen
[ { "from": "system", "value": "Fix sorting of yearly views\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = (id, unique) => {\n\n\tconst aggregation = [\n\t\t{\n\t\t\t$match: {\n\t\t\t\tdomainId: id\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t$group: {\n\t\t\t\t_id: {\n\t\t\t\t\tyear: {\n\t...
javascript
chosen
[ { "from": "system", "value": "Fix bug that prevented vertical rhythm scaling for 0 values\n" }, { "from": "human", "value": "import ms from 'modularscale'\n\n// Calculate box model values that conforms to the established Vertical Rhythm\nexport function boxModelRuleVerticalRhythm (\n size,\n {...
javascript
chosen
[ { "from": "system", "value": "Check if menu exists before attaching events to it.\n" }, { "from": "human", "value": "window.addEventListener(\"load\", function(event) {\n var menu = document.getElementById(\"contentAreaContextMenu\");\n menu.addEventListener(\"popupshowing\", setupMenuItem...
javascript
chosen
[ { "from": "system", "value": "Add yield handler example in devapp\n" }, { "from": "human", "value": "var Controller = require('../../').Controller;\n\nmodule.exports = Controller.create({\n index(req, res) {\n res.render(\"index\");\n },\n\n \"403\"(req, res) {\n throw new...
javascript
chosen
[ { "from": "system", "value": "Add global namespace to Qunit check\n\nWhen using an alternative test framework (Mocha) Qunit is not a global variable.\n" }, { "from": "human", "value": "/* globals QUnit */\nif (QUnit) {\n QUnit.config.urlConfig.push({ id: 'nojscs', label: 'Disable JSCS' });\n}\n...
javascript
chosen
[ { "from": "system", "value": "Rebuild dist for v1.0.0 launch\n" }, { "from": "human", "value": "function _isExpressApp(maybe){return!!maybe&&!!maybe.set&&!!maybe.use}function _charge(theGeneral){if(cluster.isMaster)for(var i=0;cpus>i;i++)cluster.fork();else theGeneral.listen(theGeneral.port||3e3...
javascript
chosen
[ { "from": "system", "value": "Stop feature extraction for reader mode when <body> isn't there yet\n\nBUG=495318\n\nReview URL: https://codereview.chromium.org/1251293002\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#345389}\n" }, { "from": "human", "value": "// Copyright 2015...
javascript
chosen
[ { "from": "system", "value": "Return response without calling scripts if the input data is invalid\n" }, { "from": "human", "value": "\"use strict\"\n\nconst path = require('path');\nconst exec = require('child_process').exec;\n\n\nconst setSSID = (req, res) => {\n\n const ssid = req.body['ss...
javascript
chosen
[ { "from": "system", "value": "Fix accidental context menu opening in Windows\n" }, { "from": "human", "value": "import $ from 'jquery'\n\nexport default function GameScene(display) {\n return function (container) {\n let handler = () => false\n $(window).on('touchstart', handler)\n sho...
javascript
chosen
[ { "from": "system", "value": "Make image upload work in all cases\n" }, { "from": "human", "value": "$( document ).ready( function() {\n function showUploadedImage( source ) {\n $( \"#userImage\" ).attr( \"src\", source );\n }\n $( \"#image-form\" ).submit( function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Kill enemy with correct color\n" }, { "from": "human", "value": "'use strict';\n\nvar Entities = {\n Player: require('../entities/player'),\n PlayerShot: require('../entities/playershot'),\n Enemy: require('../entities/enemy')\n};\n\nvar CollisionSystem = (...
javascript
chosen
[ { "from": "system", "value": "Sort service status types by relevance\n" }, { "from": "human", "value": "var ServiceStatusTypes = {\n RUNNING: 0,\n DEPLOYING: 1,\n SUSPENDED: 2,\n NA: 4,\n DELAYED: 5,\n WAITING: 6\n};\n\nmodule.exports = ServiceStatusTypes;\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Fix regex in rule-parser for control chars\n\nForgot to add the grouping brackets ([]) before.\n" }, { "from": "human", "value": "// L-System Rule Parser\nfunction RuleParser(str) {\n this.str = str;\n this.rules = {};\n\n this.parse = function() {\n var c, d;...
javascript
chosen
[ { "from": "system", "value": "Add param to set PageAlert display duration\n" }, { "from": "human", "value": "define([\n 'jquery',\n 'underscore',\n 'backbone',\n '../utils/animation',\n], function ($, _, Backbone, Animation) {\n\n var PageAlertView = Backbone.View.extend({\n\n el: '#pag...
javascript
chosen
[ { "from": "system", "value": "Fix issue with urls not saving\n" }, { "from": "human", "value": "window.addEventListener('DOMContentLoaded', function() {\n\n var save = document.getElementById('save');\n var urls = document.getElementById('urls');\n\n urls.value = Settings.getUrls();\n\n urls...
javascript
chosen
[ { "from": "system", "value": "Add Salmon Run (S3) tab to schedule\n" }, { "from": "human", "value": "import React, { useState } from 'react';\nimport ScheduleContents from './ScheduleContents';\nimport ScheduleTabs from './ScheduleTabs';\n\nconst data = [\n {\n id: 'regular3',\n ref: 'spl...
javascript
chosen
[ { "from": "system", "value": "Fix filter bug on nits\n" }, { "from": "human", "value": "exercism.views.SelectFilter = Backbone.View.extend({\n el: $('#pending-submissions'),\n\n events: {\n \"click #filter-nits\": \"nitHandler\",\n \"click #filter-opinions\": \"opinionHandler\",\n },\n\...
javascript
chosen
[ { "from": "system", "value": "Add TODO as reminder to add chai as required module\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar mochify = require('mochify');\nvar config = require('../config').js;\n\ngulp.task('mochify', function () {\n mochify( config.test, {\n report...
javascript
chosen
[ { "from": "system", "value": "Remove consistent JSX tag closing check\n\nStandardJS is getting this rule in standard v14.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst walkSync = require('walk-sync')\nconst fs = require('fs')\nconst path = require('path')\n\nlet hasErrors = fal...
javascript
chosen
[ { "from": "system", "value": "Fix extension to work with latest state changes\n\nRefs flarum/core#2150.\n" }, { "from": "human", "value": "import { extend } from 'flarum/extend';\nimport LinkButton from 'flarum/components/LinkButton';\nimport IndexPage from 'flarum/components/IndexPage';\nimport...
javascript
chosen
[ { "from": "system", "value": "fix: Update correct snapper when options change\n" }, { "from": "human", "value": "angular.module('snap')\n .directive('snapContent', ['snapRemote', function (snapRemote) {\n 'use strict';\n return {\n restrict: 'AE',\n link: function postLink(scope...
javascript
chosen
[ { "from": "system", "value": "Change alertMessages module namespace to vlui\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('polestar')\n .directive('alertMessages', function(Alerts) {\n return {\n templateUrl: 'components/alertmessages/alertmessages.html',\n res...
javascript
chosen
[ { "from": "system", "value": "Allow extensions to be sent as well - maybe we should consider just allowing opts.browserifyOpts\n" }, { "from": "human", "value": "var browserify = require('browserify'),\n path = require('path');\n\nmodule.exports = function(opts){\n\n var routerPath;\n if (t...
javascript
chosen
[ { "from": "system", "value": "[BPK-434] Add comment about BpkDataTableComment usage\n" }, { "from": "human", "value": "/*\n * Backpack - Skyscanner's Design System\n *\n * Copyright 2017 Skyscanner Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use ...
javascript
chosen
[ { "from": "system", "value": "Add series (and number) to book\n" }, { "from": "human", "value": "'use strict';\nvar mongoose = require('mongoose')\n\nvar schema = mongoose.Schema({\n name: String,\n altName: String,\n author: {type: mongoose.Schema.Types.ObjectId, ref: 'Person', $p: {widget:...
javascript
chosen
[ { "from": "system", "value": "Add before and after create hooks to Vote\n" }, { "from": "human", "value": "module.exports = function (sequelize, DataTypes) {\n const Vote = sequelize.define('Vote', {\n id: {\n primaryKey: true,\n type: DataTypes.UUID,\n defaultValue: DataTypes...
javascript
chosen
[ { "from": "system", "value": "Make the ABV response more verbose\n" }, { "from": "human", "value": "module.exports = {\n\tcommands: {\n\t\tunits: {\n\t\t\thelp: 'Get UK alcohol units from ABV and volume (in ml)',\n\t\t\tusage: [ 'abv', 'volume' ],\n\t\t\tcommand: function ( bot, msg ) {\n\t\t\t\...
javascript
chosen
[ { "from": "system", "value": "Fix Jackson failure when id:null was present in the json request\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport DS from 'ember-data';\n\n// Adapted from http://springember.blogspot.com.au/2014/08/using-ember-data-restadapter-with.html\nexport ...
javascript
chosen
[ { "from": "system", "value": "Remove the period from not found config file error message\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('Inp...
javascript
chosen
[ { "from": "system", "value": "Remove return from redis object" }, { "from": "human", "value": "'use strict';\n\n\nvar redis = require('redis'),\n parse = require('url').parse;\n\n\nvar RedisClient = function(connectionURL) {\n var options = this.parseURL(connectionURL);\n this.hostname = op...
javascript
chosen
[ { "from": "system", "value": "Fix path delimeter when running under Windows\n" }, { "from": "human", "value": "'use strict';\n// Gathered from http://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search\nexports.walk = function (dir) {\n var fs = require('fs');\n v...
javascript
chosen
[ { "from": "system", "value": "Fix auto remove thanks to @themouette\n" }, { "from": "human", "value": "/*global window */\ndefine(\n [\n 'text!templates/canvas.html',\n 'underscore',\n 'jquery',\n 'backbone',\n 'ventilator'\n ],\n function (template, _...
javascript
chosen
[ { "from": "system", "value": "Make sure to return callback\n\n" }, { "from": "human", "value": "// sends messages to server\n\nconst request = require('request');\nconst Callback = require('events');\n\nclass LoginCallback extends Callback {}\nclass SendMessageCallback extends Callback {}\nclass...
javascript
chosen
[ { "from": "system", "value": "Add direct access to Use case methods from application\n" }, { "from": "human", "value": "export default class OpenAds {\n constructor ({container}) {\n this._container = container\n }\n\n findAdsUseCase () {\n return this._container.getInstance({key: 'Find...
javascript
chosen
[ { "from": "system", "value": "Add Select2 tags support using select in bootstrappSelect2\n" }, { "from": "human", "value": "$.fn.bootstrappSelect2 = function(options) {\n var select2;\n this.each(function(offset, element){\n var opts = $.extend({}, options);\n element = $(ele...
javascript
chosen
[ { "from": "system", "value": "Disable the assigned list when changing to the next status\n" }, { "from": "human", "value": "$(function() {\n\n var $nextStatus = $('.next-status-choice');\n var $assigned = $('.assigned-choice');\n\n var workflowId = $('.workflow-hidden').val();\n var ...
javascript
chosen
[ { "from": "system", "value": "Apply Widget.methods() patch from mithrandi, plus some more stuff\n\nThis changes pretty much everything to use Widget.methods() \nto define methods. It also changes athenatest to use jsClass \nmost everyplace, and cleans up the \"test harness\" a bit.\n" }, { "from": ...
javascript
chosen
[ { "from": "system", "value": "Add one missing return type.\n" }, { "from": "human", "value": "// @flow\nconst isKataLine = (line) => line.trim().startsWith('////');\nconst enableKataLine = (line) => line.replace(/\\/\\/\\/\\/\\s*/, '');\nconst removeLinesAfterKataLine = (_, lineIndex, lines) => ...
javascript
chosen
[ { "from": "system", "value": "Delete extra white space at bottom of doc\n" }, { "from": "human", "value": "var colors = [\"red\", \"blue\", \"magenta\", \"yellow\"]\nvar names = [\"Dan\", \"Dave\", \"Eleanor\", \"Rupert\"]\n\ncolors.push(\"green\")\nnames.push(\"Nathaniel\")\n\nhappyHorses = {}\...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary multi line render\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { compose } from 'redux';\nimport { withRouter } from 'react-router';\nimport { connect } from 'react-redux';\nimport { Board } from ...
javascript
chosen
[ { "from": "system", "value": "Fix route name in unit test\n" }, { "from": "human", "value": "require('rootpath')();\nconst { describe, it, expect, server } = require('tests/helper');\nconst route = require('app/features/status');\nconst { name, version, description } = require('package');\n\ndes...
javascript
chosen
[ { "from": "system", "value": "Change the color for control blacks to make it slightly darker.\n\nChange-Id: Ie8af4309cdcf8c5bd5c09acc80a3f98dfa40bebd\n" }, { "from": "human", "value": "Blockly.HSV_SATURATION = 0.7;\nBlockly.CONTROL_CATEGORY_HUE = [196, 157, 59];\nBlockly.LOGIC_CATEGORY_HUE = [11...
javascript
chosen
[ { "from": "system", "value": "Call the items going into the pool simply item rather than callback\n" }, { "from": "human", "value": "jsio('from shared.javascript import Class')\n\nexports = Class(function(){\n\t\n\tthis.init = function() {\n\t\tthis._pool = {}\n\t\tthis._counts = {}\n\t\tthis._u...
javascript
chosen