conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Return cleanup fn from createAsciinemaPlayer\n" }, { "from": "human", "value": "import { render } from 'solid-js/web';\nimport AsciinemaPlayer from './components/AsciinemaPlayer';\n\nif (window) {\n window.createAsciinemaPlayer = (props, elem) => {\n render(() =...
javascript
chosen
[ { "from": "system", "value": "Correct for capture in getValidMoves from store\n" }, { "from": "human", "value": "import Reflux from 'reflux';\nimport GameActions from '../actions/GameActions';\n\nvar GameStore = Reflux.createStore({\n\n init() {\n\n getGameFEN() {\n return this.fen;\n },\n...
javascript
chosen
[ { "from": "system", "value": "Set minWidth and minHeight to MainWindow\n" }, { "from": "human", "value": "import BaseWindow from './base-window'\n\nconst key = 'MainWindow';\n\nclass MainWindow extends BaseWindow {\n static KEY = key;\n\n constructor(url) {\n //TODO: implement dummy window ...
javascript
chosen
[ { "from": "system", "value": "Fix forgotten ionic beta.2 changes\n" }, { "from": "human", "value": "module.exports = {\n proxies: null,\n\n paths: {\n html : {\n src: ['app/**/*.html'],\n dest: \"www/build\"\n },\n sass: {\n src: ['app/...
javascript
chosen
[ { "from": "system", "value": "Switch argument order to remove placeholders\n" }, { "from": "human", "value": "'use strict';\n\nvar bind = require('lodash.bind');\nvar ResponseHandler = require('./response-handler');\n\nbind.placeholder = '_';\n\nfunction ResultList(retriever, options) {\n if (!...
javascript
chosen
[ { "from": "system", "value": "Change port number to 8000\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar express = require('express');\nvar routes = require('./routes');\nvar memos = require('./routes/memos');\nvar http = require('http');\nvar path = ...
javascript
chosen
[ { "from": "system", "value": "Move dev server to port 2112 because omg collisions\n" }, { "from": "human", "value": "var dest = \"./build\";\nvar src = './src';\n\nmodule.exports = {\n browserSync: {\n open: false,\n https: true,\n server: {\n // We're serving the src folder as we...
javascript
chosen
[ { "from": "system", "value": "Change template and improve query to NotificationHistory\n" }, { "from": "human", "value": "window.c.AdminNotificationHistory = ((m, h, _, models) => {\n return {\n controller: (args) => {\n const notifications = m.prop([]),\n get...
javascript
chosen
[ { "from": "system", "value": "Add error message when token usage exceeded" }, { "from": "human", "value": "/*global angular */\n(function() {\n 'use strict';\n var QUERY_URL = \"https://address.digitalservices.surreyi.gov.uk/addresses?postcode=\";\n var AUTH_TOKEN = \"vJiSsulQe-zOobDsAWoUxr9c...
javascript
chosen
[ { "from": "system", "value": "[HeartBeat] Allow current frame modifictation by event\n" }, { "from": "human", "value": "(function($, document, window) {\n \"use strict\"\n\n window.animationHeartBeat = function (steps)\n {\n var max = steps;\n var delay = 70;\n var ...
javascript
chosen
[ { "from": "system", "value": "Fix subscription in error in channelPinnedMessages\n" }, { "from": "human", "value": "Meteor.publish('channelPinnedMessages', function (search) {\n if (this.userId) {\n // TODO: checking if the user has access to these messages\n const channel = Channels.find...
javascript
chosen
[ { "from": "system", "value": "Add connect to utils out\n" }, { "from": "human", "value": "import * as columnUtils from './columnUtils';\nimport * as compositionUtils from './compositionUtils';\nimport * as dataUtils from './dataUtils';\nimport * as rowUtils from './rowUtils';\nimport * as sortUt...
javascript
chosen
[ { "from": "system", "value": "Put a ref for item editor.\n" }, { "from": "human", "value": "import { Component } from 'substance'\nimport CardComponent from '../shared/CardComponent'\n\nexport default class CollectionEditor extends Component {\n getActionHandlers () {\n return {\n 'remo...
javascript
chosen
[ { "from": "system", "value": "Add comment about explicit UMD\n" }, { "from": "human", "value": "(function(mod) {\n // CommonJS, Node.js, browserify.\n if (typeof exports === \"object\" && typeof module === \"object\") {\n module.exports = mod(require('d3'),\n ...
javascript
chosen
[ { "from": "system", "value": "Change to check build pass in CI" }, { "from": "human", "value": "'use strict';\nvar chai = require('chai');\nvar supertest = require('supertest');\nvar api = supertest('https://apis-bank-dev.apigee.net'); // supertest init;\n\nchai.should();\n\ndescribe('/atms', fu...
javascript
chosen
[ { "from": "system", "value": "Implement functionality for equal min and max values.\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = {\n\t// This function finds the minimum and maximum values in an array of numbers.\n\tfindMinMax: function(numlist) {\n\t\tnumlist.sort( functio...
javascript
chosen
[ { "from": "system", "value": "Make play history stay up to date\n" }, { "from": "human", "value": "/**\n * View for the room users list\n * @module views/pro/PlayHistoryView\n */\nvar panes = require('./panes');\n\nvar PlayHistoryView = Backbone.View.extend({\n\n\tid: \"plugpro-play-history\",\n...
javascript
chosen
[ { "from": "system", "value": "Make image preview slightly wider for mockup\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nclass MembersPreview extends Component {\n\n render() {\n const {displayName, image, intro, slug} = this.props;\n\n // TODO: remove in...
javascript
chosen
[ { "from": "system", "value": "Rewrite favicon middleware from scratch.\n" }, { "from": "human", "value": "import {join} from \"path\"\n\nimport favicon from \"koa-favicon\"\n\n// TODO: Rewrite this middleware from scratch because of synchronous favicon\n// reading.\nconst FAVICON_PATH = join(\...
javascript
chosen
[ { "from": "system", "value": "Test if Travis CI reports a failure for failing unit tests.\n" }, { "from": "human", "value": "describe('Test stuff', function () {\n it('should just work', function () {\n angular.mock.module('hdpuzzles');\n\n expect(true).toBe(true);\n });\n});" ...
javascript
chosen
[ { "from": "system", "value": "Implement dynamic changing of marker icon\n" }, { "from": "human", "value": "import Leaflet from \"leaflet\";\n\nimport latlngType from \"./types/latlng\";\nimport PopupContainer from \"./PopupContainer\";\n\nexport default class Marker extends PopupContainer {\n c...
javascript
chosen
[ { "from": "system", "value": "Simplify things with better use of split().\n" }, { "from": "human", "value": "/*\n * CPU statistics\n */\n\nvar exec = require('child_process').exec;\n\n/*\n * Unfortunately the majority of systems are en_US based, so we go with\n * the wrong spelling of 'utilisati...
javascript
chosen
[ { "from": "system", "value": "Fix for host not being correct\n" }, { "from": "human", "value": "/*global __WEBPACK_DEV_SERVER_DEBUG__*/\n/*global __WEBPACK_DEV_SERVER_NO_FF__*/\n\nlet SAVE;\n\nif (__WEBPACK_DEV_SERVER_DEBUG__) { // for webpack-dev-server auto simulate\n SAVE = require('./webpac...
javascript
chosen
[ { "from": "system", "value": "Optimize to not use slice\n" }, { "from": "human", "value": "// Stack grow safe implementation\n\n'use strict';\n\nvar ensureValue = require('../../object/valid-value')\n , isArray = Array.isArray;\n\nmodule.exports = function () {\n\tvar input = ensureValue(th...
javascript
chosen
[ { "from": "system", "value": "Add a setUser function and change setConfig to setKey\n" }, { "from": "human", "value": "import fs from 'fs'\nimport rc from 'rc'\nimport ini from 'ini'\nimport path from 'path'\nimport mkdirp from 'mkdirp'\nimport untildify from 'untildify'\n\nconst conf = rc('tick...
javascript
chosen
[ { "from": "system", "value": "Tweak difficulty - adjust drink + food decrements\n" }, { "from": "human", "value": "export default {\n gameWidth: 1080,\n gameHeight: 1613,\n images: {\n 'background-game': './assets/images/background-game.png',\n 'background-landing': './ass...
javascript
chosen
[ { "from": "system", "value": "Write a correct postal address\n" }, { "from": "human", "value": "const request = require('supertest');\nconst app = require('../app');\ndescribe('name to point', function () {\n it('should return JSON object with geolocation',\n function (done) {\n request...
javascript
chosen
[ { "from": "system", "value": "Use lazy loading attribute on gallery\n" }, { "from": "human", "value": "const { downloadGalleryPhoto } = require(\"../../gallery-helpers\");\nconst html = require(\"../../render-string\");\nconst quality = 40;\nconst size = 300;\n\nmodule.exports = class Gallery {\...
javascript
chosen
[ { "from": "system", "value": "Fix asset picker input focus\n" }, { "from": "human", "value": "import React, { PropTypes, PureComponent } from 'react';\nimport { findDOMNode } from 'react-dom';\nimport { InputGroup } from 'binary-components';\nimport { isMobile } from 'binary-utils';\nimport { ac...
javascript
chosen
[ { "from": "system", "value": "Hide close animation for non mobile.\n" }, { "from": "human", "value": "$('.nav a').on('click', function(){\n $(\".navbar-toggle\").click();\n});" }, { "from": "gpt", "value": "$('.nav a').on('click', function(){\n if ($(window).width() <= 767) {\n...
javascript
chosen
[ { "from": "system", "value": "Fix so that get returns null instead of undefined when key not found." }, { "from": "human", "value": "/**\n * @requires Map.js\n * @requires ArrayList.js\n */\n\n/**\n * @see http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html\n * \n * @implements {...
javascript
chosen
[ { "from": "system", "value": "Add Fields & removed Validate\n\nRemove validate until Schema is working on all code.\nRenamed \"collection\", conflict with core naming in Mongoose\n" }, { "from": "human", "value": "/**\n * [schema defines validation schemas for Mongo documents being inserted into...
javascript
chosen
[ { "from": "system", "value": "Use angular's JSON lib, since it strips off $hashKey that angular adds to scope objects\n" }, { "from": "human", "value": "define(['app'], function (app) {\n \"use strict\";\n\n return app.service('storageService', ['$window', function (win) {\n this.availabl...
javascript
chosen
[ { "from": "system", "value": ":new: Use consistent-env instead of consistent-path\n" }, { "from": "human", "value": "'use babel'\n\nimport {getPath} from 'consistent-path'\nexport {tempFile} from 'atom-linter'\n\nconst assign = Object.assign || function(target, source) {\n for (const key in s...
javascript
chosen
[ { "from": "system", "value": "Use screen dimension as visible height\n" }, { "from": "human", "value": "import { Dimensions } from 'react-native'\n\nmodule.exports = {\n get visibleHeight() {\n return Dimensions.get('window').height\n },\n}\n" }, { "from": "gpt", "value": "impor...
javascript
chosen
[ { "from": "system", "value": "Fix summary not showing up in console logs\n" }, { "from": "human", "value": "'use strict';\n\nconst { protocolHandlers } = require('../../protocols');\nconst { rpcHandlers } = require('../../rpc');\n\n// Build message of events of type `request` as:\n// STATUS [ER...
javascript
chosen
[ { "from": "system", "value": "Check if called from command line.\n" }, { "from": "human", "value": "var fs = require('fs');\n\nfunction getInitialCharge() {\n var initialCharge = 100,\n body = fs.readFileSync('tesla.out').toString().split('\\n');\n\n for (var i = body.length - 1; i >= 0; ...
javascript
chosen
[ { "from": "system", "value": "Test mergeImages rejects Promise if node-canvas instance isn\\'t passed in\n" }, { "from": "human", "value": "import test from 'ava';\nimport Canvas from 'canvas';\nimport mergeImages from '../';\nimport fixtures from './fixtures';\n\ntest('mergeImages rejects Promi...
javascript
chosen
[ { "from": "system", "value": "Automate loading of issue test units.\n" }, { "from": "human", "value": "'use strict';\n/*global describe */\n\n\ndescribe('Issues.', function () {\n require('./issues/issue-8.js');\n require('./issues/issue-17.js');\n require('./issues/issue-19.js');\n require(...
javascript
chosen
[ { "from": "system", "value": "Replace child_process.fork with child_process.spawn to correctly handle child's output.\n" }, { "from": "human", "value": "var cp = require('child_process');\nvar walk = require('walk');\n\nvar walker = walk.walk(__dirname + '/spec', {followLinks: false});\nwalker.o...
javascript
chosen
[ { "from": "system", "value": "Use sync fs method (to suppress no callback error)\n" }, { "from": "human", "value": "'use strict'\n\nconst fs = require('fs')\nconst gulp = require('gulp')\nconst lessModule = require('less')\nconst less = require('gulp-less')\nconst sourcemaps = require('gulp-sour...
javascript
chosen
[ { "from": "system", "value": "Add Synology.downloadStation.info, Synology.downloadStation.getConfig and Synology.downloadStation.setConfig\n" }, { "from": "human", "value": "module.exports = function(syno) {\n return {\n };\n};\n" }, { "from": "gpt", "value": "'use strict';\n\nvar ...
javascript
chosen
[ { "from": "system", "value": "Modify default line separator from CRLF to LF\n" }, { "from": "human", "value": "/*\r\n * Find scopes from AST\r\n * @lastmodifiedBy ChengFuLin(chengfulin0806@gmail.com)\r\n * @lastmodifiedDate 2015-07-27\r\n */\r\nvar walkes = require('walkes');\r\n\r\n/**\r\n * Sc...
javascript
chosen
[ { "from": "system", "value": "Test that server config hasn't broken\n" }, { "from": "human", "value": "global.XMLHttpRequest = require('xhr2');\nglobal.dataLayer = [];\nvar test = require('blue-tape');\nvar GeordiClient = require('../index');\n\ntest('Instantiate a client with default settings',...
javascript
chosen
[ { "from": "system", "value": "Fix transpilation error to support React Native\n\nRecent versions of Babel will throw a TransformError in certain\nruntimes if any property on `Symbol` is assigned a value.\n\nThis fixes the issue, which is the last remaining issue for\nReact Native support.\n" }, { "f...
javascript
chosen
[ { "from": "system", "value": "Make testing function more solid" }, { "from": "human", "value": "var should = require('should'),\n stylus = require('stylus'),\n fs = require('fs');\n\nvar stylusMatchTest = function() {\n var files = fs.readdirSync(__dirname + '/fixtures/stylus/styl/');\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix LessError being used before being defined\n" }, { "from": "human", "value": "\nmodule.exports = LessError;\nfunction LessError(parser, e, env) {\n var input = parser.getInput(e, env),\n loc = parser.getLocation(e.index, input),\n line = loc.line...
javascript
chosen
[ { "from": "system", "value": "Return 409 if creating a use case that already exists\n" }, { "from": "human", "value": "var app = require('../load'),\n useCases = app.useCases,\n h = require('../configHelpers');\n\nexports.index = function(req, res){\n res.json(app.useCases);\n};\n\nexport...
javascript
chosen
[ { "from": "system", "value": "Change https protocol for Chat component\n" }, { "from": "human", "value": "\n/**\n *\tChat Component\n * $(\"#chat\").chat({\n * ruleGroupName: \"\",\n * style: [\"block\"],\n * template: [1],\n * environment: \"1\"|\"2\"|\"3\"\n * });\n */\n\...
javascript
chosen
[ { "from": "system", "value": "Update node loader for compiler/vm split" }, { "from": "human", "value": "var Handlebars = require(\"handlebars/base\");\nmodule.exports = Handlebars;\n\nrequire(\"handlebars/utils\");\n\nrequire(\"handlebars/ast\");\nrequire(\"handlebars/printer\");\nrequire(\"hand...
javascript
chosen
[ { "from": "system", "value": "Move ToS to the bottom\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport \"./css/App.css\";\nimport logo from \"../public/logo.svg\";\nimport Markdown from \"./Markdown\";\nimport TocHeader from \"./TocHeader\";\n\nclass App extend...
javascript
chosen
[ { "from": "system", "value": "Remove is not ready yet" }, { "from": "human", "value": "'use strict';\n\nvar Heroku = require('heroku-client');\nvar co = require('co');\nvar heroku;\n\nmodule.exports = {\n topic: 'access',\n needsAuth: true,\n needsApp: true,\n command: 'remove'...
javascript
chosen
[ { "from": "system", "value": "Handle case of undefined document list as result of search\n" }, { "from": "human", "value": "module.exports = function($http, $state, $location, $q, DocumentApiService, \n DocumentRouteService, DocumentService, GlobalService, UserService, ...
javascript
chosen
[ { "from": "system", "value": "Stop monkeypatching all the things. Monkeypatch the right things.\n" }, { "from": "human", "value": "// This initializer exists only to make sure that the following\n// imports happen before the app boots.\nimport { registerKeywords } from 'ember-a11y/ember-internal...
javascript
chosen
[ { "from": "system", "value": "Add a lower layer to the drawing manager\n" }, { "from": "human", "value": "var p;\nvar drawings = [];\n\nvar DrawingManager = function (p5Sketch) {\n p = p5Sketch;\n};\n\nDrawingManager.prototype.add = function (drawing) {\n console.log('Added ' + drawing);\n dr...
javascript
chosen
[ { "from": "system", "value": "Doc: Standardize Jsdoc style for Defiant.Plugin.PluginRegistry\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Registry = require('../util/registry');\n\n/**\n * TODO: Could this be replaced with an InitRegistry?\n * @class\n * @memberOf Defiant.Plugin\n...
javascript
chosen
[ { "from": "system", "value": "Fix segfault caused by using incorrect clear method\n" }, { "from": "human", "value": "var Graphite = require('graphite');\nvar Measured = require('measured');\n\nvar reportInterval = 5000;\nvar graphiteHost = process.env.GRAPHITE_HOST || null;\nvar graphitePort = p...
javascript
chosen
[ { "from": "system", "value": "Refactor digitCode to use /dev/urandom instead of Math.random.\nr=Tarek\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You ca...
javascript
chosen
[ { "from": "system", "value": "Remove .gitignore on bootstrap the project\n" }, { "from": "human", "value": "const fs = require('fs-extra');\nconst path = require('path');\nconst chalk = require('chalk');\n\nfunction copyTemplate(appDir, templatePath) {\n fs.copySync(templatePath, appDir);\n fs...
javascript
chosen
[ { "from": "system", "value": "Add indexes to Recall schema\n\n* Sorting the data and attempting to access tail results would result in\na buffer overrun error. Indexes were missing from the schema and have\nnow been added.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = func...
javascript
chosen
[ { "from": "system", "value": "Introduce triggerChange, use it on input/textarea change\n" }, { "from": "human", "value": "/**\n * @class CM_FormField_Text\n * @extends CM_FormField_Abstract\n */\nvar CM_FormField_Text = CM_FormField_Abstract.extend({\n _class: 'CM_FormField_Text',\n\n /** @typ...
javascript
chosen
[ { "from": "system", "value": "Remove file extension js from import\n" }, { "from": "human", "value": "import template from './builder.js';\nimport kms from './kms.js';\nimport cw from './post.js';\nimport auth from './auth.js';\n\nexports.handler = (event, context, callback) => {\n console.log(...
javascript
chosen
[ { "from": "system", "value": "Use the prototype instead of \"private\" property backups\n" }, { "from": "human", "value": "// An array with a max length.\n//\n// When max length is surpassed, items are removed from\n// the front of the array.\n\n// Using Classes to extend Array is unsupported in...
javascript
chosen
[ { "from": "system", "value": "COM-212: Add a grid to popup\n - added possibility to render number cell as an editable field\n" }, { "from": "human", "value": "define([\n 'underscore',\n 'backgrid',\n 'orodatagrid/js/datagrid/formatter/number-formatter'\n], function(_, Backgrid, NumberFo...
javascript
chosen
[ { "from": "system", "value": "Add domain detect and show bold font of domain\n" }, { "from": "human", "value": "define(function (require) {\n 'use strict';\n\n var store = require('store');\n\n var items = new Vue({\n el: 'body',\n\n data: {\n items: [],\n ...
javascript
chosen
[ { "from": "system", "value": "Add project settings via rc\n" }, { "from": "human", "value": "var jadeStream = require('jade-stream')\nvar http = require('http')\nvar st = require('st')\n\nvar mount = st({\n path: 'app/assets',\n index: 'index.jade'\n})\n\nvar app = http.createServer(function s...
javascript
chosen
[ { "from": "system", "value": "Fix widgets path when using pages that have an ID (e.g. //host/p/Page)\n" }, { "from": "human", "value": "const webpack = require(\"webpack\");\nconst CopyWebpackPlugin = require(\"copy-webpack-plugin\");\nconst { CleanWebpackPlugin } = require(\"clean-webpack-plugi...
javascript
chosen
[ { "from": "system", "value": "Define browser build target as umd\n" }, { "from": "human", "value": "const webpack = require('webpack');\n\nmodule.exports = {\n entry: './src/index.js',\n output: {\n filename: './dist/html2canvas.js',\n library: 'html2canvas'\n },\n modu...
javascript
chosen
[ { "from": "system", "value": "Use babel loader instead of babel to production\n" }, { "from": "human", "value": "var path = require(\"path\")\nvar webpack = require('webpack')\nvar BundleTracker = require('webpack-bundle-tracker')\n\nmodule.exports = {\n context: __dirname,\n\n entry: './webap...
javascript
chosen
[ { "from": "system", "value": "Set name and path of the output file\n" }, { "from": "human", "value": "const config = {\n entry: './src/index.js'\n};\n\nmodule.exports = config;\n" }, { "from": "gpt", "value": "const path = require('path'); // We can use whatever nodejs package\n\nco...
javascript
chosen
[ { "from": "system", "value": "Fix home page.\nWhen there are no game, it still show a random entry.\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar GameModel = require('../models/game');\nvar model = require('../models');\nconst _ = requi...
javascript
chosen
[ { "from": "system", "value": "Comment out reference to app.scss file\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react';\nimport { connect } from 'react-redux';\nimport actions from '../actions/index.js';\nimport '../scss/app.scss';\n\nimport Nav from './Nav.j...
javascript
chosen
[ { "from": "system", "value": "Update the API and add the updated time\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar moment = require('moment');\nvar languageColors = require('../language_colors');\n\n// GET home page\nlanguageColors.get...
javascript
chosen
[ { "from": "system", "value": "Use Mongoose to find user and pass to show page\n" }, { "from": "human", "value": "const express = require('express'),\n router = express.Router(),\n db = require('../models');\n\nrouter.get('/', function(req, res, next) {\n res.render('index');\n});\n\nr...
javascript
chosen
[ { "from": "system", "value": "Refactor out function to call digest only when safe\n" }, { "from": "human", "value": "ngGridDirectives.directive('ngViewport', [function() {\n return function($scope, elm) {\n var isMouseWheelActive;\n var prevScollLeft;\n var prevScollTop =...
javascript
chosen
[ { "from": "system", "value": "Allow also array as style prop type\n" }, { "from": "human", "value": "import React from 'react';\nimport { View } from 'react-native';\n\nconst MenuOptions = ({ style, children, onSelect, customStyles }) => (\n <View style={[customStyles.optionsWrapper, style]}>\n...
javascript
chosen
[ { "from": "system", "value": "Use Immutable-style .get instead of JS style property access on Team list page.\n\nFixes #35.\n" }, { "from": "human", "value": "import React from 'react';\nimport Router from 'react-router';\n\nimport ControllerComponent from '../utils/ControllerComponent';\nimport...
javascript
chosen
[ { "from": "system", "value": "Allow to render text or string read-only.\n" }, { "from": "human", "value": "import { Component } from 'substance'\nimport TextInput from './TextInput'\n\nexport default class StringComponent extends Component {\n render ($$) {\n let placeholder = this.props.pla...
javascript
chosen
[ { "from": "system", "value": "Create align data when creating table\n" }, { "from": "human", "value": "var Immutable = require('immutable');\nvar Draft = require('draft-js');\n\nvar TYPES = require('./TYPES');\nvar createRow = require('./createRow');\n\n/**\n * Create a new table header\n *\n * ...
javascript
chosen
[ { "from": "system", "value": "Clean up the focus handler.\n" }, { "from": "human", "value": "/* @flow */\n/** @jsx etch.dom */\n\nimport etch from 'etch'\n// $FlowBug: Yes, we know this isn't a React component :\\\nimport DiffComponent from './diff-component'\n\nimport type DiffViewModel from '....
javascript
chosen
[ { "from": "system", "value": "Remove rules which are now enabled by default\n\nThese template lint rules are now enabled in the 'recommended'\nconfiguration so we don't need to override them in our config.\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nvar defaultAllo...
javascript
chosen
[ { "from": "system", "value": "feat: Rename service-worker.js -> sw-precache.js for other worker names\n" }, { "from": "human", "value": "/**\n * https://github.com/GoogleChrome/sw-precache#command-line-interface\n */\nmodule.exports = {\n root: 'build',\n staticFileGlobs: [\n 'build/javascr...
javascript
chosen
[ { "from": "system", "value": "Test line end carriages redo.\n" }, { "from": "human", "value": "\nimport moment from 'moment';\n\nimport { Paginator } from '../../../utils';\nimport template from './outdated-queries.html';\n\nfunction OutdatedQueriesCtrl($scope, Events, $http, $timeout) {\n Even...
javascript
chosen
[ { "from": "system", "value": "Fix code style errors in the stylelint config file\n" }, { "from": "human", "value": "const declarationBlockPropertiesOrder = require('./.csscomb.json')['sort-order'][0];\n\nmodule.exports = {\n extends: `stylelint-config-modularis`,\n rules: {\n 'declaration-b...
javascript
chosen
[ { "from": "system", "value": "Add User-Agent for GitHub calls.\n" }, { "from": "human", "value": "var fs = require('fs');\nvar url = require('url');\nvar request = require('request');\n\n/**\n * @class\n */\nvar Procure = function() {};\n\n/**\n* \"Procure\" a resource, whether local or remote.\...
javascript
chosen
[ { "from": "system", "value": "Allow for 404 not found" }, { "from": "human", "value": "'use strict';\n\nvar fluxApp = require('fluxapp');\nvar router = fluxApp.getRouter();\n\nfunction isEnabled() {\n return !! (typeof window !== 'undefined' && window.history);\n}\n\nmodule.exports = {\n route...
javascript
chosen
[ { "from": "system", "value": "Fix footer paging not working\n" }, { "from": "human", "value": "import { requestAnimFrame } from '../../utils/utils';\nimport { scrollHelper } from './scrollHelper';\n\nexport function ScrollerDirective($timeout){\n return {\n restrict: 'E',\n require:'^dtBo...
javascript
chosen
[ { "from": "system", "value": "fix(shape): Update shape-basic to the latest version\n" }, { "from": "human", "value": "\"use strict\";\n\nconst FigText = require('../lib/FigText');\nconst cursor = require('kittik-cursor').create().resetTTY();\n\nFigText.create({\n text: 'KittikJS\\n Rules\\n ...
javascript
chosen
[ { "from": "system", "value": "Fix typeTest for deep attrs\n" }, { "from": "human", "value": "'use strict';\n\nconst { mapValues } = require('../../utilities');\n\nconst isObject = function (value) {\n return value.constructor === Object;\n};\n\nconst isObjectArray = function (value) {\n return...
javascript
chosen
[ { "from": "system", "value": "Allow fuzzy searches to be combined\n\nIe. v1/jsdelivr/libraries?name=jq*&lastversion=*.0.1 .\n" }, { "from": "human", "value": "var minimatch = require('minimatch');\nvar is = require('annois');\nvar fp = require('annofp');\nvar zip = require('annozip');\n\n\nmodul...
javascript
chosen
[ { "from": "system", "value": "Make log `touch` error more human-readable.\n" }, { "from": "human", "value": "'use strict';\n\nconst mkdirp = require('mkdirp');\nconst path = require('path');\nconst pify = require('pify');\nconst touch = require('touch');\nconst winston = require('winston');\n\n/...
javascript
chosen
[ { "from": "system", "value": "Remove useLintTree ember-cli-mocha build configuration\n" }, { "from": "human", "value": "/* eslint-env node */\n/* global require, module */\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon')\n\nmodule.exports = function (defaults) {\n var app = new...
javascript
chosen
[ { "from": "system", "value": "Remove a bunch of unnecessary require() statements\n" }, { "from": "human", "value": "\n// get a url to a tarball, fetch it, read the package.json, and\n// publish to the registry.\n\nmodule.exports = publish\n\nvar fs = require(\"fs\")\n , path = require(\"path\")...
javascript
chosen
[ { "from": "system", "value": "Add breaking test for sideloading data with camel cased attributes\n" }, { "from": "human", "value": "var attr = Ember.attr;\n\nmodule(\"Ember.Model sideloading\");\n\ntest(\"data can be sideloaded without materializing records\", function() {\n expect(1);\n\n var...
javascript
chosen
[ { "from": "system", "value": "Bugfix: Use valid columns in address filter\n" }, { "from": "human", "value": "\n(function() {\n 'use strict';\n\n /**\n * Generate a human-readable address string from a single museum object\n *\n * Can get fancy here and prioritize one of the thr...
javascript
chosen
[ { "from": "system", "value": "Remove checking of constructor.name, instead just check primitive types and adt.js types\n" }, { "from": "human", "value": "var adt;\ntry {\n adt = require(\"adt\");\n} catch (e) {\n adt = null;\n}\n\n// Given an object and a class name, tries to determin if the o...
javascript
chosen
[ { "from": "system", "value": "Add event listener to expand/collapse edition card info\n" }, { "from": "human", "value": "$(function () {\n $.fn.equalHeights = function() {\n var maxHeight = 0,\n $this = $(this);\n\n $this.each( function() {\n var height = $(this).innerHeight();\n\...
javascript
chosen
[ { "from": "system", "value": "Rename boundaries -> value, on getSelectedTime\n" }, { "from": "human", "value": "export const getSelectedTime = (\n server_time,\n selected_time,\n market_open_time,\n) => {\n const boundaries = selected_time.isBefore(market_open_time)\n ? market...
javascript
chosen
[ { "from": "system", "value": "Use new multiple cmd contexts\n" }, { "from": "human", "value": "require(\"./stylesheets/main.less\");\nvar marked = require(\"marked\");\n\nvar commands = codebox.require(\"core/commands\");\nvar dialogs = codebox.require(\"utils/dialogs\");\n\ncommands.register({\...
javascript
chosen
[ { "from": "system", "value": "feat(validator): Add validation rule for associations to validator\n" }, { "from": "human", "value": "import {EntityManager} from './entity-manager';\n\nexport {DefaultRepository} from './default-repository';\nexport {Repository} from './repository';\nexport {Entity...
javascript
chosen