conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Change spec test back to true/false, rewrite loop for better clarity of changes\n" }, { "from": "human", "value": "var pingPong = function(i) {\n if ((i % 3 === 0) && (i % 5 != 0)) {\n return \"ping\";\n } else if ((i % 5 === 0) && (i % 6 != 0)) {\n return \...
javascript
chosen
[ { "from": "system", "value": "Allow to create test config with overrided options\n" }, { "from": "human", "value": "var BATCH_API_ENDPOINT = 'http://127.0.0.1:8080/api/v1/sql/job';\n\nmodule.exports = {\n db: {\n host: 'localhost',\n port: 5432,\n dbname: 'analysis_api_te...
javascript
chosen
[ { "from": "system", "value": "Revert \"Test in Internet Explorer in SauceLabs\"\n\nThis reverts commit c65a817bf6dad9c9610baa00bf8d8d3143e9822e.\n" }, { "from": "human", "value": "module.exports = function(config) {\n config.set({\n frameworks: ['mocha'],\n browsers: ['Firefox',...
javascript
chosen
[ { "from": "system", "value": "Use short format when displaying dates on user record\n" }, { "from": "human", "value": "import React from \"react\";\nimport moment from \"moment\";\n\n\nclass Record extends React.Component {\n render() {\n const {record} = this.props;\n\n return ...
javascript
chosen
[ { "from": "system", "value": "Remove the responsability of spec checking\n\nSigned-off-by: Fabio José <34f3a7e4e4d9fe971c99ebc4af947a5309eca653@gmail.com>\n" }, { "from": "human", "value": "var Spec02 = require(\"../../specs/spec_0_2.js\");\n\nconst spec02 = new Spec02();\n\nfunction JSONParser(...
javascript
chosen
[ { "from": "system", "value": "Add marketing route to factory\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function RouteFactory(options) {\n return ([\n require('./routes/credits'),\n require('./routes/debits'),\n require('./routes/users'),\n require('./route...
javascript
chosen
[ { "from": "system", "value": "palette[picker]: Use mouse wheel to control HSL lightness.\n" }, { "from": "human", "value": "(function( window, document, undefined ) {\n 'use strict';\n\n var hslEl = document.createElement( 'div' );\n hslEl.classList.add( 'hsl' );\n document.body.appendChild(...
javascript
chosen
[ { "from": "system", "value": "Add checkType method and prettify code\n" }, { "from": "human", "value": "var nconf = require('nconf')\n , path = require('path');\n\nconst defaults = {\n username: \"\",\n password: \"\",\n guardcode: \"\",\n twofactor: \"\",\n sentryauth: false,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix hardcoded path to node executable\n" }, { "from": "human", "value": "#!/usr/local/bin/node\n\nvar options = {},\n\targs = process.argv.slice( 0 ),\n\tspider = require( \"../index.js\" );\n\nargs.splice( 0, 2 );\nargs.forEach( function( value ) {\n\tvar arg = val...
javascript
chosen
[ { "from": "system", "value": "Fix mongoose float and decimal problems\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies\n */\n\nmodule.exports = mongoose => {\n var Decimal = require('mongoose-float').loadType(mongoose, 2);\n var Float = require('mongoose-float')....
javascript
chosen
[ { "from": "system", "value": "Update up to changes in es5-ext\n" }, { "from": "human", "value": "'use strict';\n\nvar aFrom = require('es5-ext/array/from')\n , partial = require('es5-ext/function/#/partial')\n , extend = require('es5-ext/object/extend-properties')\n , ee = require('ev...
javascript
chosen
[ { "from": "system", "value": "Set colorize to false for downstream consumers\n" }, { "from": "human", "value": "'use strict';\n\nconst Winston = require('winston');\n\nfunction Logger(level) {\n const logLevel = level || 'info';\n\n const logger = new Winston.Logger({\n level: logLevel,\n ...
javascript
chosen
[ { "from": "system", "value": "Allow non-anchor links to click through normally\n" }, { "from": "human", "value": "var RawnetAdmin = window.RawnetAdmin || {};\n\nRawnetAdmin.menu = function(){\n\n function toggleNav(link) {\n var active = $('#mainNav a.active'),\n target = $(link.attr('h...
javascript
chosen
[ { "from": "system", "value": "Change title of meta transactions page in docs sidebar\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst path = require('path');\nconst proc = require('child_process');\nconst startCase = require('lodash.startcase');\n\nconst baseDir = process.argv[2];...
javascript
chosen
[ { "from": "system", "value": "Disable prop-types rule because Flow\n" }, { "from": "human", "value": "const commonRules = require(\"./rules\");\n\nmodule.exports = {\n parser: \"babel-eslint\",\n plugins: [\"react\", \"babel\", \"flowtype\", \"prettier\", \"import\"],\n env: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add inline documentation for reactChildrenForEachDeep\n" }, { "from": "human", "value": "/**\n * React-related utilities\n */\n\nimport React from 'react';\n\n/**\n * Like React.Children.forEach(), but traverses through all descendant children.\n *\n * @param childr...
javascript
chosen
[ { "from": "system", "value": "Fix 'd' problem on translation\n\nSince in spanish you use 'de' to say 'of' it gets mistaken for a d in the date format. An easy way to fix this is to use 'De' with capital D so it doesn't get mistaken. It's better to have a misplaced capital letter to a useless date name (the ...
javascript
chosen
[ { "from": "system", "value": "Fix a bug in the reducer\n" }, { "from": "human", "value": "import moment from 'moment';\nimport getServerList from './../../utils/getServerList';\n\nfunction getInitialState() {\n return {\n time: undefined,\n servers: getServerList().map(server => Object.as...
javascript
chosen
[ { "from": "system", "value": "Format JavaScript files with Prettier: scripts/draft-js/__github__/src/util\n\nReviewed By: creedarky\n\nDifferential Revision: D26975892\n\nfbshipit-source-id: cee70c968071c7017fe078a1d31636b7174fcf4f\n" }, { "from": "human", "value": "/**\n * Copyright 2004-presen...
javascript
chosen
[ { "from": "system", "value": "Fix JSCS violation that snuck in while the reporter was broken\n" }, { "from": "human", "value": "(function(){\n 'use strict';\n\n angular.module('app.states')\n .run(appRun);\n\n /** @ngInject */\n function appRun(routerHelper) {\n routerHelper.configureS...
javascript
chosen
[ { "from": "system", "value": "Use tag name translations in new pledge form\n" }, { "from": "human", "value": "import { connect } from 'react-redux'\nimport merge from 'lodash/merge'\nimport { setEntity } from '../../lib/actions/entityActions'\nimport { toggleSessionPopup } from '../../UserSessio...
javascript
chosen
[ { "from": "system", "value": "Update InMemory partials resolved to resolve compiled templates. This makes unit tests work again\n" }, { "from": "human", "value": "'use strict';\n\nconst parser = require('../parser');\n\nfunction InMemory(partials) {\n\tthis.partials = partials;\n\tthis.compiledP...
javascript
chosen
[ { "from": "system", "value": "Use `system` module for phantom runner script stdout/stderr\n" }, { "from": "human", "value": "var page = require('webpage').create();\nvar _ = require('underscore');\nvar fs = require('fs');\n\nfunction stdout(str) {\n fs.write('/dev/stdout', str, 'w')\n}\n\nfunct...
javascript
chosen
[ { "from": "system", "value": "Update character count for new tweet\n" }, { "from": "human", "value": "$(document).ready(function () {\n $('#columns .tweets').empty(); // Remove dummy content.\n\n $('.not-signed-in #the-sign-in-menu').popover({\n placement: 'below',\n trigger: 'manual'\n...
javascript
chosen
[ { "from": "system", "value": "[core] Update example for <Popover> to verify behavior\n" }, { "from": "human", "value": "import React from 'react';\n\nimport List from '@ichef/gypcrete/src/List';\nimport ListRow from '@ichef/gypcrete/src/ListRow';\nimport TextLabel from '@ichef/gypcrete/src/TextL...
javascript
chosen
[ { "from": "system", "value": "Switch from subject to user.\n" }, { "from": "human", "value": "exports = module.exports = function(authenticate) {\n \n return function verify(req, token, cb) {\n authenticate(token, function(err, tkn, ctx) {\n if (err) { return cb(err); }\n \n ...
javascript
chosen
[ { "from": "system", "value": "Add the score result to the UI to show the battle's winner\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react';\n\nconst puke = (obj) => <pre>{JSON.stringify(obj, 2, ' ')}</pre>\n\nconst Results = React.createClass({\n render() {\n re...
javascript
chosen
[ { "from": "system", "value": "Fix error handler on remove job\n" }, { "from": "human", "value": "var express = require('express');\nvar kue = require('kue');\nvar Bot = require('../models/bot');\n\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res, next) {...
javascript
chosen
[ { "from": "system", "value": "Add todo comments for local storage request repository\n" }, { "from": "human", "value": "var glimpse = require('glimpse');\nvar store = require('store.js');\n\nvar _storeSummaryKey = 'glimpse.data.summary',\n _storeDetailKey = 'glimpse.data.request';\n// store F...
javascript
chosen
[ { "from": "system", "value": "Refresh JWT token if expires\n" }, { "from": "human", "value": "/* global localStorage */\nimport axios from 'axios';\n\nexport const BASE_URL = process.env.REACT_APP_API_URL;\n\nconst request = (endpoint, { headers = {}, body, ...otherOptions }, method) => {\n ret...
javascript
chosen
[ { "from": "system", "value": "Fix same rule parameter validation\n" }, { "from": "human", "value": "(function() {\n\t\n\tvar rule = data.rules[parseInt(request.param.num, 10)] || null;\n\t\n\tif (rule === null) return response.error(404);\n\t\n\tswitch (request.method) {\n\t\tcase 'PUT':\n\t\t\t...
javascript
chosen
[ { "from": "system", "value": "Clear localStorage order variables when order is complete\n" }, { "from": "human", "value": "SpreeStore.module('Checkout',function(Checkout, SpreeStore, Backbone,Marionette,$,_){\n Checkout.Controller = {\n show: function(state) {\n SpreeStore.noSidebar()\n...
javascript
chosen
[ { "from": "system", "value": "Clean up file and remove editor text on submit\n" }, { "from": "human", "value": "/* All related comment actions will be managed here */\n/* appending comment see views/comments/create.js.erb */\n\n$(function(){\n\n // declare variables for link, button, form ids\n...
javascript
chosen
[ { "from": "system", "value": ":wrench: Fix defaults for DeleteIcon message\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { openModal } from 'actions/uiActions';\nimport Icon from 'utils/icons';\nimport ConfirmModal from '../Modals/ConfirmModal';\...
javascript
chosen
[ { "from": "system", "value": "Revert back to limited situation\n" }, { "from": "human", "value": "var express = require('express');\n_ = require('underscore')._\nvar request = require('request');\nvar router = express.Router({mergeParams: true});\nvar exec = require('child_process').exec;\nvar p...
javascript
chosen
[ { "from": "system", "value": "Create the canvas on editor start\n" }, { "from": "human", "value": "var innerInitialize = function() {\n console.log(\"It's the editor, man\");\n}" }, { "from": "gpt", "value": "$(document).ready(function() {\n innerInitialize();\n});\n\nvar inner...
javascript
chosen
[ { "from": "system", "value": "Fix db-connect commit (to working server state!)\n\n- Note: eventually, the node directive that requires 'db.js' will be\n replaced by the commented out directives that require the\n Listings/Users/Categories models.\n" }, { "from": "human", "value": "// node depe...
javascript
chosen
[ { "from": "system", "value": "Allow console.log statement in server\n" }, { "from": "human", "value": "import webpack from 'webpack';\nimport WebpackDevServer from 'webpack-dev-server';\nimport config from './webpack.config.babel';\nimport open from 'open';\n\nconst webpackServer = new WebpackDe...
javascript
chosen
[ { "from": "system", "value": "Use the right TSV data source\n" }, { "from": "human", "value": "const i = require('itemDataRefresher.js');\n\nfateBus.subscribe(module, 'fate.configurationLoaded', function(topic, configuration) {\n new i.ItemDataRefresher('roll', configuration.shaderDataTSV)\n});...
javascript
chosen
[ { "from": "system", "value": "Use updated symbol path for file-system-roots plugin\n" }, { "from": "human", "value": "\nvar myApp = angular.module('CordovaAppHarness', ['ngRoute']);\n\n\nmyApp.config(['$routeProvider', function($routeProvider){\n $routeProvider.when('/', {\n templateUr...
javascript
chosen
[ { "from": "system", "value": "Load react-devtools in dev env only\n" }, { "from": "human", "value": "//electron entry-point\n\nconst REACT_DEVELOPER_TOOLS = require('electron-devtools-installer').REACT_DEVELOPER_TOOLS;\nvar installExtension = require('electron-devtools-installer').default;\nvar ...
javascript
chosen
[ { "from": "system", "value": "Watch for changes in the JDL package (rebundle)\n" }, { "from": "human", "value": "//\n// See https://github.com/jenkinsci/js-builder\n//\nvar builder = require('@jenkins-cd/js-builder');\n\n// Disable js-builder based linting for now.\n// Will get fixed with https:...
javascript
chosen
[ { "from": "system", "value": "Fix web warning about useNativeDriver\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { View, StyleSheet, TouchableWithoutFeedback, Animated } from 'react-native';\nimport { OPEN_ANIM_DURATION...
javascript
chosen
[ { "from": "system", "value": "Adjust the time factor to align frontent and backend auth.\n\nFixes #27\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'client',\n environment: environment,\n baseURL: '/...
javascript
chosen
[ { "from": "system", "value": "Make camera function actually affect the matrices\n" }, { "from": "human", "value": "/**\n * @depends MatrixStack.js\n */\nvar Camera = new Class({\n initialize: function() {\n this.projection = new MatrixStack();\n this.modelview = new MatrixStack(...
javascript
chosen
[ { "from": "system", "value": "Remove external electron link as we're rethinking that for now\n" }, { "from": "human", "value": "/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (j...
javascript
chosen
[ { "from": "system", "value": "Fix endless execution of integration tests\n" }, { "from": "human", "value": "var injection = require('../services/injection.js');\nvar Q = require('q');\nvar mongoose = require('mongoose');\n\nmodule.exports = function (test, fixtureName, testFn) {\n var dbUrl =...
javascript
chosen
[ { "from": "system", "value": "Add verbose option to E2E tests.\n" }, { "from": "human", "value": "const path = require( 'path' );\n\nmodule.exports = {\n\tpreset: 'jest-puppeteer',\n\tsetupFilesAfterEnv: [\n\t\t'<rootDir>/config/bootstrap.js',\n\t\t'@wordpress/jest-console',\n\t\t'expect-puppete...
javascript
chosen
[ { "from": "system", "value": "Use a factory instead of creating an HTMLValidator inline.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the License);\n * you may not use this file exc...
javascript
chosen
[ { "from": "system", "value": "Use react-dom package for rendering application\n" }, { "from": "human", "value": "require(\"../scss/index.scss\");\n\nvar React = require('react');\nvar Locale = require('grommet/utils/Locale');\nvar Cabler = require('./components/Cabler');\n\nvar locale = Locale.g...
javascript
chosen
[ { "from": "system", "value": "Update javascript blanket adapter to include sources data." }, { "from": "human", "value": "(function (){\n /* ADAPTER\n *\n * This blanket.js adapter is designed to autostart coverage\n * immediately. The other side of this is handled from Cucumber\n *\n ...
javascript
chosen
[ { "from": "system", "value": "Use fontInliner instead of entire SVGRenderer for showing costume tiles.\n\nThe fontInliner from the scratch-svg-renderer was changed recently to work entirely on strings, so we can use that instead of parsing/loading/possibly drawing/stringifying the entire SVG. \n\nThis does ...
javascript
chosen
[ { "from": "system", "value": "Use MutationObserver API to catch dom updates\n" }, { "from": "human", "value": "function hide_covers() {\n // Remove covers\n $(\".mix_element div.cover\").remove()\n // Add class so cards can be restyled\n $(\".mix_card.half_card\").addClass(\"ext-cove...
javascript
chosen
[ { "from": "system", "value": "Update onPrimaryClick to pass down multiple args\n" }, { "from": "human", "value": "/**\n * Detects if only the primary button has been clicked in mouse events.\n * @param {MouseEvent} e Event instance (or Event-like, i.e. `SyntheticEvent`)\n * @return {Boolean}\n *...
javascript
chosen
[ { "from": "system", "value": "Add toolbar with back button\n" }, { "from": "human", "value": "require('Common');\nvar win = new Window();\napplication.exitAfterWindowsClose = true;\nwin.visible = true;\nwin.title = \"Hi Tint World!\";\n\n\nvar webview = new WebView(); // Create a new webview for...
javascript
chosen
[ { "from": "system", "value": "fix(mount): Check first if the componentDidMount and componentWillUnmount are defined\n" }, { "from": "human", "value": "/**\n * Created by thram on 21/01/17.\n */\nimport forEach from \"lodash/forEach\";\nimport assign from \"lodash/assign\";\nimport isArray from \...
javascript
chosen
[ { "from": "system", "value": "Refactor Git author text writing\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\nimport chalk from 'chalk';\nimport console from 'console';\n\nimport gitAuthorStats from './git-author-stats';\n\ngitAuthorStats().forEach((gitAuthorStat) => {\n const autho...
javascript
chosen
[ { "from": "system", "value": "Remove ignoring of stylelint rules\n" }, { "from": "human", "value": "const path = require('path')\nconst parse = require('./parsers/index')\n// TODO Fix ampersand in selectors\n// TODO ENFORCE THESE RULES\n// value-no-vendor-prefix – don't allow vendor prefixes\n//...
javascript
chosen
[ { "from": "system", "value": "Fix stye bug of footer again\n" }, { "from": "human", "value": "import React from 'react'\n\nclass Footer extends React.PureComponent {\n render () {\n return <footer className='container row'>\n <p className='col-xs-12'>\n Copyright 2017 Junyoung Ch...
javascript
chosen
[ { "from": "system", "value": "Use default parameters for default suffixes\n" }, { "from": "human", "value": "import isPromise from './isPromise';\n\nconst defaultTypes = ['PENDING', 'FULFILLED', 'REJECTED'];\n\nexport default function promiseMiddleware(config={}) {\n const promiseTypeSuffixes =...
javascript
chosen
[ { "from": "system", "value": "Trim code a little more\n" }, { "from": "human", "value": "import _ from './utils';\n\nexport default {\n has: (value = {}, conditions = {}) => {\n if (!_.isObject(conditions)) return false;\n if (_.isArray(value)) return !!_.find(value, conditions);\n if ...
javascript
chosen
[ { "from": "system", "value": "Rename service var to TrustLineService just in case.\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('Service: trustLineService', function () {\n\n // load the service's module\n beforeEach(module('riwebApp'));\n\n // instantiate service\n var trust...
javascript
chosen
[ { "from": "system", "value": "Remove drop wrapper from exports\n" }, { "from": "human", "value": "import AtomControl from './components/AtomControl';\nimport CardControl from './components/CardControl';\nimport { classToDOMCard } from './utils/classToCard';\nimport Container, { EMPTY_MOBILEDOC }...
javascript
chosen
[ { "from": "system", "value": "Add check for nil response\n\nThe app was erroring on missing statusCode when no response\nwas received. This allows the app not to crash if the url\ndoesn't respond.\n" }, { "from": "human", "value": "var url = require('url')\nvar dashButton = require('node-dash-bu...
javascript
chosen
[ { "from": "system", "value": "Add types to be exported\n" }, { "from": "human", "value": "'use strict';\n\nimport AssetLoader from './assetloader';\nimport Input from './input';\nimport Loop from './loop';\nimport Log from './log';\nimport Timer from './timer';\nimport Math from './math';\n \ne...
javascript
chosen
[ { "from": "system", "value": "Fix missing dependency when using ng-translate\n" }, { "from": "human", "value": "angular.module('proxtop', ['ngMaterial', 'ui.router', 'angular-progress-arc', 'pascalprecht.translate'])\n .config(['$stateProvider', '$urlRouterProvider', '$translateProvider', fun...
javascript
chosen
[ { "from": "system", "value": "Use object-assign instead of Object.assign\n" }, { "from": "human", "value": "const config = Object.assign({\n development: {\n api: {\n trade_events: {\n host: 'https://intrasearch.govwizely.com/v1/trade_events',\n },\n },\n },\n productio...
javascript
chosen
[ { "from": "system", "value": "Fix usage of react-native cli inside package.json scripts\n\nSummary:\nIIRC we made `wrong-react-native` to warn people in case they installed `react-native` globally (instead of `react-native-cli` what the guide suggests). To do that we added `bin` entry to React Native's `pac...
javascript
chosen
[ { "from": "system", "value": "Put higher level functions first\n" }, { "from": "human", "value": "(function(){\nvar mod = angular.module('caspy.api', ['ngResource', 'caspy.server']);\n\nmod.config(['$resourceProvider', \n function($resourceProvider) {\n $resourceProvider.defaults.strip...
javascript
chosen
[ { "from": "system", "value": "Remove extraneous parent reference from Footer\n" }, { "from": "human", "value": "/*\n backgrid\n http://github.com/wyuenho/backgrid\n\n Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors\n Licensed under the MIT @license.\n*/\n\n/**\n A Footer is a generi...
javascript
chosen
[ { "from": "system", "value": "Use encode to check geocoder status\n" }, { "from": "human", "value": "var express = require('express');\nvar geocode = require('./geocode');\nvar mongoose = require('./mongo');\nvar otp = require('./otp');\n\n/**\n * Expose `router`\n */\n\nvar router = module.expo...
javascript
chosen
[ { "from": "system", "value": "Fix lack of loads import\n" }, { "from": "human", "value": "function isSecured(operation) {\n if (_.has(this.schema.secured, operation)) {\n return this.schema.secured[operation];\n }\n else {\n return this.schema.secured.common || false;\n }\n};\n\nexport...
javascript
chosen
[ { "from": "system", "value": "Add privilege check on follow button\n" }, { "from": "human", "value": "var addFollowers = require('./follow');\nvar checkAuth = require('./check_auth');\nvar checkPrivilege = require('./privilege_check');\nvar githubOAuth = require('./github_oauth');\nvar users = r...
javascript
chosen
[ { "from": "system", "value": "Use the same kdf for Insight Storage\n" }, { "from": "human", "value": "var cryptoUtil = require('../util/crypto');\nvar InsightStorage = require('./InsightStorage');\nvar inherits = require('inherits');\n\nfunction EncryptedInsightStorage(config) {\n InsightStorag...
javascript
chosen
[ { "from": "system", "value": "Add JS to authentication and get user information by token\n" }, { "from": "human", "value": "//= require jquery\n\n$(function() {\n $('.login-trello').click(function() {\n Trello.authorize({\n type: \"redirect\",\n name: \"Reportrello\",\n scope:...
javascript
chosen
[ { "from": "system", "value": "Enable JavaScript code of bootstrap\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascr...
javascript
chosen
[ { "from": "system", "value": "Enable rails-ujs to make working REST methods on link by js\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript file within this directory, l...
javascript
chosen
[ { "from": "system", "value": "Add a create bank account token method to the service\n" }, { "from": "human", "value": "/* global Stripe */\nimport config from '../config/environment';\nimport Ember from 'ember';\nvar debug = config.LOG_STRIPE_SERVICE;\n\nfunction createToken (card) {\n if (debu...
javascript
chosen
[ { "from": "system", "value": "Fix fetch api when returning non-JSON\n" }, { "from": "human", "value": "export default class HttpApi {\n constructor (prefix = '') {\n this.prefix = prefix\n this.opts = {\n credentials: 'same-origin',\n headers: new Headers({\n 'Content-Typ...
javascript
chosen
[ { "from": "system", "value": "Fix name for the classtest\n" }, { "from": "human", "value": "import test from 'tape'\nimport { Vector, Polygon, Rectangle, Circle, ShapeEventEmitter } from '..'\n\ntest('Polygon#contains', t => {\n t.plan(5)\n //Disable warning about missing 'new'. That's what we...
javascript
chosen
[ { "from": "system", "value": "Change nodelist.foreach to a normal for loop\n\nThis should bring much greater browser compatibility the the nodelist foreach allowing it to work on all the major browser vendors.\n\nFixes #95" }, { "from": "human", "value": "/* Cached Variables ********************...
javascript
chosen
[ { "from": "system", "value": "Improve usability of contextual-help popovers\n" }, { "from": "human", "value": "$( document ).ready(function () {\n\t$('.contextual-help').click(function (){\n\t\t$(this).find('i').toggleClass('active');\n\t});\n\n\t$('body').click(function (e) {\n\t\t$('[data-togg...
javascript
chosen
[ { "from": "system", "value": "Bump internal Twig.js version to \"0.8.2-1\"\n" }, { "from": "human", "value": "/**\n * Twig.js 0.8.2\n *\n * @copyright 2011-2015 John Roepke and the Twig.js Contributors\n * @license Available under the BSD 2-Clause License\n * @link https://github.com/just...
javascript
chosen
[ { "from": "system", "value": "Fix loading config before HOME variable is set\n" }, { "from": "human", "value": "var program = require(\"commander\");\nvar pkg = require(\"../../package.json\");\nvar fs = require(\"fs\");\nvar mkdirp = require(\"mkdirp\");\nvar Helper = require(\"../helper\");\n\...
javascript
chosen
[ { "from": "system", "value": "Use MONGOHQ_URL for database connection in prod\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n db: 'mongodb://localhost/mean',\n app: {\n name: 'MEAN - A Modern Stack - Production'\n },\n facebook: {\n clientID: 'A...
javascript
chosen
[ { "from": "system", "value": "Add missing semicolon to example\n\nAdds a missing semicolon to the fade transition example." }, { "from": "human", "value": "import opacity from 'ember-animated/motions/opacity';\n\n/**\n Fades inserted, removed, and kept sprites.\n\n ```js\n import fade from 'e...
javascript
chosen
[ { "from": "system", "value": "Add some tests, they're commented out right now. Things work!\n" }, { "from": "human", "value": "// Source Model\nAV.source = Backbone.Model.extend({\n\turl: 'php/redirect.php/source',\n\tdefaults: {\n\t\tname: '',\n\t\ttype: 'raw',\n\t\tcontentType: 'txt',\n\t\tdat...
javascript
chosen
[ { "from": "system", "value": "Add db to the global variables\n" }, { "from": "human", "value": "var callisto = require('callisto');\nvar users = require('./lib/users.js');\nvar sqlite3 = require('sqlite3').verbose();\nvar db = new sqlite3.Database('database.db3');\n\ncallisto.server({\n port:...
javascript
chosen
[ { "from": "system", "value": "Add errorLoading translation of Thai language.\n\nThis closes https://github.com/select2/select2/pull/4521.\n" }, { "from": "human", "value": "define(function () {\n // Thai\n return {\n inputTooLong: function (args) {\n var overChars = args.input.length -...
javascript
chosen
[ { "from": "system", "value": "Add test case for `count` method\n" }, { "from": "human", "value": "var assert = require('assert')\nvar mongo = require('../')\nvar db = mongo('mongodb://read:read@ds031617.mongolab.com:31617/esdiscuss')\n\nbefore(function (done) {\n this.timeout(10000)\n db._get(...
javascript
chosen
[ { "from": "system", "value": "Add breaking tests for foreign/inherited errors\n" }, { "from": "human", "value": "'use strict';\n\nvar test = require('tape');\n\nvar isError = require('../index.js');\n\ntest('isError is a function', function t(assert) {\n assert.equal(typeof isError, 'function...
javascript
chosen
[ { "from": "system", "value": "Add a test for std-versions script\n" }, { "from": "human", "value": "const expect = require('chai').expect;\n\nconst version = process.env.QB_VERSION;\n\ndescribe('check compiler version inside docker', function () {\n it('should have the same version', async ()...
javascript
chosen
[ { "from": "system", "value": "Comment about start method not being present in functionFlow\n" }, { "from": "human", "value": "var f_ = require('../index.js');\n\nvar TaskList = require('./TaskList');\n\nvar f_config = {\n\tfunctionFlow: ['getSource', 'writeSource', 'notify'], // REQUIRED\n\tres...
javascript
chosen
[ { "from": "system", "value": "Mark secondsToExpiration as abstract method\n" }, { "from": "human", "value": "'use strict'\n\n/**\n * Abstract base class that ensures required public methods are implemented by\n * inheriting classes.\n *\n * @example\n *\n * class BloomFilterCache extends Cache {...
javascript
chosen
[ { "from": "system", "value": "Format prices differently for germany\n" }, { "from": "human", "value": "/**\n * Module dependencies\n */\nvar accounting = require('accounting')\n , util = require('util')\n , currency = require('currency-symbol-map');\n\n/**\n * formatPrice - format currency cod...
javascript
chosen
[ { "from": "system", "value": "Remove stop propagation from toggle text module\n" }, { "from": "human", "value": "var locastyle = locastyle || {};\n\nlocastyle.toggleText = (function() {\n 'use strict';\n\n var config = {\n trigger: '[data-ls-module=toggleText]',\n triggerChange: 'toggleT...
javascript
chosen
[ { "from": "system", "value": "Edit Fibonacci project in Bonfires Directory\n" }, { "from": "human", "value": "/* Bonfire: Sum All Odd Fibonacci Numbers */\n\nfunction sumFibs(num) {\n\n\tvar f1 = 1;\n\tvar f2 = 1;\n\n\tfunction fib(){\n\t\t\n\t}\n\n\n\n\n return num;\n}\n\nsumFibs(4);" }, {...
javascript
chosen
[ { "from": "system", "value": "Set default node as first returned from API\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport ENV from 'plenario-explorer/config/environment';\n\nexport default Ember.Controller.extend({\n modelArrived: Ember.observer('model', function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Use uppercase for fair sort enum\n" }, { "from": "human", "value": "import { GraphQLEnumType } from 'graphql';\n\nexport default {\n type: new GraphQLEnumType({\n name: 'FairSorts',\n values: {\n created_at_asc: {\n value: 'created_at',\n },\...
javascript
chosen
[ { "from": "system", "value": "Create user directories if they do not exist\n" }, { "from": "human", "value": "/*jslint node: true */\nconst pathresolver = require('angular-filemanager-nodejs-bridge').pathresolver;\nconst path = require('path');\n\npathresolver.baseDir = function(req) {\n\n if(!...
javascript
chosen