conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add dynamic prefix for windows/mac shortcuts\n"
},
{
"from": "human",
"value": "import { saveAs } from 'file-saver';\n\n\nexport const Tags = {\n STRONG: '**',\n ITALIC: '_',\n};\n\nfunction escapeRegExp(string) {\n return string.replace(/([.*+?^=!:${}()|\\[\\]\\... | javascript | chosen |
[
{
"from": "system",
"value": "Use opts to improve readability.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst process = require('process');\nconst puppeteer = require('puppeteer');\nconst debug = require('./debug');\n\npuppeteer.launch({\n args: [debug.LOAD_IMAGES == true ? '--blin... | javascript | chosen |
[
{
"from": "system",
"value": "Remove another non-literal string require in formatters.\n"
},
{
"from": "human",
"value": "var environment = require('../environment');\n\nexports.html = require('./html');\nexports.annotated = require('./annotated');\n\nif (!environment.isBrowser) {\n\tvar console... | javascript | chosen |
[
{
"from": "system",
"value": "Verify that callback is set.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar request = require('request')\n , isUrl = require('is-url')\n , articleTitle = require('article-title')\n ;\n\nmodule.exports = function(url, callback){\n\tif(!isUrl(url)){\n\t\tt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix warning react 0.14 (react/addons is deprecated)\n"
},
{
"from": "human",
"value": "var reactTemplates = require('react-templates/src/reactTemplates');\nvar fs = require('fs');\nvar _ = require('lodash');\nvar ext = '.rt';\n\nmodule.exports = function(options) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Print stack traces on failure\n"
},
{
"from": "human",
"value": "var RSVP = require('rsvp'),\n utils = require('./lib')\n fs = require('fs'),\n GoogleSpreadsheet = require(\"google-spreadsheet\"),\n config = require('./config.js'),\n doc = new GoogleS... | javascript | chosen |
[
{
"from": "system",
"value": "Include sender in message if echo is specified. Needs io object.\n"
},
{
"from": "human",
"value": "var read = require('fs').readFileSync;\nvar client = require('khoros-client');\n\nmodule.exports = function (server) {\n\n\t// Serve client js.\n\n\tif (server) {\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix requests to the GitHub API\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar async = require('async');\nvar request = require('request');\nvar linters = require('./linters');\n\nvar repoURL = 'https://api.github.com/repos/nicolasmccurdy/repo... | javascript | chosen |
[
{
"from": "system",
"value": "Call captureScreen with arguments if passed.\n"
},
{
"from": "human",
"value": "var robotjs = require('./build/Release/robotjs.node');\n\nmodule.exports = robotjs;\n\nmodule.exports.screen = {};\n\nfunction bitmap(width, height, byteWidth, bitsPerPixel, bytesPerPixe... | javascript | chosen |
[
{
"from": "system",
"value": "Make it uniformly work with any objects and (pseudo)arrays\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nmodule.exports = function dent(array) {\n if (array === undefined) {\n return dent.tail.shift();\n }\n\n dent.array = array;\n dent.tail = array.s... | javascript | chosen |
[
{
"from": "system",
"value": "Allow hosting of multiple ember applications\n\nGet the index key from the first component of the request path, if available.\nThis enables hosting of multiple ember applications in a flat prefix namespace.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar red... | javascript | chosen |
[
{
"from": "system",
"value": "Check if the settings exist before kicking of headless chrome.\n"
},
{
"from": "human",
"value": "const PuppeteerDynamics365 = require('./puppeteerdynamics365');\n\nrequire('dotenv').config();\n\n(async () => {\n const pup = new PuppeteerDynamics365(process.env.CRM... | javascript | chosen |
[
{
"from": "system",
"value": "Add checks for invalid sources."
},
{
"from": "human",
"value": "import matchbox from './lib/matcher';\nimport transactionFormatters from './lib/formatters/transactions';\nimport emailFormatters from './lib/formatters/emails';\nimport fs from 'fs';\nimport concat fr... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Use the native Object.keys if it's available.\"\n\nThis reverts commit 60689993d75db32701e99f7eb9110ce8eff54610.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = Object.keys || require('... | javascript | chosen |
[
{
"from": "system",
"value": "Remove require() to obsolete resolveWhen()\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = {\n makeRandomAlphanumericalString: require(\"./source/make-random-alphanumerical-string\"),\n addOneTimeListener: require(\"./source/... | javascript | chosen |
[
{
"from": "system",
"value": "Switch example to geojson primitives\n"
},
{
"from": "human",
"value": "/**\n * Takes a bounding box and returns a new bounding box with a size expanded or contracted\n * by a factor of X.\n *\n * @module turf/size\n * @category measurement\n * @param {Array<number>... | javascript | chosen |
[
{
"from": "system",
"value": "Allow consumers to provide options that are forwarded to tape"
},
{
"from": "human",
"value": "'use strict';\n\nvar tape = require('tape');\nvar through = require('through2');\nvar PluginError = require('gulp-util').PluginError;\nvar requireUncached = require('requi... | javascript | chosen |
[
{
"from": "system",
"value": "Use button to switch the led off\n"
},
{
"from": "human",
"value": "const Gpio = require('onoff').Gpio;\n\nconst\n ON = 1,\n OFF = 0;\n\nconst led4 = new Gpio(4, 'out');\nconst button17 = new Gpio(17, 'in', 'both');\n\nconst blink = (led, value = 1) => {\n led.w... | javascript | chosen |
[
{
"from": "system",
"value": "Replace babel promise with bluebird promises\n"
},
{
"from": "human",
"value": "/**\n * Bootstrap our server\n */\nconst sourceMaps = require('source-map-support')\nsourceMaps.install()\n\nrequire('./src/shared/console')\n\n// Compile files on PROD or launch DEV ser... | javascript | chosen |
[
{
"from": "system",
"value": "Make this steps file the same as the others...\n\nWIP: Ideally all of these would go\n"
},
{
"from": "human",
"value": "import steps from './steps';\n\n// step definitions that are shared between features should be moved to the\n// tests/acceptance/steps/steps.js fi... | javascript | chosen |
[
{
"from": "system",
"value": "Update active state of subject tool.\n"
},
{
"from": "human",
"value": "var $$ = React.createElement;\n\n// TagSubjectTool\n// ----------------\n\nvar TagSubjectTool = React.createClass({\n displayName: \"TagSubjectTool\",\n\n handleClick: function() {\n var wr... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"show failed pipelines on top\"\n\nThis reverts commit de863cf25b8dce7e3daa6e46d9f9a8ee2248d167.\n"
},
{
"from": "human",
"value": "import { perform } from \"./tasks\";\nimport fs from 'fs';\nimport config from \"./config\"\n\nfunction setupGoCDAuth(config) ... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Make output path relative of file path\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst FS = require('fs')\nconst Base = require('./base')\n\nclass GenericPlugin extends Base {\n constructor() {\n super()\n this.registerTag(['Compiler-Include'],... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments for wod controller.\n"
},
{
"from": "human",
"value": "angular.module('myApp')\n.controller('WodController', function($scope, $routeParams, $sce, Wod, Video) {\n\nvar settings = $routeParams.id;\nsettings = settings.replace(/[\\[\\]']+/g,'');\nsettings ... | javascript | chosen |
[
{
"from": "system",
"value": "Add lint rules for SFC\n"
},
{
"from": "human",
"value": "module.exports = {\n parser: 'babel-eslint',\n env: {\n browser: true,\n commonjs: true,\n es6: true,\n node: true\n },\n extends: [\n 'eslint:recommended',\n 'plugin:react/recommended',... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing eslint's no-console rule\n"
},
{
"from": "human",
"value": "(function() {\n\tvar error = 2;\n\n\tmodule.exports = {\n\t\troot: true,\n\t\textends: \"ftgp\",\n\t\tparserOptions: {\n\t\t\tecmaVersion: 6,\n\t\t\tsourceType: \"module\"\n\t\t},\n\t\trules: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Trap focus to the menu when open\"\n\nThis reverts commit ed195f52702a7eead162d9f10e6e898de0fe9029.\n\nTrapping focus was preventing the menu from being closeable\n"
},
{
"from": "human",
"value": "// JavaScript Document\n\n// Scripts written by __gulp_init... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to mark collection complete"
},
{
"from": "human",
"value": "define(function() {\n\n 'use strict';\n \n function Item() {\n }\n \n Item.prototype = {\n eventTarget: window,\n dispatchEvent: function() {\n return this.eventTarget.dispatchE... | javascript | chosen |
[
{
"from": "system",
"value": "Facebook: Fix toggle buttons not changing the focus highlight"
},
{
"from": "human",
"value": "$(document).ready(function() {\n \n $('#toggle-livros').click(function(){\n activate('livros');\n deactivate('bio');\n return false;\n });\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Hide searchbar in upload modal ctm when not allowed to read\n\nSigned-off-by: soupette <0a59f0508aa203bc732745954131d022d9f538a9@gmail.com>\n"
},
{
"from": "human",
"value": "import React, { useState, useEffect, memo } from 'react';\nimport { useDebounce } from '@bu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix revenge target coloring bug\n"
},
{
"from": "human",
"value": "import GameOverDialog from '../dialogs/gameOverDialog';\nimport { globalState } from '../globals';\n\nconst playerDiedHandler = (message) => {\n const playerId = message.id;\n const killedBy = mess... | javascript | chosen |
[
{
"from": "system",
"value": "Add hack to get it to run successfully on heroku\n"
},
{
"from": "human",
"value": "var Twitter = require('twode'),\n _ = require('underscore'),\n CronJob = require('cron').CronJob;\n config = require('./lib/config'),\n fs = require(\"fs\"),\n readFil... | javascript | chosen |
[
{
"from": "system",
"value": "Use the TypeError message from Chrome\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar isExtendable = require('is-extendable');\n\nmodule.exports = Object.assign || function(obj/*, objects*/) {\n if (obj === null || typeof obj === 'undefined') {\n throw n... | javascript | chosen |
[
{
"from": "system",
"value": "Use more modern JS code and Lambda features"
},
{
"from": "human",
"value": "var crypto = require('crypto');\n\n// User ARN: arn:aws:iam::561178107736:user/prx-upload\n// Access Key ID: AKIAJZ5C7KQPL34SQ63Q\nvar key = '';\n\nexports.handler = function (event, contex... | javascript | chosen |
[
{
"from": "system",
"value": "Update for Pomegranate > 4\n"
},
{
"from": "human",
"value": "/**\n * @file index\n * @author Jim Bulkowski <jim.b@paperelectron.com>\n * @project pomegranate-sequelize-core\n * @license MIT {@link http://opensource.org/licenses/MIT}\n */\n\n'use strict';\nvar Seque... | javascript | chosen |
[
{
"from": "system",
"value": "Support accented characters like \"É\", \"Ñ\", and \"ñ\"\n\nCloses #1.\n"
},
{
"from": "human",
"value": "module.exports = function(value) {\n var caps = 0;\n\n var index = -1;\n var length = value.length;\n while (index++ < length) {\n var chr = value[index]... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify code by using regexes to normalize strings\n"
},
{
"from": "human",
"value": "var urlResolve = require('url').resolve;\n\n// Resolves a url relative to the root git url\n// this produces a full url (domain included)\n// this works nicely with extra slashes ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert to while loop to add clarity\n"
},
{
"from": "human",
"value": "module.exports = function (number) {\n 'use strict';\n var MIN = 0, MAX = 4999, crossingTransformation, transform = number;\n crossingTransformation = [\n {decimal: 1000, roman: 'M'},\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add return for callbacks, name for Errors.\n"
},
{
"from": "human",
"value": "'use strict';\nconst request = require('request');\n\nvar getJSON = function(query, cb) {\n if (typeof query != 'string') cb(TypeError('Expected a string as first argument.'));\n\n const... | javascript | chosen |
[
{
"from": "system",
"value": "Add server starter script and define constants in uppercase\n"
},
{
"from": "human",
"value": "// Define server\nvar express = require('express');\nvar app = express();\n\nvar bodyParser = require('body-parser');\nconst axios = require('axios');\n\n// for parsing ap... | javascript | chosen |
[
{
"from": "system",
"value": "Drop test database after run the test\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n\n grunt.initConfig({\n jshint: {\n all: [\n 'Gruntfile.js',\n 'lib/**/*.js',\n 'test/**/*.js'\n ]\n },\n bgShell: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up cruft that was accidentally committed.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n// import i18n from 'ember-i18n';\n\nconst MESSAGE_DURATION = 7000;\n\nexport default Ember.Service.extend({\n i18n: Ember.inject.service(),\n\n messageK... | javascript | chosen |
[
{
"from": "system",
"value": "Update the example build script\n"
},
{
"from": "human",
"value": "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\nvar childProcess = require('child_process');\nvar fs = require('fs');\n\n// Build all of the... | javascript | chosen |
[
{
"from": "system",
"value": "Add third, fourth and fifth test to the benchmark."
},
{
"from": "human",
"value": "\"use strict\";\r\n\r\nmodule.exports = function (grunt) {\r\n grunt.initConfig({\r\n eslint: {\r\n src: [\r\n \"Gruntfile.js\",\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix undefined user issue in hook\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Add any common hooks you want to share across services in here.\n// \n// Below is an example of how a hook is written and exported. Please\n// see http://docs.feathersjs.com/hook... | javascript | chosen |
[
{
"from": "system",
"value": "Add solution for mother-child-age-difference exercise\n"
},
{
"from": "human",
"value": "import ANCESTRY_FILE from './ancestry-json';\nconst ancestry = JSON.parse(ANCESTRY_FILE);\n\n// Using the example data set from this chapter, compute the average age difference ... | javascript | chosen |
[
{
"from": "system",
"value": "Use numbers, not strings, for stats summaries.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Stats = require('fast-stats').Stats;\n\nfunction percentileName(percentile) {\n if (percentile === 0) {\n return 'min';\n } else if (percentile === 100) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove button to tag select.\n"
},
{
"from": "human",
"value": "module.exports = Backbone.View.extend({\n\n tagName: 'select',\n\n className: 'tag-select form-control',\n\n initialize: function (options) {\n this.$el.selectize({\n\n valueF... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug where not valid id crashed the server\n\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Boom = require('boom');\nconst User = require('../../../models/User');\nconst formatUser = require('../../../util/userFunctions').formatUser;\n\nmodule.export... | javascript | chosen |
[
{
"from": "system",
"value": "Send the charset with simpleBody.\n"
},
{
"from": "human",
"value": "\n/*!\n * Ext JS Connect\n * Copyright(c) 2010 Ext JS, Inc.\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar http = require('http'),\n Buffer = require('buffer').Buffer;\nvar re... | javascript | chosen |
[
{
"from": "system",
"value": "Add of getPrompt function to redisplay the prompt when search field is empty.\n\ngit-svn-id: 36dcc065b18e9ace584b1c777eaeefb1d96b1ee8@290116 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value": "/*\n* Copyright 2002-2004 The Apache Software Foundat... | javascript | chosen |
[
{
"from": "system",
"value": "Add default config to module.exports\n"
},
{
"from": "human",
"value": "import fs from 'fs'\nimport path from 'path'\n\nimport _ from 'lodash'\nimport postcss from 'postcss'\nimport stylefmt from 'stylefmt'\n\nimport defaultConfig from './defaultConfig'\nimport merg... | javascript | chosen |
[
{
"from": "system",
"value": "feat(player): Add suport play chapter in mpv\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n'use strict';\n\nconst program = require('commander');\nconst animeDl = require('anime-dl');\nconst chalk = require('chalk');\nconst updateNotifier = require('upda... | javascript | chosen |
[
{
"from": "system",
"value": "Remove React import, validation is React agnostic\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React from 'react'\nimport {\n curry,\n compose,\n Either,\n map,\n merge,\n prop,\n sequence,\n update\n} from './utils/'\n\nconst { Right, Left } = Eit... | javascript | chosen |
[
{
"from": "system",
"value": "Stop exposing preprocessors, lemmatizers and utils\n"
},
{
"from": "human",
"value": "import QuizGenerator from './quiz-generator.js';\nimport Source from './source.js';\nimport preprocessors from './preprocessor/index';\nimport lemmatizers from './lemmatizer/index'... | javascript | chosen |
[
{
"from": "system",
"value": "Update bootcode threshold to 3.7 MB\n"
},
{
"from": "human",
"value": "const fs = require('fs'),\n path = require('path'),\n expect = require('chai').expect,\n\n CACHE_DIR = path.join(__dirname, '/../../.cache'),\n THRESHOLD = 5.5 * 1024 * 1024; // 5.5 M... | javascript | chosen |
[
{
"from": "system",
"value": "BB-2453: Refactor all usages of price matching JS component\n - fixes after backmerge\n"
},
{
"from": "human",
"value": "define(function(require) {\n 'use strict';\n\n var $ = require('jquery');\n var _ = require('underscore');\n require('bootstrap');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add on-loaded argument so applications can get ahold of the network. Fix\nup the watch so that it sets the data for the network rather than\ncreating a new network.\n"
},
{
"from": "human",
"value": "Application.Directives.directive('visNetwork', visNetworkDirective... | javascript | chosen |
[
{
"from": "system",
"value": "FE: Add events for property actions (add/remove)\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n moj.Modules.Properties = {\n init: function() {\n this.cacheEls();\n this.bindEvents();\n },\n\n bindEvents: function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update test inline w/ new way we format 0s\n"
},
{
"from": "human",
"value": "jest.dontMock('../string-utils');\n\ndescribe('StringUtils', function() {\n const StringUtils = require('../string-utils');\n\n describe('formatMetric', function() {\n const formatMet... | javascript | chosen |
[
{
"from": "system",
"value": "Move process.nextTick() to run() method\n\nHope this fixes the tests. Thanks @janmeier"
},
{
"from": "human",
"value": "var util = require(\"util\")\n , EventEmitter = require(\"events\").EventEmitter\n\nmodule.exports = (function() {\n var CustomEventEmit... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce footer example col left BEMJSON\n"
},
{
"from": "human",
"value": "({\n block: 'footer',\n content: [\n {\n elem: 'col',\n elemMods: { position: 'left' },\n content: [\n { block: 'logo' },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add cancelFunc parameter for confirm dialog"
},
{
"from": "human",
"value": "define(\n\t[\n\t\t\"dojo/dom-construct\",\n\t\t\"dijit/form/Button\",\n\t\t\"dijit/Dialog\"\n\t],\n\tfunction (domConstruct, Button, Dialog) {\n\t\t\"use strict\";\n\n\t\tvar dialog = null;... | javascript | chosen |
[
{
"from": "system",
"value": "Remove compatibility detection, and refactor listeners to avoid unnecessary calls\n"
},
{
"from": "human",
"value": "var through = require('through2')\n\nfunction ChromeRuntimeStream(port) {\n var stream = through.obj(function (msg, enc, next) {\n port.postMessa... | javascript | chosen |
[
{
"from": "system",
"value": "Return `null` if array is empty\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function (arr) {\n\tvar arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86';\n\tvar platform = process.platform;\n\n\treturn arr.filter(fu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error message in t.test()"
},
{
"from": "human",
"value": "'use strict';\n\nconst t = require('tcomb-validation');\n\nconst Type = t.irreducible('Type', t.isType);\n\nfunction test (value, type) {\n const result = t.validate(value, type);\n if (!result.isVal... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure we only travers arrays"
},
{
"from": "human",
"value": "module.exports = function (vnode) {\n var result = {}\n\n function parser (res, vnode) {\n var attrs = vnode.attrs || {}\n\n function append (name, value) {\n (res[name] = res[name] || []... | javascript | chosen |
[
{
"from": "system",
"value": "Update geocoder interface to reflect that geocoders can send back results that destinations of type Rectangle or Cartesian3\n"
},
{
"from": "human",
"value": "/*global define*/\ndefine([\n './defineProperties',\n './DeveloperError'\n ], function(\n d... | javascript | chosen |
[
{
"from": "system",
"value": "Reset received size to 0 on the request event.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar throttle = require('throttleit');\n\nfunction requestProgress(request, options) {\n var reporter;\n var delayTimer;\n var delayCompleted;\n var totalSi... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for a single array or multiple arguments\n"
},
{
"from": "human",
"value": "var Promise = require('es6-promise').Promise;\nvar compose = require('static-compose');\n\nmodule.exports = function (formulas) {\n\n var promises = formulas.map(function(plugins) {... | javascript | chosen |
[
{
"from": "system",
"value": "Add result catch, better logging\n"
},
{
"from": "human",
"value": "'use strict'\nconst _ = require('lodash')\nconst Promise = require('bluebird')\nvar arr = []\n\nmodule.exports = function loadAllPages (callFx, opts) {\n opts['page'] = opts.page || 1\n\n return P... | javascript | chosen |
[
{
"from": "system",
"value": "Use arrow function for returns the response.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n'use strict';\n\nconst fetch = require('node-fetch');\n\nmodule.exports = function (url) {\n return fetch(`http://registro.br/cgi-bin/avail/?qr=${url}`)\n .then(f... | javascript | chosen |
[
{
"from": "system",
"value": "Configure CDN by config to allow NonHTTP app-usage"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n\n name: 'ember-cli-sentry',\n\n contentFor: function(type, config){\n if (type === 'body') {\n return '<scrip... | javascript | chosen |
[
{
"from": "system",
"value": "Read Key from correct directory\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst fs = require('fs')\nconst KEY = fs.readFileSync('./.KEY', 'utf-8')\n/*\n * Dota Discord Bot\n *\n * Commando Docs: https://discord.js.org/#/docs/commando/master/ge... | javascript | chosen |
[
{
"from": "system",
"value": "Exit the program when the Node.js version is incompatible with The Lounge\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n\"use strict\";\n\nprocess.chdir(__dirname);\n\n// Perform node version check before loading any other files or modules\n// Doing this... | javascript | chosen |
[
{
"from": "system",
"value": "Allow json to be false"
},
{
"from": "human",
"value": "var Writable = require('stream').Writable;\nvar loggly = require('loggly');\nvar util = require('util');\nvar extend = util._extend;\n\nmodule.exports = LogglyStream;\n\nutil.inherits(LogglyStream, Writable);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change how default options were set\n\nIt previously ignored the case when ngModuleName was not set and\noptions was defined. It should now set the default ngModuleName when\nneeded if options was defined for any reason.\n"
},
{
"from": "human",
"value": "'use stric... | javascript | chosen |
[
{
"from": "system",
"value": "Update available log screen settings\n"
},
{
"from": "human",
"value": "var url = require('url');\nvar extend = require('xtend');\n\nmodule.exports = function matrixUrl(opts) {\n var _opts = {};\n\n if (typeof opts === 'string')\n _opts = url.parse(opts);\n if... | javascript | chosen |
[
{
"from": "system",
"value": "Clean temporary file after thyself\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar through = require('through2');\n\nvar spawn = require('child_process').spawn,\n tmpdir = require('os').tmpdir(),\n path = require('path'),\n fs = require('fs');\n\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"recieving store and sessions services\"\"\n\nThis reverts commit 0c410708be0bd112391b0f6f34d0a1cfca39ea85.\n"
},
{
"from": "human",
"value": "import Engine from 'ember-engines/engine';\nimport Resolver from 'ember-resolver';\nimport loadInitializer... | javascript | chosen |
[
{
"from": "system",
"value": "Add patch number to version\n"
},
{
"from": "human",
"value": "module.exports = {\n storeURL: {\n chrome: 'https://chrome.google.com/webstore/detail/gene-info/jggendahejbhkghnachhlomkkheomchp',\n edge: 'https://microsoftedge.microsoft.com/addons/detail/gene-i... | javascript | chosen |
[
{
"from": "system",
"value": "Add the mongoUrl for production\n"
},
{
"from": "human",
"value": "/**\n * @file Defines the provider settings.\n *\n * Will set the path to Mongo, and applications id\n * Most of the configuration can be done using system environment variables.\n */\n\nvar salesfor... | javascript | chosen |
[
{
"from": "system",
"value": "Update to use Buffer.alloc in place of deprecated new Buffer()\n"
},
{
"from": "human",
"value": "function isBrowser() {\n return typeof window !== 'undefined';\n}\n\nfunction isNode() {\n return typeof window === 'undefined';\n}\n\nfunction nodeBufferToArrayB... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from JSX to render functions\n"
},
{
"from": "human",
"value": "// Webpack config to serve the JSX component with bundled styles\n\nimport path from 'path';\n\nconst demoPath = path.join(__dirname, './demo');\nconst jsxPath = path.join(__dirname, './jsx');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add guidelines for connecting to mongolab\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar mongoose = require('mongoose');\n\nvar app = express();\n\n// connect to mongo database named \"bolt\"\n// uncomment this line to use a local database... | javascript | chosen |
[
{
"from": "system",
"value": "Set global variables as it should be\n"
},
{
"from": "human",
"value": "assert = require('assert');\nchai = require(\"chai\");\nchaiAsPromised = require(\"chai-as-promised\");\njsf = require('json-schema-faker');\nshould = require('should');\n\n// Load schemas\nmock... | javascript | chosen |
[
{
"from": "system",
"value": "Add radius_changed event as event\n"
},
{
"from": "human",
"value": "/**\n@const events\n@type array\nA list of all possible events that can be called on a Maps object.\n ref 'http://gmaps-samples-v3.googlecode.com/svn/trunk/map_events/map_events.html'\n**/\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Add check for trigger before running zig zag animation\n"
},
{
"from": "human",
"value": "import gsap from 'gsap';\nimport ScrollTrigger from 'gsap/ScrollTrigger';\ngsap.registerPlugin(ScrollTrigger);\n\nfunction zigZag () {\n gsap.timeline({\n scrollTrigger: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add setUp / tearDown examples\n"
},
{
"from": "human",
"value": "describe(\"Gilded Rose\", function() {\n\n it(\"should do something\", function() {\n\n });\n\n it(\"is a syntax example\", function() {\n expect(true).toBe(true);\n });\n\n});\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Update repository endpoint location for BI server"
},
{
"from": "human",
"value": "/**\n * Repository query\n */\nvar SavedQuery = Backbone.Model.extend({\n parse: function(response, XHR) {\n this.xml = response.xml;\n },\n \n url: function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove es6 parser options for node-tests\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n root: true,\n parserOptions: {\n ecmaVersion: 6,\n sourceType: 'module'\n },\n extends: 'eslint:recommended',\n env: {\n node: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test for key overriding target\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar configMergeLoader = require('../index.js');\n\ndescribe('configMergeLoader', function() {\n it('should return an function', function() {\n assert.equal(typeof ... | javascript | chosen |
[
{
"from": "system",
"value": "[CHORE] Add comma in db migration\n"
},
{
"from": "human",
"value": "var dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.createTable('ripple_addresses', {\n id: { type: 'int', primaryKey: true, autoIncrement: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add request & reply global methods\n"
},
{
"from": "human",
"value": "import debug from 'debug';\nimport Channel from './channel';\n\nconst dbg = debug('transceiver:main');\n\nexport default new class Transceiver {\n constructor() {\n dbg('Initializing transceiv... | javascript | chosen |
[
{
"from": "system",
"value": "Set an API load every hour as a scheduled job\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Dependencies\nvar config = require('./config');\nvar express = require('express');\nvar bodyParser = require('body-parser');\nvar methodOverrid... | javascript | chosen |
[
{
"from": "system",
"value": "Move to a more global date format"
},
{
"from": "human",
"value": "import moment from 'moment';\n\nexport default function shortDate(date) {\n var now = moment(new Date());\n var instance = moment(date);\n\n var currentYear = now.format('YYYY');\n var year = ins... | javascript | chosen |
[
{
"from": "system",
"value": "Support static html routes as well\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst path = require('path');\nconst favicon = require('serve-favicon');\nconst logger = require('morgan');\nconst bodyParser = require('body-parser');\n\ncons... | javascript | chosen |
[
{
"from": "system",
"value": "Update methodOverride call to express 4.x\n"
},
{
"from": "human",
"value": "// Module dependencies.\r\nvar express = require('express');\r\nvar ArticleProvider = require('./articleprovider-memory').ArticleProvider;\r\n\r\nvar app = express();\r\nvar bodyParser = re... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug when Return statement has no argument\n"
},
{
"from": "human",
"value": "var ReturnStatement = module.exports = function(argument) {\n this.type = 'ReturnStatement';\n this.argument = argument;\n this.async = false;\n};\n\nReturnStatement.prototype.norm... | javascript | chosen |
[
{
"from": "system",
"value": "Make name of pdf the name of the file with .pdf appended\n"
},
{
"from": "human",
"value": "class MCProjectDatasetsViewContainerComponentController {\n /*@ngInject*/\n constructor(mcdsstore, $stateParams, datasetsAPI, mcprojectstore2, projectDatasetsViewServic... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.