conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix a bug where widgets wouldn't be rendered w/ their themes in wysiwyg\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { VegaChart, getVegaTheme } from 'widget-editor';\n\n// /widget_data.json?widget_id=\...
javascript
chosen
[ { "from": "system", "value": "style(controllers): Fix whitespace between conditional statement.\n\nThis commit makes it less likely that V8 will\nmisinterpret where our if/else statement begins and\nends. The error and success responses are easier to\nread for both machines and humans.\n" }, { "from...
javascript
chosen
[ { "from": "system", "value": "Fix up a broken js-test.\n\nThis test was asserting that a thing was itself, rather than what it was\nsupposed to be asserting (that a thing's JSON-serialization was correct).\n\nTesting done:\nRan js-tests.\n\nReviewed at https://reviews.reviewboard.org/r/8735/\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Use 7 chars for git commit hash, not 8\n\nConsistent with GitHub\n" }, { "from": "human", "value": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst gitDir = path.resolve(__dirname, \"..\", \".git\");\n\nfunction getPackageVersion() {\n const p...
javascript
chosen
[ { "from": "system", "value": "Fix videoLength issue (API.totalTime.getTime() -> API.totalTime)" }, { "from": "human", "value": "(function(){\n'use strict';\nangular.module('uk.ac.soton.ecs.videogular.plugins.cuepoints', [])\n\t.directive(\n\t\t'vgCuepoints',\n\t\t[function() {\n\t\t\treturn {\n\...
javascript
chosen
[ { "from": "system", "value": "Save name as user profile.\n" }, { "from": "human", "value": "Accounts.onCreateUser(function(options, user) {\n if (options.profile) {\n options.profile.picture = 'http://graph.facebook.com/' + user.services.facebook.id + '/picture/?type=large';\n user.profil...
javascript
chosen
[ { "from": "system", "value": "Add public interface from previous client. " }, { "from": "human", "value": ";(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return (root.Opbeat = factory())\n })\n } else {\n root.Opbeat = fa...
javascript
chosen
[ { "from": "system", "value": "Add tests to ensure the /webpack-dev-server/ endpoint is available\n" }, { "from": "human", "value": "\"use strict\";\n\nvar commonBaseDir = \"../../../\";\n\nvar tst = require(commonBaseDir + \"common/test/webdriverTestHelper\");\nvar webpackDevServer = require(com...
javascript
chosen
[ { "from": "system", "value": "Replace line endings to lf and add default param as empty string for `handlerName`\n" }, { "from": "human", "value": "import forEach from 'lodash/collection/forEach';\r\nimport isEmpty from 'lodash/lang/isEmpty';\r\nimport isFunction from 'lodash/lang/isFunction';\r...
javascript
chosen
[ { "from": "system", "value": "Use minWidth instead of width for badges.\n" }, { "from": "human", "value": "import React from 'react'\nimport Radium from 'radium'\nimport Colors from './Colors'\n\nlet container = {\n height: '3rem',\n width: '4rem',\n display: 'flex',\n flexDirection:...
javascript
chosen
[ { "from": "system", "value": "Fix document.ready function for future Nextcloud versions\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2017\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(fun...
javascript
chosen
[ { "from": "human", "value": "Remove flash notifications from dom after 2.5 seconds\n" }, { "from": "gpt", "value": "$(function() {\n // Remove flash notifications from dom after 2.5 seconds\n if ($('#flash_notifications').length) {\n setTimeout(function() {\n $('#flash_notifications')....
javascript
chosen
[ { "from": "system", "value": "Create post request for zipcode\n" }, { "from": "human", "value": "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy o...
javascript
chosen
[ { "from": "system", "value": "Fix typo in variable name.\n" }, { "from": "human", "value": "import \"../core/global\";\nimport \"../net/parseURLQueryTerms\"\n\nvar sn_env = {\n\tdebug : false,\n\thost : 'data.solarnetwork.net',\n\ttls : (function() {\n\t\treturn (global !== undefined \n\t\t\t&& ...
javascript
chosen
[ { "from": "system", "value": "Improve text generation between classes and methods.\n" }, { "from": "human", "value": "/**\n * Define an esi_link tag. This is a bit of a hack but it allows us to include a\n * link to a relative path (which jsdoc fails to recognize as a valid URL), and\n * it does...
javascript
chosen
[ { "from": "system", "value": "Add rowspan and colspan attribute bindings\n\nAdded rowspan and colspan attribute bindings for table header.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from './template';\n\nconst {\n computed\n} = Ember;\n\nexport default Ember.Co...
javascript
chosen
[ { "from": "system", "value": "Return undefined when parsing would return 0\n" }, { "from": "human", "value": "'use strict';\n\nexports.isPast = function (month, year) {\n return Date.now() >= new Date(year, month);\n};\n\nexports.month = {\n parse: function (month) {\n return ~~month;\n },...
javascript
chosen
[ { "from": "system", "value": "Fix the Parse api keys\n" }, { "from": "human", "value": "define([\n 'marionette',\n 'parse',\n //'localforage',\n 'core/module',\n 'intro/module',\n 'app/module',\n 'bitstamp/module'\n ], function (\n Marionette,\n Parse,\n //localfor...
javascript
chosen
[ { "from": "system", "value": "Allow annotations and inline-nodes in TableCells.\n" }, { "from": "human", "value": "import { XMLTextElement } from 'substance'\n\nexport default class TableCellNode extends XMLTextElement {\n constructor (...args) {\n super(...args)\n\n this.rowIdx = -1\n ...
javascript
chosen
[ { "from": "system", "value": "Remove console logging from collection trigger state\n" }, { "from": "human", "value": "class GelatoCollection extends Backbone.Collection {\n\n _handleRequestEvent(options) {\n let clonedOptions = _.clone(options);\n options.error = () => {\n this.state...
javascript
chosen
[ { "from": "system", "value": "Return promise in service methods\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Service.extend({\n device: null,\n server: null,\n service: null,\n characteristic: null,\n\n isAvailable() {\n return 'bluetooth' in navi...
javascript
chosen
[ { "from": "system", "value": "Fix random bug in Foursquare\n" }, { "from": "human", "value": "//\n// FourSquare\n//\nhello.init({\n\tfoursquare : {\n\t\tname : 'FourSquare',\n\t\t// Alter the querystring\n\t\tquerystring : function(qs){\n\t\t\tvar token = qs.access_token;\n\t\t\tdelete qs.access...
javascript
chosen
[ { "from": "system", "value": "Disable the save button when there's nothing to save\n" }, { "from": "human", "value": "import React, { Component } from 'react'\n\nimport styles from './ProjectButtons.styl'\n\nexport default class extends Component {\n constructor() {\n super()\n this.state...
javascript
chosen
[ { "from": "system", "value": "Disable redux devtools in production\n" }, { "from": "human", "value": "/* eslint global-require: 0 */\nimport { createStore, applyMiddleware } from 'redux';\nimport thunk from 'redux-thunk';\nimport createDebounce from 'redux-debounced';\nimport rootReducer from '....
javascript
chosen
[ { "from": "system", "value": "Fix .endsWith() not matching empty string on 0.10\n" }, { "from": "human", "value": "/*jshint node: true */\n\nmodule.exports = {\n\n /**\n * Returns true if and only if the string value of the first argument\n * ends with the given suffix. Otherwise, ret...
javascript
chosen
[ { "from": "system", "value": "Remove NavLink: unexistent in v2;\nCreate two auxiliary components to apply the correct CSS class(es) to the links.\n" }, { "from": "human", "value": "import React from 'react'\nimport { NavLink } from 'gatsby'\n\nimport styles from './navigation.module.styl'\n\nexp...
javascript
chosen
[ { "from": "system", "value": "Exit with a non-zero status code on test failure(s)\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar Mocha = require('mocha');\n\nvar mocha = new Mocha();\nmocha.reporter('spec').ui('tdd');\n\nmocha.addFile('test/basicPubSub.js');\n\nvar runner = mocha....
javascript
chosen
[ { "from": "system", "value": "Create stub for \"upsert\" as well\n" }, { "from": "human", "value": "import { Mongo } from 'meteor/mongo';\nimport sinon from 'sinon';\nimport jsc from 'jsverify';\n\nexport function union (array1, array2) {\n const result = new Set(array1);\n for (const item of ...
javascript
chosen
[ { "from": "system", "value": "Add const to feature for of loop\n" }, { "from": "human", "value": "const { MIN_ECMA_VERSION } = require('./constants');\n\nconst astTypeToFeatures = getAstTypeToFeatures(require('../data/es-features'));\n\nfunction getAstTypeToFeatures(esFeatures) {\n const astTyp...
javascript
chosen
[ { "from": "system", "value": "Add test to check for \"HyperdeckCore\"\n" }, { "from": "human", "value": "var index = require('../src/index');\n\ndescribe('index', function() {\n it('should provide the Hyperdeck class', function() {\n index.Hyperdeck.should.be.ok;\n });\n});\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Add acceptance test for showing users\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { module, test, skip } from 'qunit';\nimport startApp from 'ttz/tests/helpers/start-app';\n\nlet application;\n\nmodule('Acceptance | Index', {\n beforeEach(...
javascript
chosen
[ { "from": "system", "value": "Remove .only() call for tests. Sorry\n" }, { "from": "human", "value": "'use strict';\n\nvar validation = require('../lib/index')\n, app = require('./app')\n, should = require('should')\n, request = require('supertest');\n\ndescribe.only('set default values', functi...
javascript
chosen
[ { "from": "system", "value": "Comment tests better, a bit\n" }, { "from": "human", "value": "var assert = require('assert');\n\ndescribe('Landing page', function() {\n it('should have the correct title', function(done, server, client) {\n // Get the title with some Laika mumbo jumbo and a da...
javascript
chosen
[ { "from": "system", "value": "Fix removing the order of inventory\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('inventory.controllers')\n .controller('OrderTableCtrl', ['$scope', 'orderService', 'formService',\n function ($scope, orderService, formService) {\n $sco...
javascript
chosen
[ { "from": "system", "value": "Add route to mobilizations list\n" }, { "from": "human", "value": "import React from 'react';\nimport { Route } from 'react-router';\nimport Application from '../../app/scripts/containers/Application.jsx';\nimport Login from '../../app/scripts/pages/Login.jsx';\n\ne...
javascript
chosen
[ { "from": "system", "value": "Set a maximum cached API calls requests to 100\n" }, { "from": "human", "value": "// @flow\n\nimport type { Cache } from '../types/Cache'\n\nconst DEFAULT_MAX_AGE = 15 * 60 * 1000 // 15 minutes\nconst STORE = 'api-cacher'\n\nclass Cacher {\n load(options: {\n ke...
javascript
chosen
[ { "from": "system", "value": "Use moment at the last minute\n" }, { "from": "human", "value": "var path = require(\"path\");\nvar _ = require(\"lodash\");\n\n\n// -----------------------------------------------------------------------------\n// Make tags snake case\n// ---------------------...
javascript
chosen
[ { "from": "system", "value": "Test uniq when string is input.\n" }, { "from": "human", "value": "var codeMelon = codeMelon || {};\n\n(function(_c) {\n _c.utils = _c.utils || {};\n\n test( \"dedupe test\", function() {\n var arr = ['cat', 'dog', 'man', 'cat', 'mouse', 'dog'],\n ...
javascript
chosen
[ { "from": "system", "value": "Put responses in pingdom xml format\n" }, { "from": "human", "value": "var Hapi = require('hapi');\nvar server = new Hapi.Server(3000);\n\nserver.route({\n method: 'GET',\n path: '/',\n handler: function (request, reply) {\n reply('Transaction Monito...
javascript
chosen
[ { "from": "system", "value": "Update span element with remaining chars count\n" }, { "from": "human", "value": "$(function() {\n $('[data-behaviour=\"character-limited\"]').each(function() {\n $(this).on(\"keyup\", characterCounter);\n });\n\n function characterCounter() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix test for Node 0.12\n" }, { "from": "human", "value": "'use strict'\n\nvar fs = require('fs')\nvar path = require('path')\n\nvar expect = require('chai').expect\nvar postcss = require('postcss')\n\nvar themePlugin = require('../index')\n\nvar CSS_INPUT_FILE = __d...
javascript
chosen
[ { "from": "system", "value": "Add a test environment tag\n" }, { "from": "human", "value": "global.chai = require(\"chai\");\nglobal.expect = chai.expect;\nglobal.sinon = require(\"sinon\");\n\nvar sinonChai = require(\"sinon-chai\");\nchai.use(sinonChai);\n\n\nvar app = require('../lib/app');\n...
javascript
chosen
[ { "from": "system", "value": "Support chai expectations for immutables.\n" }, { "from": "human", "value": "import jsdom from 'jsdom';\n\nconst doc = jsdom.jsdom('<!doctype html><html><body></body></html>');\nconst win = doc.defaultView;\n\nglobal.document = doc;\nglobal.window = win;\n\nObject.k...
javascript
chosen
[ { "from": "system", "value": "Define all functions the same way\n" }, { "from": "human", "value": "function getLogin(){\n return window.location.hash.slice(1)\n}\n\nvar foundTemplate = $('#template').html();\nMustache.parse(foundTemplate);\n\nvar loadData = function(login, cb){\n if(login){\n ...
javascript
chosen
[ { "from": "system", "value": "Fix errors related to missing shebang\n\nResolves #38\n" }, { "from": "human", "value": "'use strict'\nvar meow = require('meow')\nvar hacktoberFest = require('./main.js')\n\nconst cli = meow({\n flags: {\n year: {\n type: 'number',\n alias: 'y',\n ...
javascript
chosen
[ { "from": "system", "value": "Add initializaion of user and server module,put sso tenant configuration into registry,Trigger super tenant TenantLoad event\n" }, { "from": "human", "value": "var configs = require('/config/sso.js').config();\n\nvar server = require('/modules/server.js');\nserver.i...
javascript
chosen
[ { "from": "system", "value": "Fix e2e test on headquarter metadata\n" }, { "from": "human", "value": "const { expect } = require('chai')\nconst { metadata } = require('../../../../../src/lib/urls')\n\ndescribe('Metadata', () => {\n it('endpoint should return headquarter type', () => {\n cy.r...
javascript
chosen
[ { "from": "system", "value": "Reduce size of console window on app startup\n" }, { "from": "human", "value": "var Proxy = require('./proxy');\n\nconsole.log('Background page initialised');\n\nvar config = {\n tcp: {\n address: '127.0.0.1',\n port: 9009\n },\n consoleType: 'basic' // 'ad...
javascript
chosen
[ { "from": "system", "value": "Allow customizing a template extension in requirejs config\n" }, { "from": "human", "value": "define([\"handlebars\"], function(Handlebars) {\n var buildMap = {};\n\n return {\n\n // http://requirejs.org/docs/plugins.html#apiload\n load: function (name, pare...
javascript
chosen
[ { "from": "system", "value": "Create ajax return for posting comment\n" }, { "from": "human", "value": "$(document).on(\"ready\", function() {\n\n\n});\n" }, { "from": "gpt", "value": "$(document).on(\"ready\", function() {\n\n // $(\"a\").click(\".snowflake\", function(event){\n /...
javascript
chosen
[ { "from": "system", "value": "Add test for cyrillic characters.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar slugTestCases = [\n [\"\", \"\"]\n ,[\" Jack & Jill like numbers 1,2,3 and 4 and silly characters ?%.$!/\",\n \"jack-jill-like-numbers-123-and-4-and-silly-characte...
javascript
chosen
[ { "from": "system", "value": "Test that it is a method\n" }, { "from": "human", "value": "var businessman = businessman || {}\n\ndescribe( 'businessman specs', function () {\n\n var stores\n\n it( 'Install Worker', function ( done ) {\n businessman.subscribe( 'create_client_store', ...
javascript
chosen
[ { "from": "system", "value": "Fix typo with MutationObserver length\n" }, { "from": "human", "value": "var title = document.querySelector(\"title\");\nif (title!=null){\n\tvar observer = new MutationObserver(function(mutations){\n\t\tmutations.forEach(function(mutation){\n\t\t\tif (mutation.adde...
javascript
chosen
[ { "from": "system", "value": "Add back in global event emitter\n" }, { "from": "human", "value": "var SDL = module.exports = require('./build/default/node-sdl.node');\n\n// Easy event emitter based event loop. Started automatically when the first\n// listener is added.\nvar events;\nObject.defi...
javascript
chosen
[ { "from": "system", "value": "Handle Error in Search form with a flash message and 404 view\n" }, { "from": "human", "value": "var keystone = require('keystone');\n\nexports = module.exports = function(req, res) {\n\n\tvar query = req.body.query;\n\tvar cookie = req.cookies.cookieCountry;\n\n\t/...
javascript
chosen
[ { "from": "system", "value": "Exclude node_modules from Babel processing\n" }, { "from": "human", "value": "var webpack = require('webpack');\n\nvar HtmlWebpackPlugin = require('html-webpack-plugin'),\n ExtractTextPlugin = require('extract-text-webpack-plugin');\n\nmodule.exports = {\n entry...
javascript
chosen
[ { "from": "system", "value": "Remove old debug valu from content picker\n" }, { "from": "human", "value": "//used for the media picker dialog\r\nangular.module(\"umbraco\").controller(\"Umbraco.Dialogs.ContentPickerController\",\r\n\tfunction ($scope, eventsService, $log) {\t\r\n\tvar dialogOpti...
javascript
chosen
[ { "from": "system", "value": "Improve serialization performance by V8 trick\n" }, { "from": "human", "value": "'use strict'\n\n/**\n * Copyright 2016-present, Dustin Deus (deusdustin@gmail.com)\n * All rights reserved.\n *\n * This source code is licensed under the MIT-style license found in the...
javascript
chosen
[ { "from": "system", "value": "Remove an old, unused helper\n" }, { "from": "human", "value": "FilterCheckboxes = {\n title: 'Checkboxes'\n, name: 'checkboxes'\n, items: [{\n label: 'Example'\n , name: 'example'\n }]\n, wrapperClassName: 'filterCheckboxes'\n, init: function () {\n var se...
javascript
chosen
[ { "from": "system", "value": "Load DQuestions contract instead of SimpleStorage\n" }, { "from": "human", "value": "import initContract from 'truffle-contract'\nimport contractDefinition from 'contracts/SimpleStorage.json'\n\nexport const getAccounts = web3 =>\n new Promise((resolve, reject) => ...
javascript
chosen
[ { "from": "system", "value": "Update LESS dep for Meteor 1.2\n" }, { "from": "human", "value": "Package.describe({\n name: \"mdg:camera\",\n summary: \"Photos with one function call on desktop and mobile.\",\n version: \"1.1.4\",\n git: \"https://github.com/meteor/mobile-packages\"\n});\n\nC...
javascript
chosen
[ { "from": "system", "value": "Update vanilla websocket connector to accept an opts argument\n" }, { "from": "human", "value": "var WebSocket = require('ws');\nvar reHttpSignalhost = /^http(.*)$/;\nvar reTrailingSlash = /\\/$/;\n\nfunction connect(signalhost) {\n // if we have a http/https signa...
javascript
chosen
[ { "from": "system", "value": "Add note regarding unbiased shuffles\n" }, { "from": "human", "value": "const knuthShuffle = (arr) => {\n for (let i = 0; i < arr.length; i++) {\n // Generate a random number between 0 and i\n let rnd = Math.floor((Math.random() * (i + 1)));\n\n // Swap th...
javascript
chosen
[ { "from": "system", "value": "Set webpack publicPath to /static/\n\n" }, { "from": "human", "value": "var path = require(\"path\");\nvar HTMLPlugin = require(\"html-webpack-plugin\");\nvar CleanPlugin = require(\"clean-webpack-plugin\");\n\nvar config = {\n\n entry: \"./src/js/app.js\",\n\n ...
javascript
chosen
[ { "from": "system", "value": "Remove loading directive after request fails\n" }, { "from": "human", "value": ";(function(window) {\n 'use strict';\n\n var angular = window.angular;\n var ImageLoader = window.ImageLoader;\n var ismobile = window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPo...
javascript
chosen
[ { "from": "system", "value": "Refactor service resource definition schema to use JSON Schema primitive data type descriptor functions\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = () => ({\n 'title': 'Service Resource Definition',\n 'description': 'Defines the resour...
javascript
chosen
[ { "from": "system", "value": "Fix selector for update credit card form\n" }, { "from": "human", "value": "$(function() {\n $(\"#credit-card input, #credit-card select\").attr(\"disabled\", false);\n\n $(\"#new_user, .edit_user\").submit(function() {\n var form = this;\n $(\"#user_submit\...
javascript
chosen
[ { "from": "system", "value": ":art: Install pacakge-deps on initial activate of packages\n\nInstead of having an idle callback for the purpose\n" }, { "from": "human", "value": "/* @flow */\n\nimport { CompositeDisposable, Disposable } from 'atom'\n\nimport Linter from './main'\nimport type { UI...
javascript
chosen
[ { "from": "system", "value": "Attach links to read more\n" }, { "from": "human", "value": "export const defaultTypes = {\n '2.x': [\n 'string',\n 'long',\n 'integer',\n 'short',\n 'byte',\n 'double',\n 'float',\n 'date',\n 'boolean',\n 'binary',\n 'object',\n ...
javascript
chosen
[ { "from": "system", "value": "Add `-s` option to `npm install`\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar ted = require('../ted')\nvar sh = require('shelljs')\nvar path = require('path')\nvar exec = require('child_process').execFile\n\n// Install an array of submodules with pa...
javascript
chosen
[ { "from": "system", "value": "Send computeWorkflow message when tag is deselected\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc function\n * @name tagrefineryGuiApp.controller:WorkflowCtrl\n * @description\n * # WorkflowCtrl\n * Controller of the tagrefineryGuiApp\n */\nangu...
javascript
chosen
[ { "from": "system", "value": "Remove the glob matcher for Windows compat\n\nhttps://github.com/philipwalton/analyticsjs-boilerplate/issues/7#issuecomment-282106560\n" }, { "from": "human", "value": "const glob = require('glob');\nconst path = require('path');\n\nmodule.exports = {\n entry: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add source map to get prettier stacktrace.\n" }, { "from": "human", "value": "const path = require('path')\n// eslint-disable-next-line import/no-unresolved\nconst slsw = require('serverless-webpack')\nconst CopyWebpackPlugin = require('copy-webpack-plugin')\n\ncons...
javascript
chosen
[ { "from": "system", "value": "Add new options it TinyMce\n" }, { "from": "human", "value": "\nfunction tinyMceInit(textAreaId) {\n var editor;\n\n tinymce.init({\n selector: '#' + textAreaId,\n plugins: \"lists\",\n setup: editor => {\n editor = editor;\n ...
javascript
chosen
[ { "from": "system", "value": "Add i18n to home screen\n" }, { "from": "human", "value": "/* @flow */\n\nimport React, { Component } from 'react';\nimport {\n Text,\n View,\n Image\n} from 'react-native';\nimport Button from '../../components/Button';\nimport images from '../../config/images';...
javascript
chosen
[ { "from": "system", "value": "Fix order of functions when a file is deleted\n" }, { "from": "human", "value": "var fs = require('fs-extra');\nvar helper = require('helper');\nvar forEach = helper.forEach;\nvar ensure = helper.ensure;\nvar LocalPath = helper.localPath;\n\nvar Entry = require('ent...
javascript
chosen
[ { "from": "system", "value": "Add \"old.freefeed.net\" to siteDomains in config\n" }, { "from": "human", "value": "import * as FrontendPrefsOptions from './utils/frontend-preferences-options';\n\nconst config = {\n api:{\n host: 'http://localhost:3000',\n sentinel: null // keep always las...
javascript
chosen
[ { "from": "system", "value": "Make db dir if it's not already there.\n" }, { "from": "human", "value": "import {SQLite} from 'minidb';\nimport Migrations from './migrations';\nimport path from 'path';\n\nlet instance = null;\n\nlet options = {\n file: path.join('.', 'data', 'fulcrumapp.db'),\n ...
javascript
chosen
[ { "from": "system", "value": "[fix] Fix behaviour of library loader when loader strategy does not exist.\n" }, { "from": "human", "value": "/* global angular */\n(function(){\n angular.module(\"googlechart\")\n .provider(\"agcLibraryLoader\", AgcLibraryLoaderProvider);\n\n AgcLibrar...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary variable in babel config\n" }, { "from": "human", "value": "const test = process.env.NODE_ENV === 'test';\nconst cjs = process.env.BABEL_ENV === 'commonjs' || test;\nconst loose = true;\n\nmodule.exports = {\n plugins: [cjs && '@babel/transform-m...
javascript
chosen
[ { "from": "system", "value": "Add a `wtr` folder to the custom elements polyfill tests folder.\n" }, { "from": "human", "value": "const {playwrightLauncher} = require('@web/test-runner-playwright');\n\nconst defaultBrowsers = [\n playwrightLauncher({product: 'chromium'}),\n playwrightLauncher(...
javascript
chosen
[ { "from": "system", "value": "Use strict was causing invalid javascript on bundling\n" }, { "from": "human", "value": "'use strict';\n\nthis.ckan.module('collapsible', function($) {\n return {\n\n initialize: function() {\n this.activateCollapsibles()\n },\n\n activateCollapsibles...
javascript
chosen
[ { "from": "system", "value": "Increase client timeout to be larger than server timeout (for projections) so that we can see server response\n" }, { "from": "human", "value": "// Copyright © 2016-2017 Esko Luontola\n// This software is released under the Apache License 2.0.\n// The license text i...
javascript
chosen
[ { "from": "system", "value": "Use gravatar api to create gravatar url" }, { "from": "human", "value": "export default class User {\n constructor(params) {\n this.id = params.id;\n this.email = params.email;\n this.name = params.name;\n this.gravatar = params.gravatar;\n this.stat...
javascript
chosen
[ { "from": "system", "value": "Add support for models that have .account\n" }, { "from": "human", "value": "module.exports = function(app) {\n var Role = app.models.Role;\n\n Role.registerResolver('teamMember', function(role, context, cb) {\n\n function reject(msg) {\n console.log(msg)...
javascript
chosen
[ { "from": "system", "value": "Load the Weather and RiverStatus\n" }, { "from": "human", "value": "define(['core/collections/MoxieCollection', 'today/models/OxfordDate'], function(MoxieCollection, OxfordDate) {\n var TodayItems = MoxieCollection.extend({\n fetch: function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add API key option for sensor downloader\n" }, { "from": "human", "value": "// Download sensors from RPI Data Service\n// Outputs each sensor in list to a file in output directory.\n\nvar fs = require('fs');\nvar request = require('request');\nvar qs = require('quer...
javascript
chosen
[ { "from": "system", "value": ":fire: Use all types from gamebox\n" }, { "from": "human", "value": "import Color from 'flockn/types/color';\nimport Vector2 from 'flockn/types/vector2';\nimport Vector3 from 'flockn/types/vector3';\nimport Rect from 'flockn/types/rect';\n\nlet Types = {};\n\nTypes....
javascript
chosen
[ { "from": "system", "value": "Change the log level to debug for File transports\n" }, { "from": "human", "value": "import os from 'os';\n\nconst settings = {\n backend: {\n enable: true,\n host: 'localhost',\n port: 80,\n route: 'api/'\n },\n livereload: {\n ...
javascript
chosen
[ { "from": "system", "value": "Use sane defaults for main route\n" }, { "from": "human", "value": "import express from 'express';\nimport path from 'path';\n\nlet router = express.Router();\n\nrouter.get('/', (req, res) => {\n console.log('woop');\n});\n\nexport default router;\n" }, { "...
javascript
chosen
[ { "from": "system", "value": "ember/config: Remove duplicate jQuery from output\n" }, { "from": "human", "value": "/*jshint node:true*/\n/* global require, module */\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n var app = new EmberApp(de...
javascript
chosen
[ { "from": "system", "value": "Write history file under src/history" }, { "from": "human", "value": "#!/usr/bin/env node\nconst fs = require('fs')\nconst util = require('util')\nconst format = require('../src/format')\nconst dao = require('../src/dao')\nconst _ = require('lodash')\ndao.getHistory...
javascript
chosen
[ { "from": "system", "value": "Fix Icon props doc page.\n" }, { "from": "human", "value": "import { storiesOf } from '@storybook/react';\nimport { withInfo } from '@storybook/addon-info';\n\nimport Icon from '@ichef/gypcrete/src/Icon';\nimport getPropTables from 'utils/getPropTables';\n\nimport B...
javascript
chosen
[ { "from": "system", "value": "Add Choctaw translation. Five is very important to the Chahta.\n" }, { "from": "human", "value": "(function () {\n\n var five = function() { return 5; };\n\n five.upHigh = function() { return '⁵'; };\n five.downLow = function() { return '₅'; };\n five.roman = fu...
javascript
chosen
[ { "from": "system", "value": "Update testing to better fit\n" }, { "from": "human", "value": "/*\n#\n# i2mx.js - v0.1-Alpha\n# Apache v2 License\n#\n*/\n\n// Create img2musicXML (abbreviated as i2mx) namespace\nvar i2mx = i2mx || { };\n\n// Create JsCheckup class (@TODO: Move to inside namespace...
javascript
chosen
[ { "from": "system", "value": "Add autoFocus prop to popup main <input>\n\n- fixes it now in Chrome\n- FF currently breaks this, but apparently will be fixed in FF60: https://bugzilla.mozilla.org/show_bug.cgi?id=1324255\n" }, { "from": "human", "value": "import React from 'react'\nimport PropType...
javascript
chosen
[ { "from": "system", "value": "Fix mulit-linking issue by moving cross-instance communication to compile's transclude function.\n" }, { "from": "human", "value": "angular.module('multi-transclude', []).directive('ngMultiTransclude', function(){\n return {\n link: function($scope, $element, $a...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary try/catch and array copy in what is likely a very performance critical section of code\n" }, { "from": "human", "value": "define(\n 'ephox.porkbun.Event',\n\n [\n 'ephox.compass.Arr',\n 'ephox.scullion.Struct',\n 'global!Array'\n ],\n ...
javascript
chosen
[ { "from": "system", "value": "Set the default location type to 'hash'" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'webapp',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n ...
javascript
chosen
[ { "from": "system", "value": "Change delimiter in flatten function\n" }, { "from": "human", "value": "const fs = require('fs');\nconst flat = require('flat');\n\nfunction fixParagraphStructure(originalJSONPath, translatedJSONPath) {\n const originalJSONFile = fs.readFileSync(originalJSONPath);\...
javascript
chosen