conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add riot.render.tag function to create raw tag\n"
},
{
"from": "human",
"value": "\n// allow to require('riot')\nvar riot = module.exports = require(process.env.RIOT || require('path').resolve(__dirname, '../../riot'))\n\nvar compiler = require('riot-compiler')\n\n/... | javascript | chosen |
[
{
"from": "system",
"value": "Fix outside click when no update event were fired on component\n"
},
{
"from": "human",
"value": "const isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0))\nconst event = isTouch ? 'touchstart' : 'click'\n\nconst directive = {\n instances: []... | javascript | chosen |
[
{
"from": "system",
"value": "Apply function should return a value\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar slice = Array.prototype.slice\n , toArray = require('es5-ext/lib/Object/prototype/to-array');\n\nmodule.exports = function (fn, scope, args, resolve) {\n\tfn.apply(scope,... | javascript | chosen |
[
{
"from": "system",
"value": "Add more advanced compoent using props\n"
},
{
"from": "human",
"value": "var React = require('react');\nvar ReactDOM = require('react-dom');\n\n\nvar Hi = React.createClass({\n render : function() {\n return (\n <div>Hi {this.props.name}.</div>... | javascript | chosen |
[
{
"from": "system",
"value": "Fix augmented system form interface type selection\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n var form = document.getElementById('inner-form');\n var interface_type = document.getElementsByName('interface_type');\n var static_form =... | javascript | chosen |
[
{
"from": "system",
"value": "jslint: Fix missing space between function and ("
},
{
"from": "human",
"value": "module.exports = require('./jslint-linter');\nmodule.exports.create = function(options) {\n if (!options) { throw new TypeError('options is required (at least an empty object)'); }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "chore: Remove all inline styles and delegate to the _svg Sass partial\n"
},
{
"from": "human",
"value": "'use strict';\nimport React from 'react';\n\n\nconst DPCLogo = () => (\n <svg\n width=\"570px\"\n height=\"275px\"\n style={{\n background: 'rgba(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix chapter links in scrolled navigation\n\nREDMINE-17300\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport classNames from 'classnames';\nimport styles from \"./ChapterLink.module.css\";\nimport AppHeaderTooltip from \"./AppHeaderTooltip\";\n\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Remove *readonly* example for <SwitchRow>\n\nBecause setting 'readonly' on a checkbox input does not prevent user from\nchecking/unchecking on it. It does not make sense to include that in examples for now.\n"
},
{
"from": "human",
"value": "import React from 'react... | javascript | chosen |
[
{
"from": "system",
"value": "Remove turbo links for now"
},
{
"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/javascripts, vendo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test react-addons-test-utils should be always installed\n"
},
{
"from": "human",
"value": "/* eslint no-unused-expressions: 0 */\n\nconst expect = require('chai').expect;\nconst TestUtils = require('fountain-generator').TestUtils;\n\ndescribe('generator fountain... | javascript | chosen |
[
{
"from": "system",
"value": "Fix funtion calls in test file\n"
},
{
"from": "human",
"value": "var psd = require(\"./psd-api.js\");\n\n/* Starts the psd-api below */\n\n/* SAMPLE OBJECT TESTCASES */\n/* PASSED */\n// psd({lastName: \"Abdalla\"}); /* PASSED */\n// psd({email: \"hea113\"}); /* PA... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary ngrok stuff (running globably instead)\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst express = require('express');\nconst app = express();\n\nconst PORT = 8080 | process.env.PORT;\n\nconst ngrok = require('ngrok');\nconst authToken = r... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for titles & paths\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar path = require('path');\nvar assert = require('assert');\n\nvar summary = require('../lib/summary');\n\n\nvar CONTENT = fs.readFileSync(path.join(__dirname, './fixtures/SUMMA... | javascript | chosen |
[
{
"from": "system",
"value": "Enable translations: Swedish and Turkish\n"
},
{
"from": "human",
"value": "module.exports = {\n i18n: {\n defaultLocale: 'en',\n locales: ['de', 'el', 'en', 'es', 'fr', 'lt', 'nb-NO', 'pt', 'ru']\n },\n react: {\n useSuspense: false\n }\n}\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test because component refactor\n"
},
{
"from": "human",
"value": "require('./testdom')('<html><body></body></html>');\nimport { assert } from 'chai';\nimport React from 'react';\nimport TestUtils from 'react-addons-test-utils';\nimport Toc from '../src/componen... | javascript | chosen |
[
{
"from": "system",
"value": "Add a missing field to the fetch list of deny rule\n"
},
{
"from": "human",
"value": "Meteor.methods({\n storeEncryptedPrivateKey: function (encryptedKey) {\n Meteor.users.update({\n _id: this.userId\n }, {\n $set: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add gray line to separate off-white from white\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name dyslexic-bible\n// @namespace http://tampermonkey.net/\n// @version 2\n// @description Use a dyslexic-friendly font at bible.com\n// @match... | javascript | chosen |
[
{
"from": "system",
"value": "Change event tracking to reflect latest button text.\n"
},
{
"from": "human",
"value": "/**\n * Meetings and Conferences\n */\n\nvar m = require('mithril');\nvar $osf = require('js/osfHelpers');\n\n// CSS\nrequire('css/meetings-and-conferences.css');\n\nvar Meetings... | javascript | chosen |
[
{
"from": "system",
"value": "Fix unit test bundling regex to omit image test scripts\n"
},
{
"from": "human",
"value": "var context = require.context('./src', true, /^((?!\\.image).)*\\.js$/);\ncontext.keys().forEach(context);\n"
},
{
"from": "gpt",
"value": "var context = require.c... | javascript | chosen |
[
{
"from": "system",
"value": "Add code to tooltipify all tooltip links\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically\n//... | javascript | chosen |
[
{
"from": "system",
"value": "Convert all targets to the lowercase\n\nBecause of the change to regular expression for target types, commander\ndoes the work to correct the target type. So since I made the regular\nexpression case insensitive, I need to make sure that the target name is all\nlowercase -- the... | javascript | chosen |
[
{
"from": "system",
"value": "Remove AddressModal in members section to match with design decision\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\nimport { ngettext, msgid, c } from 'ttag';\nimport { Dr... | javascript | chosen |
[
{
"from": "system",
"value": "Add function of log file body getter\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst aws = require('aws-sdk');\nconst rds = new aws.RDS();\n\nconst DBInstanceIdentifier = process.env.AWS_DB_INSTANCE_IDENTIFIER;\n\nexports.handler = (event, context, callbac... | javascript | chosen |
[
{
"from": "system",
"value": "Add return early, return often\n"
},
{
"from": "human",
"value": "class ExtendableError extends Error {\n constructor(message) {\n super(message);\n\n Object.defineProperty(this, 'name', {\n enumerable : false,\n value : this.constructor.name,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Theme To Make Sure Its An Object\n"
},
{
"from": "human",
"value": "import Form from \"./components/form.js\"\nimport Input from \"./components/input.js\"\nimport Submit from \"./components/submit.js\"\nimport FormErrorList from \"./components/form_error_list.js... | javascript | chosen |
[
{
"from": "system",
"value": "Add header row and remove email column\n"
},
{
"from": "human",
"value": "var keystone = require('keystone');\nvar csv = require('csv');\nvar User = keystone.list(\"User\");\n\nexports = module.exports = function (req, res) {\n\tUser.model.find(function (err, result... | javascript | chosen |
[
{
"from": "system",
"value": "[broken] Add first react component with HMR\n"
},
{
"from": "human",
"value": "console.log('My minimal React Webpack Babel setup')\n\nmodule.hot.accept()\n"
},
{
"from": "gpt",
"value": "import React from 'react'\nimport ReactDOM from 'react-dom'\n\ncons... | javascript | chosen |
[
{
"from": "system",
"value": "Attach sender field to PendingInvoice\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(sequelize, DataTypes) {\n var PendingInvoice = sequelize.define('PendingInvoice', {\n invoiceId: DataTypes.INTEGER,\n due: Da... | javascript | chosen |
[
{
"from": "system",
"value": "Replace Authentication string with import\n"
},
{
"from": "human",
"value": "import HomeModule from \"./home\";\n\ndescribe(\"Home\", () => {\n let $rootScope, $componentController;\n\n beforeEach(window.module(\"Authentication\")); //to load hookProvider\n befor... | javascript | chosen |
[
{
"from": "system",
"value": "Use yandex.com as a smoke tests server for https requests\n"
},
{
"from": "human",
"value": "var Asker = require('../lib/asker'),\n ask = Asker,\n assert = require('chai').assert;\n\nmodule.exports = {\n '#isRunning getter returns actual value of the privat... | javascript | chosen |
[
{
"from": "system",
"value": "Normalize DOM from DOM or selector\n"
},
{
"from": "human",
"value": "export function regexEscape(string) {\n\treturn string.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"); // $& means the whole matched string\n}\n\nexport function isDOM(obj) {\n\tif (\"HTMLElement\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add guard against multiple loading"
},
{
"from": "human",
"value": "(function () {\n var BrowserPuppet = require('../src/puppet/browser-puppet.js');\n window.browserPuppet = new BrowserPuppet();\n\n var prevOnload = window.onload;\n\n window.onload = fun... | javascript | chosen |
[
{
"from": "system",
"value": "Change id for variants image testing\n"
},
{
"from": "human",
"value": "import { test } from 'qunit';\nimport moduleForAcceptance from 'leibniz-frontend/tests/helpers/module-for-acceptance';\n\nmoduleForAcceptance('Acceptance | toggle variants test');\n\n// TODO: Ma... | javascript | chosen |
[
{
"from": "system",
"value": "Fix gh toggle for render-wrapper boxes (e.g., images, etc?)\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name GH toggle diff\n// @version 1.0\n// @description Add a button to toggle file diffs\n// @match https://github.com/*\n// ==/UserScr... | javascript | chosen |
[
{
"from": "system",
"value": "Make modal close button more visible\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { actions } from '../../../store';\n\nconst ModalContent = connect(\n null,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix case sensitive stream.js require\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* global describe */\n\nvar Stream = require('../../lib/streams/Stream.js');\nvar describeStream = require('../describers/Stream.js');\n\ndescribe('Stream', function() {\n des... | javascript | chosen |
[
{
"from": "system",
"value": "Create spies and test websocket\n"
},
{
"from": "human",
"value": "var websocket = require('../dist/websocket.js');\n\ndescribe('websocket', function () {\n var sut;\n\n beforeEach(function () {\n sut = websocket({ on: function () {} });\n });\n\n it('should ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove only the role was found in the array.\n"
},
{
"from": "human",
"value": "var Bind = require(\"github/jillix/bind\");\nvar Events = require(\"github/jillix/events\");\n\nmodule.exports = function(config) {\n\n var self = this;\n Events.call(self, config)... | javascript | chosen |
[
{
"from": "system",
"value": "Add a callback to get the results from the now modular version of paramedic.js\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar parseArgs = require('minimist'),\n paramedic = require('./paramedic');\n\nvar plugins,\n platformId;\n\nvar USAGE = \"E... | javascript | chosen |
[
{
"from": "system",
"value": "Add lots of fun new functions\n"
},
{
"from": "human",
"value": "const translate = (object3D, velocity) => {\n object3D.translateX(velocity.x);\n object3D.translateY(velocity.y);\n object3D.translateZ(velocity.z);\n}\n\nconst rand = (min, max) => min + Math.rando... | javascript | chosen |
[
{
"from": "system",
"value": "Align and bucket test data\n"
},
{
"from": "human",
"value": "var mysql = require('mysql');\nvar squel = require(\"squel\");\n\nvar OstaMysql = function() {\n\tvar self = this;\n var connection = mysql.createConnection({\n host : 'localhost',\n databa... | javascript | chosen |
[
{
"from": "system",
"value": "Add setup examples for various vdom libs.\n"
},
{
"from": "human",
"value": "export const jsx = function(propMap, defaultProps) {\n return function(h) {\n return function(type, props) {\n const args = [type, props];\n if (props) {\n Object.keys(... | javascript | chosen |
[
{
"from": "system",
"value": "Add a sitekey for localhost\n"
},
{
"from": "human",
"value": "import { h, render, Component } from 'preact';\nimport \"preact/debug\";\nimport ReCaptcha from '../src';\n\nconst sitekey = 'xxxxx';\n\nlet recaptchaInstance, recaptchaInvisibleInstance;\n\nconst change... | javascript | chosen |
[
{
"from": "system",
"value": "Add ajax call that lumps the login form in the middle of the landing page when the login link is clicked. is ugly, but it works.\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n // This is called after the document has loaded in its entirety\n /... | javascript | chosen |
[
{
"from": "system",
"value": "Add task function created no syntax errors.\n"
},
{
"from": "human",
"value": "var nano = require('nano')('http://localhost:5984');\nvar db = nano.db.use('todo');\n\nvar todo = {};\n\ntodo.getAll = function(callback) {\n var results = [];\n db.view('todos', 'all_t... | javascript | chosen |
[
{
"from": "system",
"value": "Use function instead of React Component Class\n\n* Extract logic from view.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { movePiece } from '../actions';\nimport { connect } from 'react-redux';\nimport _ from 'lodash';\nimport { getPieceImag... | javascript | chosen |
[
{
"from": "system",
"value": "Disable eslint TS rule against JS/MJS files\n"
},
{
"from": "human",
"value": "module.exports = {\r\n root: true,\r\n parser: '@typescript-eslint/parser',\r\n plugins: [\r\n '@typescript-eslint',\r\n ],\r\n extends: [\r\n 'eslint:recommended',\r\n 'plu... | javascript | chosen |
[
{
"from": "system",
"value": "Enforce URL ends with whats passed from json\n"
},
{
"from": "human",
"value": "exports.generateDefaultStub = function (data) {\n angular\n .module(data['stub-options']['module_name'], [\n 'ngMockE2E',\n 'app'\n ])\n .ru... | javascript | chosen |
[
{
"from": "system",
"value": "Remove timeout parameter from api method\n"
},
{
"from": "human",
"value": "/*\n * BotFather\n * Copyright(c) 2016 Aleki\n * MIT Licensed\n */\n'use strict';\n\nconst https = require('https');\n\nclass BotFather {\n\t/**\n\t * @param {string} token\n\t */\n constru... | javascript | chosen |
[
{
"from": "system",
"value": "Update date message on ticket\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nconst formatAvailabilityMessage = startDate =>\n `Disponible depuis le ${new Date(startDate).getDay()} ${new Date(\n startDate\n ).toLocaleString('fr-FR', { month: 'lo... | javascript | chosen |
[
{
"from": "system",
"value": "Add custom styles to AppBar\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { MuiThemeProvider } from 'material-ui/styles'\nimport './index.css';\nimport App from './App';\nimport registerServiceWorker from '.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Parcel example by using old API\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { hot } from 'react-hot-loader/root'\nimport Counter from './Counter'\n\nconst App = () => (\n <h1>\n Hello, world.<br />\n <Counter />\n </h1>\n)\n\nexp... | javascript | chosen |
[
{
"from": "system",
"value": "Add debug logs for query and projection.\n"
},
{
"from": "human",
"value": "/**\n * External imports\n */\nimport mingo from 'mingo';\nimport libdebug from 'debug';\n\n// create debug logger\nconst debug = libdebug('storage-adapter');\n\nconst PROTOTYPE = {\n find(... | javascript | chosen |
[
{
"from": "system",
"value": "Use env name MYSQL_DATABASE instead of MYSQL_DB\n\nMYSQL_DATABASE matches the environment variable name expected by the\nDocker MySQL image (https://hub.docker.com/_/mysql/) which will make it\neasier to set up deployments, as I can just set up a secret with\nMYSQL_DATABASE, MY... | javascript | chosen |
[
{
"from": "system",
"value": "Use 302 so testing w/o https still works\n"
},
{
"from": "human",
"value": "module.exports = function(serverLocation) {\n return function(req, res) {\n res.writeHead(301, {\n 'Location': serverLocation\n });\n res.end();\n }\n}\... | javascript | chosen |
[
{
"from": "system",
"value": "Add a semicolon to end of line\n"
},
{
"from": "human",
"value": "// video.js\n//\n// data object representing an video\n//\n// Copyright 2011, StatusNet Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file exc... | javascript | chosen |
[
{
"from": "system",
"value": "Remove React from bundle. Declared as peer dependency. 📦\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\nconst UglifyJsPlugin = require('uglifyjs-webpack-plugin');\n// const BundleAnalyz... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 163 music art image selector.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = '.m-playbar';\n\nConnector.trackArtImageSelector = '.head img';\n\nConnector.getTrack = function() {\n\t\tvar track = $('.fc1')... | javascript | chosen |
[
{
"from": "system",
"value": "Allow events to be triggered by name\n"
},
{
"from": "human",
"value": "function hasEvent(_public, _protected, event_name) {\n var handlers = [];\n\n _public['on' + event_name.camelize()] = function (handler) {\n handlers.push(handler);\n };\n\n _... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to construct a list element of module port\n"
},
{
"from": "human",
"value": "(function(app) {\n 'use strict';\n\n var jCore = require('jcore');\n var helper = app.helper || require('../helper.js');\n\n var ModulePort = helper.inherits(function(props)... | javascript | chosen |
[
{
"from": "system",
"value": "Replace date format from HH:m to HH:mm\n"
},
{
"from": "human",
"value": "import React, {\n Component, PropTypes as PT\n} from \"react\"\nimport {\n ListView, Text, View,\n Image, TouchableOpacity\n} ... | javascript | chosen |
[
{
"from": "system",
"value": ":fire: Remove status from compile result\nIt's still there in results\n"
},
{
"from": "human",
"value": "'use babel'\n\n/* @flow */\n\nexport type Ucompiler$Plugins = {\n compilers: Array<UCompiler$Plugin>,\n general: Array<UCompiler$Plugin>,\n minifiers: Array<U... | javascript | chosen |
[
{
"from": "system",
"value": "Remove improper response status code\n"
},
{
"from": "human",
"value": "import {Router} from 'express';\nimport HttpStatus from 'http-status-codes';\nimport * as userService from '../services/userService';\n\nlet router = Router();\n\n/**\n * GET /api/users\n */\nro... | javascript | chosen |
[
{
"from": "system",
"value": "Add path for reading the json data.\n"
},
{
"from": "human",
"value": "describe(\"Read book data\", function() {\n\tbeforeEach(function(){\t\t\n\t\tvar file = filePath.files[0];\t\t\n\t\tvar reader = new FileReader();\n\t});\n\tit(\"assert JSON file is not empty\",f... | javascript | chosen |
[
{
"from": "system",
"value": "Add `text.md` to the default grammars\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport Controller from './controller.js';\n\nexport default {\n config: {\n grammars: {\n type : 'array',\n default: ['source.gfm'],\n items : {\n t... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Fix handling of null in extend config\n"
},
{
"from": "human",
"value": "'use babel'\n\nimport isGlob from 'is-glob'\nimport {isMatch} from 'micromatch'\n\nexport function getRules(relativePath, config) {\n const localConfig = {}\n\n for (const key in config... | javascript | chosen |
[
{
"from": "system",
"value": "Fix global storage directory name.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst Storage = require(\"node-storage\");\nconst os = require('os');\n\nconst GLOBAL_STORE_ROOT = os.homedir() + \"/.src/\";\nconst GLOBAL_STORE = {\n config : { path: \"confi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix video player on pws\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 * <div data-keep-aspect-ratio=\... | javascript | chosen |
[
{
"from": "system",
"value": "Make useless menu item have \"Recode\" text\n"
},
{
"from": "human",
"value": "/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */\n/*global define, $, brackets, window */\n\n/** Simple extension that adds a \"File >... | javascript | chosen |
[
{
"from": "system",
"value": "Make Node output show which instance it's coming from\n"
},
{
"from": "human",
"value": "//Lets require/import the HTTP module\nvar http = require('http');\nvar args = {};\n\nprocess.argv.filter(function (argument) {\n return argument.indexOf('=') !== -1;\n}).for... | javascript | chosen |
[
{
"from": "system",
"value": "Add url to environment variable\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport validator from 'express-validator';\nimport bodyParser from 'body-parser';\nimport winston from 'winston';\nimport dotenv from 'dotenv';\nimport routes from './... | javascript | chosen |
[
{
"from": "system",
"value": "Trim strings before sending them to the channel\n"
},
{
"from": "human",
"value": "'use strict';\nvar request = require( 'request' ),\n cheerio = require( 'cheerio' ),\n urlChecker = {\n bot : false,\n setup : function( bot ){\n var _t... | javascript | chosen |
[
{
"from": "system",
"value": "Use <pre> to increase readability\n"
},
{
"from": "human",
"value": "/*\n#\n# i2mx.js - v0.1-Alpha\n# Apache v2 License\n#\n*/\n\n// Create img2musicXML (abbreviated as i2mx) namespace\nvar i2mx = i2mx || { };\n\n// Create JsCheckup class (@TODO: Move to inside name... | javascript | chosen |
[
{
"from": "system",
"value": "Add helper to get translated configuration values\n\nThis will be used to get the proper translation for configuration values\nlike:\n\n- Title\n- Subtitle\n- Description\n\nThis translations should be located in the `_data` folder of the Hexo\nsite, in files named like `config... | javascript | chosen |
[
{
"from": "system",
"value": "Remove cleanup ids - for possibility to use svg gradients\n"
},
{
"from": "human",
"value": "import SVGOptim from 'svgo';\n\nconst svgo = new SVGOptim({\n plugins: [\n 'removeDoctype',\n 'removeXMLProcInst',\n 'removeComments',\n 'removeMetadata',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix js error when using node < 4.x\n"
},
{
"from": "human",
"value": "var is = require('is');\nvar Promise = require('../../utils/promise');\nvar editHTMLElement = require('./editHTMLElement');\n\n/**\n Return language for a code blocks from a list of class names... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure npm dependencies are also requiring React 0.14-rc.\n"
},
{
"from": "human",
"value": "var webpack = require(\"webpack\");\nvar path = require(\"path\");\n\nmodule.exports = {\n\ttarget: \"web\",\n\tcache: false,\n\tcontext: __dirname,\n\tdevtool: false,... | javascript | chosen |
[
{
"from": "system",
"value": "Revise Collection comments to be more clear/correct\n"
},
{
"from": "human",
"value": "'use strict';\n\n// A general container for any type of collection\nfunction Collection(SubCollectionItem, itemDicts) {\n var collection = this;\n // A reference to the sub-coll... | javascript | chosen |
[
{
"from": "system",
"value": "Support updating rather than recreate for domains\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport shallowEqual from 'shallowequal'\n\n\nexport const withDomain = ({\n domainClass,\n mapPropsToArg,\n mapPropsToArgsArray = props => mapPropsToAr... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to verify resolves correctly\n"
},
{
"from": "human",
"value": "import createCredentialsAuthenticator from '../../src/authenticators/credentials'\n\nbeforeEach(() => {\n fetch.resetMocks()\n})\n\nit('fetches from given endpoint using default config', () =>... | javascript | chosen |
[
{
"from": "system",
"value": "Add meta tests for odd values\n"
},
{
"from": "human",
"value": "var tap = require(\"../\")\n , test = tap.test\n\ntest(\"meta success\", { skip: false }, function (t) {\n t.once(\"end\", section2)\n t.ok(true, \"true is ok\")\n t.notOk(false, \"false is notOk\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add packageName variable and fix styleguide location\n"
},
{
"from": "human",
"value": "'use strict'\n\n// var console = require('better-console')\nvar path = require('path')\n\nmodule.exports = function (options) {\n function n (pathString) {\n return path.norm... | javascript | chosen |
[
{
"from": "system",
"value": "Disable auto detect for highlight by default\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n // Site\n title: 'Hexo',\n subtitle: '',\n description: '',\n author: 'John Doe',\n language: '',\n timezone: '',\n // URL\n url: 'http://y... | javascript | chosen |
[
{
"from": "system",
"value": "Update idSelector to match latest gonzales AST\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\n\nmodule.exports = function (options) {\n var filename = path.basename(options.path);\n var config = options.config;\n var node =... | javascript | chosen |
[
{
"from": "system",
"value": "Transform detail into a Canvas\n"
},
{
"from": "human",
"value": "// Editor component\nvar Editor = {\n\ttemplate: `\n\t\t<div>\n\t\t\t<div id=\"back\" class=\"editor-goback\" v-on:click=\"goBack()\"></div>\n\t\t\t<img id=\"miniletter\" class=\"editor-miniletter\" v... | javascript | chosen |
[
{
"from": "system",
"value": "Add on server start up remove messages\n"
},
{
"from": "human",
"value": "if (Meteor.isClient) {\n\n Template.messages.rendered = function () {\n scrollPosition();\n };\n\n Accounts.ui.config({\n passwordSignupFields: 'USERNAME_ONLY'\n });\n\n Template.m... | javascript | chosen |
[
{
"from": "system",
"value": "Add confirmation message before delete theme from admin side\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('shopAdmin').controller('themeEditController', ['$scope', '$stateParams', '$state', 'themeService',\n function ($scope, $stateParams, $... | javascript | chosen |
[
{
"from": "system",
"value": "Add consumerKey and consumerSecret to prompt.\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar optimist = require('optimist');\nvar prompt = require('prompt');\n\nvar schema = {\n properties: {\n file: {\n required: true,\n default: '... | javascript | chosen |
[
{
"from": "system",
"value": "Test search comparison for validation [Input vs internal data]\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst hbs = require('hbs');\n\nvar app = express();\n\n\napp.set('view engine', 'hbs');\n/* Load Web Server *\n*** USE CORRECT RELA... | javascript | chosen |
[
{
"from": "system",
"value": "Remove now extraneous warning disabling.\n\nThank to `babel-eslint@3.1.10` update.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Button from './Button';\nimport FormGroup from './FormGroup';\nimport InputBase from './InputBase';\nimport child... | javascript | chosen |
[
{
"from": "system",
"value": "Replace imperative `forEach` with `map`/`filter`\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport { Parks } from \"trailz\";\nimport { fromJson as parkFromJson, Json as ParkJson } from \"./park\";\n\nexport type Json = Array<ParkJson>;\n\nexport function fro... | javascript | chosen |
[
{
"from": "system",
"value": "Change blocky renderer solution color\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Paint a single cell in the maze a solid color padded with a single px of\n// blank space.\nmodule.exports = function (maze, canvas, opts, x, y) {\n\n var cellSize = opts.... | javascript | chosen |
[
{
"from": "system",
"value": "Add Avatar and Button in list\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from \"react\";\nimport Table from \"material-ui/lib/table/table\";\nimport TableRow from \"material-ui/lib/table/table-row\";\nimport TableRowColumn from \"material-ui/lib/ta... | javascript | chosen |
[
{
"from": "system",
"value": "Fix require paths and description\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Calculate source lines of code (SLOC) for list of JavaScript files.\n*\n* @module @stdlib/_tools/js/sloc-file-list\n*\n* @example\n* var analyze = require( '@stdlib/_tools/j... | javascript | chosen |
[
{
"from": "system",
"value": "Update file transfer example to match updates to filestream\n"
},
{
"from": "human",
"value": "var dropkick = require('dropkick');\nvar quickconnect = require('rtc-quickconnect');\nvar fileReader = require('filestream/read');\nvar fileReceiver = require('filestream/... | javascript | chosen |
[
{
"from": "system",
"value": "Add paths for underscore, jquery, and backbone.\n"
},
{
"from": "human",
"value": "window.blog = {DEUBUG: true};\n\nrequire.config({});\n\nrequire([], function() {});\n"
},
{
"from": "gpt",
"value": "window.blog = {DEUBUG: true};\n\nrequire.config({\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix linting, remove tests dependent on observables\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport FakeServer, { stubRequest } from 'ember-cli-fake-server';\nimport config from 'ember-get-config';\nimport { moduleForComponent, test } from 'embe... | javascript | chosen |
[
{
"from": "system",
"value": "Set initial state from app settings\n"
},
{
"from": "human",
"value": "\nvar initialState = {\n}\n\nfunction cards(state = initialState, action) {\n switch (action.type) {\n case 'SHOW_CARD':\n var newState = {...state};\n if (newState[action.id])\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update icl4 to use new loader format"
},
{
"from": "human",
"value": "define(['mac/palette16'], function(palette) {\n\n 'use strict';\n\n return function(resource) {\n if (resource.data.length !== 512) {\n console.error('icl4 resource expected to be 512 by... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.