conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add `raises` to linter globals.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n qunit: ['./test/index.html'],\n lint: ['supermodel.js', './test/*.js'],\n jshint: {\n options: {\n eqnull: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test update as lib, not in bin.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Run package tests.\n * (C) 2014 Alex Fernández.\n */\n\n// requires\nvar testing = require('testing');\nvar Log = require('log');\n\n// globals\nvar log = new Log('info');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Change comment reference to Team channel\n"
},
{
"from": "human",
"value": "var Office365ConnectorHook = require(\"./index.js\"),\n winston = require('winston');\n\nvar Logger = winston.Logger;\nvar Console = winston.transports.Console;\n\nvar logger = new Logger... | javascript | chosen |
[
{
"from": "system",
"value": "Correct old node version usage\n"
},
{
"from": "human",
"value": "/* global describe, it */\n\nrequire('es6-promise').polyfill()\n\nvar popsicle = require('popsicle')\nvar nock = require('nock')\nvar expect = require('chai').expect\nvar prefix = require('./')\n\ndes... | javascript | chosen |
[
{
"from": "system",
"value": "Format response to slack json\n"
},
{
"from": "human",
"value": "const Koa = require('koa');\r\nconst fetch = require('node-fetch');\r\nconst app = new Koa();\r\nconst port = process.env.PORT || 3000;\r\n\r\napp.use(async (ctx, next) => {\r\n var response = await... | javascript | chosen |
[
{
"from": "system",
"value": "Send promise failures to trackJs\n"
},
{
"from": "human",
"value": "define([\n \"underscore\",\n \"parse\",\n], function( _, Parse ) {\n\n var process_single = function (error) {\n if (_.has(error, \"message\")) {\n console.log(\"Error in... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ember-cli-deploy-redis v 0.5 bug\n\nAccording new algorythm of how https://github.com/ember-cli-deploy/ember-cli-deploy-redis works - it only stores revision. So we have to additionally apply application name"
},
{
"from": "human",
"value": "'use strict';\n\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Add optional argument to vargs to be able to force existing callback\n"
},
{
"from": "human",
"value": "function vargs(fn) {\n var slice = Array.prototype.slice,\n paramsCount = fn.length\n\n return function () {\n var argsCount = arguments.lengt... | javascript | chosen |
[
{
"from": "system",
"value": "Use callback(null, file) when pushing only one file\n"
},
{
"from": "human",
"value": "'use strict';\nvar postcssCached = require('postcss-cached');\nvar through = require('through2');\nvar applySourceMap = require('vinyl-sourcemaps-apply');\nvar gulpUtil = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Scale MIDI value (0-127) to expected scale (0-255)\n"
},
{
"from": "human",
"value": "var siteKey = process.env.HORSELIGHTS_SITEKEY\nvar lightId = process.argv[2]\n\nif(siteKey == null || lightId == null) {\n throw \"Please provide site key in environment variable ... | javascript | chosen |
[
{
"from": "system",
"value": "Use mapping to parse results\n"
},
{
"from": "human",
"value": "var Promise = require('bluebird')\nvar request = require('got')\nvar extend = require('xtend')\n\nvar BASE_URL = 'http://www.broadbandmap.gov/broadbandmap/broadband/jun2014/'\n\nmodule.exports = functio... | javascript | chosen |
[
{
"from": "system",
"value": "Add stripUrls fn. Stream now returns A hrefs and IMG src props.\n"
},
{
"from": "human",
"value": "'use strict'\nconst most = require('most')\nconst request = require('request')\nconst EventEmitter = require('events')\nconst emitter = new EventEmitter()\nconst jsdom... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for converting Numbers to NSNumbers and Dates to NSDates in the $ function.\n"
},
{
"from": "human",
"value": "// Load the node-ffi extensions\nrequire('./ffi-extend')\n\n// The main exports is the casting function\nmodule.exports = $\n$._ = $ // legacy.... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'api' folder to exports\n"
},
{
"from": "human",
"value": "var fs = require('fs'),\n path = require('path'),\n extend = require('extend');\n\nfunction load() {\n // Recursively load one or more directories passed as arguments.\n\n var dir, result = {... | javascript | chosen |
[
{
"from": "system",
"value": "Set the args variable value as an empty object if the argument in missing\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function (template, args) {\n if (!args) {\n return interpolate.bind(null, template);\n }\n\n return interpolate(temp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix asset import in ember-cli < 2.7\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-nouislider',\n\n included: function(app) {\n this._super.included(app);\n if (!process.env.EMBER_CLI_FASTBO... | javascript | chosen |
[
{
"from": "system",
"value": "Set the raw API directly.\n"
},
{
"from": "human",
"value": "// Used to detect for Cygwin\nvar os = require('os');\n\n// Required for Windows/Cygwin support\nvar root = [__dirname, '/vendor/libgit2/build/shared'].join(''),\n path = process.env.PATH;\n\nif (~os.type... | javascript | chosen |
[
{
"from": "system",
"value": "Change pick, omit to allow both array and list of params. Create function include.\n"
},
{
"from": "human",
"value": "'use strict'; // jshint ignore:line\nlet _ = require('lodash');\n\nlet JoiSequelize = function(model) {\n this._joi = {};\n this._model = model;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow error chance of 0\n"
},
{
"from": "human",
"value": "/**\n * Randomly generate a boolean based on an input probability.\n * @private\n * @param {Number} chance Value between 0 and 1 representing 0% and 100%\n * probabilities of a true value, respectively\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Fix this issue with arrow function\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst PluginError = require('plugin-error');\nconst rocambole = require('rocambole');\nconst through = require('through2');\n\nmodule.exports = () => {\n let out = '';\n\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Handle Ctrl+C cleanly in the server.\n"
},
{
"from": "human",
"value": "var connect = require('connect');\nvar faker = require('faker');\nvar serveStatic = require('serve-static');\nvar WebSocketServer = require('ws').Server;\n\nconnect().use(serveStatic(__dirname))... | javascript | chosen |
[
{
"from": "system",
"value": "Set defaut interval to 20 minutes\n\nNew Heroku instances now rotate every 30 minutes instead of every hour"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar request = require('request');\n\n\nmodule.exports = function herokuSelfPing(url, options) {\n if(!opt... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant escaping from regexp char class"
},
{
"from": "human",
"value": "var path = require('path');\n\nvar escape = function (str) {\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\");\n};\n\nvar regexp = ['lib', 't... | javascript | chosen |
[
{
"from": "system",
"value": "Add /var/task to $PATH for \"aws\" command.\n"
},
{
"from": "human",
"value": "//\n// lambdash - AWS Lambda function to run shell commands\n//\n// See also: https://alestic.com/2014/11/aws-lambda-shell/\n//\nvar AWS = require('aws-sdk');\nvar exec = require('child_p... | javascript | chosen |
[
{
"from": "system",
"value": "Comment no longer really needed.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Admit One\n *\n */\n\nimport Auth from 'ember-tiny-auth';\nimport Authenticator from 'ember-admit-one/authenticator';\nimport Authorizer from 'ember-admit-one/authorizer';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Improve UX of deck upload button\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascript... | javascript | chosen |
[
{
"from": "system",
"value": "Add types for react-hot-loader package\n"
},
{
"from": "human",
"value": "// flow-typed signature: 3193712ae4ddd5385f359c7b985ac6fd\n// flow-typed version: 1517003b23/react-hot-loader_v4.x.x/flow_>=v0.53.0\n\n// @flow\ndeclare module \"react-hot-loader/root\" {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update prefixes endpoint for federation\n"
},
{
"from": "human",
"value": "\nvar loadTemplate = require('../loadTemplate')\n\nvar config = require('config')\n\nvar federate = require('../federate')\nvar collateObjects = require('../collateObjects')\n\nfunction Prefi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test for non darwin platforms\n"
},
{
"from": "human",
"value": "// need to subtract 2 from source maps\nimport 'source-map-support/register';\n\nimport chai from 'chai';\nimport fs from 'fs';\nimport os from 'os';\nimport path from 'path';\nimport pngToIcns fro... | javascript | chosen |
[
{
"from": "system",
"value": "Update bunyan integration test: show monkey-patch"
},
{
"from": "human",
"value": "\n'use strict';\n\nvar bunyan = require('bunyan');\n\nvar logShim = require('thehelp-log-shim');\n\nvar logger = logShim('test:scenarios:bunyan');\n\nlogger.verbose('this is the defau... | javascript | chosen |
[
{
"from": "system",
"value": "Update Hero demo to support Opacity transition\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Move from 'ember-animated/motions/move';\nimport Scale from 'ember-animated/motions/scale';\n\nexport function * transition() {\n this.insertedSprit... | javascript | chosen |
[
{
"from": "system",
"value": "Use Infinity blockScrolling for ace editor\n"
},
{
"from": "human",
"value": "class ModelController {\n constructor($rootScope, $parse) {\n this.$parse = $parse;\n this.listener = $rootScope.$on('render', (event, component) => {\n this.render(event, comp... | javascript | chosen |
[
{
"from": "system",
"value": "Use helmet on graphql server\n"
},
{
"from": "human",
"value": "import express from 'express'\nimport graphQLHTTP from 'express-graphql'\nimport { maskErrors } from 'graphql-errors'\nimport cors from 'cors'\nimport cookieParser from 'cookie-parser'\nimport dotenv fr... | javascript | chosen |
[
{
"from": "system",
"value": "Allow an onDone listener to be associated with a slot\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Node = require('./Node');\n\nclass Slot extends Node {\n constructor(def) {\n super('Slot');\n\n this.generatorSlot = null;\n }\n\n g... | javascript | chosen |
[
{
"from": "system",
"value": "Test if debugger work in safari\n\n"
},
{
"from": "human",
"value": "/* eslint-disable no-undef */\nimport { fork, call, select } from 'redux-saga/effects';\nimport { isIos } from 'worona-deps';\nimport * as deps from '../deps';\n\nfunction* redirectHome() {\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Make cli spec runner work regardless of cur. dir\n"
},
{
"from": "human",
"value": "/* jshint node:true, strict:false */\n\nvar\n requirejs = require('requirejs'),\n\n jasmine = (function () {\n var Jasmine = require('jasmine');\n return new Jasmine({ projec... | javascript | chosen |
[
{
"from": "system",
"value": "Allow inline HTML links for markdown\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Markdown from 'react-markdown';\nimport styles from 'components/Paragraph/paragraph.scss';\n\nconst MarkdownParagraph = ({ text, noMargin }) => (\n <Markdown\... | javascript | chosen |
[
{
"from": "system",
"value": "Add light medium grey colour to constants\n"
},
{
"from": "human",
"value": "export const colors = {\n blue: \"#3B7A9E\",\n lightBlue: \"#61BDE0\",\n darkBlue: \"#5F7682\",\n grey: \"#999999\",\n darkGrey: \"#666666\",\n lightGrey: \"#c3c3c3\",\n lighterGrey:... | javascript | chosen |
[
{
"from": "system",
"value": "Switch import for better auto completion\n"
},
{
"from": "human",
"value": "// Mocha Specification Suite\n\n// Imports\nimport { assertDeepStrictEqual } from 'assert-deep-strict-equal';\nimport { readdirSync } from 'fs';\n\n//////////////////////////////////////////... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hide()s on page load (already done with CSS)\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar questionView = {\n $getOptions: $( '.get-options' ),\n $followupNoNotSure: $( '.followup__no-not-sure' ),\n $followupYes: $( '.followup__yes' ),\n $nextSt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix preset options for cssnano\n"
},
{
"from": "human",
"value": "require('colors');\n\n\nmodule.exports = {\n plugins: [\n require('postcss-preset-env')({\n warnForDuplicates: false,\n features: {\n rem: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add delay in notifying about transient change\n"
},
{
"from": "human",
"value": "\nfunction noop() {}\n\nexport default class TransientManager {\n\tconstructor(name, onTransChange=noop) {\n\t\tthis.name = name;\n\t\tthis.onTransChange = onTransChange;\n\t}\n\n\tlock... | javascript | chosen |
[
{
"from": "system",
"value": "Add API to users page\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport SearchBar from 'react-search-bar';\n\nexport default React.createClass({\n getInitialState: function () {\n return {\n users: [\n 'leo',\n 'bill',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix icon bounding box drag.\n"
},
{
"from": "human",
"value": "import Actions from '../actions/actions';\nimport mapStore from '../stores/mapStore';\nimport { ModeConstants } from '../constants/constants';\n\nexport default class Marker {\n constructor(latLng, icon... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dragging on icon bounding box.\n"
},
{
"from": "human",
"value": "import Actions from '../actions/actions';\nimport mapStore from '../stores/mapStore';\nimport { ModeConstants } from '../constants/constants';\n\nexport default class Marker {\n constructor(latLn... | javascript | chosen |
[
{
"from": "system",
"value": "Add override for Leaflet Path::onRemove to work around click handlers being removed\n"
},
{
"from": "human",
"value": "define(['leaflet'], function(L) {\n L.Map.prototype._originalGetBounds = L.Map.prototype.getBounds;\n return L;\n});\n"
},
{
"from": ... | javascript | chosen |
[
{
"from": "system",
"value": "Update meta data for query a name\n"
},
{
"from": "human",
"value": "const express = require('express')\nconst router = express.Router()\nconst api = require('./api')\n\nconst { FACEBOOK_APP_ID, APP_URL, APP_TITLE, APP_DESCRIPTION, APP_IMAGE } = process.env\n\n/* GE... | javascript | chosen |
[
{
"from": "system",
"value": "Add title to home route\n"
},
{
"from": "human",
"value": "import express from 'express';\nconst router = express.Router();\n\n//home\nrouter.get('/', function(req, res) {\n res.render('index', {\n header: 'express-boilerplate',\n description: 'Your ba... | javascript | chosen |
[
{
"from": "system",
"value": "Use global CartConst, ignore local require.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* global $ */\nvar CartConst = require('../const/const.js');\n\nmodule.exports = function($scope, $location, $routeSegment, footerService) {\n console.log('CartMainCt... | javascript | chosen |
[
{
"from": "system",
"value": "Change the javascript here to the test js from Test.html\n"
},
{
"from": "human",
"value": "\n\nfunction getCard(user, cardID){\n\n\tif(user == 'a'){\n\t\treturn '/html/resources/users/a/' + cardID + '.html'\n\t}else if(user == 'b'){\n\t\treturn '/html/resources/use... | javascript | chosen |
[
{
"from": "system",
"value": "Update compilation list time format\n"
},
{
"from": "human",
"value": "\nconst path = require(\"path\");\nconst fs = require(\"fs-extra\");\nconst replaceExt = require(\"replace-ext\");\n\nfunction html() {\n return fs.readdirSync(path.join(__dirname, \"compilation... | javascript | chosen |
[
{
"from": "system",
"value": "Set default port to env variable\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst favicon = require('serve-favicon');\nconst app = express();\n\n\napp.get('/', (req, res) => res.send('Hello World'));\n\napp.use(favicon(__dirname + '/publ... | javascript | chosen |
[
{
"from": "system",
"value": "Make it actually play the sound\n"
},
{
"from": "human",
"value": "var sound = require('./sound'), capture = require('./capture');\n\ncapture.on('capture', sound.addSound);\n"
},
{
"from": "gpt",
"value": "var sound = require('./sound'), capture = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Add Link in front page\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport 'isomorphic-fetch';\n\nclass HelloMessage extends React.Component {\n\n constructor() {\n super();\n this.state = {};\n}\n\n componentDidMount() {\n fetch('https://199... | javascript | chosen |
[
{
"from": "system",
"value": "Set response header to a valid date in the past.\n\nChange the response header from 'Expires=0' to 'Expires=Fri, 01 Jan 1990 00:00:00 GMT'\r\n\r\nFrom: https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ\r\n\r\n\"It is interesting to note that \"Expires: 0\" and \"Pra... | javascript | chosen |
[
{
"from": "system",
"value": "Fix PRIVATE_PORT env variable read\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst EventEmitter = require('events');\nconst createPublicWebApp = require('./web/public');\nconst createPrivateWebApp = require('./web/private');\nconst actions ... | javascript | chosen |
[
{
"from": "system",
"value": "Add info and error messages\n"
},
{
"from": "human",
"value": "const fs = require('fs');\n\nconst helpers = require('../helpers');\nconst settingsFilePath = 'settingsData.json'\n\nfunction getSettings() {\n if (fs.existsSync(settingsFilePath)) {\n let data = fs.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dumb case where errors didn't exist in the send callback.\n"
},
{
"from": "human",
"value": "var server = require('http').createServer()\nvar wr = require('./water_rower.js')({ debug: false} );\nvar ws = require('ws');\nvar url = require('url')\nvar WebSocketSer... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate to internal deps management\n"
},
{
"from": "human",
"value": "/**\n\n Copyright 2015 Covistra Technologies Inc.\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 ma... | javascript | chosen |
[
{
"from": "system",
"value": "Change to SHAStream and add type support"
},
{
"from": "human",
"value": "'use strict';\nvar SHA1Stream = require('./helpers/SHA1Stream')\n\n\n/**\n * Export the raw class\n * @type {SHA1Stream|exports}\n */\nexports.SHA1Stream = SHA1Stream\n\n\n/**\n * Shorthand co... | javascript | chosen |
[
{
"from": "system",
"value": "Make a request against github's api.\n"
},
{
"from": "human",
"value": "var request = require('superagent');\nvar config = require('./config');\nvar debug = require('debug')('cyan-git-stats');\n\nvar personalAccessToken = config.personalAccessToken;\n\ndebug('token'... | javascript | chosen |
[
{
"from": "system",
"value": "Use .get instead of accessing .data directly\n"
},
{
"from": "human",
"value": "var fill = require('flood-fill')\n\nmodule.exports = scan\n\nfunction scan(grid, opts) {\n opts = opts || {}\n\n var indexer = 'indexer' in opts ? functor(opts.indexer) : defaultIndexe... | javascript | chosen |
[
{
"from": "system",
"value": "Remove functions that rely on the console object\nMainly because console.log isn't a standard JS feature\nand is implemented differently across browsers, causing\nproblems when trying to alias it.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar $ = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Fix formats always getting overriden. Default to less error prone format.\n"
},
{
"from": "human",
"value": "var moment = require('moment');\nvar parseDates = require('./lib/parse');\n\nmodule.exports = function(options) {\n options = options || {};\n\n if (typeof... | javascript | chosen |
[
{
"from": "system",
"value": "Allow cloning of detached nodes."
},
{
"from": "human",
"value": "function selection_cloneShallow() {\n return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling);\n}\n\nfunction selection_cloneDeep() {\n return this.parentNode.insertBefore(this.... | javascript | chosen |
[
{
"from": "system",
"value": "Add option for source maps, and pass to ng-annotate.\n"
},
{
"from": "human",
"value": "var ngAnnotate = require('ng-annotate'),\n SourceMapSource = require('webpack-core/lib/SourceMapSource');\n\nfunction ngAnnotatePlugin(options) {\n this.options = options |... | javascript | chosen |
[
{
"from": "system",
"value": "Add browserSync notification upon compilation step\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar browserSync = require('browser-sync');\n\nfunction BrowserSyncPlugin(browserSyncOptions, options) {\n var self = this;\n\n var defaultOptions = {\... | javascript | chosen |
[
{
"from": "system",
"value": "Move path strings into a config object\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n'use strict';\n\nvar program = require('commander')\n , gulp = require('gulp')\n , chalk = require('chalk')\n , exec = require('exec')\n , pjson = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Use regex return in place of deprecated RegEx.$\n"
},
{
"from": "human",
"value": "/*!\n * parse-author <https://github.com/jonschlinkert/parse-author>\n *\n * Copyright (c) 2014 Jon Schlinkert, contributors.\n * Licensed under the MIT license.\n */\n\n'use strict';... | javascript | chosen |
[
{
"from": "system",
"value": "Set the large screen dimensions to 400x500\n"
},
{
"from": "human",
"value": "\n\ndefine([], function () {\n\n\t'use strict';\n\n\treturn {\n\n\t\t'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U',\n\t\t'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08... | javascript | chosen |
[
{
"from": "system",
"value": "Write logic for .set() function. Refactor .import() and .export()\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst SPAWN = require('child_process').spawn\nconst DEFAULTS = require('./lib/defaults')()\nconst QUERY = require('./lib/query')\n\nlet Mongonaut = f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary API call on location set.\n"
},
{
"from": "human",
"value": "import {takeLatest} from 'redux-saga';\nimport {call, fork, put} from 'redux-saga/effects';\nimport {arrayOf} from 'normalizr';\nimport {receiveAddress} from './actions';\nimport {mapAct... | javascript | chosen |
[
{
"from": "system",
"value": "Set timer to poll for weather data.\n"
},
{
"from": "human",
"value": "var http = require(\"http\");\nvar log4js = require(\"log4js\");\nvar logger = log4js.getLogger(\"OpenWeatherMapAdapter\");\nvar Q = require(\"q\");\nvar _ = require(\"lodash\");\nvar request = r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix parsing exception on unknown decorator\n"
},
{
"from": "human",
"value": "const { DataParser } = require('./DataParser');\n\nconst { DataEntry } = require('../entity/DataEntry');\nconst { Syntax } = require('../Enum');\n\nclass ClassComponentDataParser extends D... | javascript | chosen |
[
{
"from": "system",
"value": "Make views a separate list.state\n"
},
{
"from": "human",
"value": "\nvar app = angular.module(\"browseApp.routes\", ['ui.router']);\n\n/*\n* Configurations for states for ui-router. Controllers refer to\n* the controllers located in mainctrls.js.\n*\n*/\napp.config... | javascript | chosen |
[
{
"from": "system",
"value": "Increase last updated interval to match the scrape interval\n"
},
{
"from": "human",
"value": "$(function () {\n // Get the last updated timestamp\n var getLastUpdatedTime = function () {\n $('#last-updated-time').load('/last-updated');\n };\n\n g... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded components from home page\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nimport Page from '../../components/page'\nimport Header from './header'\nimport PreviousEpisodeSection from './sections/previous-episodes'\nimport EpisodesSecti... | javascript | chosen |
[
{
"from": "system",
"value": "Remove default value for url parameter in PalindromConnectionError\n\nFixes #219\n"
},
{
"from": "human",
"value": "class PalindromError extends Error {\n constructor(message) {\n super(message);\n this.message = message;\n }\n}\n\nclass Palindro... | javascript | chosen |
[
{
"from": "system",
"value": "Add event listener for clicking enable/disable link (skeleton, unfinished logic) and assign backgroundpage to variable for access.\n"
},
{
"from": "human",
"value": "var PinPoint = PinPoint || {};\n\nPinPoint.updatePopup = function() {\n chrome.tabs.query({active: ... | javascript | chosen |
[
{
"from": "system",
"value": "Split IP string and log\n"
},
{
"from": "human",
"value": "/*jshint esversion: 6 */\nvar AWS = require(\"aws-sdk\");\n\nexports.handler = (event, context, callback) => {\n console.log(event);\n callback(null, 'Hello from Lambda');\n};\n"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Remove images globally when we remove images\n"
},
{
"from": "human",
"value": "import { state } from './index.js';\n\n/**\n * Removes all tools from the target element with the provided name\n * @export @public @method\n * @name removeToolForElement\n *\n * @param ... | javascript | chosen |
[
{
"from": "system",
"value": "Add sensible titles to the insertImages function and check if the image already exsists\n"
},
{
"from": "human",
"value": "Meteor.methods({\n insertImage: function (base64FullImage) {\n insertImage(base64FullImage)\n }\n})\n\ninsertImage = function (base64FullI... | javascript | chosen |
[
{
"from": "system",
"value": "Add failing test for comment-no-loud\n\nThis rule only seems to work when a comment is the first item in a CSS\nfile. This test fails to demonstrate the problem.\n"
},
{
"from": "human",
"value": "import rule, { ruleName, messages } from \"..\";\n\ntestRule(rule, {\... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out Analytics ui-router code\n"
},
{
"from": "human",
"value": "/* global*/\nimport config from './index.config';\n\nimport routerConfig from './index.route';\n\nimport runBlock from './index.run';\nimport HomeController from './home/home.controller';\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Add header to demo model\n"
},
{
"from": "human",
"value": "foam.CLASS({\n package: 'foam.demos.analytics',\n name: 'StockSnapshot',\n ids: ['time', 'symbol'],\n properties: [\n {\n class: 'DateTime',\n name: 'time'\n },\n {\n class: 'Str... | javascript | chosen |
[
{
"from": "system",
"value": "Add telegram token example to config example\n"
},
{
"from": "human",
"value": "/**\n * Config object, import as JSON\n * @type {Object}\n *\n * @example\n * {\n * \"consulateUrls\": {\n * \"country\": \"https://example.com/countries.php\",\n * \"consulate... | javascript | chosen |
[
{
"from": "system",
"value": "Use the \"ELLIPSIS\"-Character instead of dots"
},
{
"from": "human",
"value": "angular.module('truncate', [])\n .filter('characters', function () {\n return function (input, chars, breakOnWord) {\n if (isNaN(chars)) return input;\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Allow all tests to be skipped or only'ed\n"
},
{
"from": "human",
"value": "module.exports = function(arrayOfTests, generateTestDetails) {\n arrayOfTests = arrayOfTests || []\n generateTestDetails = generateTestDetails || function() {}\n\n arrayOfTests.forEach(fu... | javascript | chosen |
[
{
"from": "system",
"value": "Make the `cb` callback optional\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar aps = Array.prototype.slice;\n\nvar segue = function(cb) {\n\n var running = false;\n var queue = [];\n var nextArgs = [];\n\n var next = function() {\n\n var args = aps.c... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Add setting of mime type\n"
},
{
"from": "human",
"value": "\"use strict\"\n\nconst express = require('express');\nconst HTTPStatus = require('http-status-codes');\n\nvar scraper = require('./app/routes/scraper');\n\nconst app = express();\n\napp.use('/', scra... | javascript | chosen |
[
{
"from": "system",
"value": "Stop build if rendering fails\n"
},
{
"from": "human",
"value": "const { writeFile } = require('fs')\nconst { renderTemplates } = require('./chippanfire.js')\n\nfunction writeToBuildDirectory (renderedTemplates) {\n return Promise.all(renderedTemplates.map(writeToF... | javascript | chosen |
[
{
"from": "system",
"value": "Increase settings window height to fit contents.\n"
},
{
"from": "human",
"value": "import { BrowserWindow } from 'electron';\nimport path from 'path';\n\nexport const showDesktopSettings = () => {\n if (WindowManager.getAll('settings').length > 0) {\n WindowMan... | javascript | chosen |
[
{
"from": "system",
"value": "Fix condition to skip blacklisted extensions\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar crypto = require('crypto');\nvar CustomStats = require('webpack-custom-stats-patch');\n\nvar DEFAULT_PARAMS = {\n customStatsKey: 'sprockets',\n ignore: /\\.(gz|ht... | javascript | chosen |
[
{
"from": "system",
"value": "Fix initializer deprecation for 2.x\n\nResolves #4\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nvar proxyGenerator = function(name){\n return function(msg = '', title = '') {\n window.toastr[name](msg.toString(), title.toString());\n };\n};\... | javascript | chosen |
[
{
"from": "system",
"value": "Use slice to create a real array\n\nbefore trying to access a value by index.\n"
},
{
"from": "human",
"value": "import Model, { hasMany, belongsTo, attr } from '@ember-data/model';\nimport { htmlSafe } from '@ember/template';\nimport { use } from 'ember-could-get-u... | javascript | chosen |
[
{
"from": "system",
"value": "Allow either a string or object for opts\n\nIf string, set this.opts.loadingText to string\n"
},
{
"from": "human",
"value": "var $ = require('dom')\n\nmodule.exports = Button\n\nfunction Button(ele, opts) {\n if (!(this instanceof Button))\n return new Button(e... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for to avoid cdn on local load"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n\n name: 'ember-cli-sentry',\n\n contentFor: function(type, config){\n if (type === 'body') {\n return '<script src=\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add throwing on errors in plug-ins\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*\n * Dependencies..\n */\n\nvar Ware;\n\nWare = require('ware');\n\n/*\n * Components.\n */\n\nvar parse,\n stringify;\n\nparse = require('./lib/parse.js');\nstringify = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Clear the timeout when the request does not timeout\n"
},
{
"from": "human",
"value": "\nvar co = require('co');\n\nmodule.exports = function(timeout) {\n return function *(next) {\n var ctx = this;\n yield Promise.race([\n new Promise(function(resolve, ... | javascript | chosen |
[
{
"from": "system",
"value": "Save on bytes using inlining of one-byte values\n"
},
{
"from": "human",
"value": "var VOWELS = /[aeiou]/gi;\nvar VOWELS_AND_SPACE = /[aeiou\\s]/g;\n\nexports.parse = function parse(string, join){\n if(typeof string !== 'string'){\n throw new TypeError('Expect... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.