conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Handle rejected promise, handle zero message case.\n"
},
{
"from": "human",
"value": "/* \n * This is a very basic webserver and HTTP Client.\n * In production, you may want to use something like Express.js\n * or Botkit to host a webserver and manage API calls\n */... | javascript | chosen |
[
{
"from": "system",
"value": "Allow usage in nested addons"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-chart',\n included: function included(app) {\n this._super.included(app);\n app.import(app.bowerDirectory + '/chartjs/di... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment to plugin conf\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nangular.module('arethusa.confEditor').directive('pluginConf', function() {\n return {\n restrict: 'AE',\n scope: true,\n link: function(scope, element, attrs) {\n var nam... | javascript | chosen |
[
{
"from": "system",
"value": "Add initial file-reading and line formatting\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(){\n\n};\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar fs = require('fs');\nvar stream = require('stream');\nvar readline =... | javascript | chosen |
[
{
"from": "system",
"value": "Send the req to the callback.\n"
},
{
"from": "human",
"value": "var forIn = require('for-in'),\n xobj = require('xhr'),\n XhrError = require('xhrerror');\n\nfunction noop() { }\n\nfunction xhr(options, callback, errback) {\n var req = xobj();\n\n if(Object.... | javascript | chosen |
[
{
"from": "system",
"value": "Change google storage endpoint to us https\n"
},
{
"from": "human",
"value": "import React, {Component, PropTypes} from 'react';\nimport {Akkad, Scene, shapes, cameras, lights, systems} from \"akkad\";\n\nconst googleStorageEndpoint = `http://storage.googleapis.com/... | javascript | chosen |
[
{
"from": "system",
"value": "Fix args option not functioning"
},
{
"from": "human",
"value": "var mozjpeg = require('mozjpeg')\nvar dcp = require('duplex-child-process')\n\n/**\n * @param {Object} options\n * @param {Number} opts.quality the 1 to 100. Docs suggest 5 to 95 is actual useable ra... | javascript | chosen |
[
{
"from": "system",
"value": "Use promise.map to build requests\n\nRequires moving buildRequest into inner fn scope\n"
},
{
"from": "human",
"value": "var Promise = require('bluebird')\nvar request = require('got')\nvar extend = require('xtend')\n\nvar BASE_URL = 'http://www.broadbandmap.gov/bro... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for pending, undefined it() tests and for data-driving Mocha's before()\n"
},
{
"from": "human",
"value": "/*!\n * data-driven\n * Copyright(c) 2013 Fluent Software Solutions Ltd <info@fluentsoftware.co.uk>\n * MIT Licensed\n */\n\n module.exports = func... | javascript | chosen |
[
{
"from": "system",
"value": "Breaking: Make `.tasks` return an object instead of array\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction DefaultRegistry(){\n this._tasks = {};\n}\n\nDefaultRegistry.prototype.get = function get(name){\n return this._tasks[name];\n};\n\nDefaultRegist... | javascript | chosen |
[
{
"from": "system",
"value": "Declare a few more entry points\n"
},
{
"from": "human",
"value": "/**\n * Turnpike.JS\n *\n * A lightweight and politely opinionated MVC framework for Node.js. Turnpike can be used as a traditional\n * framework, with code generation and rapid deployment, or invoke... | javascript | chosen |
[
{
"from": "system",
"value": "Use es.through instead of es.map\n\nSee https://github.com/gulpjs/gulp/issues/75#issuecomment-31581317\r\n\r\nPartial results for continue-on-error behaviour."
},
{
"from": "human",
"value": "var es = require('event-stream');\nvar coffee = require('coffee-script');\... | javascript | chosen |
[
{
"from": "system",
"value": "Change primary palette to brown\n"
},
{
"from": "human",
"value": "export default function materialConfig($mdThemingProvider) {\n 'ngInject';\n $mdThemingProvider.theme('default')\n .primaryPalette('pink')\n .accentPalette('orange');\n}"
},
{
"from":... | javascript | chosen |
[
{
"from": "system",
"value": "Add an empty githubToken to avoid request auth crash\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Global config settings.\n * (C) 2015 Diego Lafuente.\n */\n\n // requires\nvar Log = require('log');\n\n// globals\nexports.logLevel = 'info';\nvar log =... | javascript | chosen |
[
{
"from": "system",
"value": "Add base code for tree-shaking\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'emberfire-utils'\n};\n"
},
{
"from": "gpt",
"value": "/* jshint node: true */\n'use strict';\n\nvar Funnel = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Put newline at end of output\n"
},
{
"from": "human",
"value": "var fs = require( \"fs\" );\nvar path = require( \"path\" );\nvar slash = require( \"slash\" );\nvar through = require( \"through2\" );\n\nmodule.exports = function( jadeFile, options ) {\n\tvar scriptT... | javascript | chosen |
[
{
"from": "system",
"value": "Make tags accessible in sidebar\n\nThe tags as provided by the query are a Set element.\nThe sidebar js does not understand Set elements, so\nwe convert the set to an array.\n\nThis is prework for issue #4\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar butt... | javascript | chosen |
[
{
"from": "system",
"value": "Use Object.assign for better performance"
},
{
"from": "human",
"value": "var path = require('path');\nvar DtsCreator = require('typed-css-modules');\nvar loaderUtils = require('loader-utils');\n\nmodule.exports = function(source, map) {\n this.cacheable && this.ca... | javascript | chosen |
[
{
"from": "system",
"value": "Add compile and rearrange (alphabetical)\n"
},
{
"from": "human",
"value": "var build = require('./build');\nvar clean = require('./clean');\nvar copy = require('./copy');\nvar karma = require('./default-karma.conf');\nvar lint = require('./lint');\nvar requirejs = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add exitOnError as optional parameter\n"
},
{
"from": "human",
"value": "const Assert = require('assert');\nconst FS = require('fs');\n\nconst Winston = require('winston');\n\nconst Factory = require('./lib/factory');\n\nvar exceptionLogger;\n\nfunction isString(str... | javascript | chosen |
[
{
"from": "system",
"value": "Fix date ranrge picker format\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $(\"#date_range\").daterangepicker({ format: 'YYYY-MM-DD' });\n\n $(\"#date_range\").on('apply.daterangepicker', function(ev, picker){\n Chartkick.eachChart( funct... | javascript | chosen |
[
{
"from": "system",
"value": "Use port specified in environment for server\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst port = 5000\n\nvar server = require('./server')\n\nserver.listen(port, () => console.log('Server is up on port %d.', port))\n"
},
{
"from": "gpt",
"valu... | javascript | chosen |
[
{
"from": "system",
"value": "Add log function for compatibility with Console API\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar catchErrors = require('./lib/catchErrors');\nvar log = require('./lib/log');\nvar transportConsole = require('./l... | javascript | chosen |
[
{
"from": "system",
"value": "Handle mkdir error when directory exists\n"
},
{
"from": "human",
"value": "var ls = require('ls');\nvar fs = require('fs');\nexports.generate = function(dir) {\n if(dir === undefined || dir === null) {\n dir = __dirname;\n }\n fs.mkdir(dir);\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Clean out old validation stuff from Signup\n"
},
{
"from": "human",
"value": "var async = require( 'async' );\nvar Validation = require( './validation' );\nvar Data = require( './data' );\nvar Output = require( './output' );\nvar utils = require( '../utils' );\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Use new Rollbar initialization method\n"
},
{
"from": "human",
"value": "var rollbar = require(\"rollbar\");\n\nmodule.exports = {\n install: function(Vue, options) {\n Vue.rollbar = rollbar.init(options);\n }\n};\n"
},
{
"from": "gpt",
"value": "va... | javascript | chosen |
[
{
"from": "system",
"value": "Store processors into array. Pass through options to Autoprefixer.\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar postcss = require('postcss');\nvar autoprefixer = require('autoprefixer');\n\nvar app = 'src/app.css';\nvar dist = 'dist/build.css';\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow some more test functions.\n"
},
{
"from": "human",
"value": "module.exports = {\n parser: 'babel-eslint',\n extends: 'airbnb',\n globals: {\n describe: true,\n it: true,\n },\n};\n"
},
{
"from": "gpt",
"value": "module.exports = {\n pars... | javascript | chosen |
[
{
"from": "system",
"value": "Change of assertion to not depend on exact file length. Removal of docs moved to tearDown, to call it on test failure.\n"
},
{
"from": "human",
"value": "\"use strict\"\nvar grunt = require('grunt');\nvar rr = require(\"rimraf\");\n\nexports.docco = {\n tests: func... | javascript | chosen |
[
{
"from": "system",
"value": "Add opts.plugins for specifying additional rework plugins"
},
{
"from": "human",
"value": "var importcss = require('rework-npm')\n , rework = require('rework')\n , variables = require('rework-vars')\n , path = require('path')\n , read = require('fs').readFileSyn... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to build other js files\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport gulp from 'gulp';\nimport ignite from 'gulp-ignite';\nimport browserify from 'gulp-ignite-browserify';\nimport babelify from 'babelify';\nimport inject from 'gulp-inject';... | javascript | chosen |
[
{
"from": "system",
"value": "Add remaining capitals for FPO dataset\n"
},
{
"from": "human",
"value": "(function(window, undefined) {\n\n var data = window.data = window.data || { };\n var map = data.map = data.map || { };\n map['Germany'] = [52.5, 13.4];\n map['France'] = [48.9, 2.4];\n\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for being a nested dependency\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-sinon',\n\n options: {\n nodeAssets: {\n 'sinon': {\n import: [{ path: 'pkg/sinon.js', type: 'te... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary variables in loader\n"
},
{
"from": "human",
"value": "const loaderUtils = require('loader-utils');\nconst path = require('path');\nconst deepMerge = require('./lib/deep-merge');\n\nmodule.exports = function(source) {\n const HEADER = '/**** Star... | javascript | chosen |
[
{
"from": "system",
"value": "Increase wait time for server start to 15s\n"
},
{
"from": "human",
"value": "import cp from 'child_process';\nimport http from 'http';\nimport test from 'ava';\n\nlet rs;\n\ntest.before('start the server', async () => {\n\trs = cp.spawn('npm', ['start']);\n\trs.std... | javascript | chosen |
[
{
"from": "system",
"value": "Change slides variable to collection\n"
},
{
"from": "human",
"value": "import { Kefir as K } from \"kefir\";\n\nconst NEVER = K.never();\nconst ZERO = K.constant(0);\n\nconst ADD1 = (x) => x + 1;\nconst SUBTRACT1 = (x) => x - 1;\nconst ALWAYS = (x) => () => x;\n\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Use `'html'` as output format\n\nPer jstransformers/jstransformer#3.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar ejs = require('ejs');\nvar fs = require('fs');\n\nexports.name = 'ejs';\nexports.outputFormat = 'xml';\nexports.compile = ejs.compile;\nexpo... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Switch to use JSON payload parser\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst helmet = require('helmet');\nconst winston = require('winston');\nconst bodyParser = require('body-parser');\nconst env = require('./src/env');\n\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Use underscore for private properties\n"
},
{
"from": "human",
"value": "/**\n * A lightweight promise-based Reddit API wrapper.\n * @module reddit-api\n */\n\n\nexports = module.exports = Reddit;\n\nfunction Reddit() {\n this.baseApiUrl = 'http://www.reddit.com'... | javascript | chosen |
[
{
"from": "system",
"value": "Use doc instead of conditions"
},
{
"from": "human",
"value": "/*!\n * Mongoose findOrCreate Plugin\n * Copyright(c) 2012 Nicholas Penree <nick@penree.com>\n * MIT Licensed\n */\n\nfunction findOrCreatePlugin(schema, options) {\n schema.statics.findOrCreate = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add friends column to store info\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar User = new Schema({\n\tname: String,\n\tusername: String,\n\tpassword: String,\n\tdate: Date\n});\n\nmodule... | javascript | chosen |
[
{
"from": "system",
"value": "Add etl002 FQDN to Celos Oozie default properties.\n"
},
{
"from": "human",
"value": "var CELOS_USER = \"celos\";\n\nvar CELOS_DEFAULT_OOZIE = \"http://oozie002.ny7.collective-media.net:11000/oozie\";\n\nvar CELOS_DEFAULT_HDFS = \"hdfs://nameservice1\";\n\nvar NAME_... | javascript | chosen |
[
{
"from": "system",
"value": "Use highlighted taxonomies instead of top level taxonomies\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nimport ResetScrollMixin from '../mixins/reset-scroll';\nimport Analytics from 'ember-osf/mixins/analytics';\n\n/**\n * @module ember-preprints... | javascript | chosen |
[
{
"from": "system",
"value": "Move readmode to root scope\n\nPrevents incorrect angular scope inheritance behaviour (calling $scope.readmode()\nwould set the \"read\" variable on the calling scope, not in the readMode controller\nscope).\n"
},
{
"from": "human",
"value": "'use strict';\n\nangula... | javascript | chosen |
[
{
"from": "system",
"value": "Call Backbone.history directly (instead of through a dummy router)\n"
},
{
"from": "human",
"value": "define([\n 'backbone',\n 'marionette'\n], function(Backbone, Marionette) {\n var Controller = Marionette.Controller.extend({\n initialize: function(... | javascript | chosen |
[
{
"from": "system",
"value": "Allow port to be defined by env\n"
},
{
"from": "human",
"value": "/* ==================================\n Express server - main server side file\n===================================== */\n\n\nvar path = require('path');\nvar fs = require('fs');\nvar http = require... | javascript | chosen |
[
{
"from": "system",
"value": "Remove annotate from default task\n"
},
{
"from": "human",
"value": "import gulp from 'gulp';\nimport gulpWebpack from 'webpack-stream';\nimport webpack from 'webpack';\nimport config from '../config';\n\nlet app = './src/main.js';\n\ngulp.task('webpack', () => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test for instantiation of harvest client with login or api credentials\n"
},
{
"from": "human",
"value": "var assert = require('assert'),\n config = require('config'),\n Harvest = require('../index');\n\ndescribe('The Harvest API Client', function() {\n des... | javascript | chosen |
[
{
"from": "system",
"value": "Make default callback throw error\n"
},
{
"from": "human",
"value": "\"use strict\"\n\nvar http = require('http')\nvar shoe = require('shoe');\n\nvar app = http.createServer()\n\nmodule.exports = function(options, cb) {\n if (typeof options === 'function') cb = opt... | javascript | chosen |
[
{
"from": "system",
"value": "Update script to remove empty line\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst fs = require('fs');\nconst components = process.argv.slice(2);\n\nconst componentDefaultContent = componentName => `\nimport React, {\n Component,\n PropTypes,\n} fr... | javascript | chosen |
[
{
"from": "system",
"value": "Update sourceMappingURL syntax to latest change\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar parse = require('coffee-script').compile;\n\nexports.extension = 'coffee';\nexports.compile = function (src, options) {\n\tvar opts = { bare: true }, code, data, ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ESLint Errors and Warnings\n"
},
{
"from": "human",
"value": "$(function () {\n\t$('#sidebar').affix({\n\t\t offset: {\n\t\t\t//top: $('.navbar-fixed-top').height()\n\t\t\t//top: $('.navbar-fixed-top').offset().top\n\t\t\ttop: $('main').offset().top + 10\n\t\t ... | javascript | chosen |
[
{
"from": "system",
"value": "Change sub languages to asynchronous testing\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\nvar utility = require('../utility');\n\ndescribe('sub-languages', function() {\n before(function() {\n this.block = document.querySelec... | javascript | chosen |
[
{
"from": "system",
"value": "Check for onchange before try executing to avoid errors\n"
},
{
"from": "human",
"value": "import m from 'mithril';\nimport dropdown from './dropdown';\n\nconst filterDropdown = {\n view(ctrl, args) {\n const wrapper_c = args.wrapper_class || '.w-col.w-col... | javascript | chosen |
[
{
"from": "system",
"value": "Put runner.html in test directory\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar mochify = require('mochify');\nvar config = require('../config').js;\n\ngulp.task('mochify', ['jshint'], function () {\n mochify( config.test, {\... | javascript | chosen |
[
{
"from": "system",
"value": "Load ia dice image and see what it looks like\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\nvar url = require('url');\nvar request = require('request');\n\nvar bodyParser = require('body-parser');\napp.use(bodyParser.jso... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to automatically load available modules defined\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar events = require('events');\nvar configs = require('./configs');\nvar rump = module.exports = new events.EventEmitter();\n\nrump.addGulpTasks = functi... | javascript | chosen |
[
{
"from": "system",
"value": "Use console.log instead of console.warn\n"
},
{
"from": "human",
"value": "// Copyright 2014 Andrei Karpushonak\n\n\"use strict\";\n\nvar _ = require('lodash');\nvar ECMA_SIZES = require('./byte_size');\n\n/**\n * Main module's entry point\n * Calculates ... | javascript | chosen |
[
{
"from": "system",
"value": "Use glyphicons in the header so they download earlier.\n"
},
{
"from": "human",
"value": "/*\n * @flow\n */\n\nimport * as React from 'react';\n\nexport default function Navbar() {\n return (\n <nav className=\"navbar navbar-default navbar-fixed-top navbar-inver... | javascript | chosen |
[
{
"from": "system",
"value": ":hammer: Simplify the checks for package.json objects\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst path = require('path');\nconst pkg = require(path.resolve('./package.json'));\nconst semver = require('semver');\nconst versions = require('./versions.jso... | javascript | chosen |
[
{
"from": "system",
"value": "Throw if input is not a string\n"
},
{
"from": "human",
"value": "'use strict';\nvar userHome = require('user-home');\n\nmodule.exports = function (str) {\n\treturn userHome ? str.replace(/^~\\//, userHome + '/') : str;\n};\n"
},
{
"from": "gpt",
"value"... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up repeat visits to add student view.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n titleToken: 'Add a student',\n\n model() {\n return this.store.createRecord('student');\n }\n});\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor CSV generator button script\n"
},
{
"from": "human",
"value": "const csvGenerator = {\n\tinit() {\n\t\tconst downloadCsvBtnEl = document.querySelector(\".js-download-csv-btn\");\n\t\tif (downloadCsvBtnEl) {\n downloadCsvBtnEl.addEventListener(\"click\"... | javascript | chosen |
[
{
"from": "system",
"value": "Disable verbose output of the indexedDB\n"
},
{
"from": "human",
"value": "var app = app || {};\n\n(function() {\n app.db = {\n id: \"todoDB\",\n description: \"Database of the todo list\",\n migrations : [\n {\n ver... | javascript | chosen |
[
{
"from": "system",
"value": "Implement delete in history collection\n"
},
{
"from": "human",
"value": "/**\n * Collection for interfacing with localStorage.\n */\n\n'use strict';\n\nvar Backbone = require('backbone');\nvar _ = require('lodash');\n\nmodule.exports = Backbone.Collection.ex... | javascript | chosen |
[
{
"from": "system",
"value": "Allow multi value dropdowns to be used with chosen.\n"
},
{
"from": "human",
"value": "jQuery(function($) {\n\tfunction addNewField() {\n\t\tvar self = $(this);\n\t\tvar val = self.val();\n\n\t\t// check to see if the one after us is there already - if so, we don't ... | javascript | chosen |
[
{
"from": "system",
"value": "Mark the tab with the error indicator the moment error is detected\n"
},
{
"from": "human",
"value": "ManageIQ.angular.app.directive('validationStatus', function() {\n return {\n require: 'ngModel',\n link: function (scope, elem, attrs, ctrl) {\n ctrl.$v... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path existence ensuring function\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst glob = require('glob')\n\nconst outputDirectory = [process.argv[2] || 'snapshots']\n .filter(x => x)\n .join('/')\n\nconst createDir = dir => {\n const splitPa... | javascript | chosen |
[
{
"from": "system",
"value": "Add JS resource for new endpoint\n"
},
{
"from": "human",
"value": "import { Resource } from 'kolibri.lib.apiResource';\n\nexport default new Resource({\n name: 'facilitytask',\n\n /**\n * @param {string} facility\n * @return {Promise}\n */\n dataportalsync... | javascript | chosen |
[
{
"from": "system",
"value": "Remove use of extend API\n\nTo prevent warning\r\n`Warning: The \"extend\" API will be removed in the upcoming v4.0 release. Use styled(StyledComponent) instead. You can find more information here: https://github.com/styled-components/styled-components/issues/1546`"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Address edge case when table-figure already selected.\n"
},
{
"from": "human",
"value": "import { findParentByType } from './nodeHelpers'\n// TODO: move AddEntityCommand into shared\nimport AddEntityCommand from '../metadata/AddEntityCommand'\n\nexport default class... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure the phantomjs script doesn't hang on failures\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar page = require('webpage').create(),\n system = require('system'),\n address, output;\n\nif (system.args.length < 3 || system.args.length > 4) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix footer in static pages\n"
},
{
"from": "human",
"value": "const CoreView = require('backbone/core-view');\nconst template = require('./footer.tpl');\nconst checkAndBuildOpts = require('builder/helpers/required-opts');\n\nconst REQUIRED_OPTS = [\n 'configModel'\... | javascript | chosen |
[
{
"from": "system",
"value": "Use low root margin to prevent premature loading of images\n"
},
{
"from": "human",
"value": "import mediumZoom from 'src/config/medium-zoom';\nimport lqip from 'src/modules/lqip';\nimport galleryLoader from 'src/modules/gallery-lazy-load';\n\nwindow.addEventListene... | javascript | chosen |
[
{
"from": "system",
"value": "Add router saga to rootSaga\n"
},
{
"from": "human",
"value": "export default function* rootSaga() {\n}\n"
},
{
"from": "gpt",
"value": "import { createBrowserHistory as createHistory, saga as router } from 'redux-tower';\nimport routes from './routes'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change text style for instructions\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n function Menu() {\n this.titleTxt = null;\n this.startTxt = null;\n }\n\n Menu.prototype = {\n\n create: function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add remove buttons to selectize tags\n"
},
{
"from": "human",
"value": "var People = new Mongo.Collection(\"people\");\n\nif (Meteor.isClient) {\n Template.body.helpers({\n people: function () {\n return People.find({});\n }\n });\n\n Template.body.eve... | javascript | chosen |
[
{
"from": "system",
"value": "Update logic in getBaseUrl determining if SSL is being used, to match http hook\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies\n */\n\nvar _ = require ('lodash');\n\n\n\n\n/**\n * Calculate the base URL (useful in emails, etc.)\n * @return {String} [... | javascript | chosen |
[
{
"from": "system",
"value": "Change some Release attributes to match the json.\n"
},
{
"from": "human",
"value": "import Model from 'ember-data/model';\nimport {belongsTo, hasMany} from 'ember-data/relationships';\nimport attr from 'ember-data/attr';\n\nexport default Model.extend({\n\n artist... | javascript | chosen |
[
{
"from": "system",
"value": "Add code for collisions (untested)\n"
},
{
"from": "human",
"value": "import { translate, rand, vLog, objToArr, getR,\n massToRadius, filterClose, vectorToString } from './VectorHelpers';\nimport { GRAVITY, PLANET_SPRING } from './Constants';\n\nconst getGravityAcc... | javascript | chosen |
[
{
"from": "system",
"value": "Purge tailwindcss classes not mentioned in apply\n\n[#867]\n"
},
{
"from": "human",
"value": "module.exports = {\n theme: {\n extend: {}\n },\n variants: {},\n plugins: []\n}\n"
},
{
"from": "gpt",
"value": "module.exports = {\n purge: ['./src/st... | javascript | chosen |
[
{
"from": "system",
"value": "Update static file directory to /public subfolder\n"
},
{
"from": "human",
"value": "var bodyParser = require('body-parser');\nvar db = require('../models/index');\nmodule.exports = function (app, express) {\n \n //Handle CORS\n app.use(function(req, res, next) {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix logic around AJAXing in preamble sections\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar URI = require('urijs');\nvar _ = require('underscore');\nvar Backbone = require('backbone');\nvar MetaModel = require('./meta-model');\n\nBackbone.PreambleModel = M... | javascript | chosen |
[
{
"from": "system",
"value": "Rename module's function to reflect module name.\n"
},
{
"from": "human",
"value": "/**\n * Middleware that only allows users to pass that have their isAdmin flag set.\n */\nfunction validateToken (req, res, next) {\n const user = req.decoded\n if (!user.isAdmin) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix story bug for Tab\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { action } from '@storybook/addon-actions'\nimport Tab from 'components/Tab/Tab'\nimport DraggableTab from 'components/Tab/Dragga... | javascript | chosen |
[
{
"from": "system",
"value": "change: Rename release directory name to Out\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) Ajay Sreedhar. All rights reserved.\n *\n * Licensed under the MIT License.\n * Please see LICENSE file located in the project root for more information.\n */\n\n'u... | javascript | chosen |
[
{
"from": "system",
"value": "Remove global reference intended only for debugging.\n"
},
{
"from": "human",
"value": "import { assert } from 'chai';\nimport ShadowTemplate from '../src/ShadowTemplate';\n\n\nwindow.MyElement = class MyElement extends HTMLElement {\n greet() {\n return `Hello!... | javascript | chosen |
[
{
"from": "system",
"value": "Update Map Component: remove TextContainer\n"
},
{
"from": "human",
"value": "const React = require('react');\nconst { mapChildren } = require('idyll-component-children');\nimport TextContainer from './text-container';\n\nclass Map extends React.Component {\n rende... | javascript | chosen |
[
{
"from": "system",
"value": "Add optional arguments to improve phantomjs rendering perf.\n\ndisk-cache=true will enable disk cache.\nload-images=false will prevent phantomjs from having to wait for\nslow image servers / cdns to be ready.\n"
},
{
"from": "human",
"value": "/**\n * @fileoverview ... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify IO and fix the s/defer/deferred/ typo\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n this.IO = {\n load: function(url, async) {\n if (async) {\n return this.loadAsync(url);\n }\n return this.loadSync(url); \n... | javascript | chosen |
[
{
"from": "system",
"value": "Handle another corner case where refreshToken is undefined\n"
},
{
"from": "human",
"value": "import jwt from 'jsonwebtoken';\n\n// Components\nimport UserDAO from './sql';\n\nimport schema from './schema.graphqls';\nimport createResolvers from './resolvers';\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Allow webpack errors to be displayed (suppress browserSyncInstance.reload)\n"
},
{
"from": "human",
"value": "let argv = require('yargs').argv;\nlet command = require('node-cmd');\nlet jigsaw = require('./tasks/bin');\nlet mix = require('laravel-mix');\n\nlet AfterB... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lerna alias in testing-utils\n"
},
{
"from": "human",
"value": "const lernaAliases = require('lerna-alias').jest()\n\nmodule.exports = {\n testEnvironment: 'node',\n moduleNameMapper: Object.assign(lernaAliases, {\n '^redux-saga/effects$': lernaAliases['^re... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Team component (missing style)\n"
},
{
"from": "human",
"value": "import React from \"react\"\nimport { StaticQuery, graphql } from \"gatsby\"\n\nimport Member from \"./Member\"\n\nimport \"./index.module.css\"\n\nconst Team = ({ members }) => (\n <ul styleName... | javascript | chosen |
[
{
"from": "system",
"value": "Allow hljomaholl results to be empty\n"
},
{
"from": "human",
"value": "var request = require('request');\nvar assert = require('assert');\nvar helpers = require('../../../lib/test_helpers.js');\n\ndescribe('hljomaholl', function() {\n // The only thing that change... | javascript | chosen |
[
{
"from": "system",
"value": "Update test to mock stripes-loader alias\n"
},
{
"from": "human",
"value": "import mockReq from 'mock-require';\nimport chai from 'chai';\nimport { shallow } from 'enzyme';\n\nimport Match from 'react-router/Match';\n\nchai.should();\n\nglobal.OKAPI_URL = 'http://lo... | javascript | chosen |
[
{
"from": "system",
"value": "Extend props for handlers like onClick\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport styles from './Button.css';\n\nconst Button = (props) => {\n const classNames = [styles.Button];\n if (props.state) {\n classNames.push(s... | javascript | chosen |
[
{
"from": "system",
"value": "Use way.repeatAt .repeatChannel .dropChannel .dropAt .set\n"
},
{
"from": "human",
"value": "const way = require('senseway');\n\nconst historyDeleteFrame = (hist, t) => {\n const newHist = way.clone(hist);\n newHist.map((ch) => {\n return ch.splice(t, 1);\n })... | javascript | chosen |
[
{
"from": "system",
"value": "Bring your own buffer for leb128\n"
},
{
"from": "human",
"value": "const continuationBit = 1 << 7;\nconst lowBitsMask = ~continuationBit & 0xff;\n\n/**\n * @template {ArrayBufferView} T\n *\n * @param {ReadableStream<Uint8Array>} stream\n * @param {number} length o... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for brightcove player when orintation is changed\n"
},
{
"from": "human",
"value": "/**\n * This script keeps the height set on elements with regard to their\n * width for a given aspect ratio. Great for \"display:block\" elements\n *\n * Example usage:\n *\n * ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.