conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update test, fix test size\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar assert = require('chai').assert;\nvar xdTesting = require('../../lib/index')\nvar templates = require('../../lib/templates');\nvar q = require('q');\n\ndescribe('MultiDevice - selec... | javascript | chosen |
[
{
"from": "system",
"value": "Add submit button to upload images dialog\n"
},
{
"from": "human",
"value": "function addImageToExperienceForm(experienceID) {\n var assetURL = \"/users/\" + getCurrentUser() + \"/assets/new\"\n $.ajax({\n method: \"get\",\n url: assetURL,\n })\n .done(fun... | javascript | chosen |
[
{
"from": "system",
"value": "Remove info message after 5sec.\n"
},
{
"from": "human",
"value": "define([\"app/app\",\n \"ember\"], function(App, Ember) {\n \"use strict\";\n\n App.ApplicationController = Ember.Controller.extend({\n hasMessage: function() {\n var message = this.... | javascript | chosen |
[
{
"from": "system",
"value": "Move process.nextTick() to run() method\n\nHope this fixes the tests. Thanks @janmeier\n"
},
{
"from": "human",
"value": "var util = require(\"util\")\n , EventEmitter = require(\"events\").EventEmitter\n\nmodule.exports = (function() {\n var CustomEventEm... | javascript | chosen |
[
{
"from": "system",
"value": "Edit function for password validation\n"
},
{
"from": "human",
"value": "import bcrypt from 'bcrypt';\n\nmodule.exports = {\n encryptPassword(password) {\n const passwordHash = bcrypt.hashSync(password, 10);\n return passwordHash;\n },\n\n};\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Delete references field to fix userId and groupId bugs\n"
},
{
"from": "human",
"value": "module.exports = {\n up: (queryInterface, Sequelize) => queryInterface.createTable('Messages', {\n id: {\n allowNull: false,\n autoIncrement: true,\n primary... | javascript | chosen |
[
{
"from": "system",
"value": "Return same function if length doesn't differ\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar test = function (a, b) {}, desc, defineProperty\n , generate, mixin;\n\ntry {\n\tObject.defineProperty(test, 'length', { configurable: true, writable: false,\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Use let instead of var\n"
},
{
"from": "human",
"value": "import Shogi from '../src/shogi';\nimport * as CONST from '../constants/actionTypes';\n\nconst InitialState = {\n board: Shogi.Board,\n isHoldingPiece: undefined\n};\n\nconst ShogiReducer = (state = Initial... | javascript | chosen |
[
{
"from": "system",
"value": "Convert to either pure CommonJS or pure ES6 (ES6, in this case)\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nimport ComponentRenderer from './src/templates/component-renderer-with-pagination'\n\nexports.replaceComponentRenderer = ({ props, loader ... | javascript | chosen |
[
{
"from": "system",
"value": "Create sourceMap for minified js\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n\n // 1. All configuration goes here\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n concat: {\n igv: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add braintree_error script into manifest\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//... | javascript | chosen |
[
{
"from": "system",
"value": "Fix format of messages for teamcity:\n1. Replace \" by ' - because Teamcity can't process messages with \"\n2. Change messages structrure\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar util = require('util');\n/**\n * @param {Errors[]} errorsCollection\n */... | javascript | chosen |
[
{
"from": "system",
"value": "Remove tappable by default mixin\n"
},
{
"from": "human",
"value": "// This is a function that decorates React's createClass.\n// It's used only internally in this library,\n// but could be used externally eventually.\n\n// See the mixins for more information on wha... | javascript | chosen |
[
{
"from": "system",
"value": "CrateTomlCopy: Convert `toggleClipboardProps()` to ember-concurrency task\n"
},
{
"from": "human",
"value": "import { action } from '@ember/object';\nimport { later } from '@ember/runloop';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glim... | javascript | chosen |
[
{
"from": "system",
"value": "Rename parameters from photo to gif to get more meaningful names\n"
},
{
"from": "human",
"value": "// URLs grom telegram\nconst TELEGRAM_BASE_URL = 'https://api.telegram.org';\nconst TELEGRAM_MESSAGE_PHOTO_ENDPOINT = '/sendPhoto';\nconst DEFAULT_PHOTO_URL = 'http:/... | javascript | chosen |
[
{
"from": "system",
"value": "Remove deferred as not needed\n"
},
{
"from": "human",
"value": "/**\n * Date: 1/9/15\n * Author: Shirish Goyal\n */\n\n(function () {\n 'use strict';\n\nangular\n .module('crowdsource.interceptor', [])\n .factory('AuthHttpResponseInterceptor', AuthHttpRespon... | javascript | chosen |
[
{
"from": "system",
"value": "Load all default mastic polyfills in server\n"
},
{
"from": "human",
"value": "const mastic = require('./server.js');\nconst { promise } = require('mastic-polyfills/bundles');\n\nconst server = mastic({\n\tpolyfills: [promise]\n});\n\nserver.listen();\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Remove img task from grunt build\n\nAs it takes ages, and it always seems to change the images every time someone else runs it. Probably no one else will ever need to update the images, or very rarely, in which case they can manually run the build img task.\n"
},
{
"fro... | javascript | chosen |
[
{
"from": "system",
"value": "Add es2015 preset to babel\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n \"babel\": {\n options: {\n sourceMap: false\n },\n dist: {\n files: [\n {\n \"expand\": true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add front end ajax call\n"
},
{
"from": "human",
"value": "\n(function() {\n var metaKeyword = '';\n var src = window.location.href;\n var metas = document.getElementsByTagName('meta');\n for (i in metas) {\n console.log(metas[i]);\n if (metas[i].name && m... | javascript | chosen |
[
{
"from": "system",
"value": "Move function creation out of loop\n\nLinter complained (it's not actually moved out of it though, function creation still occurs within the loop)\n"
},
{
"from": "human",
"value": "\"use strict\";\n/*global describe */\n/*global it */\n\nconst assert = require(\"as... | javascript | chosen |
[
{
"from": "system",
"value": "Add new fields and add method to set notification as read\n"
},
{
"from": "human",
"value": "Notifications = new Mongo.Collection('notifications');\n\n// TODO add allow/deny rules\n// user is owner of project - deny\n// user is not logged in - deny\n\ncreateRequestN... | javascript | chosen |
[
{
"from": "system",
"value": "Allow setting hide text related css classes on wrapper\n\nSo far the css classes `hide_content_with_text` and\n`no_hidden_text_indicator` had to be present on the page's `section`\nelement. Allowing them also on the `.content_and_background` wrapper\nelement makes things much e... | javascript | chosen |
[
{
"from": "system",
"value": "Read note on and control change events from MIDI input\n"
},
{
"from": "human",
"value": "var MidiInput = function() {\n this.init = function(visualizer) {\n this.visualizer = visualizer;\n\n if (navigator.requestMIDIAccess) {\n navigator.requestMIDIAc... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for upload-validation-active helper.\n"
},
{
"from": "human",
"value": "\nimport { uploadValidationActive } from 'preprint-service/helpers/upload-validation-active';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Helper | upload validation active... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo on a keyup handler that was causing chrome to throw errors on every key press\n"
},
{
"from": "human",
"value": "$(function() {\n $('body').on('click', '[data-apos-search-filter]', function() {\n $(this).closest('form').submit();\n });\n $('body').on(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix exception for 'load' on jQuery 1.8 and above\n\nThe 'load' event has been deprecated for a couple of years, and thus broke the plugin."
},
{
"from": "human",
"value": "/**\n * Script for AutoTabber\n * Handles Tab Keypress\n * @author MarcosBL <soy@marcosbl.com>... | javascript | chosen |
[
{
"from": "system",
"value": "Use console.warn instead of console.error\n"
},
{
"from": "human",
"value": "(function() {\n // Resolves string keys with dots in a deeply nested object\n // http://stackoverflow.com/a/22129960/4405214\n var resolveObject = function(path, obj) {\n return path\... | javascript | chosen |
[
{
"from": "system",
"value": "Add hide alert action creator\n"
},
{
"from": "human",
"value": "export function changeLocation(location) {\n return {\n type: 'CHANGE_LOCATION',\n location\n };\n}\n\nexport function changeUnitType(unitType) {\n return {\n type: 'CHANGE_UNIT_TYPE',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add an emitter to AbstractComponent\n"
},
{
"from": "human",
"value": "/** @babel */\n\nimport etch from 'etch'\n\nimport {CompositeDisposable} from 'atom'\n\nexport default class AbstractComponent {\n constructor(properties, children, callback) {\n if (properti... | javascript | chosen |
[
{
"from": "system",
"value": "Add colored output to repl\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/*!\n * BALLZ repl module\n *\n * @author pfleidi\n */\n\nvar Readline = require('readline');\nvar Util = require('util');\n\nvar Parser = require('../lib/parser');\nvar Environment... | javascript | chosen |
[
{
"from": "system",
"value": "Set up tests to log in on first getting to the site\n"
},
{
"from": "human",
"value": "var chai = require('chai');\nvar chaiAsPromised = require('chai-as-promised');\nchai.use(chaiAsPromised);\n\nvar expect = chai.expect;\n\nmodule.exports = function() {\n\n disc... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor layout controllers layout attributes to static members\n"
},
{
"from": "human",
"value": "Space.Object.extend('Todos.LayoutController', {\n\n mixin: [\n Space.messaging.EventSubscribing\n ],\n\n dependencies: {\n layout: 'Layout',\n _: 'undersco... | javascript | chosen |
[
{
"from": "system",
"value": "Set each slide to have it's own z-index.\n"
},
{
"from": "human",
"value": "(function () {\n\n // Set to true to show console.log for debugging\n var DEBUG_MODE = true;\n\n 'use strict';\n\n var Slide = function (title) {\n\n // Constructor\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Stop checking server features to determine enterprise vs. standard\n"
},
{
"from": "human",
"value": "import { withName } from './shared';\nimport { FEATURES } from 'data/columns';\n\nexport default function isEnterprise(modules) {\n const serverModule = modules.fi... | javascript | chosen |
[
{
"from": "system",
"value": "Implement scalar/vector multiply and divide\n"
},
{
"from": "human",
"value": "export default class Vector2 {\n\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n\n set(x, y) {\n this.x = x;\n this.y = y;\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Enhance nav component and introduce prefix prop\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport classnames from 'classnames';\nimport { GridContainer, GridRow, GridCol } from '../Grid';\n\nconst Nav = props => (\n <div\n className={classnam... | javascript | chosen |
[
{
"from": "system",
"value": "Change URLs so they can live aside eachother.\n\nException: /wrm.aspx for saving..."
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\n\nvar config = require('./config');\nvar bodyParser = require('body-parser');\nvar morgan = ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to a truly unique key\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport Example from './Example';\nimport Props from './Props';\n\nconst ComponentPage = ({component}) => {\n const {name, description, p... | javascript | chosen |
[
{
"from": "system",
"value": "Replace promise with async await and handle error cases\n"
},
{
"from": "human",
"value": "import fetch from 'node-fetch';\n\nimport { userModel } from '../models/index';\n\nexport const authenticatedWithToken = (req, res, next) => {\n let csrf;\n let jwt;\n\n if... | javascript | chosen |
[
{
"from": "system",
"value": "Fix name of readFile test\n"
},
{
"from": "human",
"value": "var path = require('path'),\n fs = require('fs'),\n crypto = require('crypto');\n\ndescribe(\"readFile functionality\", function() {\n var _this = this;\n require('./harness.js')(_this);\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor solution to use regex and map\n"
},
{
"from": "human",
"value": "// look for groups of matching characters\n// pass each group to say() and concatenate returns\nvar look = function(lookString) {\n var i = 0;\n var j = 1;\n var sayString = '';\n\n while ... | javascript | chosen |
[
{
"from": "system",
"value": "Set default contentStyle prop to make message more readable\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Snackbar from 'material-ui/Snackbar';\nimport { red900, grey50 } from 'material-u... | javascript | chosen |
[
{
"from": "system",
"value": "Update helper to set auth type.\n"
},
{
"from": "human",
"value": "/**\n * setupSiteKit utility.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for textbox view bridge causing recursion\n"
},
{
"from": "human",
"value": "var bridge = function (presenterPath) {\n window.rhubarb.viewBridgeClasses.HtmlViewBridge.apply(this, arguments);\n};\n\nbridge.prototype = new window.rhubarb.viewBridgeClasses.HtmlV... | javascript | chosen |
[
{
"from": "system",
"value": "Add email api url requirement\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar config = require(\"12factor-config\");\n\nvar appConfig = config({\n apiUrl: {\n env: \"AGFAPHD_WEBAPP_API_URL\",\n type: \"string\",\n default: \"http://localhost:8089... | javascript | chosen |
[
{
"from": "system",
"value": "54: Use route names instead of paths.\n"
},
{
"from": "human",
"value": "Template.HostCreate.events({\n 'submit form' : function (event, template) {\n event.preventDefault();\n\n // Define form field variables.\n var hostname = event.target.hostname.value,... | javascript | chosen |
[
{
"from": "system",
"value": "Once: Remove assert on event.name (handled somewhere else)\n"
},
{
"from": "human",
"value": "const assert = require('assert');\n'use strict';\n\n\n/**\n * Once middleware will block an event if there is already a scheduled event\n * @param {Event} event the event t... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak stars size on retina devices\n"
},
{
"from": "human",
"value": "(function () {\n function initTwinklingStars() {\n particlesJS('stars', {\n particles: {\n number: {\n value: 180,\n densi... | javascript | chosen |
[
{
"from": "system",
"value": "Set organization code to fhirdemo\n"
},
{
"from": "human",
"value": "var moment = require('moment');\n\nvar System = {\n\n create: function(activityInstance, user, language, nation) {\n\n var now = moment();\n\n return {\n \"User\": {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to set link target (_self to change current window's location)\n"
},
{
"from": "human",
"value": "require(['gitbook'], function(gitbook) {\n\n gitbook.events.bind('start', function(e, config) {\n var opts = config.toolbar;\n \n if (!opt... | javascript | chosen |
[
{
"from": "system",
"value": "Update PropTypes of ReadModeModal component\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\n\nimport { Modal } from 'react-bootstrap';\n\nconst ReadModeModal = props => (\n <div>\n <Modal.Header>\n <Modal.Title>{props.recipe.na... | javascript | chosen |
[
{
"from": "system",
"value": "Add title and permanent flag to token model\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst mongoose = require('mongoose')\nconst uuid = require('uuid').v4\n\nconst schema = new mongoose.Schema({\n\tid: {\n\t\ttype: String,\n\t\trequired: true,\n\t\tunique:... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize and classify only res.locals.scripts as not found\n"
},
{
"from": "human",
"value": "/*\n * Ensures something has been found during the request. Returns 404 if\n * res.template is unset, res.locals is empty and statusCode has not been set\n * to 204.\n *\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use expect.shift instead of building an array of arguments for expect when delegating to the next assertion.\n"
},
{
"from": "human",
"value": "var BufferedStream = require('bufferedstream');\nvar createMockCouchAdapter = require('./createMockCouchAdapter');\nvar ht... | javascript | chosen |
[
{
"from": "system",
"value": "Modify the configuration of fis to remove the useless configurations\n"
},
{
"from": "human",
"value": "// default settings. fis3 release\n\n// Global start\nfis.match('src/ui-p2p-lending.less', {\n parser: fis.plugin('less'),\n rExt: '.css'\n})\n\nfis.match('src/... | javascript | chosen |
[
{
"from": "system",
"value": "Add single player wrapper div\n\nKeeps structure consistent with the full player, and enable props like `className` and `wrapper`\nFixes https://github.com/CookPete/react-player/issues/346\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use unix fs-watch for OSX because of problems with OSX Lion\n"
},
{
"from": "human",
"value": "module.exports = process.platform === \"linux\" ?\n require(\"./watch-tree-unix\") :\n require(\"./watch-tree-generic\");\n"
},
{
"from": "gpt",
"value":... | javascript | chosen |
[
{
"from": "system",
"value": "Disable async/await to run on v6\n"
},
{
"from": "human",
"value": "import { expect } from 'chai';\nimport jsf from '../../../src';\n\n/* global describe, it */\n\ndescribe('Random Generation', () => {\n it('should generate all the fields with alwaysFakeOptionals o... | javascript | chosen |
[
{
"from": "system",
"value": "Hide the selected state when already on it\n"
},
{
"from": "human",
"value": "// @flow\nimport type {Snapshot, SnapshotItem} from 'redux-ship';\n\nexport type State = {\n logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[],\n selectedLog: ?number,\n selecte... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dependency loading order for checkbox\n"
},
{
"from": "human",
"value": "//= require ./core\n//= require ./mixins\n//= require ./forms\n//= require_tree ./forms\n//= require_tree ./views"
},
{
"from": "gpt",
"value": "//= require ./core\n//= require ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Register query on create.\"\n\nThis reverts commit 9b1d857a288861a8a93acb242c05d1830e61a7e5.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar DataStore = require('./regard-data-store.js');\nvar Chart = require('../schemas/chart.js')... | javascript | chosen |
[
{
"from": "system",
"value": "Destroy any old bind, makes this function repeat-callable\n"
},
{
"from": "human",
"value": "function hook_menu(){\n $.contextMenu({\n selector: '.feeder_entry', \n callback: function(key, options) {\n if(key == 'gallery'){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Throw errors that cause a redirect to make debugging easier\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst { Controller, computed } = Ember;\n\nexport default Controller.extend({\n error: null,\n\n errorStr: computed('error', function() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure there actually is an object"
},
{
"from": "human",
"value": "var txt_cache='604800';chrome.webRequest.onHeadersReceived.addListener(function(object){'use strict';var object_type=object.type.toLowerCase();if((object_type!=='main_frame')&&(object_type!=='sub... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing Station super() call\n\n"
},
{
"from": "human",
"value": "import { EventEmitter } from 'events'\nimport PouchDB from 'pouchdb'\nimport Serial from '../serial'\nimport Classifier from './classifier'\nimport { parser, dataHandler } from './data-handler'\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Hide video until it's playable and show loading message\n"
},
{
"from": "human",
"value": "var videoStyle = {\n width: '100%',\n height: '100%',\n backgroundColor: '#000'\n};\n\nvar WatchPage = React.createClass({\n propTypes: {\n name: React.PropTypes.string... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Clock weekday to always return a time in the future\n"
},
{
"from": "human",
"value": "var Clock = module.exports;\n\nClock.weekday = function(weekday, hour, minute, seconds) {\n return moment({ hour: hour, minute: minute, seconds: seconds }).day(weekday).unix(... | javascript | chosen |
[
{
"from": "system",
"value": "Add personal areas to prevent merge conflicts.\n"
},
{
"from": "human",
"value": "var plugins = require('gulp-load-plugins')({\n lazy: true\n});\n\n\n////////// TASKS ////////////\n\n/**\n * Prints out the list of available tasks.\n */\ngulp.task('default', plugin... | javascript | chosen |
[
{
"from": "system",
"value": "Correct color value for Black\n"
},
{
"from": "human",
"value": "module.exports = {\n\tBLACK: 1,\n\tRED: 1,\n\tGREEN: 2,\n\tBLUE: 3\n\n}"
},
{
"from": "gpt",
"value": "module.exports = {\n\tBLACK: 0,\n\tRED: 1,\n\tGREEN: 2,\n\tBLUE: 3\n\n}"
}
] | javascript | chosen |
[
{
"from": "system",
"value": "Add missing \"domReady\" module declaration\n"
},
{
"from": "human",
"value": "require.config({\n paths: {\n \"jquery\": \"js/jquery-2.1.4.min\",\n \"underscore\": \"js/underscore-min\",\n \"knockout\": \"js/knockout-min-3.3.0\"\n }\n});\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update CC BY 3.0 link to zh-TW localized version.\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this softwar... | javascript | chosen |
[
{
"from": "system",
"value": "Add file paths to icons\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2017-present, Hippothesis, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source t... | javascript | chosen |
[
{
"from": "system",
"value": "Call completion callback in test:run\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar tsc = require('gulp-tsc');\nvar tape = require('gulp-tape');\nvar tapSpec = require('tap-spec');\nvar del = require('del');\n\ngulp.task(\"test:clean\", function... | javascript | chosen |
[
{
"from": "system",
"value": "Modify files globs to include all files\n\nThe wildcard pattern was not picking up CNAME. Now it does.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar watch = require('gulp-watch');\nvar harp = require('harp');\nvar browserSync =... | javascript | chosen |
[
{
"from": "system",
"value": "Add renaming of index.js to memefy.js\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst browserify = require('gulp-browserify');\nconst pkg = require('./package.json')\n\ngulp.task('build', () =>\n gulp.src(pkg.main)\n .pipe(browserify({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update gulp to change name of generated file\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n rimraf = require('rimraf'),\n jshint = require('gulp-jshint'),\n uglify = require('gulp-uglify'),\n rename = require('gulp-rename'),\n insert... | javascript | chosen |
[
{
"from": "system",
"value": "Add gulp task to run tests on file change.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar del = require('del');\nvar babel = require('gulp-babel');\nvar browserify = require('browserify');\nvar source = require('vinyl-source-str... | javascript | chosen |
[
{
"from": "system",
"value": "Add return statement to gulp task\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar iife = require('gulp-iife');\nvar uglify = require('gulp-uglify');\nvar concat = require('gulp-concat');\nvar rename = require('gulp-rename');\n\ngulp.task('default... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an error in the clean task\n"
},
{
"from": "human",
"value": "var del = require('del');\nvar gulp = require('gulp');\nvar webpack = require('webpack');\n\nvar WebpackDevServer = require('webpack-dev-server');\n\nvar $ = require('gulp-load-plugins')();\n\nvar con... | javascript | chosen |
[
{
"from": "system",
"value": "Add command exists to utils\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n camelCase: require('./camel-case'),\n colorString: require('./color-string'),\n nestOptions: require('./nest-options'),\n uid: require('./uid'),\n request: requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add retry mechanism for iOS screenshots\n"
},
{
"from": "human",
"value": "const createWebsocketTarget = require('./create-websocket-target');\nconst osnap = require('osnap/src/ios');\n\nconst saveScreenshotToFile = filename => osnap.saveToFile({ filename });\n\ncon... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for Nav items duplicating\n"
},
{
"from": "human",
"value": "(function($) {\n $(function(){\n\n // https://stackoverflow.com/questions/20658402/internet-explorer-issue-with-html5-form-attribute-for-button-element\n // detect if browser supports this\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix date issue on edit\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\nimport Firebase from 'firebase';\n\nexport default DS.DateTransform.extend({\n serialize: function(date) {\n if (date === Firebase.ServerValue.TIMESTAMP){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add and require custom-methods file\n"
},
{
"from": "human",
"value": "exponentiateStrings = function(string1, string2) {\n // must have a powers function for strings because 100 ** 100 is too high for JS...\n}\n\n// var powers = [];\n\n// for (var a = 2; a <= 100;... | javascript | chosen |
[
{
"from": "system",
"value": "Add relations between Campgrounds and User models.\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\n\n// SCHEMA SETUP:\nvar campgroundSchema = new mongoose.Schema({\n name: String,\n image: String,\n description: String,\n comments... | javascript | chosen |
[
{
"from": "system",
"value": "Add TODO related to the auto-request hook feature\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar http = require('http')\nvar shimmer = require('shimmer')\nvar asyncState = require('./async-state')\n\nmodule.exports = function (client) {\n shimmer({ logger: ... | javascript | chosen |
[
{
"from": "system",
"value": "Use the botstrap logger instead of console for logging\n"
},
{
"from": "human",
"value": "\nvar math = require('mathjs');\n\nvar ERROR_RESPONSE = 'I can\\'t calculate that!';\n\nmodule.exports = function(argv, response) {\n var respBody = ERROR_RESPONSE;\n\n try {... | javascript | chosen |
[
{
"from": "system",
"value": "Use path.resolve instead of string join\n"
},
{
"from": "human",
"value": "var info = require('./info');\nvar path = require('path');\nvar myPackageJson = require('../package.json');\nvar version = myPackageJson.praatVersion;\nmodule.exports = [__dirname, '..', 'nod... | javascript | chosen |
[
{
"from": "system",
"value": "Fix HTTP status code error messages\n"
},
{
"from": "human",
"value": "var STATUS_CODES = require('http');\n\nexports.error = function (statusCode, message) {\n var err;\n\n if (message instanceof Error) {\n err = message;\n } else {\n err = n... | javascript | chosen |
[
{
"from": "system",
"value": "Enable touch events on old React versions\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar require = typeof require === 'undefined' ? function() {} : require;\n\nvar React = window.React || require('react');\nvar ReactDom = window.ReactDOM || require('react-d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix inviting others to private messages.\n"
},
{
"from": "human",
"value": "/**\n The controls at the top of a private message in the map area.\n\n @class PrivateMessageMapComponent\n @extends Ember.Component\n @namespace Discourse\n @module Discourse\n**/\nDis... | javascript | chosen |
[
{
"from": "system",
"value": "Update learn getters to create page link references\n"
},
{
"from": "human",
"value": "import mutations from './coreLearn/mutations';\nimport * as getters from './coreLearn/getters';\nimport * as actions from './coreLearn/actions';\nimport classAssignments from './c... | javascript | chosen |
[
{
"from": "human",
"value": "Test to add a subscriber to new list and remove it.\n"
},
{
"from": "gpt",
"value": "/* global describe, it */\n\n'use strict'\n\nvar expect = require('expect.js')\n\nvar MailerLite = require('..')\nvar ML = new MailerLite()\n\nconst LIST_NAME = 'Mocha Test'\n\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for PR page, check if author is redacted\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst {expect} = require(\"chai\");\n\nbefore(() => {\n browser.url(\"/login\");\n\n browser.setCookie({\n name: \"user_session\",\n value: process.env.US... | javascript | chosen |
[
{
"from": "system",
"value": "Convert typeof tests to mocha\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar buster = require(\"buster\");\nvar sinon = require(\"../lib/sinon\");\nvar assert = buster.assert;\n\nbuster.testCase(\"sinon.typeOf\", {\n \"returns boolean\": function () {\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix URL to use HTTPS.\n"
},
{
"from": "human",
"value": "import * as types from './ActionTypes'\nimport axios from 'axios'\n\nexport function addPattern(name, pattern) {\n return {\n type: types.ADD_PATTERN,\n name: name,\n pattern: pattern\n }\n}\n\nexpo... | javascript | chosen |
[
{
"from": "system",
"value": "Add stop() method to Initializer.\n\n\tmodified: lib/initializer.js\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar\nPromise = require('./promise');\n\n\nmodule.exports = function (API) {\n var\n self = Object.create(null),\n promise = Promise.resolve... | javascript | chosen |
[
{
"from": "system",
"value": "Fix migrations mongo url variable\n"
},
{
"from": "human",
"value": "var stream = require('stream')\nvar mongoose = require('mongoose')\n\nexports.mongoose = mongoose\n\nexports.connectMongoose = function() {\n mongoose.connect(process.env.MONGO_URL || 'mongodb://l... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Add a babel task to watch which works\"\n\nThis reverts commit 9b22494b461448d9e75e153610c1629d8e455074.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkgFile: 'package.json',\n clean: ['build'... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.