conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Replace keyword delete with doDelete for method name.\n"
},
{
"from": "human",
"value": "define(['jquery', 'backbone', 'tiddlerFormView', 'hbt!Tiddler'],\n function ($, Backbone, TiddlerFormView, template) {\n return Backbone.View.extend({\n\n e... | javascript | chosen |
[
{
"from": "system",
"value": "Fix KaTeX breaking stuff sometimes\n"
},
{
"from": "human",
"value": "const renderer = new marked.Renderer();\nconst katexOpts = {\n throwOnError: false,\n errorColor: '#F44336',\n};\nrenderer.code = function(code) {\n const r = katex.renderToString(code, {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move variable declaration and add section headers\n"
},
{
"from": "human",
"value": "'use strict';\n\n// TODO: clean-up\n\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar divide = require( 'compute-divide' );\nvar mean = require( 'compute-mean' );\nvar su... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary test util method\n"
},
{
"from": "human",
"value": "var obvs = require('../');\n\nexports.buildApp = function buildApp(options) {\n options = options || { logLevel: 'fatal' };\n var app = obvs.app.build(options);\n return app;\n};\n\nexports.b... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a test that must have accidentally got overwritten\n"
},
{
"from": "human",
"value": "jest.unmock('../priceInt');\n\ndescribe('priceInt', () => {\n it('creates a string with a $ in it', () => {\n const priceInt = require('../priceInt');\n expect(priceInt(... | javascript | chosen |
[
{
"from": "system",
"value": "Throw exceptions if key instances are not set\n"
},
{
"from": "human",
"value": "var Limit = function(keyName, ttl, maxLimit) {\n\n\t// {sourceName} inside the key name will be replaced by actual source name\n\t// {userID} inside the key name will be replaced by act... | javascript | chosen |
[
{
"from": "system",
"value": "Add Reference list model for Child Placement Considerations.\n"
},
{
"from": "human",
"value": "var keystone = require('keystone'),\n\tTypes = keystone.Field.Types;\n\n// Create model. Additional options allow menu name to be used what auto-generating URLs\nvar Chil... | javascript | chosen |
[
{
"from": "system",
"value": "Update check for `transitionend` on Android 4.1-3\n\nRef. https://github.com/Modernizr/Modernizr/issues/897\n"
},
{
"from": "human",
"value": "/*!\n{\n \"name\": \"Transition end event\",\n \"authors\": [\"Ivan Nikolić\"],\n \"notes\": [{\n \"name\": \"Moderni... | javascript | chosen |
[
{
"from": "system",
"value": "Remove localstorage -> jquery dependency\n\nWe no longer use jquery for browser detection here.\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"Simulates local storage on IE 6,7 using userData\",\n internal: true\n});\n\nPackage.on_use(function ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix compatibility intent name string for Actions on Google\n"
},
{
"from": "human",
"value": "const BotkitGActionsBot = require(__dirname + '/botkit');\nconst BaseController = require('../base-controler');\n\nmodule.exports = class GActionsController extends BaseCon... | javascript | chosen |
[
{
"from": "system",
"value": "Add create group method to PostIt class\n"
},
{
"from": "human",
"value": "import { connection, UserModel, GroupModel } from './models';\n\n/**\n * The User class\n * @author Babatunde Adeyemi <tundewrites@gmail.com>\n * @class\n */\nclass PostIt {\n\n /**\n * In... | javascript | chosen |
[
{
"from": "system",
"value": "Add down testing though not functional\n"
},
{
"from": "human",
"value": "const assert = require('chai').assert;\nconst Bird = require('../lib/bird')\n\ndescribe (\"Bird\", function(){\n context('with default attributes', function(){\n var bird = new Bird();\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove concepts link and rename try it to Homepage.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport styled from 'styled-components'\n\nimport rem from '../../utils/rem'\nimport { navbarHeight } from '../../utils/sizes'\nimport NavSeparator from ... | javascript | chosen |
[
{
"from": "system",
"value": "Add extra literal to make sure control chars are escaped\n"
},
{
"from": "human",
"value": "var hello = \"Hi\";\nvar world = \"Earth\";\n[\n 1,\n 100000,\n -200,\n 1.2345,\n 1e100,\n -2e9837,\n Infinity,\n null,\n this,\n true,\n false,\n NaN,\n \"foo\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for error response on bad connection string\n"
},
{
"from": "human",
"value": "import chai, {expect} from 'chai';\nimport createApp from '../../src/app';\nimport dbFixtures from '../utils/dbFixtures';\n\ndescribe('App', function() {\n before(async functi... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce timeout on message response test\n"
},
{
"from": "human",
"value": "describe(\"history\", function() {\n\tbeforeEach(function(done) {\n\t\tspyOn(chrome.runtime, \"sendMessage\").and.callThrough();\n\t\tdone();\n\t});\n\n\tit(\"expects to send a message reques... | javascript | chosen |
[
{
"from": "system",
"value": "Change URL for deleting competition\n\nStill doesn't work, see issue #48\n"
},
{
"from": "human",
"value": "angular.module(\"AdminHome\", []).controller(\"AdminHomeController\", function ($scope, $http) {\n $scope.competitionId = competitionId\n\n updateCompetitio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ‘Duplicate data property in object literal not allowed in strict mode.’\n"
},
{
"from": "human",
"value": "import React from 'react';\n\n\nclass ArrayItemIndex extends React.Component {\n static propTypes = {\n index: React.PropTypes.number,\n }\n\n render... | javascript | chosen |
[
{
"from": "system",
"value": "Allow empty editorState to be created using a string of text.\n\n`createEditorState` can now also accept a string to initiate\na new editorState\n"
},
{
"from": "human",
"value": "import {\n EditorState,\n convertFromRaw,\n CompositeDecorator,\n} from 'draft-js';... | javascript | chosen |
[
{
"from": "system",
"value": "Improve code style in main export file\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Weibull distribution probability density function (PDF).\n*\n* @module @stdlib/math/base/dist/weibull/pdf\n*\n* @example\n* var pdf = require( '@stdlib/math/base/dist/w... | javascript | chosen |
[
{
"from": "system",
"value": "Remove src from loaded assets\n"
},
{
"from": "human",
"value": "// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://www.ap... | javascript | chosen |
[
{
"from": "system",
"value": "Move app build to before install step\n\nThe translations are compiled at `postinstall`, but they don't exist by then because the app is created later. Instead move the app creation phase to before \"install\" so all assets are correctly in place.\n"
},
{
"from": "human... | javascript | chosen |
[
{
"from": "system",
"value": "Use destrucuting syntax for default in rebuild\n"
},
{
"from": "human",
"value": "import extend from 'extend'\n\nconst configs = {\n main: null,\n watch: false,\n}\n\nrebuild()\n\nexport default configs\n\nexport function rebuild(overrides) {\n const environment ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix space for the tests"
},
{
"from": "human",
"value": "module.exports = inject\n\nfunction inject (bot) {\n bot.isAlive = true\n\n bot._client.on('respawn', (packet) => {\n bot.isAlive = false\n bot.emit('respawn')\n })\n\n bot._client.once('update_healt... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure Date and Time exist\n\nApparently sometimes they do not.\n"
},
{
"from": "human",
"value": "\nmodule.exports = [\n {\n value: function(n2k) {\n return n2k.fields.Date.replace(/\\./g, '-') + \"T\" + n2k.fields.Time + \"Z\";\n },\n node: 'navi... | javascript | chosen |
[
{
"from": "system",
"value": "feat(redux-module-mercury): Set mercury to connected if already connected from instance\n"
},
{
"from": "human",
"value": "export const SET_CONNECTING = `mercury/SET_CONNECTING`;\nexport const SET_CONNECTED = `mercury/SET_CONNECTED`;\n\nexport function updateStatusC... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor project hover events in javascript file\n"
},
{
"from": "human",
"value": "$(document).on('ready', function() {\n\n $('#facebook').hover(\n function() { colorChange($(this), \"#4C66A4\") },\n function() { colorChange($(this), \"#393939\") }\n );\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Implement button on 'about' page builder\n"
},
{
"from": "human",
"value": "import * as PIXI from 'pixi.js';\nimport { colorCode } from '../../helpers';\n\nimport { rendererSize } from '../../app';\n\nexport default function aboutBuilder (type = 'STARTUP') {\n let ... | javascript | chosen |
[
{
"from": "system",
"value": "Add CSS check in didCutTheMustard method\n"
},
{
"from": "human",
"value": "/**\n * main.js\n *\n * We keep things simple here on the countryside. No complex\n * module loading or whatever using Browserify or RequireJS.\n * Just one plain, simple vanilla JavaScript ... | javascript | chosen |
[
{
"from": "system",
"value": "Send game mode to GA\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\tvar self = this;\n\tself.setGameType = function(type) {\n\t\t$('.game-container').removeClass('ad');\n\t\t$('.game-container').removeClass('ap');\n\t\t$('.game-container').remo... | javascript | chosen |
[
{
"from": "system",
"value": "Add debugging statements to try to pinpoint json parsing issue\n"
},
{
"from": "human",
"value": "var NodeHelper = require(\"node_helper\");\nconst exec = require('child_process').exec;\nconst path = require('path');\nconst request = require('request');\n\nmodule.ex... | javascript | chosen |
[
{
"from": "system",
"value": "Add quoted string expression example\n"
},
{
"from": "human",
"value": "// Disallows the use of bare strings in a template\n//\n// passes:\n// <div>{{evaluatesToAString}}</div>\n//\n// breaks:\n// <div>A bare string</div>\n\nvar calculateLocationDisplay = require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Tidy up gulp jsdoc task\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n jsdoc = require('gulp-jsdoc'),\n livereload = require('gulp-livereload'),\n docsSrcDir = './assets/js/**/*.js',\n docsDestDir = './docs/js',\n jsDocTask;\n\njsDoc... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments; and run task before watching\n"
},
{
"from": "human",
"value": "var gulp = require(\"gulp\");\nvar sass = require(\"gulp-sass\");\nvar nano = require('gulp-cssnano');\n\ngulp.task(\"sass\", function () {\n gulp.src(\"./sass/**/*.scss\")\n .pi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix `del` usage due to updated dependency version\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n uglify = require('gulp-uglify'),\n del = require('del'),\n karma = require('karma').server;\n\ngulp.task('minify', function () {\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Use word-wrap and overflow-wrap since word-wrap is not supported in Chrome et al\n"
},
{
"from": "human",
"value": "export default function() {\n return function({ addUtilities, variants, target }) {\n const wrapPropertyName = target('wordBreak') === 'ie11' ? 'w... | javascript | chosen |
[
{
"from": "system",
"value": "Add default to CLI and correct usage format\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar program = require('commander');\nvar packageInfo = require('../package.json');\n\nvar jokes = require('./jokes.js');\nvar advice = require('./advice.js');\nvar resume... | javascript | chosen |
[
{
"from": "system",
"value": "Make 'force system font stack' work on more sites\n\nBypass resource integrity restrictions"
},
{
"from": "human",
"value": "/* This should probably have ES6 to ES5 transpilation on when compiling to bookmarklet */\n\nconst version = '1.1';\n\nconst styles = `\nhtml... | javascript | chosen |
[
{
"from": "system",
"value": "Use PORT env variable if set\n"
},
{
"from": "human",
"value": "var express = require('express');\n\nvar app = express();\n\napp.use(express.static(__dirname + '/public'));\n\napp.listen(3000);\n"
},
{
"from": "gpt",
"value": "var express = require('expr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a sample data bug\n"
},
{
"from": "human",
"value": "//\n// Article\n//\n// The reason is not a plural form, because in accordance with the MongoDB manual.\n// http://docs.mongodb.org/manual/reference/operator/aggregation/project/\n//\n(function(coll){\n coll.r... | javascript | chosen |
[
{
"from": "system",
"value": "Use `babel-loader` instead of `babel`\n\nFix error\n\n```\nERROR in multi babel-polyfill ./index.js\nModule not found: Error: Can't resolve 'babel' in '/Users/argerich/dev/serverless-image-resizer'\nBREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for prev/next photo switching\n"
},
{
"from": "human",
"value": "export const getPrevNextPhotos = (state, currentPhotoId) => {\n const photos = state.photos\n let prevNextPhotos = {\n next: [],\n prev: [],\n }\n if (photos?.length) {\n let index = p... | javascript | chosen |
[
{
"from": "system",
"value": "Add scripts.js to scripts gulp pipe\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar autoprefixer = require('gulp-autoprefixer');\nvar cleanCSS = require('gulp-clean-css');\nvar concat = require('gulp-concat');\nvar gulp = require('gulp');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add sass and sass:watch tasks.\n"
},
{
"from": "human",
"value": "/**\n * Created by cfiloteo on 11/17/15.\n */\nvar gulp = require('gulp'),\n\trename = require('gulp-rename'),\n\tjade = require('gulp-jade'),\n\tbabel = require(\"gulp-babel\");\n\ngulp\n\t.task('... | javascript | chosen |
[
{
"from": "system",
"value": "Watch views/components/languages and restart server on change\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst gulp = require('gulp');\nconst cp = require('child_process');\nconst babel = require('gulp-babel');\nconst less = require('gulp-less');\nconst cle... | javascript | chosen |
[
{
"from": "system",
"value": "Change components folder to all lowercase\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport './App.css';\nimport TravelObject from './Components/TravelObject'\n\nclass App extends React.Component {\n render () {\n return(\n <div className=... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude `_tmp` directory from webpack-watch\n"
},
{
"from": "human",
"value": "let mix = require('laravel-mix');\nlet build = require('./tasks/build.js');\n\nmix.disableSuccessNotifications();\nmix.setPublicPath('source/assets/');\nmix.webpackConfig({\n plugins: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add error just to test\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst expect = require('chai').expect;\nconst Loader = require('../modules/loader');\nconst config = require('../config');\nconst image = 'https://www.google.es/images/branding/googlelogo/... | javascript | chosen |
[
{
"from": "system",
"value": "Add more tests for services/auth\n"
},
{
"from": "human",
"value": "describe('services/auth', () => {\n let auth\n\n beforeEach(() => {\n let path = require.resolve('services/auth')\n if (require.cache[path]) {\n delete require.cache[path]\n }\n a... | javascript | chosen |
[
{
"from": "system",
"value": "Use the default diag setting\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar argv = process.argv.slice(2)\n , path = require(\"path\")\n , dir = path.resolve(argv[0])\n , testDir = require(\"../lib/test-dir\")\n\ntestDir(dir, !process.env.nodiag, fu... | javascript | chosen |
[
{
"from": "system",
"value": "Add slow endpoint for testing timeouts\n"
},
{
"from": "human",
"value": "/*jshint strict:false */\n\nvar app,\n express = require('express'),\n cors = require('cors');\n\napp = express();\n\napp.get('/getjson', cors(), function (req, res) {\n res.json({hel... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor for better example of usage\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n beforeModel: function() {\n var translations = Ember.Object.create({\n 'PAGINATION_DISPLAYING': 'Displayin... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an unwanted page reload when entering username and password in the basic authentication form\n\nPrevent the default hyperlink action.\n"
},
{
"from": "human",
"value": "'use strict';\n\nSwaggerUi.Views.BasicAuthButton = Backbone.View.extend({\n\n\n initialize: ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle all Cloudflare errors as API down errors\nHandle all non 200 HTTP codes as fatal API errors\n"
},
{
"from": "human",
"value": "import ExtendableError from 'es6-error';\n\nimport makeWclUrl from './makeWclUrl';\n\nexport class ApiDownError extends ExtendableEr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove default argument syntax on getVersionedGithubPath()\n\nSummary:\nRemoves ES6 syntax of default arguments to fix website building as per #7434. [More info](https://github.com/facebook/react-native/pull/7434).\nCloses https://github.com/facebook/react-native/pull/7439\n\nD... | javascript | chosen |
[
{
"from": "system",
"value": "Disable SSR for speed testing\n"
},
{
"from": "human",
"value": "const path = require('path')\n\nmodule.exports = {\n http: {\n port: process.env.DEV ? 8080 : 8050,\n favicon: path.join(__dirname, '../assets/favicon.ico')\n },\n server: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix African Storybook loading by ensuring Hashi runs body.onload handlers.\n"
},
{
"from": "human",
"value": "import replaceScript from './replaceScript';\n\n/*\n * runs an array of async functions in sequential order\n */\nexport function seq(arr, index) {\n // fi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix default config usage ejs"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Module dependencies\n */\n\n// Native\nconst path = require('path');\n\n// Externals\nconst co = require('co');\nconst render = require('koa-ejs');\n\n/**\n * EJS hook\n */\n\nmod... | javascript | chosen |
[
{
"from": "system",
"value": "Add GA events for Explore detail footer links\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\n// Styles\nimport './styles.scss';\n\nfunction ExploreDetailFooterComponent(props) {\n const { setSidebarAnchor } = p... | javascript | chosen |
[
{
"from": "system",
"value": "Add post fetching on props update\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport PostItemContainer from '../../containers/PostItemContainer'\nimport debounce from '../../util/debounce'\n\nclass PostList extends Component {\n con... | javascript | chosen |
[
{
"from": "system",
"value": "Reset upload component on tag switch\n\nCloses #4755\n"
},
{
"from": "human",
"value": "var TagsSettingsMenuView = Ember.View.extend({\n saveText: Ember.computed('controller.model.isNew', function () {\n return this.get('controller.model.isNew') ?\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add property for disabled features\n"
},
{
"from": "human",
"value": "import mysql from './mysql';\nimport postgresql from './postgresql';\nimport sqlserver from './sqlserver';\nimport cassandra from './cassandra';\n\n\n/**\n * List of supported database clients\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to get readme\nSimple function that does a get request to get a GitHub's repo README\nfile and receive the data as html\n"
},
{
"from": "human",
"value": "const handleErrors = (response) => {\n if (!response.ok) {\n if (response.message) {\n th... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'global is not defined' error\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nfunction resolvePath(pathToResolve) {\n return path.resolve(__dirname, pathToResolve);\n}\n\nmodule.exports = {\n lintOnSave: false,\n\n pages: {\n 'index': {... | javascript | chosen |
[
{
"from": "system",
"value": "Implement get request in controller\n"
},
{
"from": "human",
"value": "// Ionic Starter App\n\n// angular.module is a global place for creating, registering and retrieving Angular modules\n// 'starter' is the name of this angular module example (also set in a <body>... | javascript | chosen |
[
{
"from": "system",
"value": "Improve storyRequest.js to use MemoryStore"
},
{
"from": "human",
"value": "var respond = require(\"./respond\");\n\n// Retrieve the requested stored resource \n// Such resources may contain unsafe data depending on their source\n\n\nfunction storeRequest(request, r... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console logs from importGlob\n"
},
{
"from": "human",
"value": "import glob from 'glob';\n\nexport default function(importPattern) {\n return glob.sync(importPattern)\n .filter(fileName => fileName.match(/\\.js$/))\n .map(fileName => {\n console.l... | javascript | chosen |
[
{
"from": "system",
"value": "Implement default next() and prev()\n"
},
{
"from": "human",
"value": "class KasenIterator {\n constructor(iter, func) {\n this.iter = iter;\n this.func = func;\n }\n\n // eslint-disable-next-line class-methods-use-this\n next() {\n throw new Error(\"no... | javascript | chosen |
[
{
"from": "system",
"value": "Add function for calculating time range in months\n"
},
{
"from": "human",
"value": "\nfunction daysInMonth(month,year) {\n return new Date(year, month + 1, 0).getDate();\n}\n\nfunction kmhToDegsPerH(kmh) {\n return kmh / 111;\n}\n\nmodule.exports.daysInMonth = da... | javascript | chosen |
[
{
"from": "system",
"value": "Remove meta tag for google\n"
},
{
"from": "human",
"value": "module.exports = o => `<head>\n <title>Tennisvuorot Helsingissä</title>\n <meta charset=\"utf-8\"/>\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\"/>\n <link rel=\"apple-touch-ic... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Make sure an object is being destructured at getPage\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport ReactDOMServer from \"react-dom/server\";\nimport { Route, StaticRouter } from \"react-router\";\nimport config from \"config\"; // Alia... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with not working reject application for leave shortcut\n\n* If a link within a selectable table is clicked, navigation to this\n link should occur instead of the navigation that occurs when clicking\n somewhere on the table row.\n\n* fixes #209\n"
},
{
"from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix svg fallbacks gulp task\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar gulpif = require('gulp-if');\nvar svg2png = require('gulp-svg2png');\nvar config = require('../config.js');\n\ngulp.task('svg2png', function() {\n return gulp.src(conf... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for configFileExist & configData methods\n"
},
{
"from": "human",
"value": "import test from 'ava'\n\nimport { ConfigService } from '../../../src/services/config'\n\ntest('test', t => {\n t.deepEqual([1, 2], [1, 2])\n})\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to work in DEV or PROD\n\n* If using Rpi, add PROD=true environment to enable Serial and GPIO\n* PROD=TRUE nodemon server.js\n"
},
{
"from": "human",
"value": "'use strict'\nvar express = require('express'),\n app = express(),\n config = require('./libs/... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment to HTMLValidator factory.\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 except in compliance wit... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing comma and fix alignment\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('config', [])\n .constant('config', {\n 'endpoint' : \"http://\"+window.location.hostname+\":8080\",\n 'provider' : \"basic\", // google, github, gitl... | javascript | chosen |
[
{
"from": "system",
"value": "Replace a video in example because previous one disappeared\n"
},
{
"from": "human",
"value": "// Mithril component which embeds four iframes with HTML videos\n\nconst MyComponent = {\n view(controller, args) {\n return m(\"div.ba.ma3.pa3.bg-light-purple\"... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused deep-merge dependency from File.\n"
},
{
"from": "human",
"value": "var path = require('path')\n , fs = require('fs')\n , clone = require('clone')\n , data = require('./data')\n , getset = require('deep-get-set')\n , DeepMerge = require('deep-merg... | javascript | chosen |
[
{
"from": "system",
"value": "Change document.title to test out if prerendering works.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('lodash');\n\nmodule.exports = {\n launch: _.once(function () {\n window.app = this;\n })\n};\n\nmodule.exports.launch();\n\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Add Push module during SDK init\n"
},
{
"from": "human",
"value": "import { Kinvey } from 'kinvey-javascript-sdk-core';\nimport { NetworkRack } from 'kinvey-javascript-sdk-core/build/rack/rack';\nimport { SerializeMiddleware } from 'kinvey-javascript-sdk-core/build/... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for more than one step, like npm does\n"
},
{
"from": "human",
"value": "module.exports = asyncMap\nfunction asyncMap (list, fn, cb_) {\n var n = list.length\n , results = []\n , errState = null\n function cb (er, data) {\n if (errState) return\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add small v in front of version\n"
},
{
"from": "human",
"value": "//@flow\n\n/*******************************************************************************\n * Imports\n *******************************************************************************/\n\nimport Re... | javascript | chosen |
[
{
"from": "system",
"value": "Add test of async compare\n"
},
{
"from": "human",
"value": "const {assert} = require('./common');\nconst Passwords = require('../passwords');\n\ndescribe('Passwords', () => {\n it('should be able to generate and compare hashes', async () => {\n const pass = 'ap... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'make test' for quiet make\n"
},
{
"from": "human",
"value": "/*\n * Code style test\n */\n\n/**\n * Module dependencies\n */\nvar helper = require('./helper');\n\n/**\n * Lint own code\n *\n * @param test\n */\nexports.MakeLint = function (test) {\n helper.tes... | javascript | chosen |
[
{
"from": "system",
"value": "Make good use of initialState\n"
},
{
"from": "human",
"value": "import {element} from 'deku';\n\nimport Editor from './editor';\nimport Menu from './menu';\nimport Panel from './panel';\n\nfunction render({props, state}, setState) {\n console.log({props, state});\... | javascript | chosen |
[
{
"from": "system",
"value": "Add a code comment. Reorganized code for clarity.\n"
},
{
"from": "human",
"value": "(function (root, factory) {\n if(typeof define === 'function' && define.amd) {\n define(['knockout'], factory);\n } else {\n factory(root.ko);\n }\n}(this, function(ko) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add js extension required for proper jspm importing\n"
},
{
"from": "human",
"value": "/**\n * @overview A module that initializes the Gallery with Flickity\n * @module Gallery.js\n*/\n\nimport Flickity from 'flickity';\nimport { ImgixSettings } from '../media/Imgix... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'should assert equality a better way'\n"
},
{
"from": "human",
"value": "describe(\"About Expects\", function() {\n\n //We shall contemplate truth by testing reality, via spec expectations. \n it(\"should expect true\", function() {\n expect(true).toBeTrut... | javascript | chosen |
[
{
"from": "system",
"value": "Add martserver-linkeddata-1:8081 to default target servers\n"
},
{
"from": "human",
"value": "//the list of servers we can access\nconst serverPaths = [\n 'http://malmo.lizenn.net:8080',\n 'http://localhost:8080',\n 'http://localhost:8081',\n 'http://malmo.lizen... | javascript | chosen |
[
{
"from": "system",
"value": "Update the sharding file to use the config\n"
},
{
"from": "human",
"value": "// At max, each shard should have ~2500 servers \n// This is used for when you get your bot on a ton of servers. \n\nconst Discord = require(\"discord.js\");\nconst Manager = new Discord.S... | javascript | chosen |
[
{
"from": "system",
"value": "Make it run regardless of if the port is present (and restart if it is present)\n"
},
{
"from": "human",
"value": "/*\n Simple example that takes a command line provided serial port destination and routes the output to a file of the same name with .log appended to ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lowercase conflict on previous test\n"
},
{
"from": "human",
"value": "var assert = require('assert');\n\nvar filename = require('../').filename;\n\n\ndescribe('Filename normalization', function() {\n it('should normalize spaces', function() {\n assert... | javascript | chosen |
[
{
"from": "system",
"value": "Clarify since it's not a shallow clone hehe"
},
{
"from": "human",
"value": "import thunk from \"redux-thunk\";\nimport { combineReducers, createStore, applyMiddleware, compose } from \"redux\";\nimport _gluestick from \"./reducers\";\nimport promiseMiddleware from ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow env variable LOG_LEVEL to override the log level\n"
},
{
"from": "human",
"value": "const LEVELS = {\n NOTHING: 0,\n ERROR: 1,\n WARN: 2,\n INFO: 4,\n DEBUG: 5,\n}\n\nconst createLevel = (label, level, currentLevel, loggerFunction) => (message, extra = {}... | javascript | chosen |
[
{
"from": "system",
"value": "Set parameters for game field from server\n"
},
{
"from": "human",
"value": "function sockets(){\n var socket = new WebSocket(\"ws://localhost:8765\");\n window.frequency = 1;\n window.height = 0;\n window.width = 0;\n var hero = {};\n window.heroI... | javascript | chosen |
[
{
"from": "system",
"value": "Switch new relic to ‘info’ logging\n"
},
{
"from": "human",
"value": "/**\n * New Relic agent configuration.\n *\n * See lib/config.defaults.js in the agent distribution for a more complete\n * description of configuration variables and their potential values.\n */\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove an extra anonymous function\n"
},
{
"from": "human",
"value": "var expect = require('expect.js');\nvar seeds = require('../seeds');\nvar Feature = require('../feature');\n\ndescribe('Feature', function () {\n before(function (done) {\n seeds(done);\n });... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the order of parameters for assert.equals()\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar seeds = require('../seeds');\nvar Feature = require('../feature');\n\ndescribe('Feature', function () {\n before(function (done) {\n seeds(don... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test data coming back as undefined.\n"
},
{
"from": "human",
"value": "import $ from 'jquery';\nimport getScrubbedData from './dataUtils';\nimport testData from '../../test/data/test-data';\nimport apiKey from '../../test/apiKey';\n\nconst getWeatherData = locat... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.