diff --git a/.gitignore b/.gitignore index 971f95c..315ec7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ profiles.json +key.pub +key diff --git a/README.md b/README.md index 6a7f97a..03ca384 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,12 @@ An open source chat client - atob - btoa - child_process +- showdown +- open + +# Chat formatting +- Bold: `*` +- Italic: `_` +- Strikethrough: `~` +- Underline: `-` +- Code: ` diff --git a/index.html b/index.html index 9890840..85868a6 100644 --- a/index.html +++ b/index.html @@ -3,11 +3,20 @@ Chat Client + + + + + - + + + + + diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 120000 index 0000000..fbb7ee0 --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1 @@ +../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/showdown b/node_modules/.bin/showdown new file mode 120000 index 0000000..0b3dd15 --- /dev/null +++ b/node_modules/.bin/showdown @@ -0,0 +1 @@ +../showdown/bin/showdown.js \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 120000 index 0000000..f62471c --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1 @@ +../which/bin/which \ No newline at end of file diff --git a/node_modules/circular-json/README.md b/node_modules/circular-json/README.md deleted file mode 100644 index e6451b2..0000000 --- a/node_modules/circular-json/README.md +++ /dev/null @@ -1,146 +0,0 @@ -CircularJSON -============ - -[![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/WebReflection/donate) ![Downloads](https://img.shields.io/npm/dm/circular-json.svg) [![Build Status](https://travis-ci.org/WebReflection/circular-json.svg?branch=master)](https://travis-ci.org/WebReflection/circular-json) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/circular-json/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/circular-json?branch=master) - -Serializes and deserializes otherwise valid JSON objects containing circular references into and from a specialized JSON format. - -- - - - -## The future of this module is called [flatted](https://github.com/WebReflection/flatted#flatted) - -Smaller, faster, and able to produce on average a reduced output too, [flatted](https://github.com/WebReflection/flatted#flatted) is the new, bloatless, ESM and CJS compatible, circular JSON parser. - -It has now reached V1 and it implements the exact same JSON API. - -Please note **CircularJSON is in maintenance only** and **[flatted](https://github.com/WebReflection/flatted#flatted) is its successor**. - -- - - - -### A Working Solution To A Common Problem -A usage example: - -```JavaScript -var object = {}; -object.arr = [ - object, object -]; -object.arr.push(object.arr); -object.obj = object; - -var serialized = CircularJSON.stringify(object); -// '{"arr":["~","~","~arr"],"obj":"~"}' -// NOTE: CircularJSON DOES NOT parse JS -// it handles receiver and reviver callbacks - -var unserialized = CircularJSON.parse(serialized); -// { arr: [ [Circular], [Circular] ], -// obj: [Circular] } - -unserialized.obj === unserialized; -unserialized.arr[0] === unserialized; -unserialized.arr.pop() === unserialized.arr; -``` - -A quick summary: - - * **new** in version `0.5`, you can specify a JSON parser different from JSON itself. `CircularJSON.parser = ABetterJSON;` is all you need. - * uses `~` as a special prefix symbol to denote which parent the reference belongs to (i.e. `~root~child1~child2`) - * reasonably fast in both serialization and deserialization - * compact serialization for easier and slimmer transportation across environments - * [tested and covered](test/circular-json.js) over nasty structures too - * compatible with all JavaScript engines - -Node Installation & Usage -============ - -```bash -npm install --save circular-json -``` - -```javascript -'use strict'; - -var - CircularJSON = require('circular-json'), - obj = { foo: 'bar' }, - str -; - -obj.self = obj; -str = CircularJSON.stringify(obj); -``` - -There are no dependencies. - -Browser Installation & Usage -================ - -* Global: -* AMD: -* CommonJS: - -(generated via [gitstrap](https://github.com/WebReflection/gitstrap)) - -```html - -``` - -```javascript -'use strict'; - -var CircularJSON = window.CircularJSON - , obj = { foo: 'bar' } - , str - ; - -obj.self = obj; -str = CircularJSON.stringify(obj); -``` - -NOTE: Platforms without native JSON (i.e. MSIE <= 8) requires `json3.js` or similar. - -It is also *a bad idea* to `CircularJSON.parse(JSON.stringify(object))` because of those manipulation used in `CircularJSON.stringify()` able to make parsing safe and secure. - -As summary: `CircularJSON.parse(CircularJSON.stringify(object))` is the way to go, same is for `JSON.parse(JSON.stringify(object))`. - -API -=== - -It's the same as native JSON, except the fourth parameter `placeholder`, which circular references to be replaced with `"[Circular]"` (i.e. for logging). - -* CircularJSON.stringify(object, replacer, spacer, placeholder) -* CircularJSON.parse(string, reviver) - -Bear in mind `JSON.parse(CircularJSON.stringify(object))` will work but not produce the expected output. - -Similar Libraries -======= - -### Why Not the [@izs](https://twitter.com/izs) One -The module [json-stringify-safe](https://github.com/isaacs/json-stringify-safe) seems to be for `console.log()` but it's completely pointless for `JSON.parse()`, being latter one unable to retrieve back the initial structure. Here an example: - -```JavaScript -// a logged object with circular references -{ - "circularRef": "[Circular]", - "list": [ - "[Circular]", - "[Circular]" - ] -} -// what do we do with above output ? -``` - -Just type this in your `node` console: `var o = {}; o.a = o; console.log(o);`. The output will be `{ a: [Circular] }` ... good, but that ain't really solving the problem. - -However, if that's all you need, the function used to create that kind of output is probably faster than `CircularJSON` and surely fits in less lines of code. - - -### Why Not {{put random name}} Solution -So here the thing: circular references can be wrong but, if there is a need for them, any attempt to ignore them or remove them can be considered just a failure. - -Not because the method is bad or it's not working, simply because the circular info, the one we needed and used in the first place, is lost! - -In this case, `CircularJSON` does even more than just solve circular and recursions: it maps all same objects so that less memory is used as well on deserialization as less bandwidth too! -It's able to redefine those references back later on so the way we store is the way we retrieve and in a reasonably performant way, also trusting the snappy and native `JSON` methods to iterate. diff --git a/node_modules/circular-json/build/circular-json.js b/node_modules/circular-json/build/circular-json.js deleted file mode 100644 index bcb6046..0000000 --- a/node_modules/circular-json/build/circular-json.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! (C) WebReflection Mit Style License */ -var CircularJSON=function(JSON,RegExp){var specialChar="~",safeSpecialChar="\\x"+("0"+specialChar.charCodeAt(0).toString(16)).slice(-2),escapedSafeSpecialChar="\\"+safeSpecialChar,specialCharRG=new RegExp(safeSpecialChar,"g"),safeSpecialCharRG=new RegExp(escapedSafeSpecialChar,"g"),safeStartWithSpecialCharRG=new RegExp("(?:^|([^\\\\]))"+escapedSafeSpecialChar),indexOf=[].indexOf||function(v){for(var i=this.length;i--&&this[i]!==v;);return i},$String=String;function generateReplacer(value,replacer,resolve){var doNotIgnore=false,inspect=!!replacer,path=[],all=[value],seen=[value],mapp=[resolve?specialChar:"[Circular]"],last=value,lvl=1,i,fn;if(inspect){fn=typeof replacer==="object"?function(key,value){return key!==""&&replacer.indexOf(key)<0?void 0:value}:replacer}return function(key,value){if(inspect)value=fn.call(this,key,value);if(doNotIgnore){if(last!==this){i=lvl-indexOf.call(all,this)-1;lvl-=i;all.splice(lvl,all.length);path.splice(lvl-1,path.length);last=this}if(typeof value==="object"&&value){if(indexOf.call(all,value)<0){all.push(last=value)}lvl=all.length;i=indexOf.call(seen,value);if(i<0){i=seen.push(value)-1;if(resolve){path.push((""+key).replace(specialCharRG,safeSpecialChar));mapp[i]=specialChar+path.join(specialChar)}else{mapp[i]=mapp[0]}}else{value=mapp[i]}}else{if(typeof value==="string"&&resolve){value=value.replace(safeSpecialChar,escapedSafeSpecialChar).replace(specialChar,safeSpecialChar)}}}else{doNotIgnore=true}return value}}function retrieveFromPath(current,keys){for(var i=0,length=keys.length;i +# [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23) + + +### Features + +* add resetOutput method ([#57](https://github.com/yargs/cliui/issues/57)) ([7246902](https://github.com/yargs/cliui/commit/7246902)) + + + + +# [4.0.0](https://github.com/yargs/cliui/compare/v3.2.0...v4.0.0) (2017-12-18) + + +### Bug Fixes + +* downgrades strip-ansi to version 3.0.1 ([#54](https://github.com/yargs/cliui/issues/54)) ([5764c46](https://github.com/yargs/cliui/commit/5764c46)) +* set env variable FORCE_COLOR. ([#56](https://github.com/yargs/cliui/issues/56)) ([7350e36](https://github.com/yargs/cliui/commit/7350e36)) + + +### Chores + +* drop support for node < 4 ([#53](https://github.com/yargs/cliui/issues/53)) ([b105376](https://github.com/yargs/cliui/commit/b105376)) + + +### Features + +* add fallback for window width ([#45](https://github.com/yargs/cliui/issues/45)) ([d064922](https://github.com/yargs/cliui/commit/d064922)) + + +### BREAKING CHANGES + +* officially drop support for Node < 4 + + + + +# [3.2.0](https://github.com/yargs/cliui/compare/v3.1.2...v3.2.0) (2016-04-11) + + +### Bug Fixes + +* reduces tarball size ([acc6c33](https://github.com/yargs/cliui/commit/acc6c33)) + +### Features + +* adds standard-version for release management ([ff84e32](https://github.com/yargs/cliui/commit/ff84e32)) diff --git a/node_modules/cliui/LICENSE.txt b/node_modules/cliui/LICENSE.txt new file mode 100644 index 0000000..c7e2747 --- /dev/null +++ b/node_modules/cliui/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cliui/README.md b/node_modules/cliui/README.md new file mode 100644 index 0000000..7861976 --- /dev/null +++ b/node_modules/cliui/README.md @@ -0,0 +1,115 @@ +# cliui + +[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui) +[![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=) +[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +easily create complex multi-column command-line-interfaces. + +## Example + +```js +var ui = require('cliui')() + +ui.div('Usage: $0 [command] [options]') + +ui.div({ + text: 'Options:', + padding: [2, 0, 2, 0] +}) + +ui.div( + { + text: "-f, --file", + width: 20, + padding: [0, 4, 0, 4] + }, + { + text: "the file to load." + + chalk.green("(if this description is long it wraps).") + , + width: 20 + }, + { + text: chalk.red("[required]"), + align: 'right' + } +) + +console.log(ui.toString()) +``` + + + +## Layout DSL + +cliui exposes a simple layout DSL: + +If you create a single `ui.row`, passing a string rather than an +object: + +* `\n`: characters will be interpreted as new rows. +* `\t`: characters will be interpreted as new columns. +* `\s`: characters will be interpreted as padding. + +**as an example...** + +```js +var ui = require('./')({ + width: 60 +}) + +ui.div( + 'Usage: node ./bin/foo.js\n' + + ' \t provide a regex\n' + + ' \t provide a glob\t [required]' +) + +console.log(ui.toString()) +``` + +**will output:** + +```shell +Usage: node ./bin/foo.js + provide a regex + provide a glob [required] +``` + +## Methods + +```js +cliui = require('cliui') +``` + +### cliui({width: integer}) + +Specify the maximum width of the UI being generated. +If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`. + +### cliui({wrap: boolean}) + +Enable or disable the wrapping of text in a column. + +### cliui.div(column, column, column) + +Create a row with any number of columns, a column +can either be a string, or an object with the following +options: + +* **text:** some text to place in the column. +* **width:** the width of a column. +* **align:** alignment, `right` or `center`. +* **padding:** `[top, right, bottom, left]`. +* **border:** should a border be placed around the div? + +### cliui.span(column, column, column) + +Similar to `div`, except the next row will be appended without +a new line being created. + +### cliui.resetOutput() + +Resets the UI elements of the current cliui instance, maintaining the values +set for `width` and `wrap`. diff --git a/node_modules/cliui/index.js b/node_modules/cliui/index.js new file mode 100644 index 0000000..b42d982 --- /dev/null +++ b/node_modules/cliui/index.js @@ -0,0 +1,324 @@ +var stringWidth = require('string-width') +var stripAnsi = require('strip-ansi') +var wrap = require('wrap-ansi') +var align = { + right: alignRight, + center: alignCenter +} +var top = 0 +var right = 1 +var bottom = 2 +var left = 3 + +function UI (opts) { + this.width = opts.width + this.wrap = opts.wrap + this.rows = [] +} + +UI.prototype.span = function () { + var cols = this.div.apply(this, arguments) + cols.span = true +} + +UI.prototype.resetOutput = function () { + this.rows = [] +} + +UI.prototype.div = function () { + if (arguments.length === 0) this.div('') + if (this.wrap && this._shouldApplyLayoutDSL.apply(this, arguments)) { + return this._applyLayoutDSL(arguments[0]) + } + + var cols = [] + + for (var i = 0, arg; (arg = arguments[i]) !== undefined; i++) { + if (typeof arg === 'string') cols.push(this._colFromString(arg)) + else cols.push(arg) + } + + this.rows.push(cols) + return cols +} + +UI.prototype._shouldApplyLayoutDSL = function () { + return arguments.length === 1 && typeof arguments[0] === 'string' && + /[\t\n]/.test(arguments[0]) +} + +UI.prototype._applyLayoutDSL = function (str) { + var _this = this + var rows = str.split('\n') + var leftColumnWidth = 0 + + // simple heuristic for layout, make sure the + // second column lines up along the left-hand. + // don't allow the first column to take up more + // than 50% of the screen. + rows.forEach(function (row) { + var columns = row.split('\t') + if (columns.length > 1 && stringWidth(columns[0]) > leftColumnWidth) { + leftColumnWidth = Math.min( + Math.floor(_this.width * 0.5), + stringWidth(columns[0]) + ) + } + }) + + // generate a table: + // replacing ' ' with padding calculations. + // using the algorithmically generated width. + rows.forEach(function (row) { + var columns = row.split('\t') + _this.div.apply(_this, columns.map(function (r, i) { + return { + text: r.trim(), + padding: _this._measurePadding(r), + width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined + } + })) + }) + + return this.rows[this.rows.length - 1] +} + +UI.prototype._colFromString = function (str) { + return { + text: str, + padding: this._measurePadding(str) + } +} + +UI.prototype._measurePadding = function (str) { + // measure padding without ansi escape codes + var noAnsi = stripAnsi(str) + return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length] +} + +UI.prototype.toString = function () { + var _this = this + var lines = [] + + _this.rows.forEach(function (row, i) { + _this.rowToString(row, lines) + }) + + // don't display any lines with the + // hidden flag set. + lines = lines.filter(function (line) { + return !line.hidden + }) + + return lines.map(function (line) { + return line.text + }).join('\n') +} + +UI.prototype.rowToString = function (row, lines) { + var _this = this + var padding + var rrows = this._rasterize(row) + var str = '' + var ts + var width + var wrapWidth + + rrows.forEach(function (rrow, r) { + str = '' + rrow.forEach(function (col, c) { + ts = '' // temporary string used during alignment/padding. + width = row[c].width // the width with padding. + wrapWidth = _this._negatePadding(row[c]) // the width without padding. + + ts += col + + for (var i = 0; i < wrapWidth - stringWidth(col); i++) { + ts += ' ' + } + + // align the string within its column. + if (row[c].align && row[c].align !== 'left' && _this.wrap) { + ts = align[row[c].align](ts, wrapWidth) + if (stringWidth(ts) < wrapWidth) ts += new Array(width - stringWidth(ts)).join(' ') + } + + // apply border and padding to string. + padding = row[c].padding || [0, 0, 0, 0] + if (padding[left]) str += new Array(padding[left] + 1).join(' ') + str += addBorder(row[c], ts, '| ') + str += ts + str += addBorder(row[c], ts, ' |') + if (padding[right]) str += new Array(padding[right] + 1).join(' ') + + // if prior row is span, try to render the + // current row on the prior line. + if (r === 0 && lines.length > 0) { + str = _this._renderInline(str, lines[lines.length - 1]) + } + }) + + // remove trailing whitespace. + lines.push({ + text: str.replace(/ +$/, ''), + span: row.span + }) + }) + + return lines +} + +function addBorder (col, ts, style) { + if (col.border) { + if (/[.']-+[.']/.test(ts)) return '' + else if (ts.trim().length) return style + else return ' ' + } + return '' +} + +// if the full 'source' can render in +// the target line, do so. +UI.prototype._renderInline = function (source, previousLine) { + var leadingWhitespace = source.match(/^ */)[0].length + var target = previousLine.text + var targetTextWidth = stringWidth(target.trimRight()) + + if (!previousLine.span) return source + + // if we're not applying wrapping logic, + // just always append to the span. + if (!this.wrap) { + previousLine.hidden = true + return target + source + } + + if (leadingWhitespace < targetTextWidth) return source + + previousLine.hidden = true + + return target.trimRight() + new Array(leadingWhitespace - targetTextWidth + 1).join(' ') + source.trimLeft() +} + +UI.prototype._rasterize = function (row) { + var _this = this + var i + var rrow + var rrows = [] + var widths = this._columnWidths(row) + var wrapped + + // word wrap all columns, and create + // a data-structure that is easy to rasterize. + row.forEach(function (col, c) { + // leave room for left and right padding. + col.width = widths[c] + if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), { hard: true }).split('\n') + else wrapped = col.text.split('\n') + + if (col.border) { + wrapped.unshift('.' + new Array(_this._negatePadding(col) + 3).join('-') + '.') + wrapped.push("'" + new Array(_this._negatePadding(col) + 3).join('-') + "'") + } + + // add top and bottom padding. + if (col.padding) { + for (i = 0; i < (col.padding[top] || 0); i++) wrapped.unshift('') + for (i = 0; i < (col.padding[bottom] || 0); i++) wrapped.push('') + } + + wrapped.forEach(function (str, r) { + if (!rrows[r]) rrows.push([]) + + rrow = rrows[r] + + for (var i = 0; i < c; i++) { + if (rrow[i] === undefined) rrow.push('') + } + rrow.push(str) + }) + }) + + return rrows +} + +UI.prototype._negatePadding = function (col) { + var wrapWidth = col.width + if (col.padding) wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0) + if (col.border) wrapWidth -= 4 + return wrapWidth +} + +UI.prototype._columnWidths = function (row) { + var _this = this + var widths = [] + var unset = row.length + var unsetWidth + var remainingWidth = this.width + + // column widths can be set in config. + row.forEach(function (col, i) { + if (col.width) { + unset-- + widths[i] = col.width + remainingWidth -= col.width + } else { + widths[i] = undefined + } + }) + + // any unset widths should be calculated. + if (unset) unsetWidth = Math.floor(remainingWidth / unset) + widths.forEach(function (w, i) { + if (!_this.wrap) widths[i] = row[i].width || stringWidth(row[i].text) + else if (w === undefined) widths[i] = Math.max(unsetWidth, _minWidth(row[i])) + }) + + return widths +} + +// calculates the minimum width of +// a column, based on padding preferences. +function _minWidth (col) { + var padding = col.padding || [] + var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0) + if (col.border) minWidth += 4 + return minWidth +} + +function getWindowWidth () { + if (typeof process === 'object' && process.stdout && process.stdout.columns) return process.stdout.columns +} + +function alignRight (str, width) { + str = str.trim() + var padding = '' + var strWidth = stringWidth(str) + + if (strWidth < width) { + padding = new Array(width - strWidth + 1).join(' ') + } + + return padding + str +} + +function alignCenter (str, width) { + str = str.trim() + var padding = '' + var strWidth = stringWidth(str.trim()) + + if (strWidth < width) { + padding = new Array(parseInt((width - strWidth) / 2, 10) + 1).join(' ') + } + + return padding + str +} + +module.exports = function (opts) { + opts = opts || {} + + return new UI({ + width: (opts || {}).width || getWindowWidth() || 80, + wrap: typeof opts.wrap === 'boolean' ? opts.wrap : true + }) +} diff --git a/node_modules/cliui/node_modules/ansi-regex/index.js b/node_modules/cliui/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..c4aaecf --- /dev/null +++ b/node_modules/cliui/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = () => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, 'g'); +}; diff --git a/node_modules/cliui/node_modules/ansi-regex/license b/node_modules/cliui/node_modules/ansi-regex/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/cliui/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cliui/node_modules/ansi-regex/package.json b/node_modules/cliui/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..fea046d --- /dev/null +++ b/node_modules/cliui/node_modules/ansi-regex/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + "ansi-regex@^3.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui/node_modules/strip-ansi" + ] + ], + "_from": "ansi-regex@>=3.0.0 <4.0.0", + "_id": "ansi-regex@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/cliui/ansi-regex", + "_nodeVersion": "4.8.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/ansi-regex-3.0.0.tgz_1497985412590_0.5700640194118023" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "name": "ansi-regex", + "raw": "ansi-regex@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cliui/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "_shasum": "ed0317c322064f79466c02966bddb605ab37d998", + "_shrinkwrap": null, + "_spec": "ansi-regex@^3.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui/node_modules/strip-ansi", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "ed0317c322064f79466c02966bddb605ab37d998", + "tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "0a8cc19946c03c38520fe8c086b8adb66f9cce0b", + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "find", + "formatting", + "match", + "pattern", + "re", + "regex", + "regexp", + "rgb", + "shell", + "string", + "styles", + "terminal", + "test", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dthree", + "email": "threedeecee@gmail.com" + }, + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-regex", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/cliui/node_modules/ansi-regex/readme.md b/node_modules/cliui/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..22db1c3 --- /dev/null +++ b/node_modules/cliui/node_modules/ansi-regex/readme.md @@ -0,0 +1,46 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] +``` + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js b/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000..d506327 --- /dev/null +++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +/* eslint-disable yoda */ +module.exports = x => { + if (Number.isNaN(x)) { + return false; + } + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= x && x <= 0x4dbf) || + // CJK Unified Ideographs .. Yi Radicals + (0x4e00 <= x && x <= 0xa4c6) || + // Hangul Jamo Extended-A + (0xa960 <= x && x <= 0xa97c) || + // Hangul Syllables + (0xac00 <= x && x <= 0xd7a3) || + // CJK Compatibility Ideographs + (0xf900 <= x && x <= 0xfaff) || + // Vertical Forms + (0xfe10 <= x && x <= 0xfe19) || + // CJK Compatibility Forms .. Small Form Variants + (0xfe30 <= x && x <= 0xfe6b) || + // Halfwidth and Fullwidth Forms + (0xff01 <= x && x <= 0xff60) || + (0xffe0 <= x && x <= 0xffe6) || + // Kana Supplement + (0x1b000 <= x && x <= 0x1b001) || + // Enclosed Ideographic Supplement + (0x1f200 <= x && x <= 0x1f251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= x && x <= 0x3fffd) + ) + ) { + return true; + } + + return false; +}; diff --git a/node_modules/circular-json/LICENSE.txt b/node_modules/cliui/node_modules/is-fullwidth-code-point/license similarity index 91% rename from node_modules/circular-json/LICENSE.txt rename to node_modules/cliui/node_modules/is-fullwidth-code-point/license index e42a04b..654d0bf 100644 --- a/node_modules/circular-json/LICENSE.txt +++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/license @@ -1,4 +1,6 @@ -Copyright (C) 2013-2017 by Andrea Giammarchi - @WebReflection +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json b/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000..7755759 --- /dev/null +++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + "is-fullwidth-code-point@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui/node_modules/string-width" + ] + ], + "_from": "is-fullwidth-code-point@>=2.0.0 <3.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/cliui/is-fullwidth-code-point", + "_nodeVersion": "4.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/is-fullwidth-code-point-2.0.0.tgz_1474526567505_0.299921662081033" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "name": "is-fullwidth-code-point", + "raw": "is-fullwidth-code-point@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cliui/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "_shrinkwrap": null, + "_spec": "is-fullwidth-code-point@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui/node_modules/string-width", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "dependencies": {}, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "tarball": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "e94a78056056c5546f2bf4c4cf812a2163a46dae", + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "char", + "character", + "check", + "code", + "codepoint", + "detect", + "full", + "full-width", + "fullwidth", + "is", + "point", + "str", + "string", + "unicode", + "width" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-fullwidth-code-point", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md b/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000..093b028 --- /dev/null +++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('谢'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cliui/node_modules/string-width/index.js b/node_modules/cliui/node_modules/string-width/index.js new file mode 100644 index 0000000..bbc49d2 --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/index.js @@ -0,0 +1,36 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +module.exports = str => { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + str = stripAnsi(str); + + let width = 0; + + for (let i = 0; i < str.length; i++) { + const code = str.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/node_modules/cliui/node_modules/string-width/license b/node_modules/cliui/node_modules/string-width/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cliui/node_modules/string-width/package.json b/node_modules/cliui/node_modules/string-width/package.json new file mode 100644 index 0000000..1762aef --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + "string-width@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ], + [ + "string-width@^2.1.1", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui" + ] + ], + "_from": "string-width@>=2.1.1 <3.0.0", + "_id": "string-width@2.1.1", + "_inCache": true, + "_installable": true, + "_location": "/cliui/string-width", + "_nodeVersion": "8.0.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/string-width-2.1.1.tgz_1500376154382_0.7171604454051703" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "5.0.0", + "_phantomChildren": {}, + "_requested": { + "name": "string-width", + "raw": "string-width@^2.1.1", + "rawSpec": "^2.1.1", + "scope": null, + "spec": ">=2.1.1 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cliui" + ], + "_shrinkwrap": null, + "_spec": "string-width@^2.1.1", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "shasum": "ab93f27a8dc13d28cac815c462143a6d9012ae9e", + "tarball": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "74d8d552b465692790c41169b123409669d41079", + "homepage": "https://github.com/sindresorhus/string-width#readme", + "keywords": [ + "ansi", + "char", + "character", + "chinese", + "cjk", + "cli", + "codes", + "column", + "columns", + "command-line", + "console", + "escape", + "fixed-width", + "full", + "full-width", + "fullwidth", + "japanese", + "korean", + "str", + "string", + "terminal", + "unicode", + "visual", + "width" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "string-width", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.1" +} diff --git a/node_modules/cliui/node_modules/string-width/readme.md b/node_modules/cliui/node_modules/string-width/readme.md new file mode 100644 index 0000000..df5b719 --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/readme.md @@ -0,0 +1,42 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cliui/node_modules/strip-ansi/index.js b/node_modules/cliui/node_modules/strip-ansi/index.js new file mode 100644 index 0000000..96e0292 --- /dev/null +++ b/node_modules/cliui/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; diff --git a/node_modules/cliui/node_modules/strip-ansi/license b/node_modules/cliui/node_modules/strip-ansi/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/cliui/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cliui/node_modules/strip-ansi/package.json b/node_modules/cliui/node_modules/strip-ansi/package.json new file mode 100644 index 0000000..b91d30b --- /dev/null +++ b/node_modules/cliui/node_modules/strip-ansi/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + "strip-ansi@^4.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui" + ] + ], + "_from": "strip-ansi@>=4.0.0 <5.0.0", + "_id": "strip-ansi@4.0.0", + "_inCache": true, + "_installable": true, + "_location": "/cliui/strip-ansi", + "_nodeVersion": "4.8.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/strip-ansi-4.0.0.tgz_1497986904730_0.4528853143565357" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "name": "strip-ansi", + "raw": "strip-ansi@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cliui", + "/cliui/string-width" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "_shasum": "a8479022eb1ac368a871389b635262c505ee368f", + "_shrinkwrap": null, + "_spec": "strip-ansi@^4.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "description": "Strip ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a8479022eb1ac368a871389b635262c505ee368f", + "tarball": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "c299056a42b31d7a479d6a89b41318b2a2462cc7", + "homepage": "https://github.com/chalk/strip-ansi#readme", + "keywords": [ + "256", + "ansi", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "formatting", + "log", + "logging", + "remove", + "rgb", + "shell", + "string", + "strip", + "styles", + "terminal", + "text", + "trim", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dthree", + "email": "threedeecee@gmail.com" + }, + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "strip-ansi", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.0.0" +} diff --git a/node_modules/cliui/node_modules/strip-ansi/readme.md b/node_modules/cliui/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000..dc76f0c --- /dev/null +++ b/node_modules/cliui/node_modules/strip-ansi/readme.md @@ -0,0 +1,39 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json new file mode 100644 index 0000000..50b22bf --- /dev/null +++ b/node_modules/cliui/package.json @@ -0,0 +1,131 @@ +{ + "_args": [ + [ + "cliui@^4.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "cliui@>=4.0.0 <5.0.0", + "_hasShrinkwrap": false, + "_id": "cliui@4.1.0", + "_inCache": true, + "_installable": true, + "_location": "/cliui", + "_nodeVersion": "8.8.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/cliui_4.1.0_1524450515410_0.021997836619508382" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "5.8.0", + "_phantomChildren": {}, + "_requested": { + "name": "cliui", + "raw": "cliui@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "_shasum": "348422dbe82d800b3022eef4f6ac10bf2e4d1b49", + "_shrinkwrap": null, + "_spec": "cliui@^4.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/yargs/cliui/issues" + }, + "config": { + "blanket": { + "data-cover-never": [ + "node_modules", + "test" + ], + "output-reporter": "spec", + "pattern": [ + "index.js" + ] + } + }, + "dependencies": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "description": "easily create complex multi-column command-line-interfaces", + "devDependencies": { + "chai": "^3.5.0", + "chalk": "^1.1.2", + "coveralls": "^2.11.8", + "mocha": "^3.0.0", + "nyc": "^10.0.0", + "standard": "^8.0.0", + "standard-version": "^3.0.0" + }, + "directories": {}, + "dist": { + "fileCount": 5, + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3UTUCRA9TVsSAnZWagAAQBYP/21PAh+wIPQktq2XDuQ+\ntMjuDek2ebHLK5M4RyNM6TAJioGf5uHwUmqV7rHAhm9gRJn+dIIqkIukvLZy\ntln2x5GkDmYIxOC2wsj8Lbyc0k1cxoynJt8v8F/oE6EEaa6mRHuk3SJQU5Yy\nim1ofDj95s/mWcHeyrjdcfyvKJ4e6GZwylinGspAk1hR6UO33RoiWL4c2YIY\n7jYvi4HNVwv52cqGyoI78QZ8Js90rOCyZQz8QP6tZ1NMo1SwUC3jPauspGsn\npMgHslY1s0fZWp70Ac/MziJdx2XTFzYJZKkiuyJCxsyBuX7f1kUTD/Za235A\nDlpUmgj5a9UKpVtptlJ3nMRmgqXBClnIjvmm9NG2nJ8Egt3QxFdBZaxgJNbM\nMFss+LSZNnxBvmgnAC37sMvie06xwV2UOB/+eiK1EWBdVILV7END0hyRSyuM\naFsVZpqDAaXSVS4hwUFQvPA4biDGncxwDmktuOuJHSGVbIqRJJ7EEfVVBbFl\nH2KZQ8gxFT93Gg6x3tFuXlXQdPaHKvtZTkKJCLtigINk1Rr9PlUzstLRayay\nG55YvsSlDm1P2FMYosbMUrNHe0f8SVgyLsZk/tQ40htjK7zMthyAamxq+JpT\nl63y6KDYrtAwAE41206ry1QyNvlCyp+ZHv5KSZdxcUW25ZK5kwJDCMs1Sbkw\nn7bO\r\n=CsbE\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "348422dbe82d800b3022eef4f6ac10bf2e4d1b49", + "tarball": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "unpackedSize": 14471 + }, + "engine": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "83ada4a595ad60fff4fb962a3288eccbe163bccf", + "homepage": "https://github.com/yargs/cliui#readme", + "keywords": [ + "cli", + "command-line", + "console", + "design", + "layout", + "table", + "wrap" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + } + ], + "name": "cliui", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/cliui.git" + }, + "scripts": { + "coverage": "nyc --reporter=text-lcov mocha | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "nyc mocha" + }, + "standard": { + "globals": [ + "it" + ], + "ignore": [ + "**/example/**" + ] + }, + "version": "4.1.0" +} diff --git a/node_modules/cross-spawn/CHANGELOG.md b/node_modules/cross-spawn/CHANGELOG.md new file mode 100644 index 0000000..f1298a8 --- /dev/null +++ b/node_modules/cross-spawn/CHANGELOG.md @@ -0,0 +1,6 @@ +## 5.0.0 - 2016-10-30 + +- Add support for `options.shell` +- Improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module +- Refactor some code to make it more clear +- Update README caveats diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE new file mode 100644 index 0000000..db5e914 --- /dev/null +++ b/node_modules/cross-spawn/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 IndigoUnited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/cross-spawn/README.md b/node_modules/cross-spawn/README.md new file mode 100644 index 0000000..dde730d --- /dev/null +++ b/node_modules/cross-spawn/README.md @@ -0,0 +1,85 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg +[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn +[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg +[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn +[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn.svg +[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn#info=devDependencies +[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn.svg + +A cross platform solution to node's spawn and spawnSync. + + +## Installation + +`$ npm install cross-spawn` + +If you are using `spawnSync` on node 0.10 or older, you will also need to install `spawn-sync`: + +`$ npm install spawn-sync` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang) +- No `options.shell` support on node < v6 +- It does not allow you to run `del` or `dir` + +All these issues are handled correctly by `cross-spawn`. +There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments. + + +## Usage + +Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement. + + +```js +var spawn = require('cross-spawn'); + +// Spawn NPM asynchronously +var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); + +// Spawn NPM synchronously +var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); +``` + + +## Caveats + +#### `options.shell` as an alternative to `cross-spawn` + +Starting from node v6, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves most of the problems that `cross-spawn` attempts to solve, but: + +- It's not supported in node < v6 +- It has no support for shebangs on Windows +- You must manually escape the command and arguments which is very error prone, specially when passing user input + +If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned. + + +#### Shebangs + +While `cross-spawn` handles shebangs on Windows, its support is limited: e.g.: it doesn't handle arguments after the path, e.g.: `#!/bin/bash -e`. + +Remember to always test your code on Windows! + + +## Tests + +`$ npm test` + + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js new file mode 100644 index 0000000..7814a96 --- /dev/null +++ b/node_modules/cross-spawn/index.js @@ -0,0 +1,59 @@ +'use strict'; + +var cp = require('child_process'); +var parse = require('./lib/parse'); +var enoent = require('./lib/enoent'); + +var cpSpawnSync = cp.spawnSync; + +function spawn(command, args, options) { + var parsed; + var spawned; + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + var parsed; + var result; + + if (!cpSpawnSync) { + try { + cpSpawnSync = require('spawn-sync'); // eslint-disable-line global-require + } catch (ex) { + throw new Error( + 'In order to use spawnSync on node 0.10 or older, you must ' + + 'install spawn-sync:\n\n' + + ' npm install spawn-sync --save' + ); + } + } + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + result = cpSpawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 0000000..d0a193a --- /dev/null +++ b/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,73 @@ +'use strict'; + +var isWin = process.platform === 'win32'; +var resolveCommand = require('./util/resolveCommand'); + +var isNode10 = process.version.indexOf('v0.10.') === 0; + +function notFoundError(command, syscall) { + var err; + + err = new Error(syscall + ' ' + command + ' ENOENT'); + err.code = err.errno = 'ENOENT'; + err.syscall = syscall + ' ' + command; + + return err; +} + +function hookChildProcess(cp, parsed) { + var originalEmit; + + if (!isWin) { + return; + } + + originalEmit = cp.emit; + cp.emit = function (name, arg1) { + var err; + + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + // If we are in node 10, then we are using spawn-sync; if it exited + // with -1 it probably means that the command does not exist + if (isNode10 && status === -1) { + parsed.file = isWin ? parsed.file : resolveCommand(parsed.original); + + if (!parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + } + + return null; +} + +module.exports.hookChildProcess = hookChildProcess; +module.exports.verifyENOENT = verifyENOENT; +module.exports.verifyENOENTSync = verifyENOENTSync; +module.exports.notFoundError = notFoundError; diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 0000000..10a0136 --- /dev/null +++ b/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,113 @@ +'use strict'; + +var resolveCommand = require('./util/resolveCommand'); +var hasEmptyArgumentBug = require('./util/hasEmptyArgumentBug'); +var escapeArgument = require('./util/escapeArgument'); +var escapeCommand = require('./util/escapeCommand'); +var readShebang = require('./util/readShebang'); + +var isWin = process.platform === 'win32'; +var skipShellRegExp = /\.(?:com|exe)$/i; + +// Supported in Node >= 6 and >= 4.8 +var supportsShellOption = parseInt(process.version.substr(1).split('.')[0], 10) >= 6 || + parseInt(process.version.substr(1).split('.')[0], 10) === 4 && parseInt(process.version.substr(1).split('.')[1], 10) >= 8; + +function parseNonShell(parsed) { + var shebang; + var needsShell; + var applyQuotes; + + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + parsed.file = resolveCommand(parsed.command); + parsed.file = parsed.file || resolveCommand(parsed.command, true); + shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(resolveCommand(shebang) || resolveCommand(shebang, true)); + } else { + needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(parsed.file); + } + + // If a shell is required, use cmd.exe and take care of escaping everything correctly + if (needsShell) { + // Escape command & arguments + applyQuotes = (parsed.command !== 'echo'); // Do not quote arguments for the special "echo" command + parsed.command = escapeCommand(parsed.command); + parsed.args = parsed.args.map(function (arg) { + return escapeArgument(arg, applyQuotes); + }); + + // Make use of cmd.exe + parsed.args = ['/d', '/s', '/c', '"' + parsed.command + (parsed.args.length ? ' ' + parsed.args.join(' ') : '') + '"']; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } + + return parsed; +} + +function parseShell(parsed) { + var shellCommand; + + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option, see: https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', '"' + shellCommand + '"']; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +// ------------------------------------------------ + +function parse(command, args, options) { + var parsed; + + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = options || {}; + + // Build our parsed object + parsed = { + command: command, + args: args, + options: options, + file: undefined, + original: command, + }; + + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} + +module.exports = parse; diff --git a/node_modules/cross-spawn/lib/util/escapeArgument.js b/node_modules/cross-spawn/lib/util/escapeArgument.js new file mode 100644 index 0000000..367263f --- /dev/null +++ b/node_modules/cross-spawn/lib/util/escapeArgument.js @@ -0,0 +1,30 @@ +'use strict'; + +function escapeArgument(arg, quote) { + // Convert to string + arg = '' + arg; + + // If we are not going to quote the argument, + // escape shell metacharacters, including double and single quotes: + if (!quote) { + arg = arg.replace(/([()%!^<>&|;,"'\s])/g, '^$1'); + } else { + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = '"' + arg + '"'; + } + + return arg; +} + +module.exports = escapeArgument; diff --git a/node_modules/cross-spawn/lib/util/escapeCommand.js b/node_modules/cross-spawn/lib/util/escapeCommand.js new file mode 100644 index 0000000..d9c25b2 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/escapeCommand.js @@ -0,0 +1,12 @@ +'use strict'; + +var escapeArgument = require('./escapeArgument'); + +function escapeCommand(command) { + // Do not escape if this command is not dangerous.. + // We do this so that commands like "echo" or "ifconfig" work + // Quoting them, will make them unaccessible + return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true); +} + +module.exports = escapeCommand; diff --git a/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js b/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js new file mode 100644 index 0000000..9f2eba6 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js @@ -0,0 +1,18 @@ +'use strict'; + +// See: https://github.com/IndigoUnited/node-cross-spawn/pull/34#issuecomment-221623455 +function hasEmptyArgumentBug() { + var nodeVer; + + if (process.platform !== 'win32') { + return false; + } + + nodeVer = process.version.substr(1).split('.').map(function (num) { + return parseInt(num, 10); + }); + + return (nodeVer[0] === 0 && nodeVer[1] < 12); +} + +module.exports = hasEmptyArgumentBug(); diff --git a/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/cross-spawn/lib/util/readShebang.js new file mode 100644 index 0000000..2cf3541 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/readShebang.js @@ -0,0 +1,37 @@ +'use strict'; + +var fs = require('fs'); +var LRU = require('lru-cache'); +var shebangCommand = require('shebang-command'); + +var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function readShebang(command) { + var buffer; + var fd; + var shebang; + + // Check if it is in the cache first + if (shebangCache.has(command)) { + return shebangCache.get(command); + } + + // Read the first 150 bytes from the file + buffer = new Buffer(150); + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, 150, 0); + fs.closeSync(fd); + } catch (e) { /* empty */ } + + // Attempt to extract shebang (null is returned if not a shebang) + shebang = shebangCommand(buffer.toString()); + + // Store the shebang in the cache + shebangCache.set(command, shebang); + + return shebang; +} + +module.exports = readShebang; diff --git a/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/cross-spawn/lib/util/resolveCommand.js new file mode 100644 index 0000000..b7a9490 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/resolveCommand.js @@ -0,0 +1,31 @@ +'use strict'; + +var path = require('path'); +var which = require('which'); +var LRU = require('lru-cache'); + +var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function resolveCommand(command, noExtension) { + var resolved; + + noExtension = !!noExtension; + resolved = commandCache.get(command + '!' + noExtension); + + // Check if its resolved in the cache + if (commandCache.has(command)) { + return commandCache.get(command); + } + + try { + resolved = !noExtension ? + which.sync(command) : + which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') }); + } catch (e) { /* empty */ } + + commandCache.set(command + '!' + noExtension, resolved); + + return resolved; +} + +module.exports = resolveCommand; diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json new file mode 100644 index 0000000..7c63818 --- /dev/null +++ b/node_modules/cross-spawn/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + "cross-spawn@^5.0.1", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa" + ] + ], + "_from": "cross-spawn@>=5.0.1 <6.0.0", + "_id": "cross-spawn@5.1.0", + "_inCache": true, + "_installable": true, + "_location": "/cross-spawn", + "_nodeVersion": "7.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/cross-spawn-5.1.0.tgz_1488134324770_0.025160177145153284" + }, + "_npmUser": { + "email": "andremiguelcruz@msn.com", + "name": "satazor" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "name": "cross-spawn", + "raw": "cross-spawn@^5.0.1", + "rawSpec": "^5.0.1", + "scope": null, + "spec": ">=5.0.1 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "_shasum": "e8bd0efee58fcff6f8f94510a0a554bbfa235449", + "_shrinkwrap": null, + "_spec": "cross-spawn@^5.0.1", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa", + "author": { + "email": "hello@indigounited.com", + "name": "IndigoUnited", + "url": "http://indigounited.com" + }, + "bugs": { + "url": "https://github.com/IndigoUnited/node-cross-spawn/issues/" + }, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "devDependencies": { + "@satazor/eslint-config": "^3.0.0", + "eslint": "^3.0.0", + "expect.js": "^0.3.0", + "glob": "^7.0.0", + "mkdirp": "^0.5.1", + "mocha": "^3.0.2", + "once": "^1.4.0", + "rimraf": "^2.5.0" + }, + "directories": {}, + "dist": { + "shasum": "e8bd0efee58fcff6f8f94510a0a554bbfa235449", + "tarball": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz" + }, + "files": [ + "index.js", + "lib" + ], + "gitHead": "1da4c09ccf658079849a3d191b16e59bc600e8b4", + "homepage": "https://github.com/IndigoUnited/node-cross-spawn#readme", + "keywords": [ + "cmd", + "cross", + "execute", + "ext", + "hashbang", + "path", + "path-ext", + "path_ext", + "platform", + "shebang", + "spawn", + "spawnSync", + "windows" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "satazor", + "email": "andremiguelcruz@msn.com" + } + ], + "name": "cross-spawn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/IndigoUnited/node-cross-spawn.git" + }, + "scripts": { + "lint": "eslint '{*.js,lib/**/*.js,test/**/*.js}'", + "test": "node test/prepare && mocha --bail test/test" + }, + "version": "5.1.0" +} diff --git a/node_modules/execa/index.js b/node_modules/execa/index.js new file mode 100644 index 0000000..74ba8ee --- /dev/null +++ b/node_modules/execa/index.js @@ -0,0 +1,309 @@ +'use strict'; +const childProcess = require('child_process'); +const util = require('util'); +const crossSpawn = require('cross-spawn'); +const stripEof = require('strip-eof'); +const npmRunPath = require('npm-run-path'); +const isStream = require('is-stream'); +const _getStream = require('get-stream'); +const pFinally = require('p-finally'); +const onExit = require('signal-exit'); +const errname = require('./lib/errname'); +const stdio = require('./lib/stdio'); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + if (opts && opts.env && opts.extendEnv !== false) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts && opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: cmd + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, opts) { + const input = opts.input; + + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, encoding, maxBuffer) { + if (!process[stream]) { + return null; + } + + let ret; + + if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +module.exports = (cmd, args, opts) => { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + const parsed = handleArgs(cmd, args, opts); + const encoding = parsed.opts.encoding; + const maxBuffer = parsed.opts.maxBuffer; + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanupTimeout = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanupTimeout(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanupTimeout(); + resolve({err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanupTimeout(); + resolve({err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const promise = pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', encoding, maxBuffer), + getStream(spawned, 'stderr', encoding, maxBuffer) + ]).then(arr => { + const result = arr[0]; + const stdout = arr[1]; + const stderr = arr[2]; + + let err = result.err; + const code = result.code; + const signal = result.signal; + + if (removeExitHandler) { + removeExitHandler(); + } + + if (err || code !== 0 || signal !== null) { + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, stdout), + stderr: handleOutput(parsed.opts, stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts); + + spawned.then = promise.then.bind(promise); + spawned.catch = promise.catch.bind(promise); + + return spawned; +}; + +module.exports.stdout = function () { + // TODO: set `stderr: 'ignore'` when that option is implemented + return module.exports.apply(null, arguments).then(x => x.stdout); +}; + +module.exports.stderr = function () { + // TODO: set `stdout: 'ignore'` when that option is implemented + return module.exports.apply(null, arguments).then(x => x.stderr); +}; + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + + if (result.error || result.status !== 0) { + throw (result.error || new Error(result.stderr === '' ? result.stdout : result.stderr)); + } + + result.stdout = handleOutput(parsed.opts, result.stdout); + result.stderr = handleOutput(parsed.opts, result.stderr); + + return result; +}; + +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); + +module.exports.spawn = util.deprecate(module.exports, 'execa.spawn() is deprecated. Use execa() instead.'); diff --git a/node_modules/execa/lib/errname.js b/node_modules/execa/lib/errname.js new file mode 100644 index 0000000..328f3e3 --- /dev/null +++ b/node_modules/execa/lib/errname.js @@ -0,0 +1,37 @@ +'use strict'; +// The Node team wants to deprecate `process.bind(...)`. +// https://github.com/nodejs/node/pull/2768 +// +// However, we need the 'uv' binding for errname support. +// This is a defensive wrapper around it so `execa` will not fail entirely if it stops working someday. +// +// If this ever stops working. See: https://github.com/sindresorhus/execa/issues/31#issuecomment-215939939 for another possible solution. +let uv; + +try { + uv = process.binding('uv'); + + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } +} catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; +} + +function errname(uv, code) { + if (uv) { + return uv.errname(code); + } + + if (!(code < 0)) { + throw new Error('err >= 0'); + } + + return `Unknown system error ${code}`; +} + +module.exports = code => errname(uv, code); + +// Used for testing the fallback behavior +module.exports.__test__ = errname; diff --git a/node_modules/execa/lib/stdio.js b/node_modules/execa/lib/stdio.js new file mode 100644 index 0000000..a82d468 --- /dev/null +++ b/node_modules/execa/lib/stdio.js @@ -0,0 +1,41 @@ +'use strict'; +const alias = ['stdin', 'stdout', 'stderr']; + +const hasAlias = opts => alias.some(x => Boolean(opts[x])); + +module.exports = opts => { + if (!opts) { + return null; + } + + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } + + if (typeof opts.stdio === 'string') { + return opts.stdio; + } + + const stdio = opts.stdio || []; + + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + + const result = []; + const len = Math.max(stdio.length, alias.length); + + for (let i = 0; i < len; i++) { + let value = null; + + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } + + result[i] = value; + } + + return result; +}; diff --git a/node_modules/execa/license b/node_modules/execa/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/execa/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/execa/package.json b/node_modules/execa/package.json new file mode 100644 index 0000000..0aeb962 --- /dev/null +++ b/node_modules/execa/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + "execa@^0.7.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/os-locale" + ] + ], + "_from": "execa@>=0.7.0 <0.8.0", + "_id": "execa@0.7.0", + "_inCache": true, + "_installable": true, + "_location": "/execa", + "_nodeVersion": "4.8.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/execa-0.7.0.tgz_1497045041009_0.3423430174589157" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "name": "execa", + "raw": "execa@^0.7.0", + "rawSpec": "^0.7.0", + "scope": null, + "spec": ">=0.7.0 <0.8.0", + "type": "range" + }, + "_requiredBy": [ + "/os-locale" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "_shasum": "944becd34cc41ee32a63a9faf27ad5a65fc59777", + "_shrinkwrap": null, + "_spec": "execa@^0.7.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/os-locale", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "dependencies": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^2.11.9", + "delay": "^2.0.0", + "is-running": "^2.0.0", + "nyc": "^11.0.2", + "tempfile": "^2.0.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "944becd34cc41ee32a63a9faf27ad5a65fc59777", + "tarball": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "lib" + ], + "gitHead": "b4d1c8613fd068e3c36f11e7bff672d008ac88f9", + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "bin", + "binaries", + "binary", + "child", + "exec", + "execfile", + "execute", + "file", + "fork", + "local", + "npm", + "path", + "process", + "shell", + "spawn" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "execa", + "nyc": { + "exclude": [ + "**/fixtures/**", + "**/test.js", + "**/test/**" + ], + "reporter": [ + "lcov", + "text" + ] + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "0.7.0" +} diff --git a/node_modules/execa/readme.md b/node_modules/execa/readme.md new file mode 100644 index 0000000..18c808a --- /dev/null +++ b/node_modules/execa/readme.md @@ -0,0 +1,279 @@ +# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) + +> A better [`child_process`](https://nodejs.org/api/child_process.html) + + +## Why + +- Promise interface. +- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. +- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. +- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) +- Higher max buffer. 10 MB instead of 200 KB. +- [Executes locally installed binaries by name.](#preferlocal) +- [Cleans up spawned processes when the parent process dies.](#cleanup) + + +## Install + +``` +$ npm install --save execa +``` + + +## Usage + +```js +const execa = require('execa'); + +execa('echo', ['unicorns']).then(result => { + console.log(result.stdout); + //=> 'unicorns' +}); + +// pipe the child process stdout to the current stdout +execa('echo', ['unicorns']).stdout.pipe(process.stdout); + +execa.shell('echo unicorns').then(result => { + console.log(result.stdout); + //=> 'unicorns' +}); + +// example of catching an error +execa.shell('exit 3').catch(error => { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + killed: false, + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ +}); +``` + + +## API + +### execa(file, [arguments], [options]) + +Execute a file. + +Think of this as a mix of `child_process.execFile` and `child_process.spawn`. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. + +### execa.stdout(file, [arguments], [options]) + +Same as `execa()`, but returns only `stdout`. + +### execa.stderr(file, [arguments], [options]) + +Same as `execa()`, but returns only `stderr`. + +### execa.shell(command, [options]) + +Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.sync(file, [arguments], [options]) + +Execute a file synchronously. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +This method throws an `Error` if the command fails. + +### execa.shellSync(file, [options]) + +Execute a command synchronously through the system shell. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### options + +Type: `Object` + +#### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory of the child process. + +#### env + +Type: `Object`
+Default: `process.env` + +Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. + +#### extendEnv + +Type: `boolean`
+Default: `true` + +Set to `false` if you don't want to extend the environment variables when providing the `env` property. + +#### argv0 + +Type: `string` + +Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. + +#### stdio + +Type: `Array` `string`
+Default: `pipe` + +Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. + +#### detached + +Type: `boolean` + +Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). + +#### uid + +Type: `number` + +Sets the user identity of the process. + +#### gid + +Type: `number` + +Sets the group identity of the process. + +#### shell + +Type: `boolean` `string`
+Default: `false` + +If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. + +#### stripEof + +Type: `boolean`
+Default: `true` + +[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. + +#### preferLocal + +Type: `boolean`
+Default: `true` + +Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`. + +#### localDir + +Type: `string`
+Default: `process.cwd()` + +Preferred path to find locally installed binaries in (use with `preferLocal`). + +#### input + +Type: `string` `Buffer` `stream.Readable` + +Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods. + +#### reject + +Type: `boolean`
+Default: `true` + +Setting this to `false` resolves the promise with the error instead of rejecting it. + +#### cleanup + +Type: `boolean`
+Default: `true` + +Keep track of the spawned process and `kill` it when the parent process exits. + +#### encoding + +Type: `string`
+Default: `utf8` + +Specify the character encoding used to decode the `stdout` and `stderr` output. + +#### timeout + +Type: `number`
+Default: `0` + +If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. + +#### maxBuffer + +Type: `number`
+Default: `10000000` (10MB) + +Largest amount of data in bytes allowed on `stdout` or `stderr`. + +#### killSignal + +Type: `string` `number`
+Default: `SIGTERM` + +Signal value to be used when the spawned process will be killed. + +#### stdin + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stdout + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stderr + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + + +## Tips + +### Save and pipe output from a child process + +Let's say you want to show the output of a child process in real-time while also saving it to a variable. + +```js +const execa = require('execa'); +const getStream = require('get-stream'); + +const stream = execa('echo', ['foo']).stdout; + +stream.pipe(process.stdout); + +getStream(stream).then(value => { + console.log('child output:', value); +}); +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/get-caller-file/LICENSE.md b/node_modules/get-caller-file/LICENSE.md new file mode 100644 index 0000000..bf3e1c0 --- /dev/null +++ b/node_modules/get-caller-file/LICENSE.md @@ -0,0 +1,6 @@ +ISC License (ISC) +Copyright 2018 Stefan Penner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md new file mode 100644 index 0000000..1944927 --- /dev/null +++ b/node_modules/get-caller-file/README.md @@ -0,0 +1,4 @@ +# get-caller-file + +[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) +[![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master) diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js new file mode 100644 index 0000000..03e7dfc --- /dev/null +++ b/node_modules/get-caller-file/index.js @@ -0,0 +1,20 @@ +'use strict'; + +// Call this function in a another function to find out the file from +// which that function was called from. (Inspects the v8 stack trace) +// +// Inspired by http://stackoverflow.com/questions/13227489 + +module.exports = function getCallerFile(_position) { + var oldPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function(err, stack) { return stack; }; + var stack = new Error().stack; + Error.prepareStackTrace = oldPrepareStackTrace; + + var position = _position ? _position : 2; + + // stack[0] holds this file + // stack[1] holds where this function was called + // stack[2] holds the file we're interested in + return stack[position] ? stack[position].getFileName() : undefined; +}; diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json new file mode 100644 index 0000000..daab60c --- /dev/null +++ b/node_modules/get-caller-file/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "get-caller-file@^1.0.1", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "get-caller-file@>=1.0.1 <2.0.0", + "_hasShrinkwrap": false, + "_id": "get-caller-file@1.0.3", + "_inCache": true, + "_installable": true, + "_location": "/get-caller-file", + "_nodeVersion": "10.6.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/get-caller-file_1.0.3_1531318482467_0.29196568362695974" + }, + "_npmUser": { + "email": "stefan.penner@gmail.com", + "name": "stefanpenner" + }, + "_npmVersion": "6.1.0", + "_phantomChildren": {}, + "_requested": { + "name": "get-caller-file", + "raw": "get-caller-file@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "_shasum": "f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a", + "_shrinkwrap": null, + "_spec": "get-caller-file@^1.0.1", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "name": "Stefan Penner" + }, + "bugs": { + "url": "https://github.com/stefanpenner/get-caller-file/issues" + }, + "dependencies": {}, + "description": "[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.a", + "devDependencies": { + "chai": "^4.1.2", + "ensure-posix-path": "^1.0.1", + "mocha": "^5.2.0" + }, + "directories": { + "test": "tests" + }, + "dist": { + "fileCount": 4, + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbRhDSCRA9TVsSAnZWagAABCsQAISfJUg79/mpbXNlCcnf\nx5XH8U998GO/e1jUn+D+tJw6PqhPYMRjjfcWvDApP5XijXEPN1VxedAW6cCD\nQYNFH1M+KMQ/APV6vB6w5aqcDmrkY7F8kD0KdWen/xoOs7aeBhIlgJOIJRmI\nxPvT3JQB9tKaBu5Jit/TQfRsA2YtF1WjwvoRowu8v8Lg0facAeE9Pvt++mGm\ngKl5e0jgEzHvl4RKoit5HqC6c7N8MziTsgVOoIQb+jpCggJTPzxfu6h5hJcU\nQw4pqxYdt0vWvzxiG1owgt015O14dq2F9CvInYELcCjsjKdskBEI4iiXFa4v\n2KFxKfUy8v1He51AlEhCVEzTI53rc2EUUedxgcC6x6Z0yXEwoyF+jbtugDTn\nApmL268vD5yW7bGi3hMT11QzJidNrioi4itEc4zg/BaZC/UTW1Y9HNe6fPOE\n42MDIfd95tTHJhXVPDKjo5p85aZj2cg506PiyMgb6z9ONMsDbXlp4/x1YuzE\nfWVHefdm1Nx0fIWwVapoiEa2ZGqDLpVtxPJt1tLnmutfCR+j/GlfQr+BJ1XS\nSFQEMw0DTpBZRbXrytfO6OMjwNajlHq2FH2cSgq7bHzV4RfwI900TRudwp+S\nK9H7JpbJxWMS4x41erfD65O5NM0iLITnEeN49wC+SheDhVk/bXUoIx1sPfJj\npQXC\r\n=ofq4\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a", + "tarball": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "unpackedSize": 2479 + }, + "files": [ + "index.js" + ], + "gitHead": "8519eaca478b51b44e575617759a503dcf13a345", + "homepage": "https://github.com/stefanpenner/get-caller-file#readme", + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "stefanpenner", + "email": "stefan.penner@gmail.com" + } + ], + "name": "get-caller-file", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/stefanpenner/get-caller-file.git" + }, + "scripts": { + "test": "mocha test", + "test:debug": "mocha test" + }, + "version": "1.0.3" +} diff --git a/node_modules/get-stream/buffer-stream.js b/node_modules/get-stream/buffer-stream.js new file mode 100644 index 0000000..ae45d3d --- /dev/null +++ b/node_modules/get-stream/buffer-stream.js @@ -0,0 +1,51 @@ +'use strict'; +const PassThrough = require('stream').PassThrough; + +module.exports = opts => { + opts = Object.assign({}, opts); + + const array = opts.array; + let encoding = opts.encoding; + const buffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } + + if (buffer) { + encoding = null; + } + + let len = 0; + const ret = []; + const stream = new PassThrough({objectMode}); + + if (encoding) { + stream.setEncoding(encoding); + } + + stream.on('data', chunk => { + ret.push(chunk); + + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); + + stream.getBufferedValue = () => { + if (array) { + return ret; + } + + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; + + stream.getBufferedLength = () => len; + + return stream; +}; diff --git a/node_modules/get-stream/index.js b/node_modules/get-stream/index.js new file mode 100644 index 0000000..2dc5ee9 --- /dev/null +++ b/node_modules/get-stream/index.js @@ -0,0 +1,51 @@ +'use strict'; +const bufferStream = require('./buffer-stream'); + +function getStream(inputStream, opts) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + opts = Object.assign({maxBuffer: Infinity}, opts); + + const maxBuffer = opts.maxBuffer; + let stream; + let clean; + + const p = new Promise((resolve, reject) => { + const error = err => { + if (err) { // null check + err.bufferedData = stream.getBufferedValue(); + } + + reject(err); + }; + + stream = bufferStream(opts); + inputStream.once('error', error); + inputStream.pipe(stream); + + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + reject(new Error('maxBuffer exceeded')); + } + }); + stream.once('error', error); + stream.on('end', resolve); + + clean = () => { + // some streams doesn't implement the `stream.Readable` interface correctly + if (inputStream.unpipe) { + inputStream.unpipe(stream); + } + }; + }); + + p.then(clean, clean); + + return p.then(() => stream.getBufferedValue()); +} + +module.exports = getStream; +module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'})); +module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true})); diff --git a/node_modules/get-stream/license b/node_modules/get-stream/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/get-stream/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/get-stream/package.json b/node_modules/get-stream/package.json new file mode 100644 index 0000000..2f9bc95 --- /dev/null +++ b/node_modules/get-stream/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + "get-stream@^3.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa" + ] + ], + "_from": "get-stream@>=3.0.0 <4.0.0", + "_id": "get-stream@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/get-stream", + "_nodeVersion": "4.6.2", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/get-stream-3.0.0.tgz_1479869385406_0.47692562686279416" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "name": "get-stream", + "raw": "get-stream@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14", + "_shrinkwrap": null, + "_spec": "get-stream@^3.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "dependencies": {}, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "ava": "*", + "into-stream": "^3.0.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14", + "tarball": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "buffer-stream.js", + "index.js" + ], + "gitHead": "3023bc31dec6680dda4f935a2b320b3a4f18c815", + "homepage": "https://github.com/sindresorhus/get-stream#readme", + "keywords": [ + "array", + "buffer", + "concat", + "consume", + "data", + "get", + "obj", + "object", + "promise", + "read", + "readable", + "readablestream", + "str", + "stream", + "string", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jamestalmage", + "email": "james@talmage.io" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "get-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/get-stream/readme.md b/node_modules/get-stream/readme.md new file mode 100644 index 0000000..73b188f --- /dev/null +++ b/node_modules/get-stream/readme.md @@ -0,0 +1,117 @@ +# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) + +> Get a stream as a string, buffer, or array + + +## Install + +``` +$ npm install --save get-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const getStream = require('get-stream'); +const stream = fs.createReadStream('unicorn.txt'); + +getStream(stream).then(str => { + console.log(str); + /* + ,,))))))));, + __)))))))))))))), + \|/ -\(((((''''((((((((. + -*-==//////(('' . `)))))), + /|\ ))| o ;-. '((((( ,(, + ( `| / ) ;))))' ,_))^;(~ + | | | ,))((((_ _____------~~~-. %,;(;(>';'~ + o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ + ; ''''```` `: `:::|\,__,%% );`'; ~ + | _ ) / `:|`----' `-' + ______/\/~ | / / + /~;;.____/;;' / ___--,-( `;;;/ + / // _;______;'------~~~~~ /;;/\ / + // | | / ; \;;,\ + (<_ | ; /',/-----' _> + \_| ||_ //~;~~~~~~~~~ + `\_| (,~~ + \~\ + ~~ + */ +}); +``` + + +## API + +The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. + +### getStream(stream, [options]) + +Get the `stream` as a string. + +#### options + +##### encoding + +Type: `string`
+Default: `utf8` + +[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. + +##### maxBuffer + +Type: `number`
+Default: `Infinity` + +Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected. + +### getStream.buffer(stream, [options]) + +Get the `stream` as a buffer. + +It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. + +### getStream.array(stream, [options]) + +Get the `stream` as an array of values. + +It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: + +- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). + +- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. + +- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. + + +## Errors + +If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. + +```js +getStream(streamThatErrorsAtTheEnd('unicorn')) + .catch(err => { + console.log(err.bufferedData); + //=> 'unicorn' + }); +``` + + +## FAQ + +### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? + +This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. + + +## Related + +- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/invert-kv/index.js b/node_modules/invert-kv/index.js new file mode 100644 index 0000000..61e2196 --- /dev/null +++ b/node_modules/invert-kv/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (obj) { + if (typeof obj !== 'object') { + throw new TypeError('Expected an object'); + } + + var ret = {}; + + for (var key in obj) { + var val = obj[key]; + ret[val] = key; + } + + return ret; +}; diff --git a/node_modules/invert-kv/package.json b/node_modules/invert-kv/package.json new file mode 100644 index 0000000..65e235b --- /dev/null +++ b/node_modules/invert-kv/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "invert-kv@^1.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/lcid" + ] + ], + "_from": "invert-kv@>=1.0.0 <2.0.0", + "_id": "invert-kv@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/invert-kv", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "1.4.21", + "_phantomChildren": {}, + "_requested": { + "name": "invert-kv", + "raw": "invert-kv@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lcid" + ], + "_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "_shasum": "104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6", + "_shrinkwrap": null, + "_spec": "invert-kv@^1.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/lcid", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/invert-kv/issues" + }, + "dependencies": {}, + "description": "Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6", + "tarball": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c28c3a15abcde3f67bd90f90f8ffe54a5f8cb04e", + "homepage": "https://github.com/sindresorhus/invert-kv", + "keywords": [ + "invert", + "key", + "kv", + "obj", + "object", + "val", + "value" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "invert-kv", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/invert-kv.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/node_modules/invert-kv/readme.md b/node_modules/invert-kv/readme.md new file mode 100644 index 0000000..039fc7c --- /dev/null +++ b/node_modules/invert-kv/readme.md @@ -0,0 +1,25 @@ +# invert-kv [![Build Status](https://travis-ci.org/sindresorhus/invert-kv.svg?branch=master)](https://travis-ci.org/sindresorhus/invert-kv) + +> Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}` + + +## Install + +```sh +$ npm install --save invert-kv +``` + + +## Usage + +```js +var invertKv = require('invert-kv'); + +invertKv({foo: 'bar', unicorn: 'rainbow'}); +//=> {bar: 'foo', rainbow: 'unicorn'} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-stream/index.js b/node_modules/is-stream/index.js new file mode 100644 index 0000000..6f7ec91 --- /dev/null +++ b/node_modules/is-stream/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var isStream = module.exports = function (stream) { + return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; +}; + +isStream.writable = function (stream) { + return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; +}; + +isStream.readable = function (stream) { + return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; +}; + +isStream.duplex = function (stream) { + return isStream.writable(stream) && isStream.readable(stream); +}; + +isStream.transform = function (stream) { + return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; +}; diff --git a/node_modules/is-stream/license b/node_modules/is-stream/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-stream/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-stream/package.json b/node_modules/is-stream/package.json new file mode 100644 index 0000000..1edf378 --- /dev/null +++ b/node_modules/is-stream/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "is-stream@^1.1.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa" + ] + ], + "_from": "is-stream@>=1.1.0 <2.0.0", + "_id": "is-stream@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/is-stream", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/is-stream-1.1.0.tgz_1460446915184_0.806101513793692" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.0", + "_phantomChildren": {}, + "_requested": { + "name": "is-stream", + "raw": "is-stream@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "_shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44", + "_shrinkwrap": null, + "_spec": "is-stream@^1.1.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-stream/issues" + }, + "dependencies": {}, + "description": "Check if something is a Node.js stream", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44", + "tarball": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "e21d73f1028c189d16150cea52641059b0936310", + "homepage": "https://github.com/sindresorhus/is-stream#readme", + "keywords": [ + "check", + "detect", + "duplex", + "is", + "readable", + "stream", + "streams", + "transform", + "type", + "writable" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/node_modules/is-stream/readme.md b/node_modules/is-stream/readme.md new file mode 100644 index 0000000..d8afce8 --- /dev/null +++ b/node_modules/is-stream/readme.md @@ -0,0 +1,42 @@ +# is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream) + +> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html) + + +## Install + +``` +$ npm install --save is-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const isStream = require('is-stream'); + +isStream(fs.createReadStream('unicorn.png')); +//=> true + +isStream({}); +//=> false +``` + + +## API + +### isStream(stream) + +#### isStream.writable(stream) + +#### isStream.readable(stream) + +#### isStream.duplex(stream) + +#### isStream.transform(stream) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-wsl/index.js b/node_modules/is-wsl/index.js new file mode 100644 index 0000000..ade6cda --- /dev/null +++ b/node_modules/is-wsl/index.js @@ -0,0 +1,25 @@ +'use strict'; +const os = require('os'); +const fs = require('fs'); + +const isWsl = () => { + if (process.platform !== 'linux') { + return false; + } + + if (os.release().includes('Microsoft')) { + return true; + } + + try { + return fs.readFileSync('/proc/version', 'utf8').includes('Microsoft'); + } catch (err) { + return false; + } +}; + +if (process.env.__IS_WSL_TEST__) { + module.exports = isWsl; +} else { + module.exports = isWsl(); +} diff --git a/node_modules/is-wsl/license b/node_modules/is-wsl/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-wsl/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-wsl/package.json b/node_modules/is-wsl/package.json new file mode 100644 index 0000000..f6444b4 --- /dev/null +++ b/node_modules/is-wsl/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "is-wsl@^1.1.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/open" + ] + ], + "_from": "is-wsl@>=1.1.0 <2.0.0", + "_id": "is-wsl@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/is-wsl", + "_nodeVersion": "4.7.3", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/is-wsl-1.1.0.tgz_1492407587032_0.143065512413159" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "name": "is-wsl", + "raw": "is-wsl@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/open" + ], + "_resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "_shasum": "1f16e4aa22b04d1336b66188a66af3c600c3a66d", + "_shrinkwrap": null, + "_spec": "is-wsl@^1.1.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/open", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-wsl/issues" + }, + "dependencies": {}, + "description": "Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)", + "devDependencies": { + "ava": "*", + "clear-require": "^2.0.0", + "proxyquire": "^1.7.11", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "1f16e4aa22b04d1336b66188a66af3c600c3a66d", + "tarball": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "60ea5d57a51ee596cb144ef47187c0476a5a421b", + "homepage": "https://github.com/sindresorhus/is-wsl#readme", + "keywords": [ + "bash", + "check", + "console", + "detect", + "is", + "linux", + "process", + "subsystem", + "terminal", + "windows", + "wsl" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-wsl", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-wsl.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/node_modules/is-wsl/readme.md b/node_modules/is-wsl/readme.md new file mode 100644 index 0000000..7ab40c5 --- /dev/null +++ b/node_modules/is-wsl/readme.md @@ -0,0 +1,28 @@ +# is-wsl [![Build Status](https://travis-ci.org/sindresorhus/is-wsl.svg?branch=master)](https://travis-ci.org/sindresorhus/is-wsl) + +> Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows) + +Can be useful if you need to work around unimplemented or buggy features in WSL. + + +## Install + +``` +$ npm install --save is-wsl +``` + + +## Usage + +```js +const isWsl = require('is-wsl'); + +// When running inside Windows Subsystem for Linux +console.log(isWsl); +//=> true +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore new file mode 100644 index 0000000..c1cb757 --- /dev/null +++ b/node_modules/isexe/.npmignore @@ -0,0 +1,2 @@ +.nyc_output/ +coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/isexe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md new file mode 100644 index 0000000..35769e8 --- /dev/null +++ b/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js new file mode 100644 index 0000000..553fb32 --- /dev/null +++ b/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js new file mode 100644 index 0000000..1995ea4 --- /dev/null +++ b/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json new file mode 100644 index 0000000..2b55d40 --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,87 @@ +{ + "_args": [ + [ + "isexe@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/which" + ] + ], + "_from": "isexe@>=2.0.0 <3.0.0", + "_id": "isexe@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/isexe", + "_nodeVersion": "8.0.0-pre", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/isexe-2.0.0.tgz_1490230396126_0.8949183595832437" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "4.4.2", + "_phantomChildren": {}, + "_requested": { + "name": "isexe", + "raw": "isexe@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_shasum": "e8fbf374dc556ff8947a10dcb0572d633f2cfa10", + "_shrinkwrap": null, + "_spec": "isexe@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/which", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "dependencies": {}, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "e8fbf374dc556ff8947a10dcb0572d633f2cfa10", + "tarball": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + }, + "gitHead": "10f8be491aab2e158c7e20df64a7f90ab5b5475c", + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "isexe", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.0.0" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 0000000..d926df6 --- /dev/null +++ b/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js new file mode 100644 index 0000000..3499673 --- /dev/null +++ b/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js new file mode 100644 index 0000000..69bd3d2 --- /dev/null +++ b/node_modules/lcid/index.js @@ -0,0 +1,22 @@ +'use strict'; +var invertKv = require('invert-kv'); +var all = require('./lcid.json'); +var inverted = invertKv(all); + +exports.from = function (lcidCode) { + if (typeof lcidCode !== 'number') { + throw new TypeError('Expected a number'); + } + + return inverted[lcidCode]; +}; + +exports.to = function (localeId) { + if (typeof localeId !== 'string') { + throw new TypeError('Expected a string'); + } + + return all[localeId]; +}; + +exports.all = all; diff --git a/node_modules/lcid/lcid.json b/node_modules/lcid/lcid.json new file mode 100644 index 0000000..9c89f6a --- /dev/null +++ b/node_modules/lcid/lcid.json @@ -0,0 +1,203 @@ +{ + "af_ZA": 1078, + "am_ET": 1118, + "ar_AE": 14337, + "ar_BH": 15361, + "ar_DZ": 5121, + "ar_EG": 3073, + "ar_IQ": 2049, + "ar_JO": 11265, + "ar_KW": 13313, + "ar_LB": 12289, + "ar_LY": 4097, + "ar_MA": 6145, + "ar_OM": 8193, + "ar_QA": 16385, + "ar_SA": 1025, + "ar_SY": 10241, + "ar_TN": 7169, + "ar_YE": 9217, + "arn_CL": 1146, + "as_IN": 1101, + "az_AZ": 2092, + "ba_RU": 1133, + "be_BY": 1059, + "bg_BG": 1026, + "bn_IN": 1093, + "bo_BT": 2129, + "bo_CN": 1105, + "br_FR": 1150, + "bs_BA": 8218, + "ca_ES": 1027, + "co_FR": 1155, + "cs_CZ": 1029, + "cy_GB": 1106, + "da_DK": 1030, + "de_AT": 3079, + "de_CH": 2055, + "de_DE": 1031, + "de_LI": 5127, + "de_LU": 4103, + "div_MV": 1125, + "dsb_DE": 2094, + "el_GR": 1032, + "en_AU": 3081, + "en_BZ": 10249, + "en_CA": 4105, + "en_CB": 9225, + "en_GB": 2057, + "en_IE": 6153, + "en_IN": 18441, + "en_JA": 8201, + "en_MY": 17417, + "en_NZ": 5129, + "en_PH": 13321, + "en_TT": 11273, + "en_US": 1033, + "en_ZA": 7177, + "en_ZW": 12297, + "es_AR": 11274, + "es_BO": 16394, + "es_CL": 13322, + "es_CO": 9226, + "es_CR": 5130, + "es_DO": 7178, + "es_EC": 12298, + "es_ES": 3082, + "es_GT": 4106, + "es_HN": 18442, + "es_MX": 2058, + "es_NI": 19466, + "es_PA": 6154, + "es_PE": 10250, + "es_PR": 20490, + "es_PY": 15370, + "es_SV": 17418, + "es_UR": 14346, + "es_US": 21514, + "es_VE": 8202, + "et_EE": 1061, + "eu_ES": 1069, + "fa_IR": 1065, + "fi_FI": 1035, + "fil_PH": 1124, + "fo_FO": 1080, + "fr_BE": 2060, + "fr_CA": 3084, + "fr_CH": 4108, + "fr_FR": 1036, + "fr_LU": 5132, + "fr_MC": 6156, + "fy_NL": 1122, + "ga_IE": 2108, + "gbz_AF": 1164, + "gl_ES": 1110, + "gsw_FR": 1156, + "gu_IN": 1095, + "ha_NG": 1128, + "he_IL": 1037, + "hi_IN": 1081, + "hr_BA": 4122, + "hr_HR": 1050, + "hu_HU": 1038, + "hy_AM": 1067, + "id_ID": 1057, + "ii_CN": 1144, + "is_IS": 1039, + "it_CH": 2064, + "it_IT": 1040, + "iu_CA": 2141, + "ja_JP": 1041, + "ka_GE": 1079, + "kh_KH": 1107, + "kk_KZ": 1087, + "kl_GL": 1135, + "kn_IN": 1099, + "ko_KR": 1042, + "kok_IN": 1111, + "ky_KG": 1088, + "lb_LU": 1134, + "lo_LA": 1108, + "lt_LT": 1063, + "lv_LV": 1062, + "mi_NZ": 1153, + "mk_MK": 1071, + "ml_IN": 1100, + "mn_CN": 2128, + "mn_MN": 1104, + "moh_CA": 1148, + "mr_IN": 1102, + "ms_BN": 2110, + "ms_MY": 1086, + "mt_MT": 1082, + "my_MM": 1109, + "nb_NO": 1044, + "ne_NP": 1121, + "nl_BE": 2067, + "nl_NL": 1043, + "nn_NO": 2068, + "ns_ZA": 1132, + "oc_FR": 1154, + "or_IN": 1096, + "pa_IN": 1094, + "pl_PL": 1045, + "ps_AF": 1123, + "pt_BR": 1046, + "pt_PT": 2070, + "qut_GT": 1158, + "quz_BO": 1131, + "quz_EC": 2155, + "quz_PE": 3179, + "rm_CH": 1047, + "ro_RO": 1048, + "ru_RU": 1049, + "rw_RW": 1159, + "sa_IN": 1103, + "sah_RU": 1157, + "se_FI": 3131, + "se_NO": 1083, + "se_SE": 2107, + "si_LK": 1115, + "sk_SK": 1051, + "sl_SI": 1060, + "sma_NO": 6203, + "sma_SE": 7227, + "smj_NO": 4155, + "smj_SE": 5179, + "smn_FI": 9275, + "sms_FI": 8251, + "sq_AL": 1052, + "sr_BA": 7194, + "sr_SP": 3098, + "sv_FI": 2077, + "sv_SE": 1053, + "sw_KE": 1089, + "syr_SY": 1114, + "ta_IN": 1097, + "te_IN": 1098, + "tg_TJ": 1064, + "th_TH": 1054, + "tk_TM": 1090, + "tmz_DZ": 2143, + "tn_ZA": 1074, + "tr_TR": 1055, + "tt_RU": 1092, + "ug_CN": 1152, + "uk_UA": 1058, + "ur_IN": 2080, + "ur_PK": 1056, + "uz_UZ": 2115, + "vi_VN": 1066, + "wen_DE": 1070, + "wo_SN": 1160, + "xh_ZA": 1076, + "yo_NG": 1130, + "zh_CHS": 4, + "zh_CHT": 31748, + "zh_CN": 2052, + "zh_HK": 3076, + "zh_MO": 5124, + "zh_SG": 4100, + "zh_TW": 1028, + "zu_ZA": 1077 +} diff --git a/node_modules/lcid/license b/node_modules/lcid/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/lcid/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/lcid/package.json b/node_modules/lcid/package.json new file mode 100644 index 0000000..5686386 --- /dev/null +++ b/node_modules/lcid/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + "lcid@^1.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/os-locale" + ] + ], + "_from": "lcid@>=1.0.0 <2.0.0", + "_id": "lcid@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/lcid", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "lcid", + "raw": "lcid@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/os-locale" + ], + "_resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "_shasum": "308accafa0bc483a3867b4b6f2b9506251d1b835", + "_shrinkwrap": null, + "_spec": "lcid@^1.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/os-locale", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/lcid/issues" + }, + "dependencies": { + "invert-kv": "^1.0.0" + }, + "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "308accafa0bc483a3867b4b6f2b9506251d1b835", + "tarball": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lcid.json" + ], + "gitHead": "96bb3e617f77f5f8ceb78653c77de5a85abb3b1e", + "homepage": "https://github.com/sindresorhus/lcid", + "keywords": [ + "bcp47", + "convert", + "id", + "identifier", + "ietf", + "json", + "lang", + "language", + "lcid", + "locale", + "map", + "mapping", + "str", + "string", + "tag", + "windows" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "lcid", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/lcid.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/lcid/readme.md b/node_modules/lcid/readme.md new file mode 100644 index 0000000..bee4a70 --- /dev/null +++ b/node_modules/lcid/readme.md @@ -0,0 +1,35 @@ +# lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid) + +> Mapping between [standard locale identifiers](http://en.wikipedia.org/wiki/Locale) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) + +Based on the [mapping](https://github.com/python/cpython/blob/be2a1a76fa43bb1ea1b3577bb5bdd506a2e90e37/Lib/locale.py#L1395-L1604) used in the Python standard library. + +The mapping itself is just a [JSON file](lcid.json) and can be used wherever. + + +## Install + +``` +$ npm install --save lcid +``` + + +## Usage + +```js +var lcid = require('lcid'); + +lcid.from(1044); +//=> 'nb_NO' + +lcid.to('nb_NO'); +//=> 1044 + +lcid.all; +//=> {'af_ZA': 1078, ...} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/locate-path/index.js b/node_modules/locate-path/index.js new file mode 100644 index 0000000..32b108d --- /dev/null +++ b/node_modules/locate-path/index.js @@ -0,0 +1,24 @@ +'use strict'; +const path = require('path'); +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +module.exports = (iterable, opts) => { + opts = Object.assign({ + cwd: process.cwd() + }, opts); + + return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts); +}; + +module.exports.sync = (iterable, opts) => { + opts = Object.assign({ + cwd: process.cwd() + }, opts); + + for (const el of iterable) { + if (pathExists.sync(path.resolve(opts.cwd, el))) { + return el; + } + } +}; diff --git a/node_modules/locate-path/license b/node_modules/locate-path/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/locate-path/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/locate-path/package.json b/node_modules/locate-path/package.json new file mode 100644 index 0000000..30a5815 --- /dev/null +++ b/node_modules/locate-path/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "locate-path@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs/node_modules/find-up" + ] + ], + "_from": "locate-path@>=2.0.0 <3.0.0", + "_id": "locate-path@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/locate-path", + "_nodeVersion": "7.2.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/locate-path-2.0.0.tgz_1480310853492_0.9661909360438585" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "name": "locate-path", + "raw": "locate-path@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs/find-up" + ], + "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "_shasum": "2b568b265eec944c6d9c0de9c3dbbbca0354cd8e", + "_shrinkwrap": null, + "_spec": "locate-path@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs/node_modules/find-up", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/locate-path/issues" + }, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "description": "Get the first path that exists on disk of multiple paths", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "2b568b265eec944c6d9c0de9c3dbbbca0354cd8e", + "tarball": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "a30b86df0934329c66ff6a2be395db03d65478b8", + "homepage": "https://github.com/sindresorhus/locate-path#readme", + "keywords": [ + "array", + "exists", + "file", + "files", + "find", + "finder", + "iterable", + "iterator", + "locate", + "path", + "paths", + "search", + "searcher" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "locate-path", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/locate-path.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/locate-path/readme.md b/node_modules/locate-path/readme.md new file mode 100644 index 0000000..f7b337b --- /dev/null +++ b/node_modules/locate-path/readme.md @@ -0,0 +1,99 @@ +# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) + +> Get the first path that exists on disk of multiple paths + + +## Install + +``` +$ npm install --save locate-path +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const locatePath = require('locate-path'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // only this one actually exists on disk + 'pony.png' +]; + +locatePath(files).then(foundPath => { + console.log(foundPath); + //=> 'rainbow' +}); +``` + + +## API + +### locatePath(input, [options]) + +Returns a `Promise` for the first path that exists or `undefined` if none exists. + +#### input + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises. + +##### preserveOrder + +Type: `boolean`
+Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory. + +### locatePath.sync(input, [options]) + +Returns the first path that exists or `undefined` if none exists. + +#### input + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### cwd + +Same as above. + + +## Related + +- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/lru-cache/LICENSE b/node_modules/lru-cache/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/lru-cache/README.md b/node_modules/lru-cache/README.md new file mode 100644 index 0000000..d660dd5 --- /dev/null +++ b/node_modules/lru-cache/README.md @@ -0,0 +1,158 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) + +## Installation: + +```javascript +npm install lru-cache --save +``` + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +// but note that it must be THE SAME object, not +// just a JSON-equivalent object. +var someObject = { a: 1 } +cache.set(someObject, 'a value') +// Object keys are not toString()-ed +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') +// A similar object with same keys/values won't work, +// because it's a different object identity +assert.equal(cache.get({ a: 1 }), undefined) + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. The item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. +* `noDisposeOnSet` By default, if you set a `dispose()` method, then + it'll be called whenever a `set()` operation overwrites an existing + key. If you set this option, `dispose()` will only be called when a + key falls out of the cache, not when it is overwritten. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `maxAge` is optional and overrides the + cache `maxAge` option if provided. + + If the key is not found, `get()` will return `undefined`. + + The key and val can be any value. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries + +* `prune()` + + Manually iterates over the entire cache proactively pruning old entries diff --git a/node_modules/lru-cache/index.js b/node_modules/lru-cache/index.js new file mode 100644 index 0000000..bd35b53 --- /dev/null +++ b/node_modules/lru-cache/index.js @@ -0,0 +1,468 @@ +'use strict' + +module.exports = LRUCache + +// This will be a proper iterable 'Map' in engines that support it, +// or a fakey-fake PseudoMap in older versions. +var Map = require('pseudomap') +var util = require('util') + +// A linked list to keep track of recently-used-ness +var Yallist = require('yallist') + +// use symbols if possible, otherwise just _props +var hasSymbol = typeof Symbol === 'function' && process.env._nodeLRUCacheForceNoSymbol !== '1' +var makeSymbol +if (hasSymbol) { + makeSymbol = function (key) { + return Symbol(key) + } +} else { + makeSymbol = function (key) { + return '_' + key + } +} + +var MAX = makeSymbol('max') +var LENGTH = makeSymbol('length') +var LENGTH_CALCULATOR = makeSymbol('lengthCalculator') +var ALLOW_STALE = makeSymbol('allowStale') +var MAX_AGE = makeSymbol('maxAge') +var DISPOSE = makeSymbol('dispose') +var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet') +var LRU_LIST = makeSymbol('lruList') +var CACHE = makeSymbol('cache') + +function naiveLength () { return 1 } + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +function LRUCache (options) { + if (!(this instanceof LRUCache)) { + return new LRUCache(options) + } + + if (typeof options === 'number') { + options = { max: options } + } + + if (!options) { + options = {} + } + + var max = this[MAX] = options.max + // Kind of weird to have a default max of Infinity, but oh well. + if (!max || + !(typeof max === 'number') || + max <= 0) { + this[MAX] = Infinity + } + + var lc = options.length || naiveLength + if (typeof lc !== 'function') { + lc = naiveLength + } + this[LENGTH_CALCULATOR] = lc + + this[ALLOW_STALE] = options.stale || false + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this.reset() +} + +// resize the cache when the max changes. +Object.defineProperty(LRUCache.prototype, 'max', { + set: function (mL) { + if (!mL || !(typeof mL === 'number') || mL <= 0) { + mL = Infinity + } + this[MAX] = mL + trim(this) + }, + get: function () { + return this[MAX] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function (allowStale) { + this[ALLOW_STALE] = !!allowStale + }, + get: function () { + return this[ALLOW_STALE] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function (mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0 + } + this[MAX_AGE] = mA + trim(this) + }, + get: function () { + return this[MAX_AGE] + }, + enumerable: true +}) + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function (lC) { + if (typeof lC !== 'function') { + lC = naiveLength + } + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(function (hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }, this) + } + trim(this) + }, + get: function () { return this[LENGTH_CALCULATOR] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'length', { + get: function () { return this[LENGTH] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function () { return this[LRU_LIST].length }, + enumerable: true +}) + +LRUCache.prototype.rforEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].tail; walker !== null;) { + var prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } +} + +function forEachStep (self, fn, node, thisp) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) { + hit = undefined + } + } + if (hit) { + fn.call(thisp, hit.value, hit.key, self) + } +} + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].head; walker !== null;) { + var next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } +} + +LRUCache.prototype.keys = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.key + }, this) +} + +LRUCache.prototype.values = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.value + }, this) +} + +LRUCache.prototype.reset = function () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(function (hit) { + this[DISPOSE](hit.key, hit.value) + }, this) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list +} + +LRUCache.prototype.dump = function () { + return this[LRU_LIST].map(function (hit) { + if (!isStale(this, hit)) { + return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + } + } + }, this).toArray().filter(function (h) { + return h + }) +} + +LRUCache.prototype.dumpLru = function () { + return this[LRU_LIST] +} + +/* istanbul ignore next */ +LRUCache.prototype.inspect = function (n, opts) { + var str = 'LRUCache {' + var extras = false + + var as = this[ALLOW_STALE] + if (as) { + str += '\n allowStale: true' + extras = true + } + + var max = this[MAX] + if (max && max !== Infinity) { + if (extras) { + str += ',' + } + str += '\n max: ' + util.inspect(max, opts) + extras = true + } + + var maxAge = this[MAX_AGE] + if (maxAge) { + if (extras) { + str += ',' + } + str += '\n maxAge: ' + util.inspect(maxAge, opts) + extras = true + } + + var lc = this[LENGTH_CALCULATOR] + if (lc && lc !== naiveLength) { + if (extras) { + str += ',' + } + str += '\n length: ' + util.inspect(this[LENGTH], opts) + extras = true + } + + var didFirst = false + this[LRU_LIST].forEach(function (item) { + if (didFirst) { + str += ',\n ' + } else { + if (extras) { + str += ',\n' + } + didFirst = true + str += '\n ' + } + var key = util.inspect(item.key).split('\n').join('\n ') + var val = { value: item.value } + if (item.maxAge !== maxAge) { + val.maxAge = item.maxAge + } + if (lc !== naiveLength) { + val.length = item.length + } + if (isStale(this, item)) { + val.stale = true + } + + val = util.inspect(val, opts).split('\n').join('\n ') + str += key + ' => ' + val + }) + + if (didFirst || extras) { + str += '\n' + } + str += '}' + + return str +} + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + var now = maxAge ? Date.now() : 0 + var len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + var node = this[CACHE].get(key) + var item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key, item.value) + } + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + var hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) { + this[DISPOSE](key, value) + } + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true +} + +LRUCache.prototype.has = function (key) { + if (!this[CACHE].has(key)) return false + var hit = this[CACHE].get(key).value + if (isStale(this, hit)) { + return false + } + return true +} + +LRUCache.prototype.get = function (key) { + return get(this, key, true) +} + +LRUCache.prototype.peek = function (key) { + return get(this, key, false) +} + +LRUCache.prototype.pop = function () { + var node = this[LRU_LIST].tail + if (!node) return null + del(this, node) + return node.value +} + +LRUCache.prototype.del = function (key) { + del(this, this[CACHE].get(key)) +} + +LRUCache.prototype.load = function (arr) { + // reset the cache + this.reset() + + var now = Date.now() + // A previous serialized cache has the most recent items first + for (var l = arr.length - 1; l >= 0; l--) { + var hit = arr[l] + var expiresAt = hit.e || 0 + if (expiresAt === 0) { + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + } else { + var maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } +} + +LRUCache.prototype.prune = function () { + var self = this + this[CACHE].forEach(function (value, key) { + get(self, key, false) + }) +} + +function get (self, key, doUse) { + var node = self[CACHE].get(key) + if (node) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) hit = undefined + } else { + if (doUse) { + self[LRU_LIST].unshiftNode(node) + } + } + if (hit) hit = hit.value + } + return hit +} + +function isStale (self, hit) { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) { + return false + } + var stale = false + var diff = Date.now() - hit.now + if (hit.maxAge) { + stale = diff > hit.maxAge + } else { + stale = self[MAX_AGE] && (diff > self[MAX_AGE]) + } + return stale +} + +function trim (self) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + var prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +function del (self, node) { + if (node) { + var hit = node.value + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value) + } + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +// classy, since V8 prefers predictable objects. +function Entry (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 +} diff --git a/node_modules/lru-cache/package.json b/node_modules/lru-cache/package.json new file mode 100644 index 0000000..3b7c523 --- /dev/null +++ b/node_modules/lru-cache/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + "lru-cache@^4.0.1", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cross-spawn" + ] + ], + "_from": "lru-cache@>=4.0.1 <5.0.0", + "_hasShrinkwrap": false, + "_id": "lru-cache@4.1.5", + "_inCache": true, + "_installable": true, + "_location": "/lru-cache", + "_nodeVersion": "10.12.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/lru-cache_4.1.5_1543513774289_0.3522451077999784" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "6.4.1", + "_phantomChildren": {}, + "_requested": { + "name": "lru-cache", + "raw": "lru-cache@^4.0.1", + "rawSpec": "^4.0.1", + "scope": null, + "spec": ">=4.0.1 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "_shasum": "8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd", + "_shrinkwrap": null, + "_spec": "lru-cache@^4.0.1", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cross-spawn", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter" + }, + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "description": "A cache object that deletes the least-recently-used items.", + "devDependencies": { + "benchmark": "^2.1.4", + "standard": "^12.0.1", + "tap": "^12.1.0" + }, + "directories": {}, + "dist": { + "fileCount": 4, + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcACavCRA9TVsSAnZWagAAApYQAIClk2BJDU+mzS2L6g/6\nWU9peKlytceanWLW6zivfwQc7E0gNOb0NXY8XKFOxAibBoYStcKvxTqPLR53\nCOowz/CMKFHnyoZd+rPvN8Tt6So58+sk6k03W3M81vb3IGB1Sjx5scSfjHS6\nIzxR/BSRJ2HIPSfvs397Uxm82YmZEVLaDE0C4bPzXq7M8FWRKW8GV16InLoH\nWoIh/XDs0Q2dSerWlI96HvoE6UybkY/kfkpL3957AAUap3vTj4N0bDl9DKt2\n0lcbm/Ba//zYLjbXu4zkCDNKgPr7lWioLRSH0JI2ykoqlDsuz8GEqye4dvc0\n/SkIpj+DR0k1qnwoLFQeKqCa+bIZO8+y8zqKqauoitoInhd73hZR57QgaThF\nc0BWs19VYfKzG1/OVzgHrFxJwP9fqiQb0r1oJ3jz4HI/4z0T4sY5fvKGGRRa\nip4wOeLr3ASRBGNGkH4q0PKbciZtZ08vt82+vdknDEoGc/ld+HC+NVmUlALF\njveTwVK5jB+1iOv/r7QW8Y2bhA3b0hyxTL8aAozG1TlbHhikZ+Ueq4wG12mn\n/hJuq+YsF7eQIK6Ifn8+V4iwo2wGzCvFKYFcd9f2qHQVYdGIUeAXsDL1JNeX\nW8lx9eGsbFfX+xzLfqw692GhCOKi9QTPA8Qzeim8af/wnuBMUOqJNxysLaOT\nb5/m\r\n=3dPc\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd", + "tarball": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "unpackedSize": 17843 + }, + "gitHead": "57658f575607a44bb2fa38dd0e43d74835e42dae", + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "keywords": [ + "cache", + "lru", + "mru" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "name": "lru-cache", + "optionalDependencies": {}, + "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache)\n\n## Installation:\n\n```javascript\nnpm install lru-cache --save\n```\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n, key) { return n * 2 + key.length }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\n// non-string keys ARE fully supported\n// but note that it must be THE SAME object, not\n// just a JSON-equivalent object.\nvar someObject = { a: 1 }\ncache.set(someObject, 'a value')\n// Object keys are not toString()-ed\ncache.set('[object Object]', 'a different value')\nassert.equal(cache.get(someObject), 'a value')\n// A similar object with same keys/values won't work,\n// because it's a different object identity\nassert.equal(cache.get({ a: 1 }), undefined)\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n, key){return n.length}`. The default is\n `function(){return 1}`, which is fine if you want to store `max`\n like-sized things. The item is passed as the first argument, and\n the key is passed as the second argumnet.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n* `noDisposeOnSet` By default, if you set a `dispose()` method, then\n it'll be called whenever a `set()` operation overwrites an existing\n key. If you set this option, `dispose()` will only be called when a\n key falls out of the cache, not when it is overwritten.\n\n## API\n\n* `set(key, value, maxAge)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think. `maxAge` is optional and overrides the\n cache `maxAge` option if provided.\n\n If the key is not found, `get()` will return `undefined`.\n\n The key and val can be any value.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `rforEach(function(value,key,cache), [thisp])`\n\n The same as `cache.forEach(...)` but items are iterated over in\n reverse order. (ie, less recently used items are iterated over\n first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n\n* `length`\n\n Return total length of objects in cache taking into account\n `length` options function.\n\n* `itemCount`\n\n Return total quantity of objects currently in cache. Note, that\n `stale` (see options) items are returned as part of this item\n count.\n\n* `dump()`\n\n Return an array of the cache entries ready for serialization and usage\n with 'destinationCache.load(arr)`.\n\n* `load(cacheEntriesArray)`\n\n Loads another cache entries array, obtained with `sourceCache.dump()`,\n into the cache. The destination cache is reset before loading new entries\n\n* `prune()`\n\n Manually iterates over the entire cache proactively pruning old entries\n", + "readmeFilename": "README.md", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "scripts": { + "coveragerport": "tap --coverage-report=html", + "lintfix": "standard --fix test/*.js index.js", + "postpublish": "git push origin --all; git push origin --tags", + "posttest": "standard test/*.js index.js", + "postversion": "npm publish --tag=legacy", + "preversion": "npm test", + "snap": "TAP_SNAPSHOT=1 tap test/*.js -J", + "test": "tap test/*.js --100 -J" + }, + "version": "4.1.5" +} diff --git a/node_modules/mem/index.js b/node_modules/mem/index.js new file mode 100644 index 0000000..aa5a073 --- /dev/null +++ b/node_modules/mem/index.js @@ -0,0 +1,55 @@ +'use strict'; +const mimicFn = require('mimic-fn'); + +const cacheStore = new WeakMap(); + +const defaultCacheKey = function (x) { + if (arguments.length === 1 && (x === null || x === undefined || (typeof x !== 'function' && typeof x !== 'object'))) { + return x; + } + + return JSON.stringify(arguments); +}; + +module.exports = (fn, opts) => { + opts = Object.assign({ + cacheKey: defaultCacheKey, + cache: new Map() + }, opts); + + const memoized = function () { + const cache = cacheStore.get(memoized); + const key = opts.cacheKey.apply(null, arguments); + + if (cache.has(key)) { + const c = cache.get(key); + + if (typeof opts.maxAge !== 'number' || Date.now() < c.maxAge) { + return c.data; + } + } + + const ret = fn.apply(null, arguments); + + cache.set(key, { + data: ret, + maxAge: Date.now() + (opts.maxAge || 0) + }); + + return ret; + }; + + mimicFn(memoized, fn); + + cacheStore.set(memoized, opts.cache); + + return memoized; +}; + +module.exports.clear = fn => { + const cache = cacheStore.get(fn); + + if (cache && typeof cache.clear === 'function') { + cache.clear(); + } +}; diff --git a/node_modules/mem/license b/node_modules/mem/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/mem/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/mem/package.json b/node_modules/mem/package.json new file mode 100644 index 0000000..1a2597c --- /dev/null +++ b/node_modules/mem/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + "mem@^1.1.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/os-locale" + ] + ], + "_from": "mem@>=1.1.0 <2.0.0", + "_id": "mem@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/mem", + "_nodeVersion": "4.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/mem-1.1.0.tgz_1476900325889_0.8028518599458039" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "name": "mem", + "raw": "mem@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/os-locale" + ], + "_resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "_shasum": "5edd52b485ca1d900fe64895505399a0dfa45f76", + "_shrinkwrap": null, + "_spec": "mem@^1.1.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/os-locale", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/mem/issues" + }, + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input", + "devDependencies": { + "ava": "*", + "delay": "^1.1.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "5edd52b485ca1d900fe64895505399a0dfa45f76", + "tarball": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "c12270441fab7f42fe53cf97edd53c60c4a8268f", + "homepage": "https://github.com/sindresorhus/mem#readme", + "keywords": [ + "cache", + "caching", + "expire", + "function", + "mem", + "memoization", + "memoize", + "optimize", + "performance", + "promise", + "ttl" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "mem", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/mem.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/mem/readme.md b/node_modules/mem/readme.md new file mode 100644 index 0000000..7ebab84 --- /dev/null +++ b/node_modules/mem/readme.md @@ -0,0 +1,147 @@ +# mem [![Build Status](https://travis-ci.org/sindresorhus/mem.svg?branch=master)](https://travis-ci.org/sindresorhus/mem) + +> [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input + + +## Install + +``` +$ npm install --save mem +``` + + +## Usage + +```js +const mem = require('mem'); + +let i = 0; +const counter = () => ++i; +const memoized = mem(counter); + +memoized('foo'); +//=> 1 + +// cached as it's the same arguments +memoized('foo'); +//=> 1 + +// not cached anymore as the arguments changed +memoized('bar'); +//=> 2 + +memoized('bar'); +//=> 2 +``` + +##### Works fine with promise returning functions + +```js +const mem = require('mem'); + +let i = 0; +const counter = () => Promise.resolve(++i); +const memoized = mem(counter); + +memoized().then(a => { + console.log(a); + //=> 1 + + memoized().then(b => { + // the return value didn't increase as it's cached + console.log(b); + //=> 1 + }); +}); +``` + +```js +const mem = require('mem'); +const got = require('got'); +const memGot = mem(got, {maxAge: 1000}); + +memGot('sindresorhus.com').then(() => { + // this call is cached + memGot('sindresorhus.com').then(() => { + setTimeout(() => { + // this call is not cached as the cache has expired + memGot('sindresorhus.com').then(() => {}); + }, 2000); + }); +}); +``` + + +## API + +### mem(fn, [options]) + +#### fn + +Type: `Function` + +Function to be memoized. + +#### options + +##### maxAge + +Type: `number`
+Default: `Infinity` + +Milliseconds until the cache expires. + +##### cacheKey + +Type: `Function` + +Determines the cache key for storing the result based on the function arguments. By default, if there's only one argument and it's a [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive), it's used directly as a key, otherwise it's all the function arguments JSON stringified as an array. + +You could for example change it to only cache on the first argument `x => JSON.stringify(x)`. + +##### cache + +Type: `Object`
+Default: `new Map()` + +Use a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, and optionally `.clear()`. You could for example use a `WeakMap` instead. + +### mem.clear(fn) + +Clear all cached data of a memoized function. + +#### fn + +Type: `Function` + +Memoized function. + + +## Tips + +### Cache statistics + +If you want to know how many times your cache had a hit or a miss, you can make use of [stats-map](https://github.com/SamVerschueren/stats-map) as a replacement for the default cache. + +#### Example + +```js +const mem = require('mem'); +const StatsMap = require('stats-map'); +const got = require('got'); + +const cache = new StatsMap(); +const memGot = mem(got, {cache}); + +memGot('sindresorhus.com') + .then(() => memGot('sindresorhus.com')) + .then(() => memGot('sindresorhus.com')); + +console.log(cache.stats); +//=> {hits: 2, misses: 1} +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/mimic-fn/index.js b/node_modules/mimic-fn/index.js new file mode 100644 index 0000000..08e69d3 --- /dev/null +++ b/node_modules/mimic-fn/index.js @@ -0,0 +1,9 @@ +'use strict'; +module.exports = (to, from) => { + // TODO: use `Reflect.ownKeys()` when targeting Node.js 6 + for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + + return to; +}; diff --git a/node_modules/mimic-fn/license b/node_modules/mimic-fn/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/mimic-fn/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mimic-fn/package.json b/node_modules/mimic-fn/package.json new file mode 100644 index 0000000..a239972 --- /dev/null +++ b/node_modules/mimic-fn/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + "mimic-fn@^1.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/mem" + ] + ], + "_from": "mimic-fn@>=1.0.0 <2.0.0", + "_id": "mimic-fn@1.2.0", + "_inCache": true, + "_installable": true, + "_location": "/mimic-fn", + "_nodeVersion": "8.9.4", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/mimic-fn-1.2.0.tgz_1517542098165_0.264689544448629" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "5.6.0", + "_phantomChildren": {}, + "_requested": { + "name": "mimic-fn", + "raw": "mimic-fn@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/mem" + ], + "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "_shasum": "820c86a39334640e99516928bd03fca88057d022", + "_shrinkwrap": null, + "_spec": "mimic-fn@^1.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/mem", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/mimic-fn/issues" + }, + "dependencies": {}, + "description": "Make a function mimic another one", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "shasum": "820c86a39334640e99516928bd03fca88057d022", + "tarball": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "d762fc495eef1e48718e1f39b82c39ff5e95dfe4", + "homepage": "https://github.com/sindresorhus/mimic-fn#readme", + "keywords": [ + "change", + "copy", + "fn", + "func", + "function", + "imitate", + "infer", + "inherit", + "mimic", + "name", + "properties", + "rename", + "set" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "mimic-fn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/mimic-fn.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0" +} diff --git a/node_modules/mimic-fn/readme.md b/node_modules/mimic-fn/readme.md new file mode 100644 index 0000000..e575734 --- /dev/null +++ b/node_modules/mimic-fn/readme.md @@ -0,0 +1,68 @@ +# mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn) + +> Make a function mimic another one + +Useful when you wrap a function in another function and like to preserve the original name and other properties. + + +## Install + +``` +$ npm install mimic-fn +``` + + +## Usage + +```js +const mimicFn = require('mimic-fn'); + +function foo() {} +foo.unicorn = '🦄'; + +function wrapper() { + return foo() {}; +} + +console.log(wrapper.name); +//=> 'wrapper' + +mimicFn(wrapper, foo); + +console.log(wrapper.name); +//=> 'foo' + +console.log(wrapper.unicorn); +//=> '🦄' +``` + + +## API + +It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set. + +### mimicFn(to, from) + +It will modify `to` and return it. + +#### to + +Type: `Function` + +Mimicking function. + +#### from + +Type: `Function` + +Function to mimic. + + +## Related + +- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/npm-run-path/index.js b/node_modules/npm-run-path/index.js new file mode 100644 index 0000000..56f31e4 --- /dev/null +++ b/node_modules/npm-run-path/index.js @@ -0,0 +1,39 @@ +'use strict'; +const path = require('path'); +const pathKey = require('path-key'); + +module.exports = opts => { + opts = Object.assign({ + cwd: process.cwd(), + path: process.env[pathKey()] + }, opts); + + let prev; + let pth = path.resolve(opts.cwd); + const ret = []; + + while (prev !== pth) { + ret.push(path.join(pth, 'node_modules/.bin')); + prev = pth; + pth = path.resolve(pth, '..'); + } + + // ensure the running `node` binary is used + ret.push(path.dirname(process.execPath)); + + return ret.concat(opts.path).join(path.delimiter); +}; + +module.exports.env = opts => { + opts = Object.assign({ + env: process.env + }, opts); + + const env = Object.assign({}, opts.env); + const path = pathKey({env}); + + opts.path = env[path]; + env[path] = module.exports(opts); + + return env; +}; diff --git a/node_modules/npm-run-path/license b/node_modules/npm-run-path/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/npm-run-path/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/npm-run-path/package.json b/node_modules/npm-run-path/package.json new file mode 100644 index 0000000..a5a5271 --- /dev/null +++ b/node_modules/npm-run-path/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + "npm-run-path@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa" + ] + ], + "_from": "npm-run-path@>=2.0.0 <3.0.0", + "_id": "npm-run-path@2.0.2", + "_inCache": true, + "_installable": true, + "_location": "/npm-run-path", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/npm-run-path-2.0.2.tgz_1475136638037_0.6285470693837851" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "name": "npm-run-path", + "raw": "npm-run-path@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "_shasum": "35a9232dfa35d7067b4cb2ddf2357b1871536c5f", + "_shrinkwrap": null, + "_spec": "npm-run-path@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/npm-run-path/issues" + }, + "dependencies": { + "path-key": "^2.0.0" + }, + "description": "Get your PATH prepended with locally installed binaries", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "35a9232dfa35d7067b4cb2ddf2357b1871536c5f", + "tarball": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "4d956312d5da324c4eff435af7d80797f04f09e1", + "homepage": "https://github.com/sindresorhus/npm-run-path#readme", + "keywords": [ + "bin", + "binaries", + "binary", + "cli", + "command-line", + "executable", + "execute", + "npm", + "package", + "path", + "run", + "script" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "npm-run-path", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/npm-run-path.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.2", + "xo": { + "esnext": true + } +} diff --git a/node_modules/npm-run-path/readme.md b/node_modules/npm-run-path/readme.md new file mode 100644 index 0000000..4ff4722 --- /dev/null +++ b/node_modules/npm-run-path/readme.md @@ -0,0 +1,81 @@ +# npm-run-path [![Build Status](https://travis-ci.org/sindresorhus/npm-run-path.svg?branch=master)](https://travis-ci.org/sindresorhus/npm-run-path) + +> Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries + +In [npm run scripts](https://docs.npmjs.com/cli/run-script) you can execute locally installed binaries by name. This enables the same outside npm. + + +## Install + +``` +$ npm install --save npm-run-path +``` + + +## Usage + +```js +const childProcess = require('child_process'); +const npmRunPath = require('npm-run-path'); + +console.log(process.env.PATH); +//=> '/usr/local/bin' + +console.log(npmRunPath()); +//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin' + +// `foo` is a locally installed binary +childProcess.execFileSync('foo', { + env: npmRunPath.env() +}); +``` + + +## API + +### npmRunPath([options]) + +#### options + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Working directory. + +##### path + +Type: `string`
+Default: [`PATH`](https://github.com/sindresorhus/path-key) + +PATH to be appended.
+Set it to an empty string to exclude the default PATH. + +### npmRunPath.env([options]) + +#### options + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Working directory. + +##### env + +Type: `Object` + +Accepts an object of environment variables, like `process.env`, and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use in the `child_process` options. + + +## Related + +- [npm-run-path-cli](https://github.com/sindresorhus/npm-run-path-cli) - CLI for this module +- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/open/index.js b/node_modules/open/index.js new file mode 100644 index 0000000..e2bbc05 --- /dev/null +++ b/node_modules/open/index.js @@ -0,0 +1,118 @@ +'use strict'; +const {promisify} = require('util'); +const path = require('path'); +const childProcess = require('child_process'); +const isWsl = require('is-wsl'); + +const pExecFile = promisify(childProcess.execFile); + +// Convert a path from WSL format to Windows format: +// `/mnt/c/Program Files/Example/MyApp.exe` → `C:\Program Files\Example\MyApp.exe`` +const wslToWindowsPath = async path => { + const {stdout} = await pExecFile('wslpath', ['-w', path]); + return stdout.trim(); +}; + +module.exports = async (target, options) => { + if (typeof target !== 'string') { + throw new TypeError('Expected a `target`'); + } + + options = { + wait: false, + background: false, + ...options + }; + + let command; + let appArguments = []; + const cliArguments = []; + const childProcessOptions = {}; + + if (Array.isArray(options.app)) { + appArguments = options.app.slice(1); + options.app = options.app[0]; + } + + if (process.platform === 'darwin') { + command = 'open'; + + if (options.wait) { + cliArguments.push('-W'); + } + + if (options.background) { + cliArguments.push('--background'); + } + + if (options.app) { + cliArguments.push('-a', options.app); + } + } else if (process.platform === 'win32' || isWsl) { + command = 'cmd' + (isWsl ? '.exe' : ''); + cliArguments.push('/c', 'start', '""', '/b'); + target = target.replace(/&/g, '^&'); + + if (options.wait) { + cliArguments.push('/wait'); + } + + if (options.app) { + if (isWsl && options.app.startsWith('/mnt/')) { + const windowsPath = await wslToWindowsPath(options.app); + options.app = windowsPath; + } + + cliArguments.push(options.app); + } + + if (appArguments.length > 0) { + cliArguments.push(...appArguments); + } + } else { + if (options.app) { + command = options.app; + } else { + const useSystemXdgOpen = process.versions.electron || process.platform === 'android'; + command = useSystemXdgOpen ? 'xdg-open' : path.join(__dirname, 'xdg-open'); + } + + if (appArguments.length > 0) { + cliArguments.push(...appArguments); + } + + if (!options.wait) { + // `xdg-open` will block the process unless stdio is ignored + // and it's detached from the parent even if it's unref'd. + childProcessOptions.stdio = 'ignore'; + childProcessOptions.detached = true; + } + } + + cliArguments.push(target); + + if (process.platform === 'darwin' && appArguments.length > 0) { + cliArguments.push('--args', ...appArguments); + } + + const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions); + + if (options.wait) { + return new Promise((resolve, reject) => { + subprocess.once('error', reject); + + subprocess.once('close', exitCode => { + if (exitCode > 0) { + reject(new Error(`Exited with code ${exitCode}`)); + return; + } + + resolve(subprocess); + }); + }); + } + + subprocess.unref(); + + return subprocess; +}; diff --git a/node_modules/open/license b/node_modules/open/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/open/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/open/package.json b/node_modules/open/package.json new file mode 100644 index 0000000..c5604a8 --- /dev/null +++ b/node_modules/open/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + "open", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client" + ] + ], + "_from": "open@latest", + "_hasShrinkwrap": false, + "_id": "open@6.1.0", + "_inCache": true, + "_installable": true, + "_location": "/open", + "_nodeVersion": "10.15.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/open_6.1.0_1554630076079_0.11965164174216758" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "6.4.1", + "_phantomChildren": {}, + "_requested": { + "name": "open", + "raw": "open", + "rawSpec": "", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER" + ], + "_resolved": "https://registry.npmjs.org/open/-/open-6.1.0.tgz", + "_shasum": "0e7e671b883976a4e5251b5d1ca905ab6f4be78f", + "_shrinkwrap": null, + "_spec": "open", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/open/issues" + }, + "dependencies": { + "is-wsl": "^1.1.0" + }, + "description": "Open stuff like URLs, files, executables. Cross-platform.", + "devDependencies": { + "ava": "^1.4.0", + "xo": "^0.24.0" + }, + "directories": {}, + "dist": { + "fileCount": 5, + "integrity": "sha512-Vqch7NFb/WsMujhqfq+B3u0xkssRjZlxh+NSsBSphpcgaFD7gfB0SUBfR91E9ygBlyNGNogXR2cUB8rRfoo2kQ==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqcW9CRA9TVsSAnZWagAAai4P/0NCJDIDSL5rfpN3kga6\nU2OwyXdr0uioxuvP80PT4JY4wbgfaT0oMIcThZgBwnZakkUStQuSAzpqzKU3\n+30suXgdeZ2kSaLqUl4O8ZUkZhLZr1o5zghafNTu0J/okW+tM0Fxinet8NPm\nRebV7TB9Fwd8UQHQ6KRkjkJ9HYaHjgpsWxQMwi10kEIeHL/8jqG5MMP7XZPw\nTmg3MeK0eUQTNYFFwSgIH9dFvt8ZEhoxyz4CD3SJvZ2JRcNsyxbff/Zi3Tmu\n+ftNmD+2aPFiSsC9yDnsRAgdKlA/LXHghWuv+x00EC2utjUuYQckwL4fKDyf\nJ9Ohae6IcHIAH9rmlu1relAY/Tjs8efywL7Ue7kKiJudQMl6YOSR/1Dg+gJ2\nIFkLo+PbZs4E7rM7G8eJ8OuKHiSi860o3HM/HEdTnEvNhozAGnuyKRbZRg+F\nP3iseqPHskSPYqaZrq+tZzBzYlWUga8isKqCTj5Azn6X4AMfc8eQ6X6JBi+i\n4FeqvsJNmq9O0SqaV81XX4eRFPOegBtf/XKsz7uOCb/Bvcfgyok7NE2X7a3W\n61Wz3M16SA0a2DITMIPghcDCRX73Nl+vUhA2kBXkeAXRSU88zs8IqOq1kg3a\neuYquTPTTrsQG0f6zOkef/LgoG7MAd1zDgU0CffKY6iL+x1w1OuqFX4ix885\nJeMD\r\n=oxdq\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "0e7e671b883976a4e5251b5d1ca905ab6f4be78f", + "tarball": "https://registry.npmjs.org/open/-/open-6.1.0.tgz", + "unpackedSize": 33709 + }, + "engines": { + "node": ">=8" + }, + "gitHead": "48dfe3d209554584dfa448c1c19d919cfb3270f3", + "homepage": "https://github.com/sindresorhus/open#readme", + "keywords": [ + "app", + "args", + "arguments", + "browser", + "child", + "cmd", + "default", + "editor", + "exe", + "exec", + "executable", + "file", + "launch", + "open", + "opener", + "opens", + "process", + "spawn", + "start", + "url", + "urls", + "website", + "xdg", + "xdg-open" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "open", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/open.git" + }, + "scripts": { + "test": "xo" + }, + "version": "6.1.0" +} diff --git a/node_modules/open/readme.md b/node_modules/open/readme.md new file mode 100644 index 0000000..1b38ec1 --- /dev/null +++ b/node_modules/open/readme.md @@ -0,0 +1,105 @@ +# open + +> Open stuff like URLs, files, executables. Cross-platform. + +If need this for Electron, use [`shell.openItem()`](https://electronjs.org/docs/api/shell#shellopenitemfullpath) instead. + +Note: The original [`open` package](https://github.com/pwnall/node-open) was recently deprecated in favor of this package, and we got the name, so this package is now named `open` instead of `opn`. If you're upgrading from the original `open` package (`open@0.0.5` or lower), keep in mind that the API is different. + +#### Why? + +- Actively maintained. +- Supports app arguments. +- Safer as it uses `spawn` instead of `exec`. +- Fixes most of the open original `node-open` issues. +- Includes the latest [`xdg-open` script](http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=c55122295c2a480fa721a9614f0e2d42b2949c18) for Linux. +- Supports WSL paths to Windows apps under `/mnt/*`. + + +## Install + +``` +$ npm install open +``` + + +## Usage + +```js +const open = require('open'); + +// Opens the image in the default image viewer +(async () => { + await open('unicorn.png', {wait: true}); + console.log('The image viewer app closed'); + + // Opens the url in the default browser + await open('https://sindresorhus.com'); + + // Specify the app to open in + await open('https://sindresorhus.com', {app: 'firefox'}); + + // Specify app arguments + await open('https://sindresorhus.com', {app: ['google chrome', '--incognito']}); +})(); +``` + + +## API + +It uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms. + +### open(target, [options]) + +Returns a promise for the [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process. + +#### target + +Type: `string` + +The thing you want to open. Can be a URL, file, or executable. + +Opens in the default app for the file type. For example, URLs opens in your default browser. + +#### options + +Type: `Object` + +##### wait + +Type: `boolean`
+Default: `false` + +Wait for the opened app to exit before fulfilling the promise. If `false` it's fulfilled immediately when opening the app. + +Note that it waits for the app to exit, not just for the window to close. + +On Windows, you have to explicitly specify an app for it to be able to wait. + +##### background (macOS only) + +Type: `boolean`
+Default: `false` + +Do not bring the app to the foreground. + +##### app + +Type: `string | string[]` + +Specify the app to open the `target` with, or an array with the app and app arguments. + +The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows. + +You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome. + + +## Related + +- [opn-cli](https://github.com/sindresorhus/opn-cli) - CLI for this module +- [open-editor](https://github.com/sindresorhus/open-editor) - Open files in your editor at a specific line and column + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/open/xdg-open b/node_modules/open/xdg-open new file mode 100644 index 0000000..faaea7f --- /dev/null +++ b/node_modules/open/xdg-open @@ -0,0 +1,1066 @@ +#!/bin/sh +#--------------------------------------------- +# xdg-open +# +# Utility script to open a URL in the registered default application. +# +# Refer to the usage() function below for usage. +# +# Copyright 2009-2010, Fathi Boudra +# Copyright 2009-2010, Rex Dieter +# Copyright 2006, Kevin Krammer +# Copyright 2006, Jeremy White +# +# LICENSE: +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +#--------------------------------------------- + +manualpage() +{ +cat << _MANUALPAGE +Name + + xdg-open -- opens a file or URL in the user's preferred + application + +Synopsis + + xdg-open { file | URL } + + xdg-open { --help | --manual | --version } + +Description + + xdg-open opens a file or URL in the user's preferred + application. If a URL is provided the URL will be opened in the + user's preferred web browser. If a file is provided the file + will be opened in the preferred application for files of that + type. xdg-open supports file, ftp, http and https URLs. + + xdg-open is for use inside a desktop session only. It is not + recommended to use xdg-open as root. + +Options + + --help + Show command synopsis. + + --manual + Show this manual page. + + --version + Show the xdg-utils version information. + +Exit Codes + + An exit code of 0 indicates success while a non-zero exit code + indicates failure. The following failure codes can be returned: + + 1 + Error in command line syntax. + + 2 + One of the files passed on the command line did not + exist. + + 3 + A required tool could not be found. + + 4 + The action failed. + +See Also + + xdg-mime(1), xdg-settings(1), MIME applications associations + specification + +Examples + +xdg-open 'http://www.freedesktop.org/' + + Opens the freedesktop.org website in the user's default + browser. + +xdg-open /tmp/foobar.png + + Opens the PNG image file /tmp/foobar.png in the user's default + image viewing application. +_MANUALPAGE +} + +usage() +{ +cat << _USAGE + xdg-open -- opens a file or URL in the user's preferred + application + +Synopsis + + xdg-open { file | URL } + + xdg-open { --help | --manual | --version } + +_USAGE +} + +#@xdg-utils-common@ + +#---------------------------------------------------------------------------- +# Common utility functions included in all XDG wrapper scripts +#---------------------------------------------------------------------------- + +DEBUG() +{ + [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; + [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; + shift + echo "$@" >&2 +} + +# This handles backslashes but not quote marks. +first_word() +{ + read first rest + echo "$first" +} + +#------------------------------------------------------------- +# map a binary to a .desktop file +binary_to_desktop_file() +{ + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + binary="`which "$1"`" + binary="`readlink -f "$binary"`" + base="`basename "$binary"`" + IFS=: + for dir in $search; do + unset IFS + [ "$dir" ] || continue + [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue + for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do + [ -r "$file" ] || continue + # Check to make sure it's worth the processing. + grep -q "^Exec.*$base" "$file" || continue + # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop"). + grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue + command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" + command="`which "$command"`" + if [ x"`readlink -f "$command"`" = x"$binary" ]; then + # Fix any double slashes that got added path composition + echo "$file" | sed -e 's,//*,/,g' + return + fi + done + done +} + +#------------------------------------------------------------- +# map a .desktop file to a binary +desktop_file_to_binary() +{ + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + desktop="`basename "$1"`" + IFS=: + for dir in $search; do + unset IFS + [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue + # Check if desktop file contains - + if [ "${desktop#*-}" != "$desktop" ]; then + vendor=${desktop%-*} + app=${desktop#*-} + if [ -r $dir/applications/$vendor/$app ]; then + file_path=$dir/applications/$vendor/$app + elif [ -r $dir/applnk/$vendor/$app ]; then + file_path=$dir/applnk/$vendor/$app + fi + fi + if test -z "$file_path" ; then + for indir in "$dir"/applications/ "$dir"/applications/*/ "$dir"/applnk/ "$dir"/applnk/*/; do + file="$indir/$desktop" + if [ -r "$file" ]; then + file_path=$file + break + fi + done + fi + if [ -r "$file_path" ]; then + # Remove any arguments (%F, %f, %U, %u, etc.). + command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`" + command="`which "$command"`" + readlink -f "$command" + return + fi + done +} + +#------------------------------------------------------------- +# Exit script on successfully completing the desired operation + +exit_success() +{ + if [ $# -gt 0 ]; then + echo "$@" + echo + fi + + exit 0 +} + + +#----------------------------------------- +# Exit script on malformed arguments, not enough arguments +# or missing required option. +# prints usage information + +exit_failure_syntax() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + echo "Try 'xdg-open --help' for more information." >&2 + else + usage + echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." + fi + + exit 1 +} + +#------------------------------------------------------------- +# Exit script on missing file specified on command line + +exit_failure_file_missing() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 2 +} + +#------------------------------------------------------------- +# Exit script on failure to locate necessary tool applications + +exit_failure_operation_impossible() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 3 +} + +#------------------------------------------------------------- +# Exit script on failure returned by a tool application + +exit_failure_operation_failed() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 4 +} + +#------------------------------------------------------------ +# Exit script on insufficient permission to read a specified file + +exit_failure_file_permission_read() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 5 +} + +#------------------------------------------------------------ +# Exit script on insufficient permission to write a specified file + +exit_failure_file_permission_write() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 6 +} + +check_input_file() +{ + if [ ! -e "$1" ]; then + exit_failure_file_missing "file '$1' does not exist" + fi + if [ ! -r "$1" ]; then + exit_failure_file_permission_read "no permission to read file '$1'" + fi +} + +check_vendor_prefix() +{ + file_label="$2" + [ -n "$file_label" ] || file_label="filename" + file=`basename "$1"` + case "$file" in + [[:alpha:]]*-*) + return + ;; + esac + + echo "xdg-open: $file_label '$file' does not have a proper vendor prefix" >&2 + echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2 + echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2 + echo "Use --novendor to override or 'xdg-open --manual' for additional info." >&2 + exit 1 +} + +check_output_file() +{ + # if the file exists, check if it is writeable + # if it does not exists, check if we are allowed to write on the directory + if [ -e "$1" ]; then + if [ ! -w "$1" ]; then + exit_failure_file_permission_write "no permission to write to file '$1'" + fi + else + DIR=`dirname "$1"` + if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then + exit_failure_file_permission_write "no permission to create file '$1'" + fi + fi +} + +#---------------------------------------- +# Checks for shared commands, e.g. --help + +check_common_commands() +{ + while [ $# -gt 0 ] ; do + parm="$1" + shift + + case "$parm" in + --help) + usage + echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." + exit_success + ;; + + --manual) + manualpage + exit_success + ;; + + --version) + echo "xdg-open 1.1.3" + exit_success + ;; + esac + done +} + +check_common_commands "$@" + +[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL; +if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then + # Be silent + xdg_redirect_output=" > /dev/null 2> /dev/null" +else + # All output to stderr + xdg_redirect_output=" >&2" +fi + +#-------------------------------------- +# Checks for known desktop environments +# set variable DE to the desktop environments name, lowercase + +detectDE() +{ + # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 + unset GREP_OPTIONS + + if [ -n "${XDG_CURRENT_DESKTOP}" ]; then + case "${XDG_CURRENT_DESKTOP}" in + # only recently added to menu-spec, pre-spec X- still in use + Cinnamon|X-Cinnamon) + DE=cinnamon; + ;; + ENLIGHTENMENT) + DE=enlightenment; + ;; + # GNOME, GNOME-Classic:GNOME, or GNOME-Flashback:GNOME + GNOME*) + DE=gnome; + ;; + KDE) + DE=kde; + ;; + # Deepin Desktop Environments + DEEPIN|Deepin|deepin) + DE=dde; + ;; + LXDE) + DE=lxde; + ;; + LXQt) + DE=lxqt; + ;; + MATE) + DE=mate; + ;; + XFCE) + DE=xfce + ;; + X-Generic) + DE=generic + ;; + esac + fi + + if [ x"$DE" = x"" ]; then + # classic fallbacks + if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; + elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; + elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate; + elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; + elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; + elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce + elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; + elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=lxqt; + fi + fi + + if [ x"$DE" = x"" ]; then + # fallback to checking $DESKTOP_SESSION + case "$DESKTOP_SESSION" in + gnome) + DE=gnome; + ;; + LXDE|Lubuntu) + DE=lxde; + ;; + MATE) + DE=mate; + ;; + xfce|xfce4|'Xfce Session') + DE=xfce; + ;; + esac + fi + + if [ x"$DE" = x"" ]; then + # fallback to uname output for other platforms + case "$(uname 2>/dev/null)" in + CYGWIN*) + DE=cygwin; + ;; + Darwin) + DE=darwin; + ;; + esac + fi + + if [ x"$DE" = x"gnome" ]; then + # gnome-default-applications-properties is only available in GNOME 2.x + # but not in GNOME 3.x + which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3" + fi + + if [ -f "$XDG_RUNTIME_DIR/flatpak-info" ]; then + DE="flatpak" + fi +} + +#---------------------------------------------------------------------------- +# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 +# It also always returns 1 in KDE 3.4 and earlier +# Simply return 0 in such case + +kfmclient_fix_exit_code() +{ + version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` + major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` + minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` + release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` + test "$major" -gt 3 && return $1 + test "$minor" -gt 5 && return $1 + test "$release" -gt 4 && return $1 + return 0 +} + +#---------------------------------------------------------------------------- +# Returns true if there is a graphical display attached. + +has_display() +{ + if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then + return 0 + else + return 1 + fi +} + +# This handles backslashes but not quote marks. +last_word() +{ + read first rest + echo "$rest" +} + +# Get the value of a key in a desktop file's Desktop Entry group. +# Example: Use get_key foo.desktop Exec +# to get the values of the Exec= key for the Desktop Entry group. +get_key() +{ + local file="${1}" + local key="${2}" + local desktop_entry="" + + IFS_="${IFS}" + IFS="" + while read line + do + case "$line" in + "[Desktop Entry]") + desktop_entry="y" + ;; + # Reset match flag for other groups + "["*) + desktop_entry="" + ;; + "${key}="*) + # Only match Desktop Entry group + if [ -n "${desktop_entry}" ] + then + echo "${line}" | cut -d= -f 2- + fi + esac + done < "${file}" + IFS="${IFS_}" +} + +# Returns true if argument is a file:// URL or path +is_file_url_or_path() +{ + if echo "$1" | grep -q '^file://' \ + || ! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:'; then + return 0 + else + return 1 + fi +} + +# If argument is a file URL, convert it to a (percent-decoded) path. +# If not, leave it as it is. +file_url_to_path() +{ + local file="$1" + if echo "$file" | grep -q '^file:///'; then + file=${file#file://} + file=${file%%#*} + file=$(echo "$file" | sed -r 's/\?.*$//') + local printf=printf + if [ -x /usr/bin/printf ]; then + printf=/usr/bin/printf + fi + file=$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')") + fi + echo "$file" +} + +open_cygwin() +{ + cygstart "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_darwin() +{ + open "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_kde() +{ + if [ -n "${KDE_SESSION_VERSION}" ]; then + case "${KDE_SESSION_VERSION}" in + 4) + kde-open "$1" + ;; + 5) + kde-open${KDE_SESSION_VERSION} "$1" + ;; + esac + else + kfmclient exec "$1" + kfmclient_fix_exit_code $? + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_dde() +{ + if dde-open -version >/dev/null 2>&1; then + dde-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_gnome3() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_gnome() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + elif gnome-open --help 2>/dev/null 1>&2; then + gnome-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_mate() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + elif mate-open --help 2>/dev/null 1>&2; then + mate-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_xfce() +{ + if exo-open --help 2>/dev/null 1>&2; then + exo-open "$1" + elif gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_enlightenment() +{ + if enlightenment_open --help 2>/dev/null 1>&2; then + enlightenment_open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_flatpak() +{ + gdbus call --session \ + --dest org.freedesktop.portal.Desktop \ + --object-path /org/freedesktop/portal/desktop \ + --method org.freedesktop.portal.OpenURI.OpenURI \ + "" "$1" {} + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +#----------------------------------------- +# Recursively search .desktop file + +search_desktop_file() +{ + local default="$1" + local dir="$2" + local target="$3" + + local file="" + # look for both vendor-app.desktop, vendor/app.desktop + if [ -r "$dir/$default" ]; then + file="$dir/$default" + elif [ -r "$dir/`echo $default | sed -e 's|-|/|'`" ]; then + file="$dir/`echo $default | sed -e 's|-|/|'`" + fi + + if [ -r "$file" ] ; then + command="$(get_key "${file}" "Exec" | first_word)" + command_exec=`which $command 2>/dev/null` + icon="$(get_key "${file}" "Icon")" + # FIXME: Actually LC_MESSAGES should be used as described in + # http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html + localised_name="$(get_key "${file}" "Name")" + set -- $(get_key "${file}" "Exec" | last_word) + # We need to replace any occurrence of "%f", "%F" and + # the like by the target file. We examine each + # argument and append the modified argument to the + # end then shift. + local args=$# + local replaced=0 + while [ $args -gt 0 ]; do + case $1 in + %[c]) + replaced=1 + arg="${localised_name}" + shift + set -- "$@" "$arg" + ;; + %[fFuU]) + replaced=1 + arg="$target" + shift + set -- "$@" "$arg" + ;; + %[i]) + replaced=1 + shift + set -- "$@" "--icon" "$icon" + ;; + *) + arg="$1" + shift + set -- "$@" "$arg" + ;; + esac + args=$(( $args - 1 )) + done + [ $replaced -eq 1 ] || set -- "$@" "$target" + "$command_exec" "$@" + + if [ $? -eq 0 ]; then + exit_success + fi + fi + + for d in $dir/*/; do + [ -d "$d" ] && search_desktop_file "$default" "$d" "$target" + done +} + + +open_generic_xdg_mime() +{ + filetype="$2" + default=`xdg-mime query default "$filetype"` + if [ -n "$default" ] ; then + xdg_user_dir="$XDG_DATA_HOME" + [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" + + xdg_system_dirs="$XDG_DATA_DIRS" + [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/ + +DEBUG 3 "$xdg_user_dir:$xdg_system_dirs" + for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do + search_desktop_file "$default" "$x/applications/" "$1" + done + fi +} + +open_generic_xdg_file_mime() +{ + filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"` + open_generic_xdg_mime "$1" "$filetype" +} + +open_generic_xdg_x_scheme_handler() +{ + scheme="`echo $1 | sed -n 's/\(^[[:alnum:]+\.-]*\):.*$/\1/p'`" + if [ -n $scheme ]; then + filetype="x-scheme-handler/$scheme" + open_generic_xdg_mime "$1" "$filetype" + fi +} + +has_single_argument() +{ + test $# = 1 +} + +open_envvar() +{ + local oldifs="$IFS" + local browser browser_with_arg + + IFS=":" + for browser in $BROWSER; do + IFS="$oldifs" + + if [ -z "$browser" ]; then + continue + fi + + if echo "$browser" | grep -q %s; then + # Avoid argument injection. + # See https://bugs.freedesktop.org/show_bug.cgi?id=103807 + # URIs don't have IFS characters spaces anyway. + has_single_argument $1 && $(printf "$browser" "$1") + else + $browser "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + fi + done +} + +open_generic() +{ + if is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + check_input_file "$file" + + if has_display; then + filetype=`xdg-mime query filetype "$file" | sed "s/;.*//"` + open_generic_xdg_mime "$file" "$filetype" + fi + + if which run-mailcap 2>/dev/null 1>&2; then + run-mailcap --action=view "$file" + if [ $? -eq 0 ]; then + exit_success + fi + fi + + if has_display && mimeopen -v 2>/dev/null 1>&2; then + mimeopen -L -n "$file" + if [ $? -eq 0 ]; then + exit_success + fi + fi + fi + + if has_display; then + open_generic_xdg_x_scheme_handler "$1" + fi + + if [ -n "$BROWSER" ]; then + open_envvar "$1" + fi + + # if BROWSER variable is not set, check some well known browsers instead + if [ x"$BROWSER" = x"" ]; then + BROWSER=www-browser:links2:elinks:links:lynx:w3m + if has_display; then + BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:$BROWSER + fi + fi + + open_envvar "$1" + + exit_failure_operation_impossible "no method available for opening '$1'" +} + +open_lxde() +{ + + # pcmanfm only knows how to handle file:// urls and filepaths, it seems. + if pcmanfm --help >/dev/null 2>&1 && is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + # handle relative paths + if ! echo "$file" | grep -q ^/; then + file="$(pwd)/$file" + fi + + pcmanfm "$file" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_lxqt() +{ + open_generic "$1" +} + +[ x"$1" != x"" ] || exit_failure_syntax + +url= +while [ $# -gt 0 ] ; do + parm="$1" + shift + + case "$parm" in + -*) + exit_failure_syntax "unexpected option '$parm'" + ;; + + *) + if [ -n "$url" ] ; then + exit_failure_syntax "unexpected argument '$parm'" + fi + url="$parm" + ;; + esac +done + +if [ -z "${url}" ] ; then + exit_failure_syntax "file or URL argument missing" +fi + +detectDE + +if [ x"$DE" = x"" ]; then + DE=generic +fi + +DEBUG 2 "Selected DE $DE" + +# sanitize BROWSER (avoid caling ourselves in particular) +case "${BROWSER}" in + *:"xdg-open"|"xdg-open":*) + BROWSER=$(echo $BROWSER | sed -e 's|:xdg-open||g' -e 's|xdg-open:||g') + ;; + "xdg-open") + BROWSER= + ;; +esac + +case "$DE" in + kde) + open_kde "$url" + ;; + + dde) + open_dde "$url" + ;; + + gnome3|cinnamon) + open_gnome3 "$url" + ;; + + gnome) + open_gnome "$url" + ;; + + mate) + open_mate "$url" + ;; + + xfce) + open_xfce "$url" + ;; + + lxde) + open_lxde "$url" + ;; + + lxqt) + open_lxqt "$url" + ;; + + enlightenment) + open_enlightenment "$url" + ;; + + cygwin) + open_cygwin "$url" + ;; + + darwin) + open_darwin "$url" + ;; + + flatpak) + open_flatpak "$url" + ;; + + generic) + open_generic "$url" + ;; + + *) + exit_failure_operation_impossible "no method available for opening '$url'" + ;; +esac diff --git a/node_modules/os-locale/index.js b/node_modules/os-locale/index.js new file mode 100644 index 0000000..1ada7a4 --- /dev/null +++ b/node_modules/os-locale/index.js @@ -0,0 +1,101 @@ +'use strict'; +const execa = require('execa'); +const lcid = require('lcid'); +const mem = require('mem'); + +const defaultOpts = {spawn: true}; +const defaultLocale = 'en_US'; + +function getEnvLocale(env) { + env = env || process.env; + return env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE; +} + +function parseLocale(x) { + const env = x.split('\n').reduce((env, def) => { + def = def.split('='); + env[def[0]] = def[1].replace(/^"|"$/g, ''); + return env; + }, {}); + return getEnvLocale(env); +} + +function getLocale(str) { + return (str && str.replace(/[.:].*/, '')); +} + +function getAppleLocale() { + return execa.stdout('defaults', ['read', '-g', 'AppleLocale']); +} + +function getAppleLocaleSync() { + return execa.sync('defaults', ['read', '-g', 'AppleLocale']).stdout; +} + +function getUnixLocale() { + if (process.platform === 'darwin') { + return getAppleLocale(); + } + + return execa.stdout('locale') + .then(stdout => getLocale(parseLocale(stdout))); +} + +function getUnixLocaleSync() { + if (process.platform === 'darwin') { + return getAppleLocaleSync(); + } + + return getLocale(parseLocale(execa.sync('locale').stdout)); +} + +function getWinLocale() { + return execa.stdout('wmic', ['os', 'get', 'locale']) + .then(stdout => { + const lcidCode = parseInt(stdout.replace('Locale', ''), 16); + return lcid.from(lcidCode); + }); +} + +function getWinLocaleSync() { + const stdout = execa.sync('wmic', ['os', 'get', 'locale']).stdout; + const lcidCode = parseInt(stdout.replace('Locale', ''), 16); + return lcid.from(lcidCode); +} + +module.exports = mem(opts => { + opts = opts || defaultOpts; + const envLocale = getEnvLocale(); + let thenable; + + if (envLocale || opts.spawn === false) { + thenable = Promise.resolve(getLocale(envLocale)); + } else if (process.platform === 'win32') { + thenable = getWinLocale(); + } else { + thenable = getUnixLocale(); + } + + return thenable.then(locale => locale || defaultLocale) + .catch(() => defaultLocale); +}); + +module.exports.sync = mem(opts => { + opts = opts || defaultOpts; + const envLocale = getEnvLocale(); + let res; + + if (envLocale || opts.spawn === false) { + res = getLocale(envLocale); + } else { + try { + if (process.platform === 'win32') { + res = getWinLocaleSync(); + } else { + res = getUnixLocaleSync(); + } + } catch (err) {} + } + + return res || defaultLocale; +}); diff --git a/node_modules/os-locale/license b/node_modules/os-locale/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/os-locale/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/os-locale/package.json b/node_modules/os-locale/package.json new file mode 100644 index 0000000..bddd01b --- /dev/null +++ b/node_modules/os-locale/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + "os-locale@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "os-locale@>=2.0.0 <3.0.0", + "_id": "os-locale@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/os-locale", + "_nodeVersion": "8.0.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/os-locale-2.1.0.tgz_1500667149329_0.6210105223581195" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "5.0.0", + "_phantomChildren": {}, + "_requested": { + "name": "os-locale", + "raw": "os-locale@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "_shasum": "42bc2900a6b5b8bd17376c8e882b65afccf24bf2", + "_shrinkwrap": null, + "_spec": "os-locale@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-locale/issues" + }, + "dependencies": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + }, + "description": "Get the system locale", + "devDependencies": { + "ava": "*", + "import-fresh": "^2.0.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "shasum": "42bc2900a6b5b8bd17376c8e882b65afccf24bf2", + "tarball": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "7322d9e8db79bbf153906e6b2870832893f5e1e5", + "homepage": "https://github.com/sindresorhus/os-locale#readme", + "keywords": [ + "country", + "id", + "identifier", + "lang", + "language", + "locale", + "os", + "region", + "str", + "string", + "system", + "user" + ], + "license": "MIT", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + }, + { + "name": "nexdrew", + "email": "andrew@npmjs.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-locale", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-locale.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0" +} diff --git a/node_modules/os-locale/readme.md b/node_modules/os-locale/readme.md new file mode 100644 index 0000000..7c80d33 --- /dev/null +++ b/node_modules/os-locale/readme.md @@ -0,0 +1,53 @@ +# os-locale [![Build Status](https://travis-ci.org/sindresorhus/os-locale.svg?branch=master)](https://travis-ci.org/sindresorhus/os-locale) + +> Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software)) + +Useful for localizing your module or app. + +POSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation. + + +## Install + +``` +$ npm install --save os-locale +``` + + +## Usage + +```js +const osLocale = require('os-locale'); + +osLocale().then(locale => { + console.log(locale); + //=> 'en_US' +}); +``` + + +## API + +### osLocale([options]) + +Returns a `Promise` for the locale. + +### osLocale.sync([options]) + +Returns the locale. + +#### options + +Type: `Object` + +##### spawn + +Type: `boolean`
+Default: `true` + +Set to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-finally/index.js b/node_modules/p-finally/index.js new file mode 100644 index 0000000..52b7b49 --- /dev/null +++ b/node_modules/p-finally/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = (promise, onFinally) => { + onFinally = onFinally || (() => {}); + + return promise.then( + val => new Promise(resolve => { + resolve(onFinally()); + }).then(() => val), + err => new Promise(resolve => { + resolve(onFinally()); + }).then(() => { + throw err; + }) + ); +}; diff --git a/node_modules/p-finally/license b/node_modules/p-finally/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/p-finally/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/p-finally/package.json b/node_modules/p-finally/package.json new file mode 100644 index 0000000..a514f1c --- /dev/null +++ b/node_modules/p-finally/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + "p-finally@^1.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa" + ] + ], + "_from": "p-finally@>=1.0.0 <2.0.0", + "_id": "p-finally@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/p-finally", + "_nodeVersion": "4.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/p-finally-1.0.0.tgz_1477029729610_0.2481102051679045" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "name": "p-finally", + "raw": "p-finally@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "_shasum": "3fbcfb15b899a44123b34b6dcc18b724336a2cae", + "_shrinkwrap": null, + "_spec": "p-finally@^1.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-finally/issues" + }, + "dependencies": {}, + "description": "`Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "3fbcfb15b899a44123b34b6dcc18b724336a2cae", + "tarball": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "9cfdd5dccb41995300916c17ab0fab784800f4d3", + "homepage": "https://github.com/sindresorhus/p-finally#readme", + "keywords": [ + "async", + "await", + "bluebird", + "finally", + "function", + "handler", + "polyfill", + "ponyfill", + "promise", + "promises", + "settled", + "shim" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "p-finally", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-finally.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/p-finally/readme.md b/node_modules/p-finally/readme.md new file mode 100644 index 0000000..09ef364 --- /dev/null +++ b/node_modules/p-finally/readme.md @@ -0,0 +1,47 @@ +# p-finally [![Build Status](https://travis-ci.org/sindresorhus/p-finally.svg?branch=master)](https://travis-ci.org/sindresorhus/p-finally) + +> [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome + +Useful for cleanup. + + +## Install + +``` +$ npm install --save p-finally +``` + + +## Usage + +```js +const pFinally = require('p-finally'); + +const dir = createTempDir(); + +pFinally(write(dir), () => cleanup(dir)); +``` + + +## API + +### pFinally(promise, [onFinally]) + +Returns a `Promise`. + +#### onFinally + +Type: `Function` + +Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason. + + +## Related + +- [p-try](https://github.com/sindresorhus/p-try) - `Promise#try()` ponyfill - Starts a promise chain +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-limit/index.js b/node_modules/p-limit/index.js new file mode 100644 index 0000000..873f0e7 --- /dev/null +++ b/node_modules/p-limit/index.js @@ -0,0 +1,42 @@ +'use strict'; +const pTry = require('p-try'); + +module.exports = concurrency => { + if (concurrency < 1) { + throw new TypeError('Expected `concurrency` to be a number from 1 and up'); + } + + const queue = []; + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.length > 0) { + queue.shift()(); + } + }; + + return fn => new Promise((resolve, reject) => { + const run = () => { + activeCount++; + + pTry(fn).then( + val => { + resolve(val); + next(); + }, + err => { + reject(err); + next(); + } + ); + }; + + if (activeCount < concurrency) { + run(); + } else { + queue.push(run); + } + }); +}; diff --git a/node_modules/p-limit/license b/node_modules/p-limit/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/p-limit/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/p-limit/package.json b/node_modules/p-limit/package.json new file mode 100644 index 0000000..538b9b1 --- /dev/null +++ b/node_modules/p-limit/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + "p-limit@^1.1.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/p-locate" + ] + ], + "_from": "p-limit@>=1.1.0 <2.0.0", + "_hasShrinkwrap": false, + "_id": "p-limit@1.3.0", + "_inCache": true, + "_installable": true, + "_location": "/p-limit", + "_nodeVersion": "8.11.2", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/p-limit_1.3.0_1528300898695_0.9429035390514915" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "6.1.0", + "_phantomChildren": {}, + "_requested": { + "name": "p-limit", + "raw": "p-limit@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/p-locate" + ], + "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "_shasum": "b86bd5f0c25690911c7590fcbfc2010d54b3ccb8", + "_shrinkwrap": null, + "_spec": "p-limit@^1.1.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/p-locate", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-limit/issues" + }, + "dependencies": { + "p-try": "^1.0.0" + }, + "description": "Run multiple promise-returning & async functions with limited concurrency", + "devDependencies": { + "ava": "*", + "delay": "^2.0.0", + "in-range": "^1.0.0", + "random-int": "^1.0.0", + "time-span": "^2.0.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "fileCount": 4, + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGAVjCRA9TVsSAnZWagAA8tgP/1ybyg51ZIGk4PPoB+Ku\nJom0mpGjv3UTxa6C6wUeakkszs9k2vCGCueUvOnNdVg7675D7MdUmRKE7P1+\nCrnJ0YeVkdfajWlWkEA9+nNMEONBDWvOtPYpXa/DYFV19XVxVTdmN/VSTIeQ\nJ+SEMV0R9s4LvLz4o4ua0HgdRVyDTrX3rf4HDJfWkHINF7/Vggr72XuKoB3/\nyciRX51Wn5fWEkMpbmXAq0K5QrI+nKWRZ7S1HMsW22AEaoUHnjUNfwn6sQah\nPLNpp00mi4QDQXoT9RGC51D3acVs4sUS9VJUiRtt4DvaVv6eJF4z3R2iZDlI\nhKQI2cItT8AS7Wf3gTHmeZKsAZ9WOjxBF+N6lVB1BBNiWHHqKbpiG8Hd6j01\nK6cOeN1l3dZw9an/tsHvB6DqZ09s3MSzZc48fRhYiJD11Doj1wwIGUAaY1ht\nNjodGrQGZD16aQXMSQxwC3VSoX+8PHKv6A+OHWEEBKHLuB+OTJ7L71Hp4ner\npfnZOxMiGtg1nNVd2nOdMaf7MAoRQsklUb0Zy1qvb6E/wcO/VuTU9nU4WZXw\nnV1FYtLowrp7ThA7zOWdCPgKPsSTfy+L6kfrMcseMdE8WO9FtdgjhSVWuxNo\n0YV9PwTxK5axwNrcJS/YFMLsUk7knkf7Y7xv0K4SMyXXFZr+ZouGnny8Vzj/\njd1T\r\n=Msum\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "b86bd5f0c25690911c7590fcbfc2010d54b3ccb8", + "tarball": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "unpackedSize": 3963 + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "cf076d73844ebbfda8ae4e184fc436396998ecb2", + "homepage": "https://github.com/sindresorhus/p-limit#readme", + "keywords": [ + "async", + "await", + "batch", + "bluebird", + "concurrency", + "limit", + "limited", + "promise", + "promises", + "queue", + "rate", + "ratelimit", + "task", + "throat", + "throttle" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "p-limit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-limit.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.3.0" +} diff --git a/node_modules/p-limit/readme.md b/node_modules/p-limit/readme.md new file mode 100644 index 0000000..9012992 --- /dev/null +++ b/node_modules/p-limit/readme.md @@ -0,0 +1,69 @@ +# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) + +> Run multiple promise-returning & async functions with limited concurrency + + +## Install + +``` +$ npm install p-limit +``` + + +## Usage + +```js +const pLimit = require('p-limit'); + +const limit = pLimit(1); + +const input = [ + limit(() => fetchSomething('foo')), + limit(() => fetchSomething('bar')), + limit(() => doSomething()) +]; + +(async () => { + // Only one promise is run at once + const result = await Promise.all(input); + console.log(result); +})(); +``` + + +## API + +### pLimit(concurrency) + +Returns a `limit` function. + +#### concurrency + +Type: `number`
+Minimum: `1` + +Concurrency limit. + +### limit(fn) + +Returns the promise returned by calling `fn`. + +#### fn + +Type: `Function` + +Promise-returning/async function. + + +## Related + +- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control +- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions +- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions +- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-locate/index.js b/node_modules/p-locate/index.js new file mode 100644 index 0000000..7461d66 --- /dev/null +++ b/node_modules/p-locate/index.js @@ -0,0 +1,31 @@ +'use strict'; +const pLimit = require('p-limit'); + +class EndError extends Error { + constructor(value) { + super(); + this.value = value; + } +} + +// the input can also be a promise, so we `Promise.all()` them both +const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); + +module.exports = (iterable, tester, opts) => { + opts = Object.assign({ + concurrency: Infinity, + preserveOrder: true + }, opts); + + const limit = pLimit(opts.concurrency); + + // start all the promises concurrently with optional limit + const items = Array.from(iterable).map(el => [el, limit(() => Promise.resolve(el).then(tester))]); + + // check the promises either serially or concurrently + const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); + + return Promise.all(items.map(el => checkLimit(() => finder(el)))) + .then(() => {}) + .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); +}; diff --git a/node_modules/p-locate/license b/node_modules/p-locate/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/p-locate/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/p-locate/package.json b/node_modules/p-locate/package.json new file mode 100644 index 0000000..ba83ced --- /dev/null +++ b/node_modules/p-locate/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + "p-locate@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/locate-path" + ] + ], + "_from": "p-locate@>=2.0.0 <3.0.0", + "_id": "p-locate@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/p-locate", + "_nodeVersion": "7.2.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/p-locate-2.0.0.tgz_1480310721089_0.044998719124123454" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "name": "p-locate", + "raw": "p-locate@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/locate-path" + ], + "_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "_shasum": "20a0103b222a70c8fd39cc2e580680f3dde5ec43", + "_shrinkwrap": null, + "_spec": "p-locate@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/locate-path", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-locate/issues" + }, + "dependencies": { + "p-limit": "^1.1.0" + }, + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "devDependencies": { + "ava": "*", + "delay": "^1.3.1", + "in-range": "^1.0.0", + "time-span": "^1.0.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "20a0103b222a70c8fd39cc2e580680f3dde5ec43", + "tarball": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "6300abb6451f04bbaa760f42844ec1c501d79120", + "homepage": "https://github.com/sindresorhus/p-locate#readme", + "keywords": [ + "array", + "async", + "await", + "bluebird", + "collection", + "fastest", + "find", + "finder", + "fulfilled", + "iterable", + "iterator", + "locate", + "promise", + "promises", + "race", + "search", + "searcher", + "test" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "p-locate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-locate.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/p-locate/readme.md b/node_modules/p-locate/readme.md new file mode 100644 index 0000000..68b96a4 --- /dev/null +++ b/node_modules/p-locate/readme.md @@ -0,0 +1,86 @@ +# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) + +> Get the first fulfilled promise that satisfies the provided testing function + +Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). + + +## Install + +``` +$ npm install --save p-locate +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // only this one actually exists on disk + 'pony.png' +]; + +pLocate(files, file => pathExists(file)).then(foundPath => { + console.log(foundPath); + //=> 'rainbow' +}); +``` + +*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* + + +## API + +### pLocate(input, tester, [options]) + +Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + +#### input + +Type: `Iterable` + +#### tester(element) + +Type: `Function` + +Expected to return a `Promise` or boolean. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises returned by `tester`. + +##### preserveOrder + +Type: `boolean`
+Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + + +## Related + +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently +- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-try/index.js b/node_modules/p-try/index.js new file mode 100644 index 0000000..efa2f74 --- /dev/null +++ b/node_modules/p-try/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = cb => new Promise(resolve => { + resolve(cb()); +}); diff --git a/node_modules/p-try/license b/node_modules/p-try/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/p-try/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/p-try/package.json b/node_modules/p-try/package.json new file mode 100644 index 0000000..5711f5d --- /dev/null +++ b/node_modules/p-try/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + "p-try@^1.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/p-limit" + ] + ], + "_from": "p-try@>=1.0.0 <2.0.0", + "_id": "p-try@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/p-try", + "_nodeVersion": "4.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/p-try-1.0.0.tgz_1477030603238_0.5670752932783216" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "name": "p-try", + "raw": "p-try@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/p-limit" + ], + "_resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "_shasum": "cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3", + "_shrinkwrap": null, + "_spec": "p-try@^1.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/p-limit", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-try/issues" + }, + "dependencies": {}, + "description": "`Promise#try()` ponyfill - Starts a promise chain", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3", + "tarball": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "8a6f2c232b80e12c138714e553fc8dd6313604c2", + "homepage": "https://github.com/sindresorhus/p-try#readme", + "keywords": [ + "async", + "await", + "bluebird", + "catch", + "function", + "polyfill", + "ponyfill", + "promise", + "promises", + "resolve", + "settled", + "shim", + "try" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "p-try", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-try.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/p-try/readme.md b/node_modules/p-try/readme.md new file mode 100644 index 0000000..8e5fddd --- /dev/null +++ b/node_modules/p-try/readme.md @@ -0,0 +1,38 @@ +# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) + +> [`Promise#try()`](https://github.com/ljharb/proposal-promise-try) [ponyfill](https://ponyfill.com) - Starts a promise chain + +[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) + + +## Install + +``` +$ npm install --save p-try +``` + + +## Usage + +```js +const pTry = require('p-try'); + +pTry(() => { + return synchronousFunctionThatMightThrow(); +}).then(value => { + console.log(value); +}).catch(error => { + console.error(error); +}); +``` + + +## Related + +- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-key/index.js b/node_modules/path-key/index.js new file mode 100644 index 0000000..62c8250 --- /dev/null +++ b/node_modules/path-key/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = opts => { + opts = opts || {}; + + const env = opts.env || process.env; + const platform = opts.platform || process.platform; + + if (platform !== 'win32') { + return 'PATH'; + } + + return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; +}; diff --git a/node_modules/path-key/license b/node_modules/path-key/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/path-key/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/path-key/package.json b/node_modules/path-key/package.json new file mode 100644 index 0000000..8061ec8 --- /dev/null +++ b/node_modules/path-key/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + "path-key@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/npm-run-path" + ] + ], + "_from": "path-key@>=2.0.0 <3.0.0", + "_id": "path-key@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/path-key", + "_nodeVersion": "4.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/path-key-2.0.1.tgz_1474887352898_0.8162120468914509" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "name": "path-key", + "raw": "path-key@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npm-run-path" + ], + "_resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "_shasum": "411cadb574c5a140d3a4b1910d40d80cc9f40b40", + "_shrinkwrap": null, + "_spec": "path-key@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/npm-run-path", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/path-key/issues" + }, + "dependencies": {}, + "description": "Get the PATH environment variable key cross-platform", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "411cadb574c5a140d3a4b1910d40d80cc9f40b40", + "tarball": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "d60207f9ab9dc9e60d49c87faacf415a4946287c", + "homepage": "https://github.com/sindresorhus/path-key#readme", + "keywords": [ + "cross-platform", + "env", + "environment", + "get", + "key", + "path", + "var", + "variable", + "windows" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "path-key", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-key.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.1", + "xo": { + "esnext": true + } +} diff --git a/node_modules/path-key/readme.md b/node_modules/path-key/readme.md new file mode 100644 index 0000000..cb5710a --- /dev/null +++ b/node_modules/path-key/readme.md @@ -0,0 +1,51 @@ +# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key) + +> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform + +It's usually `PATH`, but on Windows it can be any casing like `Path`... + + +## Install + +``` +$ npm install --save path-key +``` + + +## Usage + +```js +const pathKey = require('path-key'); + +const key = pathKey(); +//=> 'PATH' + +const PATH = process.env[key]; +//=> '/usr/local/bin:/usr/bin:/bin' +``` + + +## API + +### pathKey([options]) + +#### options + +##### env + +Type: `Object`
+Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env) + +Use a custom environment variables object. + +#### platform + +Type: `string`
+Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform) + +Get the PATH key for a specific platform. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pseudomap/LICENSE b/node_modules/pseudomap/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/pseudomap/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pseudomap/README.md b/node_modules/pseudomap/README.md new file mode 100644 index 0000000..778bf01 --- /dev/null +++ b/node_modules/pseudomap/README.md @@ -0,0 +1,60 @@ +# pseudomap + +A thing that is a lot like ES6 `Map`, but without iterators, for use +in environments where `for..of` syntax and `Map` are not available. + +If you need iterators, or just in general a more faithful polyfill to +ES6 Maps, check out [es6-map](http://npm.im/es6-map). + +If you are in an environment where `Map` is supported, then that will +be returned instead, unless `process.env.TEST_PSEUDOMAP` is set. + +You can use any value as keys, and any value as data. Setting again +with the identical key will overwrite the previous value. + +Internally, data is stored on an `Object.create(null)` style object. +The key is coerced to a string to generate the key on the internal +data-bag object. The original key used is stored along with the data. + +In the event of a stringified-key collision, a new key is generated by +appending an increasing number to the stringified-key until finding +either the intended key or an empty spot. + +Note that because object traversal order of plain objects is not +guaranteed to be identical to insertion order, the insertion order +guarantee of `Map.prototype.forEach` is not guaranteed in this +implementation. However, in all versions of Node.js and V8 where this +module works, `forEach` does traverse data in insertion order. + +## API + +Most of the [Map +API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), +with the following exceptions: + +1. A `Map` object is not an iterator. +2. `values`, `keys`, and `entries` methods are not implemented, + because they return iterators. +3. The argument to the constructor can be an Array of `[key, value]` + pairs, or a `Map` or `PseudoMap` object. But, since iterators + aren't used, passing any plain-old iterator won't initialize the + map properly. + +## USAGE + +Use just like a regular ES6 Map. + +```javascript +var PseudoMap = require('pseudomap') + +// optionally provide a pseudomap, or an array of [key,value] pairs +// as the argument to initialize the map with +var myMap = new PseudoMap() + +myMap.set(1, 'number 1') +myMap.set('1', 'string 1') +var akey = {} +var bkey = {} +myMap.set(akey, { some: 'data' }) +myMap.set(bkey, { some: 'other data' }) +``` diff --git a/node_modules/pseudomap/map.js b/node_modules/pseudomap/map.js new file mode 100644 index 0000000..7db1599 --- /dev/null +++ b/node_modules/pseudomap/map.js @@ -0,0 +1,9 @@ +if (process.env.npm_package_name === 'pseudomap' && + process.env.npm_lifecycle_script === 'test') + process.env.TEST_PSEUDOMAP = 'true' + +if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map +} else { + module.exports = require('./pseudomap') +} diff --git a/node_modules/pseudomap/package.json b/node_modules/pseudomap/package.json new file mode 100644 index 0000000..967c6f8 --- /dev/null +++ b/node_modules/pseudomap/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "pseudomap@^1.0.2", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/lru-cache" + ] + ], + "_from": "pseudomap@>=1.0.2 <2.0.0", + "_id": "pseudomap@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/pseudomap", + "_nodeVersion": "4.0.0", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "name": "pseudomap", + "raw": "pseudomap@^1.0.2", + "rawSpec": "^1.0.2", + "scope": null, + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lru-cache" + ], + "_resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "_shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", + "_shrinkwrap": null, + "_spec": "pseudomap@^1.0.2", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/lru-cache", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/pseudomap/issues" + }, + "dependencies": {}, + "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", + "tarball": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz" + }, + "gitHead": "b6dc728207a0321ede6479e34506d3e0e13a940b", + "homepage": "https://github.com/isaacs/pseudomap#readme", + "license": "ISC", + "main": "map.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "pseudomap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/pseudomap.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.2" +} diff --git a/node_modules/pseudomap/pseudomap.js b/node_modules/pseudomap/pseudomap.js new file mode 100644 index 0000000..25a21d8 --- /dev/null +++ b/node_modules/pseudomap/pseudomap.js @@ -0,0 +1,113 @@ +var hasOwnProperty = Object.prototype.hasOwnProperty + +module.exports = PseudoMap + +function PseudoMap (set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'") + + this.clear() + + if (set) { + if ((set instanceof PseudoMap) || + (typeof Map === 'function' && set instanceof Map)) + set.forEach(function (value, key) { + this.set(key, value) + }, this) + else if (Array.isArray(set)) + set.forEach(function (kv) { + this.set(kv[0], kv[1]) + }, this) + else + throw new TypeError('invalid argument') + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') + fn.call(thisp, this._data[k].value, this._data[k].key) + }, this) +} + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k) +} + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k) + return res && res.value +} + +PseudoMap.prototype.set = function (k, v) { + set(this._data, k, v) +} + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k) + if (res) { + delete this._data[res._index] + this._data.size-- + } +} + +PseudoMap.prototype.clear = function () { + var data = Object.create(null) + data.size = 0 + + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }) +} + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function () { + return this._data.size + }, + set: function (n) {}, + enumerable: true, + configurable: true +}) + +PseudoMap.prototype.values = +PseudoMap.prototype.keys = +PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version') +} + +// Either identical, or both NaN +function same (a, b) { + return a === b || a !== a && b !== b +} + +function Entry (k, v, i) { + this.key = k + this.value = v + this._index = i +} + +function find (data, k) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v + return + } + } + data.size++ + data[key] = new Entry(k, v, key) +} diff --git a/node_modules/pseudomap/test/basic.js b/node_modules/pseudomap/test/basic.js new file mode 100644 index 0000000..4378e45 --- /dev/null +++ b/node_modules/pseudomap/test/basic.js @@ -0,0 +1,86 @@ +var t = require('tap') + +process.env.TEST_PSEUDOMAP = 'true' + +var PM = require('../') +runTests(PM) + +// if possible, verify that Map also behaves the same way +if (typeof Map === 'function') + runTests(Map) + + +function runTests (Map) { + t.throws(Map) + + var m = new Map() + + t.equal(m.size, 0) + + m.set(1, '1 string') + t.equal(m.get(1), '1 string') + t.equal(m.size, 1) + m.size = 1000 + t.equal(m.size, 1) + m.size = 0 + t.equal(m.size, 1) + + m = new Map([[1, 'number 1'], ['1', 'string 1']]) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + m = new Map(m) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + var akey = {} + var bkey = {} + m.set(akey, { some: 'data' }) + m.set(bkey, { some: 'other data' }) + t.same(m.get(akey), { some: 'data' }) + t.same(m.get(bkey), { some: 'other data' }) + t.equal(m.size, 4) + + var x = /x/ + var y = /x/ + m.set(x, 'x regex') + m.set(y, 'y regex') + t.equal(m.get(x), 'x regex') + m.set(x, 'x again') + t.equal(m.get(x), 'x again') + t.equal(m.size, 6) + + m.set(NaN, 'not a number') + t.equal(m.get(NaN), 'not a number') + m.set(NaN, 'it is a ' + typeof NaN) + t.equal(m.get(NaN), 'it is a number') + m.set('NaN', 'stringie nan') + t.equal(m.get(NaN), 'it is a number') + t.equal(m.get('NaN'), 'stringie nan') + t.equal(m.size, 8) + + m.delete(NaN) + t.equal(m.get(NaN), undefined) + t.equal(m.size, 7) + + var expect = [ + { value: 'number 1', key: 1 }, + { value: 'string 1', key: '1' }, + { value: { some: 'data' }, key: {} }, + { value: { some: 'other data' }, key: {} }, + { value: 'x again', key: /x/ }, + { value: 'y regex', key: /x/ }, + { value: 'stringie nan', key: 'NaN' } + ] + var actual = [] + + m.forEach(function (value, key) { + actual.push({ value: value, key: key }) + }) + t.same(actual, expect) + + m.clear() + t.equal(m.size, 0) +} diff --git a/node_modules/require-directory/.jshintrc b/node_modules/require-directory/.jshintrc new file mode 100644 index 0000000..e14e4dc --- /dev/null +++ b/node_modules/require-directory/.jshintrc @@ -0,0 +1,67 @@ +{ + "maxerr" : 50, + "bitwise" : true, + "camelcase" : true, + "curly" : true, + "eqeqeq" : true, + "forin" : true, + "immed" : true, + "indent" : 2, + "latedef" : true, + "newcap" : true, + "noarg" : true, + "noempty" : true, + "nonew" : true, + "plusplus" : true, + "quotmark" : true, + "undef" : true, + "unused" : true, + "strict" : true, + "trailing" : true, + "maxparams" : false, + "maxdepth" : false, + "maxstatements" : false, + "maxcomplexity" : false, + "maxlen" : false, + "asi" : false, + "boss" : false, + "debug" : false, + "eqnull" : true, + "es5" : false, + "esnext" : false, + "moz" : false, + "evil" : false, + "expr" : true, + "funcscope" : true, + "globalstrict" : true, + "iterator" : true, + "lastsemic" : false, + "laxbreak" : false, + "laxcomma" : false, + "loopfunc" : false, + "multistr" : false, + "proto" : false, + "scripturl" : false, + "smarttabs" : false, + "shadow" : false, + "sub" : false, + "supernew" : false, + "validthis" : false, + "browser" : true, + "couch" : false, + "devel" : true, + "dojo" : false, + "jquery" : false, + "mootools" : false, + "node" : true, + "nonstandard" : false, + "prototypejs" : false, + "rhino" : false, + "worker" : false, + "wsh" : false, + "yui" : false, + "nomen" : true, + "onevar" : true, + "passfail" : false, + "white" : true +} diff --git a/node_modules/require-directory/.npmignore b/node_modules/require-directory/.npmignore new file mode 100644 index 0000000..47cf365 --- /dev/null +++ b/node_modules/require-directory/.npmignore @@ -0,0 +1 @@ +test/** diff --git a/node_modules/require-directory/.travis.yml b/node_modules/require-directory/.travis.yml new file mode 100644 index 0000000..20fd86b --- /dev/null +++ b/node_modules/require-directory/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.10 diff --git a/node_modules/require-directory/LICENSE b/node_modules/require-directory/LICENSE new file mode 100644 index 0000000..a70f253 --- /dev/null +++ b/node_modules/require-directory/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2011 Troy Goode + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/require-directory/README.markdown b/node_modules/require-directory/README.markdown new file mode 100644 index 0000000..926a063 --- /dev/null +++ b/node_modules/require-directory/README.markdown @@ -0,0 +1,184 @@ +# require-directory + +Recursively iterates over specified directory, `require()`'ing each file, and returning a nested hash structure containing those modules. + +**[Follow me (@troygoode) on Twitter!](https://twitter.com/intent/user?screen_name=troygoode)** + +[![NPM](https://nodei.co/npm/require-directory.png?downloads=true&stars=true)](https://nodei.co/npm/require-directory/) + +[![build status](https://secure.travis-ci.org/troygoode/node-require-directory.png)](http://travis-ci.org/troygoode/node-require-directory) + +## How To Use + +### Installation (via [npm](https://npmjs.org/package/require-directory)) + +```bash +$ npm install require-directory +``` + +### Usage + +A common pattern in node.js is to include an index file which creates a hash of the files in its current directory. Given a directory structure like so: + +* app.js +* routes/ + * index.js + * home.js + * auth/ + * login.js + * logout.js + * register.js + +`routes/index.js` uses `require-directory` to build the hash (rather than doing so manually) like so: + +```javascript +var requireDirectory = require('require-directory'); +module.exports = requireDirectory(module); +``` + +`app.js` references `routes/index.js` like any other module, but it now has a hash/tree of the exports from the `./routes/` directory: + +```javascript +var routes = require('./routes'); + +// snip + +app.get('/', routes.home); +app.get('/register', routes.auth.register); +app.get('/login', routes.auth.login); +app.get('/logout', routes.auth.logout); +``` + +The `routes` variable above is the equivalent of this: + +```javascript +var routes = { + home: require('routes/home.js'), + auth: { + login: require('routes/auth/login.js'), + logout: require('routes/auth/logout.js'), + register: require('routes/auth/register.js') + } +}; +``` + +*Note that `routes.index` will be `undefined` as you would hope.* + +### Specifying Another Directory + +You can specify which directory you want to build a tree of (if it isn't the current directory for whatever reason) by passing it as the second parameter. Not specifying the path (`requireDirectory(module)`) is the equivelant of `requireDirectory(module, __dirname)`: + +```javascript +var requireDirectory = require('require-directory'); +module.exports = requireDirectory(module, './some/subdirectory'); +``` + +For example, in the [example in the Usage section](#usage) we could have avoided creating `routes/index.js` and instead changed the first lines of `app.js` to: + +```javascript +var requireDirectory = require('require-directory'); +var routes = requireDirectory(module, './routes'); +``` + +## Options + +You can pass an options hash to `require-directory` as the 2nd parameter (or 3rd if you're passing the path to another directory as the 2nd parameter already). Here are the available options: + +### Whitelisting + +Whitelisting (either via RegExp or function) allows you to specify that only certain files be loaded. + +```javascript +var requireDirectory = require('require-directory'), + whitelist = /onlyinclude.js$/, + hash = requireDirectory(module, {include: whitelist}); +``` + +```javascript +var requireDirectory = require('require-directory'), + check = function(path){ + if(/onlyinclude.js$/.test(path)){ + return true; // don't include + }else{ + return false; // go ahead and include + } + }, + hash = requireDirectory(module, {include: check}); +``` + +### Blacklisting + +Blacklisting (either via RegExp or function) allows you to specify that all but certain files should be loaded. + +```javascript +var requireDirectory = require('require-directory'), + blacklist = /dontinclude\.js$/, + hash = requireDirectory(module, {exclude: blacklist}); +``` + +```javascript +var requireDirectory = require('require-directory'), + check = function(path){ + if(/dontinclude\.js$/.test(path)){ + return false; // don't include + }else{ + return true; // go ahead and include + } + }, + hash = requireDirectory(module, {exclude: check}); +``` + +### Visiting Objects As They're Loaded + +`require-directory` takes a function as the `visit` option that will be called for each module that is added to module.exports. + +```javascript +var requireDirectory = require('require-directory'), + visitor = function(obj) { + console.log(obj); // will be called for every module that is loaded + }, + hash = requireDirectory(module, {visit: visitor}); +``` + +The visitor can also transform the objects by returning a value: + +```javascript +var requireDirectory = require('require-directory'), + visitor = function(obj) { + return obj(new Date()); + }, + hash = requireDirectory(module, {visit: visitor}); +``` + +### Renaming Keys + +```javascript +var requireDirectory = require('require-directory'), + renamer = function(name) { + return name.toUpperCase(); + }, + hash = requireDirectory(module, {rename: renamer}); +``` + +### No Recursion + +```javascript +var requireDirectory = require('require-directory'), + hash = requireDirectory(module, {recurse: false}); +``` + +## Run Unit Tests + +```bash +$ npm run lint +$ npm test +``` + +## License + +[MIT License](http://www.opensource.org/licenses/mit-license.php) + +## Author + +[Troy Goode](https://github.com/TroyGoode) ([troygoode@gmail.com](mailto:troygoode@gmail.com)) + diff --git a/node_modules/require-directory/index.js b/node_modules/require-directory/index.js new file mode 100644 index 0000000..cd37da7 --- /dev/null +++ b/node_modules/require-directory/index.js @@ -0,0 +1,86 @@ +'use strict'; + +var fs = require('fs'), + join = require('path').join, + resolve = require('path').resolve, + dirname = require('path').dirname, + defaultOptions = { + extensions: ['js', 'json', 'coffee'], + recurse: true, + rename: function (name) { + return name; + }, + visit: function (obj) { + return obj; + } + }; + +function checkFileInclusion(path, filename, options) { + return ( + // verify file has valid extension + (new RegExp('\\.(' + options.extensions.join('|') + ')$', 'i').test(filename)) && + + // if options.include is a RegExp, evaluate it and make sure the path passes + !(options.include && options.include instanceof RegExp && !options.include.test(path)) && + + // if options.include is a function, evaluate it and make sure the path passes + !(options.include && typeof options.include === 'function' && !options.include(path, filename)) && + + // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass + !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path)) && + + // if options.exclude is a function, evaluate it and make sure the path doesn't pass + !(options.exclude && typeof options.exclude === 'function' && options.exclude(path, filename)) + ); +} + +function requireDirectory(m, path, options) { + var retval = {}; + + // path is optional + if (path && !options && typeof path !== 'string') { + options = path; + path = null; + } + + // default options + options = options || {}; + for (var prop in defaultOptions) { + if (typeof options[prop] === 'undefined') { + options[prop] = defaultOptions[prop]; + } + } + + // if no path was passed in, assume the equivelant of __dirname from caller + // otherwise, resolve path relative to the equivalent of __dirname + path = !path ? dirname(m.filename) : resolve(dirname(m.filename), path); + + // get the path of each file in specified directory, append to current tree node, recurse + fs.readdirSync(path).forEach(function (filename) { + var joined = join(path, filename), + files, + key, + obj; + + if (fs.statSync(joined).isDirectory() && options.recurse) { + // this node is a directory; recurse + files = requireDirectory(m, joined, options); + // exclude empty directories + if (Object.keys(files).length) { + retval[options.rename(filename, joined, filename)] = files; + } + } else { + if (joined !== m.filename && checkFileInclusion(joined, filename, options)) { + // hash node key shouldn't include file extension + key = filename.substring(0, filename.lastIndexOf('.')); + obj = m.require(joined); + retval[options.rename(key, joined, filename)] = options.visit(obj, joined, filename) || obj; + } + } + }); + + return retval; +} + +module.exports = requireDirectory; +module.exports.defaults = defaultOptions; diff --git a/node_modules/require-directory/package.json b/node_modules/require-directory/package.json new file mode 100644 index 0000000..fb97047 --- /dev/null +++ b/node_modules/require-directory/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "require-directory@^2.1.1", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "require-directory@>=2.1.1 <3.0.0", + "_id": "require-directory@2.1.1", + "_inCache": true, + "_installable": true, + "_location": "/require-directory", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "troygoode@gmail.com", + "name": "troygoode" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "require-directory", + "raw": "require-directory@^2.1.1", + "rawSpec": "^2.1.1", + "scope": null, + "spec": ">=2.1.1 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "_shasum": "8c64ad5fd30dab1c976e2344ffe7f792a6a6df42", + "_shrinkwrap": null, + "_spec": "require-directory@^2.1.1", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "troygoode@gmail.com", + "name": "Troy Goode", + "url": "http://github.com/troygoode/" + }, + "bugs": { + "url": "http://github.com/troygoode/node-require-directory/issues/" + }, + "contributors": [ + { + "name": "Troy Goode", + "email": "troygoode@gmail.com", + "url": "http://github.com/troygoode/" + } + ], + "dependencies": {}, + "description": "Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.", + "devDependencies": { + "jshint": "^2.6.0", + "mocha": "^2.1.0" + }, + "directories": {}, + "dist": { + "shasum": "8c64ad5fd30dab1c976e2344ffe7f792a6a6df42", + "tarball": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "gitHead": "cc71c23dd0c16cefd26855303c16ca1b9b50a36d", + "homepage": "https://github.com/troygoode/node-require-directory/", + "keywords": [ + "directory", + "library", + "recursive", + "require" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "troygoode", + "email": "troygoode@gmail.com" + } + ], + "name": "require-directory", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/troygoode/node-require-directory.git" + }, + "scripts": { + "lint": "jshint index.js test/test.js", + "test": "mocha" + }, + "version": "2.1.1" +} diff --git a/node_modules/require-main-filename/.npmignore b/node_modules/require-main-filename/.npmignore new file mode 100644 index 0000000..6f9fe6b --- /dev/null +++ b/node_modules/require-main-filename/.npmignore @@ -0,0 +1,3 @@ +node_modules +.DS_Store +.nyc_output diff --git a/node_modules/require-main-filename/.travis.yml b/node_modules/require-main-filename/.travis.yml new file mode 100644 index 0000000..ab61ce7 --- /dev/null +++ b/node_modules/require-main-filename/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +os: + - linux +node_js: + - "0.10" + - "0.12" + - "4.1" + - "node" diff --git a/node_modules/require-main-filename/LICENSE.txt b/node_modules/require-main-filename/LICENSE.txt new file mode 100644 index 0000000..836440b --- /dev/null +++ b/node_modules/require-main-filename/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/require-main-filename/README.md b/node_modules/require-main-filename/README.md new file mode 100644 index 0000000..820d9f5 --- /dev/null +++ b/node_modules/require-main-filename/README.md @@ -0,0 +1,26 @@ +# require-main-filename + +[![Build Status](https://travis-ci.org/yargs/require-main-filename.png)](https://travis-ci.org/yargs/require-main-filename) +[![Coverage Status](https://coveralls.io/repos/yargs/require-main-filename/badge.svg?branch=master)](https://coveralls.io/r/yargs/require-main-filename?branch=master) +[![NPM version](https://img.shields.io/npm/v/require-main-filename.svg)](https://www.npmjs.com/package/require-main-filename) + +`require.main.filename` is great for figuring out the entry +point for the current application. This can be combined with a module like +[pkg-conf](https://www.npmjs.com/package/pkg-conf) to, _as if by magic_, load +top-level configuration. + +Unfortunately, `require.main.filename` sometimes fails when an application is +executed with an alternative process manager, e.g., [iisnode](https://github.com/tjanczuk/iisnode). + +`require-main-filename` is a shim that addresses this problem. + +## Usage + +```js +var main = require('require-main-filename')() +// use main as an alternative to require.main.filename. +``` + +## License + +ISC diff --git a/node_modules/require-main-filename/index.js b/node_modules/require-main-filename/index.js new file mode 100644 index 0000000..dca7f0c --- /dev/null +++ b/node_modules/require-main-filename/index.js @@ -0,0 +1,18 @@ +module.exports = function (_require) { + _require = _require || require + var main = _require.main + if (main && isIISNode(main)) return handleIISNode(main) + else return main ? main.filename : process.cwd() +} + +function isIISNode (main) { + return /\\iisnode\\/.test(main.filename) +} + +function handleIISNode (main) { + if (!main.children.length) { + return main.filename + } else { + return main.children[0].filename + } +} diff --git a/node_modules/require-main-filename/package.json b/node_modules/require-main-filename/package.json new file mode 100644 index 0000000..ac39dbe --- /dev/null +++ b/node_modules/require-main-filename/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "require-main-filename@^1.0.1", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "require-main-filename@>=1.0.1 <2.0.0", + "_id": "require-main-filename@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/require-main-filename", + "_nodeVersion": "3.2.0", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/require-main-filename-1.0.1.tgz_1455688492890_0.0750324921682477" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "3.3.0", + "_phantomChildren": {}, + "_requested": { + "name": "require-main-filename", + "raw": "require-main-filename@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "_shasum": "97f717b69d48784f5f526a6c5aa8ffdda055a4d1", + "_shrinkwrap": null, + "_spec": "require-main-filename@^1.0.1", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/yargs/require-main-filename/issues" + }, + "dependencies": {}, + "description": "shim for require.main.filename() that works in as many environments as possible", + "devDependencies": { + "chai": "^3.5.0", + "standard": "^6.0.5", + "tap": "^5.2.0" + }, + "directories": {}, + "dist": { + "shasum": "97f717b69d48784f5f526a6c5aa8ffdda055a4d1", + "tarball": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz" + }, + "gitHead": "6dd2291332bed764c56302ccdd14da8a213249a1", + "homepage": "https://github.com/yargs/require-main-filename#readme", + "keywords": [ + "iisnode", + "require", + "shim" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + } + ], + "name": "require-main-filename", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/require-main-filename.git" + }, + "scripts": { + "pretest": "standard", + "test": "tap --coverage test.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/require-main-filename/test.js b/node_modules/require-main-filename/test.js new file mode 100644 index 0000000..d89e7dc --- /dev/null +++ b/node_modules/require-main-filename/test.js @@ -0,0 +1,36 @@ +/* global describe, it */ + +var requireMainFilename = require('./') + +require('tap').mochaGlobals() +require('chai').should() + +describe('require-main-filename', function () { + it('returns require.main.filename in normal circumstances', function () { + requireMainFilename().should.match(/test\.js/) + }) + + it('should use children[0].filename when running on iisnode', function () { + var main = { + filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', + children: [ {filename: 'D:\\home\\site\\wwwroot\\server.js'} ] + } + requireMainFilename({ + main: main + }).should.match(/server\.js/) + }) + + it('should not use children[0] if no children exist', function () { + var main = { + filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', + children: [] + } + requireMainFilename({ + main: main + }).should.match(/interceptor\.js/) + }) + + it('should default to process.cwd() if require.main is undefined', function () { + requireMainFilename({}).should.match(/require-main-filename/) + }) +}) diff --git a/node_modules/set-blocking/CHANGELOG.md b/node_modules/set-blocking/CHANGELOG.md new file mode 100644 index 0000000..03bf591 --- /dev/null +++ b/node_modules/set-blocking/CHANGELOG.md @@ -0,0 +1,26 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [2.0.0](https://github.com/yargs/set-blocking/compare/v1.0.0...v2.0.0) (2016-05-17) + + +### Features + +* add an isTTY check ([#3](https://github.com/yargs/set-blocking/issues/3)) ([66ce277](https://github.com/yargs/set-blocking/commit/66ce277)) + + +### BREAKING CHANGES + +* stdio/stderr will not be set to blocking if isTTY === false + + + + +# 1.0.0 (2016-05-14) + + +### Features + +* implemented shim for stream._handle.setBlocking ([6bde0c0](https://github.com/yargs/set-blocking/commit/6bde0c0)) diff --git a/node_modules/set-blocking/LICENSE.txt b/node_modules/set-blocking/LICENSE.txt new file mode 100644 index 0000000..836440b --- /dev/null +++ b/node_modules/set-blocking/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/set-blocking/README.md b/node_modules/set-blocking/README.md new file mode 100644 index 0000000..e93b420 --- /dev/null +++ b/node_modules/set-blocking/README.md @@ -0,0 +1,31 @@ +# set-blocking + +[![Build Status](https://travis-ci.org/yargs/set-blocking.svg)](https://travis-ci.org/yargs/set-blocking) +[![NPM version](https://img.shields.io/npm/v/set-blocking.svg)](https://www.npmjs.com/package/set-blocking) +[![Coverage Status](https://coveralls.io/repos/yargs/set-blocking/badge.svg?branch=)](https://coveralls.io/r/yargs/set-blocking?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +set blocking `stdio` and `stderr` ensuring that terminal output does not truncate. + +```js +const setBlocking = require('set-blocking') +setBlocking(true) +console.log(someLargeStringToOutput) +``` + +## Historical Context/Word of Warning + +This was created as a shim to address the bug discussed in [node #6456](https://github.com/nodejs/node/issues/6456). This bug crops up on +newer versions of Node.js (`0.12+`), truncating terminal output. + +You should be mindful of the side-effects caused by using `set-blocking`: + +* if your module sets blocking to `true`, it will effect other modules + consuming your library. In [yargs](https://github.com/yargs/yargs/blob/master/yargs.js#L653) we only call + `setBlocking(true)` once we already know we are about to call `process.exit(code)`. +* this patch will not apply to subprocesses spawned with `isTTY = true`, this is + the [default `spawn()` behavior](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). + +## License + +ISC diff --git a/node_modules/set-blocking/index.js b/node_modules/set-blocking/index.js new file mode 100644 index 0000000..6f78774 --- /dev/null +++ b/node_modules/set-blocking/index.js @@ -0,0 +1,7 @@ +module.exports = function (blocking) { + [process.stdout, process.stderr].forEach(function (stream) { + if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') { + stream._handle.setBlocking(blocking) + } + }) +} diff --git a/node_modules/set-blocking/package.json b/node_modules/set-blocking/package.json new file mode 100644 index 0000000..0774e09 --- /dev/null +++ b/node_modules/set-blocking/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "set-blocking@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "set-blocking@>=2.0.0 <3.0.0", + "_id": "set-blocking@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/set-blocking", + "_nodeVersion": "0.12.7", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/set-blocking-2.0.0.tgz_1463525966987_0.5456729622092098" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "name": "set-blocking", + "raw": "set-blocking@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "_shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", + "_shrinkwrap": null, + "_spec": "set-blocking@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/yargs/set-blocking/issues" + }, + "dependencies": {}, + "description": "set blocking stdio and stderr ensuring that terminal output does not truncate", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.9", + "mocha": "^2.4.5", + "nyc": "^6.4.4", + "standard": "^7.0.1", + "standard-version": "^2.2.1" + }, + "directories": {}, + "dist": { + "shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", + "tarball": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" + }, + "files": [ + "LICENSE.txt", + "index.js" + ], + "gitHead": "7eec10577b5fff264de477ba3b9d07f404946eff", + "homepage": "https://github.com/yargs/set-blocking#readme", + "keywords": [ + "blocking", + "flush", + "shim", + "stderr", + "stdio", + "terminal" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + } + ], + "name": "set-blocking", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/yargs/set-blocking.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "test": "nyc mocha ./test/*.js", + "version": "standard-version" + }, + "version": "2.0.0" +} diff --git a/node_modules/shebang-command/index.js b/node_modules/shebang-command/index.js new file mode 100644 index 0000000..2de70b0 --- /dev/null +++ b/node_modules/shebang-command/index.js @@ -0,0 +1,19 @@ +'use strict'; +var shebangRegex = require('shebang-regex'); + +module.exports = function (str) { + var match = str.match(shebangRegex); + + if (!match) { + return null; + } + + var arr = match[0].replace(/#! ?/, '').split(' '); + var bin = arr[0].split('/').pop(); + var arg = arr[1]; + + return (bin === 'env' ? + arg : + bin + (arg ? ' ' + arg : '') + ); +}; diff --git a/node_modules/shebang-command/license b/node_modules/shebang-command/license new file mode 100644 index 0000000..0f8cf79 --- /dev/null +++ b/node_modules/shebang-command/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Martensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/shebang-command/package.json b/node_modules/shebang-command/package.json new file mode 100644 index 0000000..d9d8868 --- /dev/null +++ b/node_modules/shebang-command/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "shebang-command@^1.2.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cross-spawn" + ] + ], + "_from": "shebang-command@>=1.2.0 <2.0.0", + "_id": "shebang-command@1.2.0", + "_inCache": true, + "_installable": true, + "_location": "/shebang-command", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/shebang-command-1.2.0.tgz_1474530105733_0.9689246460329741" + }, + "_npmUser": { + "email": "kevinmartensson@gmail.com", + "name": "kevva" + }, + "_npmVersion": "3.10.6", + "_phantomChildren": {}, + "_requested": { + "name": "shebang-command", + "raw": "shebang-command@^1.2.0", + "rawSpec": "^1.2.0", + "scope": null, + "spec": ">=1.2.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "_shasum": "44aac65b695b03398968c39f363fee5deafdf1ea", + "_shrinkwrap": null, + "_spec": "shebang-command@^1.2.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cross-spawn", + "author": { + "email": "kevinmartensson@gmail.com", + "name": "Kevin Martensson", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/shebang-command/issues" + }, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "description": "Get the command from a shebang", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "44aac65b695b03398968c39f363fee5deafdf1ea", + "tarball": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "01de9b7d355f21e00417650a6fb1eb56321bc23c", + "homepage": "https://github.com/kevva/shebang-command#readme", + "keywords": [ + "cmd", + "command", + "parse", + "shebang" + ], + "license": "MIT", + "maintainers": [ + { + "name": "kevva", + "email": "kevinmartensson@gmail.com" + } + ], + "name": "shebang-command", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/shebang-command.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0", + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/shebang-command/readme.md b/node_modules/shebang-command/readme.md new file mode 100644 index 0000000..16b0be4 --- /dev/null +++ b/node_modules/shebang-command/readme.md @@ -0,0 +1,39 @@ +# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) + +> Get the command from a shebang + + +## Install + +``` +$ npm install --save shebang-command +``` + + +## Usage + +```js +const shebangCommand = require('shebang-command'); + +shebangCommand('#!/usr/bin/env node'); +//=> 'node' + +shebangCommand('#!/bin/bash'); +//=> 'bash' +``` + + +## API + +### shebangCommand(string) + +#### string + +Type: `string` + +String containing a shebang. + + +## License + +MIT © [Kevin Martensson](http://github.com/kevva) diff --git a/node_modules/shebang-regex/index.js b/node_modules/shebang-regex/index.js new file mode 100644 index 0000000..d052d2e --- /dev/null +++ b/node_modules/shebang-regex/index.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = /^#!.*/; diff --git a/node_modules/shebang-regex/license b/node_modules/shebang-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/shebang-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/shebang-regex/package.json b/node_modules/shebang-regex/package.json new file mode 100644 index 0000000..9450a30 --- /dev/null +++ b/node_modules/shebang-regex/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "shebang-regex@^1.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/shebang-command" + ] + ], + "_from": "shebang-regex@>=1.0.0 <2.0.0", + "_id": "shebang-regex@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/shebang-regex", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "shebang-regex", + "raw": "shebang-regex@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/shebang-command" + ], + "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "_shasum": "da42f49740c0b42db2ca9728571cb190c98efea3", + "_shrinkwrap": null, + "_spec": "shebang-regex@^1.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/shebang-command", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/shebang-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching a shebang", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "da42f49740c0b42db2ca9728571cb190c98efea3", + "tarball": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "cb774c70d5f569479ca997abf8ee7e558e617284", + "homepage": "https://github.com/sindresorhus/shebang-regex", + "keywords": [ + "match", + "re", + "regex", + "regexp", + "shebang", + "test" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "shebang-regex", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/shebang-regex.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/shebang-regex/readme.md b/node_modules/shebang-regex/readme.md new file mode 100644 index 0000000..ef75e51 --- /dev/null +++ b/node_modules/shebang-regex/readme.md @@ -0,0 +1,29 @@ +# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) + +> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) + + +## Install + +``` +$ npm install --save shebang-regex +``` + + +## Usage + +```js +var shebangRegex = require('shebang-regex'); +var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; + +shebangRegex.test(str); +//=> true + +shebangRegex.exec(str)[0]; +//=> '#!/usr/bin/env node' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/showdown/.appveyor.yml b/node_modules/showdown/.appveyor.yml new file mode 100644 index 0000000..9d1dc05 --- /dev/null +++ b/node_modules/showdown/.appveyor.yml @@ -0,0 +1,40 @@ +# branches to build +#branches: + # whitelist + #only: + # - master + +# What combinations to test +environment: + matrix: + - nodejs_version: "6" + platform: x64 + - nodejs_version: "6" + platform: x86 + - nodejs_version: "8" + platform: x86 + - nodejs_version: "8" + platform: x64 + - nodejs_version: "10" + platform: x64 + +install: + # Use version based on tag + - ps: $env:package_version = (Get-Content -Raw -Path package.json | ConvertFrom-Json).version + - ps: Update-AppveyorBuild -Version "$env:package_version-$env:APPVEYOR_BUILD_NUMBER" + + # install node + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install grunt-cli globally + - npm install -g grunt-cli + # install modules + - npm install + +test_script: + # Output useful info for debugging + - node --version && npm --version + - ps: grunt test + +# Don't actually build. +build: off diff --git a/node_modules/showdown/.editorconfig b/node_modules/showdown/.editorconfig new file mode 100644 index 0000000..77a9976 --- /dev/null +++ b/node_modules/showdown/.editorconfig @@ -0,0 +1,15 @@ +[*.js] +indent_style = space +indent_size = 2 +continuation_indent_size = 2 +insert_final_newline = true +quote_type = single +space_after_anonymous_functions = true +space_after_control_statements = true +spaces_around_operators = true +trim_trailing_whitespace = true +spaces_in_brackets = false +curly_bracket_next_line = true +indent_brace_style = 1TBS +end_of_line = lf +charset = utf-8 diff --git a/node_modules/showdown/.eslintrc.json b/node_modules/showdown/.eslintrc.json new file mode 100644 index 0000000..2afad32 --- /dev/null +++ b/node_modules/showdown/.eslintrc.json @@ -0,0 +1,27 @@ +{ + "rules": { + "indent": [2, 2, {"SwitchCase": 1, "VariableDeclarator": 2}], + "curly": [2, "all"], + "operator-linebreak": [2, "after"], + "camelcase": [2, {"properties": "never"}], + "quotes": [2, "single"], + "no-multi-str": 2, + "no-mixed-spaces-and-tabs": 2, + "no-trailing-spaces": 2, + "space-unary-ops": [2, + { + "nonwords": false, + "overrides": {} + } + ], + "brace-style": [2, "1tbs", {"allowSingleLine": true}], + "keyword-spacing": [2, {}], + "space-infix-ops": 2, + "space-before-blocks": [2, "always"], + "eol-last": 2, + "space-before-function-paren": [2, "always"], + "array-bracket-spacing": [2, "never", {"singleValue": false}], + "space-in-parens": [2, "never"], + "no-multiple-empty-lines": 2 + } +} diff --git a/node_modules/showdown/.gitattributes b/node_modules/showdown/.gitattributes new file mode 100644 index 0000000..9645d1e --- /dev/null +++ b/node_modules/showdown/.gitattributes @@ -0,0 +1,26 @@ +# Exports for git archive +/test export-ignore +.editorconfig export-ignore +.gitattributes export-ignore +.gitignore export-ignore +.eslintrc.json export-ignore +.jshintignore export-ignore +.jshintrc export-ignore +.travis.yml export-ignore +.appveyor.yml export-ignore +bower.json +Gruntfile.js export-ignore +performance.* export-ignore + +# Line endings control +CHANGELOG.md text +CONTRIBUTING.md text +CREDITS.md text +license.txt text + +# Force LF on js files +*.js text eol=lf + +# Force binary mode on bin dir and dist fir +bin/* binary +dist/* binary diff --git a/node_modules/showdown/.jshintignore b/node_modules/showdown/.jshintignore new file mode 100644 index 0000000..54c5705 --- /dev/null +++ b/node_modules/showdown/.jshintignore @@ -0,0 +1,5 @@ +Gruntfile.js +dist/**/*.js +build/**/*.js +src/options.js +bin/* diff --git a/node_modules/showdown/.jshintrc b/node_modules/showdown/.jshintrc new file mode 100644 index 0000000..0dfea06 --- /dev/null +++ b/node_modules/showdown/.jshintrc @@ -0,0 +1,28 @@ +{ + "node": true, + "browser": true, + "esnext": true, + "bitwise": true, + "camelcase": true, + "curly": true, + "eqeqeq": true, + "immed": true, + "indent": 2, + "latedef": "nofunc", + "newcap": true, + "noarg": true, + "quotmark": "single", + "undef": false, + "unused": true, + "strict": true, + "trailing": true, + "smarttabs": true, + "onevar": true, + "globals": { + "angular": true, + "module": true, + "define": true, + "window": true, + "showdown": true + } +} diff --git a/node_modules/showdown/.travis.yml b/node_modules/showdown/.travis.yml new file mode 100644 index 0000000..8575a1b --- /dev/null +++ b/node_modules/showdown/.travis.yml @@ -0,0 +1,26 @@ +language: node_js +node_js: + - "6" + - "8" + - "10" + +before_install: + - npm install -g grunt-cli + +# travis build speed up +sudo: false +cache: + directories: + - node_modules + +# scripts +script: grunt test + +# hooks +notifications: + webhooks: + urls: + - 'https://webhooks.gitter.im/e/e369617839852624aa69' + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: false # default: false diff --git a/node_modules/showdown/CHANGELOG.md b/node_modules/showdown/CHANGELOG.md new file mode 100644 index 0000000..9df6cc6 --- /dev/null +++ b/node_modules/showdown/CHANGELOG.md @@ -0,0 +1,773 @@ + +# [1.9.0](https://github.com/showdownjs/showdown/compare/1.8.7...1.9.0) (2018-11-10) + + +### Bug Fixes + +* **italicsAndBold:** fix issue with consecutive spans ([#608](https://github.com/showdownjs/showdown/issues/608)) ([5c0d67e](https://github.com/showdownjs/showdown/commit/5c0d67e)), closes [#544](https://github.com/showdownjs/showdown/issues/544) +* **underline**: fix issue with consecutive spans ([81edc70](https://github.com/showdownjs/showdown/commit/81edc70)) + +### Features + +* **converter.makeMarkdown:** [EXPERIMENTAL] add an HTML to MD converter ([e4b0e69](https://github.com/showdownjs/showdown/commit/e4b0e69)), closes [#388](https://github.com/showdownjs/showdown/issues/388) [#233](https://github.com/showdownjs/showdown/issues/233) + + + + +## [1.8.7](https://github.com/showdownjs/showdown/compare/1.8.6...1.8.7) (2018-10-16) + + +### Bug Fixes + +* **emojis:** fix emoji excessive size ([4aca41c](https://github.com/showdownjs/showdown/commit/4aca41c)) +* **gfm-codeblocks:** + * add support for spaces before language declaration ([24bf7b1](https://github.com/showdownjs/showdown/commit/24bf7b1)), closes [#569](https://github.com/showdownjs/showdown/issues/569) + * leading space no longer breaks gfm codeblocks ([828c32f](https://github.com/showdownjs/showdown/commit/828c32f)), closes [#523](https://github.com/showdownjs/showdown/issues/523) +* **images:** fix js error when using image references ([980e702](https://github.com/showdownjs/showdown/commit/980e702)), closes [#585](https://github.com/showdownjs/showdown/issues/585) +* **literalMidWordAsterisks:** now parses single characters enclosed by * correctly ([fe70e45](https://github.com/showdownjs/showdown/commit/fe70e45)), closes [#478](https://github.com/showdownjs/showdown/issues/478) +* **mentions:** allow for usernames with dot, underscore and dash ([dfeb1e2](https://github.com/showdownjs/showdown/commit/dfeb1e2)), closes [#574](https://github.com/showdownjs/showdown/issues/574) +* **nbsp:** fix replacing of nbsp with regular spaces ([8bc1f42](https://github.com/showdownjs/showdown/commit/8bc1f42)) + + + + +## [1.8.6](https://github.com/showdownjs/showdown/compare/1.8.5...1.8.6) (2017-12-22) + + +### Features + +* **splitAdjacentBlockquotes:** add option to split adjacent blockquote blocks ([da328f2](https://github.com/showdownjs/showdown/commit/da328f2)), closes [#477](https://github.com/showdownjs/showdown/issues/477) + + + + +# [1.8.5](https://github.com/showdownjs/showdown/compare/1.8.4...1.8.5) (2017-12-10) + + +### Features + +* **completeHTMLDocument:** add option to output a complete HTML document ([a8427c9](https://github.com/showdownjs/showdown/commit/a8427c9)) +* **metadata:** add support for embedded metadata ([63d949f](https://github.com/showdownjs/showdown/commit/63d949f)), closes [#260](https://github.com/showdownjs/showdown/issues/260) + + + + +## [1.8.4](https://github.com/showdownjs/showdown/compare/1.8.3...1.8.4) (2017-12-05) + + +### Bug Fixes + +* **tables:** raw html inside code tags in tables no longer breaks tables ([4ef4c5e](https://github.com/showdownjs/showdown/commit/4ef4c5e)), closes [#471](https://github.com/showdownjs/showdown/issues/471) + + + + +## [1.8.3](https://github.com/showdownjs/showdown/compare/1.8.2...1.8.3) (2017-11-28) + + +### Bug Fixes + +* **literalMidWordAsterisks:** no longer treats colon as alphanumeric char ([21194c8](https://github.com/showdownjs/showdown/commit/21194c8)), closes [#461](https://github.com/showdownjs/showdown/issues/461) +* **spanGamut:** code spans are hashed after parsing ([f4f63c5](https://github.com/showdownjs/showdown/commit/f4f63c5)), closes [#464](https://github.com/showdownjs/showdown/issues/464) +* **tables:** pipe character in code spans no longer breaks table ([0c933a0](https://github.com/showdownjs/showdown/commit/0c933a0)), closes [#465](https://github.com/showdownjs/showdown/issues/465) + + + + +## [1.8.2](https://github.com/showdownjs/showdown/compare/1.8.1...1.8.2) (2017-11-11) + + +### Bug Fixes + +* **fenced codeblocks:** add tilde as fenced code block delimiter ([c956ede](https://github.com/showdownjs/showdown/commit/c956ede)), closes [#456](https://github.com/showdownjs/showdown/issues/456) +* **openLinksInNewWindow:** hash links are not affected by the option ([11936ec](https://github.com/showdownjs/showdown/commit/11936ec)), closes [#457](https://github.com/showdownjs/showdown/issues/457) + + + + +## [1.8.1](https://github.com/showdownjs/showdown/compare/1.8.0...1.8.1) (2017-11-01) + + +### Dependencies update + +* **package:** update yargs to version 10.0.3 ([#447](https://github.com/showdownjs/showdown/issues/447)) ([906b26d](https://github.com/showdownjs/showdown/commit/906b26d)) + +### Bug Fixes + +* **CDNjs:** bump version to fix version missmatch with CDNjs ([#452](https://github.com/showdownjs/showdown/issues/452)) + + + +# [1.8.0](https://github.com/showdownjs/showdown/compare/1.7.6...1.8.0) (2017-10-24) + +### NOTICE + +Don't use the CDNjs version of this release. See issue [#452](https://github.com/showdownjs/showdown/issues/452) for more details. + + +### Bug Fixes + +* **autolinks:** prevent _ and * to be parsed in links ([61929bb](https://github.com/showdownjs/showdown/commit/61929bb)), closes [#444](https://github.com/showdownjs/showdown/issues/444) + + +### Features + +* **ellipsis:** add auto-ellipsis support ([25f1978](https://github.com/showdownjs/showdown/commit/25f1978)) + + - *Example:* + + input + + ```md + this is an ellipsis... + ``` + + output + + ```html +

this is an ellipsis…

+ ``` + +* **emoji:** add emoji support through option `emoji`([5b8f1d3](https://github.com/showdownjs/showdown/commit/5b8f1d3)), closes [#448](https://github.com/showdownjs/showdown/issues/448) + + - *Usage:* + + ```js + var conv = new showdown.Converter({emoji: true}); + ``` + + - *Example:* + + input + + ```md + this is a smile :smile: emoji + ``` + + output + + ```html +

this is a smile 😄 emoji

+ ``` + +* **start ordered lists at an arbitrary number:** add support for defining the first item number of ordered lists ([9cdc35e](https://github.com/showdownjs/showdown/commit/9cdc35e)), closes [#377](https://github.com/showdownjs/showdown/issues/377) + + - *Example:* + + input + + ```md + 3. foo + 4. bar + 5. baz + ``` + + output + + ```html +
    +
  1. foo
  2. +
  3. bar
  4. +
  5. baz
  6. +
+ ``` + +* **underline:** add EXPERIMENTAL support for underline ([084b819](https://github.com/showdownjs/showdown/commit/084b819)), closes [#450](https://github.com/showdownjs/showdown/issues/450) + + - *Usage:* + + ```js + var conv = new showdown.Converter({underline: true}); + ``` + + - *Example:* + + input + + ```md + this is __underlined__ and this is ___also underlined___ + ``` + + output + + ```html +

this is underlined and this is also underlined

+ ``` + + - *Note:* With this option enabled, underscore no longer parses as `` or `` + +### BREAKING CHANGES + +* start ordered lists at an arbitrary number: Since showdown now supports starting ordered lists at an arbitrary number, +list output may differ. + + + + +## [1.7.6](https://github.com/showdownjs/showdown/compare/1.7.5...1.7.6) (2017-10-06) + + +### Bug Fixes + +* **tables:** tables are properly rendered when followed by a single linebreak and a list ([d88b095](https://github.com/showdownjs/showdown/commit/d88b095)), closes [#443](https://github.com/showdownjs/showdown/issues/443) +* **tables:** trailing spaces no longer prevent table parsing ([66bdd21](https://github.com/showdownjs/showdown/commit/66bdd21)), closes [#442](https://github.com/showdownjs/showdown/issues/442) + + + + +## [1.7.5](https://github.com/showdownjs/showdown/compare/1.7.4...1.7.5) (2017-10-02) + + +### Bug Fixes + +* **html-comments:** changed regex to precent malformed long comment to freeze showdown ([3efcd10](https://github.com/showdownjs/showdown/commit/3efcd10)), closes [#439](https://github.com/showdownjs/showdown/issues/439) + + + + +## [1.7.4](https://github.com/showdownjs/showdown/compare/1.7.3...1.7.4) (2017-09-08) + + +### Bug Fixes + +* **helper.isArray:** replace a.constructor === Array with Array.isArray ([466a2eb](https://github.com/showdownjs/showdown/commit/466a2eb)), closes [#425](https://github.com/showdownjs/showdown/issues/425) +* **loader:** allow AMD loader to be used within Node env ([ff24bdb](https://github.com/showdownjs/showdown/commit/ff24bdb)) + + +### Features + +* **base64-wrapping:** support for wrapping base64 strings ([8c593a4](https://github.com/showdownjs/showdown/commit/8c593a4)), closes [#429](https://github.com/showdownjs/showdown/issues/429) + + + + +## [1.7.3](https://github.com/showdownjs/showdown/compare/1.7.2...1.7.3) (2017-08-23) + + +### Bug Fixes + +* **github flavor:** add backslashEscapesHTMLTags to GFM flavor ([5284439](https://github.com/showdownjs/showdown/commit/5284439)) +* **literalMidWordAsterisks:** option no longer treats punctuation as word character ([8f05be7](https://github.com/showdownjs/showdown/commit/8f05be7)), closes [#398](https://github.com/showdownjs/showdown/issues/398) +* **tables:** allow for one column table ([fef110c](https://github.com/showdownjs/showdown/commit/fef110cccb2d02b218183398d9baa0ae256a7283)), closes [#406](https://github.com/showdownjs/showdown/issues/406) + +### Features + +* **rawHeaderId:** Remove only spaces, ' and " from generated header ids ([1791cf0](https://github.com/showdownjs/showdown/commit/1791cf0)), closes [#409](https://github.com/showdownjs/showdown/issues/409) +* **rawPrefixHeaderId:** add option to prevent showdown from modifying the prefix ([ff26c08](https://github.com/showdownjs/showdown/commit/ff26c08)), closes [#409](https://github.com/showdownjs/showdown/issues/409) + + + + +## [1.7.2](https://github.com/showdownjs/showdown/compare/1.7.1...1.7.2) (2017-08-05) + + +### Bug Fixes + +* **githubMentions:** githubMentions now works with openLinksInNewWindow options ([1194d88](https://github.com/showdownjs/showdown/commit/1194d88)), closes [#403](https://github.com/showdownjs/showdown/issues/403) +* **lists:** fix multi paragraph lists with sublists ([a2259c0](https://github.com/showdownjs/showdown/commit/a2259c0)), closes [#397](https://github.com/showdownjs/showdown/issues/397) +* **tablesHeaderId:** fix missmatch of option name ([51e4693](https://github.com/showdownjs/showdown/commit/51e4693)), closes [#412](https://github.com/showdownjs/showdown/issues/412) + + +### Features + +* **backslashEscapesHTMLTags:** backslash escapes HTML tags ([5a5aff6](https://github.com/showdownjs/showdown/commit/5a5aff6)), closes [#374](https://github.com/showdownjs/showdown/issues/374) + + + + +## [1.7.1](https://github.com/showdownjs/showdown/compare/1.7.0...1.7.1) (2017-06-02) + +Important HOTFIX + +### Bug Fixes + +* **HTML Parser:** fix nasty bug where malformed HTML would hang showdown ([6566c72](https://github.com/showdownjs/showdown/commit/6566c72)), closes [#393](https://github.com/showdownjs/showdown/issues/393) + + + + +## [1.7.0](https://github.com/showdownjs/showdown/compare/1.6.4...1.7.0) (2017-06-01) + +(DEPRECATED) + +### Bug Fixes + +* **anchors:** fix issue with brackets in link URL ([7ba18dd](https://github.com/showdownjs/showdown/commit/7ba18dd)), closes [#390](https://github.com/showdownjs/showdown/issues/390) +* **excludeTrailingPunctuationFromURL:** add comma to punctuation list ([fa35fd5](https://github.com/showdownjs/showdown/commit/fa35fd5)), closes [#354](https://github.com/showdownjs/showdown/issues/354) +* **excludeTrailingPunctuationFromURLs:** fix weird character when this option with simplifiedAutoLinks ([71acff5](https://github.com/showdownjs/showdown/commit/71acff5)), closes [#378](https://github.com/showdownjs/showdown/issues/378) +* **HTML parsing:** fix HTML parsing issues with nested tags ([6fbc072](https://github.com/showdownjs/showdown/commit/6fbc072)), closes [#357](https://github.com/showdownjs/showdown/issues/357) [#387](https://github.com/showdownjs/showdown/issues/387) +* **openLinksInNewWindow:** encode _ to prevent clash with em ([813f832](https://github.com/showdownjs/showdown/commit/813f832)), closes [#379](https://github.com/showdownjs/showdown/issues/379) +* **package:** update yargs to version 7.0.1 ([#349](https://github.com/showdownjs/showdown/issues/349)) ([9308d7b](https://github.com/showdownjs/showdown/commit/9308d7b)) +* **package:** update yargs to version 8.0.1 ([#385](https://github.com/showdownjs/showdown/issues/385)) ([5fd847b](https://github.com/showdownjs/showdown/commit/5fd847b)) +* **simpleAutoLinks:** URLs with emphasis/strikethrough are parsed ([5c50675](https://github.com/showdownjs/showdown/commit/5c50675)), closes [#347](https://github.com/showdownjs/showdown/issues/347) +* **tables:** pipe char can now be escaped ([1ebc195](https://github.com/showdownjs/showdown/commit/1ebc195)), closes [#345](https://github.com/showdownjs/showdown/issues/345) +* **url parsing:** fix url edge case parsing in images and links ([30aa18c](https://github.com/showdownjs/showdown/commit/30aa18c)) + + +### Features + +* **customizeHeaderId:** add option for customizing header ids ([94c570a](https://github.com/showdownjs/showdown/commit/94c570a)), closes [#383](https://github.com/showdownjs/showdown/issues/383) +* **images:** add support for image's implicit reference syntax ([0c6c07b](https://github.com/showdownjs/showdown/commit/0c6c07b)), closes [#366](https://github.com/showdownjs/showdown/issues/366) +* **literalMidWordAsterisks:** add option for mid word asterisks ([5bec8f9](https://github.com/showdownjs/showdown/commit/5bec8f9)) +* **openLinksInNewWindow:** add option to open all links in a new window ([50235d6](https://github.com/showdownjs/showdown/commit/50235d6)), closes [#362](https://github.com/showdownjs/showdown/issues/362) [#337](https://github.com/showdownjs/showdown/issues/337) [#249](https://github.com/showdownjs/showdown/issues/249) [#247](https://github.com/showdownjs/showdown/issues/247) [#222](https://github.com/showdownjs/showdown/issues/222) + + + + +## [1.6.4](https://github.com/showdownjs/showdown/compare/1.6.3...1.6.4) (2017-02-06) + + +### Bug Fixes + +* **encodeAmpsAndAngles:** fix > and < encoding ([7f43b79](https://github.com/showdownjs/showdown/commit/7f43b79)), closes [#236](https://github.com/showdownjs/showdown/issues/236) +* **encodeEmail:** now produces valid emails ([605d8b7](https://github.com/showdownjs/showdown/commit/605d8b7)), closes [#340](https://github.com/showdownjs/showdown/issues/340) +* **flavor: github:** new version of github does not use prefix 'user-content' in headers ([368f0b6](https://github.com/showdownjs/showdown/commit/368f0b6)) +* **hashCodeTags:** escape code tags ([41cb3f6](https://github.com/showdownjs/showdown/commit/41cb3f6)), closes [#339](https://github.com/showdownjs/showdown/issues/339) +* **italicsAndBold:** fix double emphasis edge case ([1832b7f](https://github.com/showdownjs/showdown/commit/1832b7f)) +* **paragraph:** workaround QML bug ([f7a429e](https://github.com/showdownjs/showdown/commit/f7a429e)), closes [#246](https://github.com/showdownjs/showdown/issues/246) [#338](https://github.com/showdownjs/showdown/issues/338) +* **prefixHeaderId:** make `prefixHeaderId` string be parsed along the generated id ([f641a7d](https://github.com/showdownjs/showdown/commit/f641a7d)) + + +### Features + +* **flavor: ghost:** add Ghost flavor ([6374b5b](https://github.com/showdownjs/showdown/commit/6374b5b)) +* **flavor: original:** add John Gruber's markdown flavor ([6374b5b](https://github.com/showdownjs/showdown/commit/6374b5b)) + + + + +## [1.6.3](https://github.com/showdownjs/showdown/compare/1.6.2...1.6.3) (2017-01-30) + + +### Bug Fixes + +* **codeSpans:** add - and = to escaped chars inside code spans ([4243a31](https://github.com/showdownjs/showdown/commit/4243a31)) +* **italicsAndBold:** fix inconsistency in italicsAndBold parsing ([a4f05d4](https://github.com/showdownjs/showdown/commit/a4f05d4)), closes [#332](https://github.com/showdownjs/showdown/issues/332) +* **literalMidWordUnderscores:** fix inconsistent behavior of emphasis and strong with literalMidWordUndescores ([0292ae0](https://github.com/showdownjs/showdown/commit/0292ae0)), closes [#333](https://github.com/showdownjs/showdown/issues/333) +* **paragraphs:** fix empty lines generating empty paragraphs ([54bf744](https://github.com/showdownjs/showdown/commit/54bf744)), closes [#334](https://github.com/showdownjs/showdown/issues/334) +* **strikethrough:** fix striketrough being wrongly parsed inside codeSpans ([169cbe8](https://github.com/showdownjs/showdown/commit/169cbe8)) + +### Features + +* **events:** add events to all subparsers ([7d63a3e](https://github.com/showdownjs/showdown/commit/7d63a3e)) + + + + +## [1.6.2](https://github.com/showdownjs/showdown/compare/1.6.1...1.6.2) (2017-01-29) + + +### Bug Fixes + +* **escapeSpecialCharsWithinTagAttributes:** add ~ and = to escaped chars ([bfcc0e4](https://github.com/showdownjs/showdown/commit/bfcc0e4)) +* **strikethrough:** allow escapinging tilde char ([24d47d7](https://github.com/showdownjs/showdown/commit/24d47d7)), closes [#331](https://github.com/showdownjs/showdown/issues/331) + +### Features + +* **ghMentionsLink:** add ability to define the generated url in @mentions ([a4c24c9](https://github.com/showdownjs/showdown/commit/a4c24c9)) + + + + +## [1.6.1](https://github.com/showdownjs/showdown/compare/1.6.0...1.6.1) (2017-01-28) + + +### Bug Fixes + +* **simplifiedAutoLink:** fix missing spaces before and after email addresses ([5190b6a](https://github.com/showdownjs/showdown/commit/5190b6a)), closes [#330](https://github.com/showdownjs/showdown/issues/330) + +### Features + +* **encodeEmail:** add option to enable/disable mail obfuscation ([90c52b8](https://github.com/showdownjs/showdown/commit/90c52b8)) + +### Notes + +This release also improves performance a bit (around 8%) + + + + +## [1.6.0](https://github.com/showdownjs/showdown/compare/1.5.5...1.6.0) (2017-01-09) + + +### Bug Fixes + +* **ghCompatibleHeaderId:** improve the number of removed chars ([d499feb](https://github.com/showdownjs/showdown/commit/d499feb)) +* **IE8:** fix for IE8 error on using isUndefined function ([561dc5f](https://github.com/showdownjs/showdown/commit/561dc5f)), closes [#280](https://github.com/showdownjs/showdown/issues/280) +* **options:** fix ghCompatibleHeaderId that was set as string instead of boolean ([de7c37e](https://github.com/showdownjs/showdown/commit/de7c37e)) +* **simpleLineBreaks:** fix simpleLineBreaks option not working with non-ASCII chars and markdown delimiters ([b1c458a](https://github.com/showdownjs/showdown/commit/b1c458a)), closes [#318](https://github.com/showdownjs/showdown/issues/318) [#323](https://github.com/showdownjs/showdown/issues/323) + +### Features + +* **CLI:** add -q (quiet) and -m (mute) mode to CLI ([f3b86f0](https://github.com/showdownjs/showdown/commit/f3b86f0)) +* **CLI:flavor:** add flavor option to CLI ([2d6cd1e](https://github.com/showdownjs/showdown/commit/2d6cd1e)) +* **getFlavor:** add getFlavor method to showdown and Converter ([0eaf105](https://github.com/showdownjs/showdown/commit/0eaf105)) +* **ghMentions:** add support for github's @mentions ([f2671c0](https://github.com/showdownjs/showdown/commit/f2671c0)), closes [#51](https://github.com/showdownjs/showdown/issues/51) + +### BREAKING CHANGES: + +* CLI tool now uses the same option defaults as showdown main library. This mean + the default flavor is vanilla and ghCodeBlocks options is enabled by default. + + To update, add `--ghCodeBlocks="false"` to the command. + + + +## [1.5.5](https://github.com/showdownjs/showdown/compare/1.5.4...1.5.5) (2016-12-30) + +### Features + +* **ghCompatibleHeaderId:** generate header ids compatible with github ([db97a90](https://github.com/showdownjs/showdown/commit/db97a90)), closes [#320](https://github.com/showdownjs/showdown/issues/320) [#321](https://github.com/showdownjs/showdown/issues/321) + + + + +## [1.5.4](https://github.com/showdownjs/showdown/compare/1.5.3...1.5.4) (2016-12-21) + + +### Bug Fixes + +* **horizontal rule:** revert backwards incompatibility change ([113f5f6](https://github.com/showdownjs/showdown/commit/113f5f6)), closes [#317](https://github.com/showdownjs/showdown/issues/317) +* **simpleLineBreaks:** fix simpleLineBreak option breaking lists html ([ed4c33f](https://github.com/showdownjs/showdown/commit/ed4c33f)), closes [#316](https://github.com/showdownjs/showdown/issues/316) + + + + +## [1.5.3](https://github.com/showdownjs/showdown/compare/1.5.2...1.5.3) (2016-12-19) + + +### Bug Fixes + +* parser slowness with certain inputs ([da8fb53](https://github.com/showdownjs/showdown/commit/da8fb53)), closes [#315](https://github.com/showdownjs/showdown/issues/315) + +### Features + +* **requireSpaceBeforeHeadingText:** option to make space between `#` and header text mandatory ([5d19877](https://github.com/showdownjs/showdown/commit/5d19877)), closes [#277](https://github.com/showdownjs/showdown/issues/277) + + + + +## [1.5.2](https://github.com/showdownjs/showdown/compare/1.5.1...1.5.2) (2016-12-17) + + +### Bug Fixes + +* **listeners:** fix listeners typo ([f0d25b7](https://github.com/showdownjs/showdown/commit/f0d25b7)), closes [#290](https://github.com/showdownjs/showdown/issues/290) +* **lists:** lines with mutiple dashes being parsed as multilists ([10b3410](https://github.com/showdownjs/showdown/commit/10b3410)), closes [#312](https://github.com/showdownjs/showdown/issues/312) +* **nbsp:** nbsp are replaced with simple spaces ([6e90f7c](https://github.com/showdownjs/showdown/commit/6e90f7c)) + + + + +## [1.5.1](https://github.com/showdownjs/showdown/compare/1.5.0...1.5.1) (2016-12-01) + + +### Features + +* **simpleLineBreaks:** option that parses linebreaks as
. This option enables linebreaks to always be treated as `
` tags + without needing to add spaces in front of the line, the same way GitHub does. ([0942b5e](https://github.com/showdownjs/showdown/commit/0942b5e)), closes [#206](https://github.com/showdownjs/showdown/issues/206) +* **excludeTrailingPunctuationFromURLs:** option that excludes trailing punctuation from auto linked URLs. ([d2fc2a0](https://github.com/showdownjs/showdown/commit/d2fc2a0)), closes [#266](https://github.com/showdownjs/showdown/issues/266) [#308](https://github.com/showdownjs/showdown/issues/308) + + + + +## [1.5.0](https://github.com/showdownjs/showdown/compare/1.4.4...1.5.0) (2016-11-11) + + +### Bug Fixes + +* **lists:** enforce 4 space indentation in sublists ([d51be6e](https://github.com/showdownjs/showdown/commit/d51be6e)) +* **lists:** fix sublists inconsistent behavior ([9cfe8b1](https://github.com/showdownjs/showdown/commit/9cfe8b1)), closes [#299](https://github.com/showdownjs/showdown/issues/299) + +### Features + +* **disableForced4SpacesIndentedSublists:** option that disables the requirement of indenting nested sublists by 4 spaces. The option is disabled by default ([0be39bc](https://github.com/showdownjs/showdown/commit/0be39bc)) + + +### BREAKING CHANGES + +* syntax for sublists is now more restrictive. Before, sublists SHOULD be indented by 4 spaces, but indenting at least 2 spaces would work. + Now, sublists MUST be indented 4 spaces or they won't work. + + With this input: + ```md + * one + * two + * three + ``` + + Before (ouput): + ```html + \n // instead of:\n //
  • - - a
\n // So, to prevent it, we will put a marker (¨A)in the beginning of the line\n // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser\n item = item.replace(/^([-*+]|\\d\\.)[ \\t]+[\\S\\n ]*/g, function (wm2) {\n return '¨A' + wm2;\n });\n\n // m1 - Leading line or\n // Has a double return (multi paragraph) or\n // Has sublist\n if (m1 || (item.search(/\\n{2,}/) > -1)) {\n item = showdown.subParser('githubCodeBlocks')(item, options, globals);\n item = showdown.subParser('blockGamut')(item, options, globals);\n } else {\n // Recursion for sub-lists:\n item = showdown.subParser('lists')(item, options, globals);\n item = item.replace(/\\n$/, ''); // chomp(item)\n item = showdown.subParser('hashHTMLBlocks')(item, options, globals);\n\n // Colapse double linebreaks\n item = item.replace(/\\n\\n+/g, '\\n\\n');\n if (isParagraphed) {\n item = showdown.subParser('paragraphs')(item, options, globals);\n } else {\n item = showdown.subParser('spanGamut')(item, options, globals);\n }\n }\n\n // now we need to remove the marker (¨A)\n item = item.replace('¨A', '');\n // we can finally wrap the line in list item tags\n item = '' + item + '\\n';\n\n return item;\n });\n\n // attacklab: strip sentinel\n listStr = listStr.replace(/¨0/g, '');\n\n globals.gListLevel--;\n\n if (trimTrailing) {\n listStr = listStr.replace(/\\s+$/, '');\n }\n\n return listStr;\n }\n\n function styleStartNumber (list, listType) {\n // check if ol and starts by a number different than 1\n if (listType === 'ol') {\n var res = list.match(/^ *(\\d+)\\./);\n if (res && res[1] !== '1') {\n return ' start=\"' + res[1] + '\"';\n }\n }\n return '';\n }\n\n /**\n * Check and parse consecutive lists (better fix for issue #142)\n * @param {string} list\n * @param {string} listType\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function parseConsecutiveLists (list, listType, trimTrailing) {\n // check if we caught 2 or more consecutive lists by mistake\n // we use the counterRgx, meaning if listType is UL we look for OL and vice versa\n var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\\d+\\.[ \\t]/gm : /^ {0,3}\\d+\\.[ \\t]/gm,\n ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \\t]/gm : /^ {0,3}[*+-][ \\t]/gm,\n counterRxg = (listType === 'ul') ? olRgx : ulRgx,\n result = '';\n\n if (list.search(counterRxg) !== -1) {\n (function parseCL (txt) {\n var pos = txt.search(counterRxg),\n style = styleStartNumber(list, listType);\n if (pos !== -1) {\n // slice\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '\\n';\n\n // invert counterType and listType\n listType = (listType === 'ul') ? 'ol' : 'ul';\n counterRxg = (listType === 'ul') ? olRgx : ulRgx;\n\n //recurse\n parseCL(txt.slice(pos));\n } else {\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt, !!trimTrailing) + '\\n';\n }\n })(list);\n } else {\n var style = styleStartNumber(list, listType);\n result = '\\n\\n<' + listType + style + '>\\n' + processListItems(list, !!trimTrailing) + '\\n';\n }\n\n return result;\n }\n\n /** Start of list parsing **/\n text = globals.converter._dispatch('lists.before', text, options, globals);\n // add sentinel to hack around khtml/safari bug:\n // http://bugs.webkit.org/show_bug.cgi?id=11231\n text += '¨0';\n\n if (globals.gListLevel) {\n text = text.replace(/^(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, list, m2) {\n var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, true);\n }\n );\n } else {\n text = text.replace(/(\\n\\n|^\\n?)(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, m1, list, m3) {\n var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, false);\n }\n );\n }\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n text = globals.converter._dispatch('lists.after', text, options, globals);\n return text;\n});\n","/**\n * Parse metadata at the top of the document\n */\nshowdown.subParser('metadata', function (text, options, globals) {\n 'use strict';\n\n if (!options.metadata) {\n return text;\n }\n\n text = globals.converter._dispatch('metadata.before', text, options, globals);\n\n function parseMetadataContents (content) {\n // raw is raw so it's not changed in any way\n globals.metadata.raw = content;\n\n // escape chars forbidden in html attributes\n // double quotes\n content = content\n // ampersand first\n .replace(/&/g, '&')\n // double quotes\n .replace(/\"/g, '"');\n\n content = content.replace(/\\n {4}/g, ' ');\n content.replace(/^([\\S ]+): +([\\s\\S]+?)$/gm, function (wm, key, value) {\n globals.metadata.parsed[key] = value;\n return '';\n });\n }\n\n text = text.replace(/^\\s*«««+(\\S*?)\\n([\\s\\S]+?)\\n»»»+\\n/, function (wholematch, format, content) {\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/^\\s*---+(\\S*?)\\n([\\s\\S]+?)\\n---+\\n/, function (wholematch, format, content) {\n if (format) {\n globals.metadata.format = format;\n }\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/¨M/g, '');\n\n text = globals.converter._dispatch('metadata.after', text, options, globals);\n return text;\n});\n","/**\n * Remove one level of line-leading tabs or spaces\n */\nshowdown.subParser('outdent', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('outdent.before', text, options, globals);\n\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n text = text.replace(/^(\\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width\n\n // attacklab: clean up hack\n text = text.replace(/¨0/g, '');\n\n text = globals.converter._dispatch('outdent.after', text, options, globals);\n return text;\n});\n","/**\n *\n */\nshowdown.subParser('paragraphs', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('paragraphs.before', text, options, globals);\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n\n var grafs = text.split(/\\n{2,}/g),\n grafsOut = [],\n end = grafs.length; // Wrap

tags\n\n for (var i = 0; i < end; i++) {\n var str = grafs[i];\n // if this is an HTML marker, copy it\n if (str.search(/¨(K|G)(\\d+)\\1/g) >= 0) {\n grafsOut.push(str);\n\n // test for presence of characters to prevent empty lines being parsed\n // as paragraphs (resulting in undesired extra empty paragraphs)\n } else if (str.search(/\\S/) >= 0) {\n str = showdown.subParser('spanGamut')(str, options, globals);\n str = str.replace(/^([ \\t]*)/g, '

');\n str += '

';\n grafsOut.push(str);\n }\n }\n\n /** Unhashify HTML blocks */\n end = grafsOut.length;\n for (i = 0; i < end; i++) {\n var blockText = '',\n grafsOutIt = grafsOut[i],\n codeFlag = false;\n // if this is a marker for an html block...\n // use RegExp.test instead of string.search because of QML bug\n while (/¨(K|G)(\\d+)\\1/.test(grafsOutIt)) {\n var delim = RegExp.$1,\n num = RegExp.$2;\n\n if (delim === 'K') {\n blockText = globals.gHtmlBlocks[num];\n } else {\n // we need to check if ghBlock is a false positive\n if (codeFlag) {\n // use encoded version of all text\n blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);\n } else {\n blockText = globals.ghCodeBlocks[num].codeblock;\n }\n }\n blockText = blockText.replace(/\\$/g, '$$$$'); // Escape any dollar signs\n\n grafsOutIt = grafsOutIt.replace(/(\\n\\n)?¨(K|G)\\d+\\2(\\n\\n)?/, blockText);\n // Check if grafsOutIt is a pre->code\n if (/^]*>\\s*]*>/.test(grafsOutIt)) {\n codeFlag = true;\n }\n }\n grafsOut[i] = grafsOutIt;\n }\n text = grafsOut.join('\\n');\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n return globals.converter._dispatch('paragraphs.after', text, options, globals);\n});\n","/**\n * Run extension\n */\nshowdown.subParser('runExtension', function (ext, text, options, globals) {\n 'use strict';\n\n if (ext.filter) {\n text = ext.filter(text, globals.converter, options);\n\n } else if (ext.regex) {\n // TODO remove this when old extension loading mechanism is deprecated\n var re = ext.regex;\n if (!(re instanceof RegExp)) {\n re = new RegExp(re, 'g');\n }\n text = text.replace(re, ext.replace);\n }\n\n return text;\n});\n","/**\n * These are all the transformations that occur *within* block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('spanGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('spanGamut.before', text, options, globals);\n text = showdown.subParser('codeSpans')(text, options, globals);\n text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);\n text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);\n\n // Process anchor and image tags. Images must come first,\n // because ![foo][f] looks like an anchor.\n text = showdown.subParser('images')(text, options, globals);\n text = showdown.subParser('anchors')(text, options, globals);\n\n // Make links out of things like ``\n // Must come after anchors, because you can use < and >\n // delimiters in inline links like [this]().\n text = showdown.subParser('autoLinks')(text, options, globals);\n text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);\n text = showdown.subParser('emoji')(text, options, globals);\n text = showdown.subParser('underline')(text, options, globals);\n text = showdown.subParser('italicsAndBold')(text, options, globals);\n text = showdown.subParser('strikethrough')(text, options, globals);\n text = showdown.subParser('ellipsis')(text, options, globals);\n\n // we need to hash HTML tags inside spans\n text = showdown.subParser('hashHTMLSpans')(text, options, globals);\n\n // now we encode amps and angles\n text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);\n\n // Do hard breaks\n if (options.simpleLineBreaks) {\n // GFM style hard breaks\n // only add line breaks if the text does not contain a block (special case for lists)\n if (!/\\n\\n¨K/.test(text)) {\n text = text.replace(/\\n+/g, '
\\n');\n }\n } else {\n // Vanilla hard breaks\n text = text.replace(/ +\\n/g, '
\\n');\n }\n\n text = globals.converter._dispatch('spanGamut.after', text, options, globals);\n return text;\n});\n","showdown.subParser('strikethrough', function (text, options, globals) {\n 'use strict';\n\n function parseInside (txt) {\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n return '' + txt + '';\n }\n\n if (options.strikethrough) {\n text = globals.converter._dispatch('strikethrough.before', text, options, globals);\n text = text.replace(/(?:~){2}([\\s\\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });\n text = globals.converter._dispatch('strikethrough.after', text, options, globals);\n }\n\n return text;\n});\n","/**\n * Strips link definitions from text, stores the URLs and titles in\n * hash references.\n * Link defs are in the form: ^[id]: url \"optional title\"\n */\nshowdown.subParser('stripLinkDefinitions', function (text, options, globals) {\n 'use strict';\n\n var regex = /^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*\\s]+)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n+|(?=¨0))/gm,\n base64Regex = /^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n\\n|(?=¨0)|(?=\\n\\[))/gm;\n\n // attacklab: sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n text += '¨0';\n\n var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {\n linkId = linkId.toLowerCase();\n if (url.match(/^data:.+?\\/.+?;base64,/)) {\n // remove newlines\n globals.gUrls[linkId] = url.replace(/\\s/g, '');\n } else {\n globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive\n }\n\n if (blankLines) {\n // Oops, found blank lines, so it's not a title.\n // Put back the parenthetical statement we stole.\n return blankLines + title;\n\n } else {\n if (title) {\n globals.gTitles[linkId] = title.replace(/\"|'/g, '"');\n }\n if (options.parseImgDimensions && width && height) {\n globals.gDimensions[linkId] = {\n width: width,\n height: height\n };\n }\n }\n // Completely remove the definition from the text\n return '';\n };\n\n // first we try to find base64 link references\n text = text.replace(base64Regex, replaceFunc);\n\n text = text.replace(regex, replaceFunc);\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return text;\n});\n","showdown.subParser('tables', function (text, options, globals) {\n 'use strict';\n\n if (!options.tables) {\n return text;\n }\n\n var tableRgx = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n //singeColTblRgx = /^ {0,3}\\|.+\\|\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n(?: {0,3}\\|.+\\|\\n)+(?:\\n\\n|¨0)/gm;\n singeColTblRgx = /^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm;\n\n function parseStyles (sLine) {\n if (/^:[ \\t]*--*$/.test(sLine)) {\n return ' style=\"text-align:left;\"';\n } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine)) {\n return ' style=\"text-align:right;\"';\n } else if (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n return ' style=\"text-align:center;\"';\n } else {\n return '';\n }\n }\n\n function parseHeaders (header, style) {\n var id = '';\n header = header.trim();\n // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility\n if (options.tablesHeaderId || options.tableHeaderId) {\n id = ' id=\"' + header.replace(/ /g, '_').toLowerCase() + '\"';\n }\n header = showdown.subParser('spanGamut')(header, options, globals);\n\n return '' + header + '\\n';\n }\n\n function parseCells (cell, style) {\n var subText = showdown.subParser('spanGamut')(cell, options, globals);\n return '' + subText + '\\n';\n }\n\n function buildTable (headers, cells) {\n var tb = '\\n\\n\\n',\n tblLgn = headers.length;\n\n for (var i = 0; i < tblLgn; ++i) {\n tb += headers[i];\n }\n tb += '\\n\\n\\n';\n\n for (i = 0; i < cells.length; ++i) {\n tb += '\\n';\n for (var ii = 0; ii < tblLgn; ++ii) {\n tb += cells[i][ii];\n }\n tb += '\\n';\n }\n tb += '\\n
\\n';\n return tb;\n }\n\n function parseTable (rawTable) {\n var i, tableLines = rawTable.split('\\n');\n\n for (i = 0; i < tableLines.length; ++i) {\n // strip wrong first and last column if wrapped tables are used\n if (/^ {0,3}\\|/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/^ {0,3}\\|/, '');\n }\n if (/\\|[ \\t]*$/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/\\|[ \\t]*$/, '');\n }\n // parse code spans first, but we only support one line code spans\n tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);\n }\n\n var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),\n rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),\n rawCells = [],\n headers = [],\n styles = [],\n cells = [];\n\n tableLines.shift();\n tableLines.shift();\n\n for (i = 0; i < tableLines.length; ++i) {\n if (tableLines[i].trim() === '') {\n continue;\n }\n rawCells.push(\n tableLines[i]\n .split('|')\n .map(function (s) {\n return s.trim();\n })\n );\n }\n\n if (rawHeaders.length < rawStyles.length) {\n return rawTable;\n }\n\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n\n for (i = 0; i < rawHeaders.length; ++i) {\n if (showdown.helper.isUndefined(styles[i])) {\n styles[i] = '';\n }\n headers.push(parseHeaders(rawHeaders[i], styles[i]));\n }\n\n for (i = 0; i < rawCells.length; ++i) {\n var row = [];\n for (var ii = 0; ii < headers.length; ++ii) {\n if (showdown.helper.isUndefined(rawCells[i][ii])) {\n\n }\n row.push(parseCells(rawCells[i][ii], styles[ii]));\n }\n cells.push(row);\n }\n\n return buildTable(headers, cells);\n }\n\n text = globals.converter._dispatch('tables.before', text, options, globals);\n\n // find escaped pipe characters\n text = text.replace(/\\\\(\\|)/g, showdown.helper.escapeCharactersCallback);\n\n // parse multi column tables\n text = text.replace(tableRgx, parseTable);\n\n // parse one column tables\n text = text.replace(singeColTblRgx, parseTable);\n\n text = globals.converter._dispatch('tables.after', text, options, globals);\n\n return text;\n});\n","showdown.subParser('underline', function (text, options, globals) {\n 'use strict';\n\n if (!options.underline) {\n return text;\n }\n\n text = globals.converter._dispatch('underline.before', text, options, globals);\n\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n }\n\n // escape remaining underscores to prevent them being parsed by italic and bold\n text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('underline.after', text, options, globals);\n\n return text;\n});\n","/**\n * Swap back in all the special characters we've hidden.\n */\nshowdown.subParser('unescapeSpecialChars', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);\n\n text = text.replace(/¨E(\\d+)E/g, function (wholeMatch, m1) {\n var charCodeToReplace = parseInt(m1);\n return String.fromCharCode(charCodeToReplace);\n });\n\n text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);\n return text;\n});\n","showdown.subParser('makeMarkdown.blockquote', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals);\n\n if (innerTxt === '') {\n continue;\n }\n txt += innerTxt;\n }\n }\n // cleanup\n txt = txt.trim();\n txt = '> ' + txt.split('\\n').join('\\n> ');\n return txt;\n});\n","showdown.subParser('makeMarkdown.codeBlock', function (node, globals) {\n 'use strict';\n\n var lang = node.getAttribute('language'),\n num = node.getAttribute('precodenum');\n return '```' + lang + '\\n' + globals.preList[num] + '\\n```';\n});\n","showdown.subParser('makeMarkdown.codeSpan', function (node) {\n 'use strict';\n\n return '`' + node.innerHTML + '`';\n});\n","showdown.subParser('makeMarkdown.emphasis', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '*';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '*';\n }\n return txt;\n});\n","showdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) {\n 'use strict';\n\n var headerMark = new Array(headerLevel + 1).join('#'),\n txt = '';\n\n if (node.hasChildNodes()) {\n txt = headerMark + ' ';\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n return txt;\n});\n","showdown.subParser('makeMarkdown.hr', function () {\n 'use strict';\n\n return '---';\n});\n","showdown.subParser('makeMarkdown.image', function (node) {\n 'use strict';\n\n var txt = '';\n if (node.hasAttribute('src')) {\n txt += '![' + node.getAttribute('alt') + '](';\n txt += '<' + node.getAttribute('src') + '>';\n if (node.hasAttribute('width') && node.hasAttribute('height')) {\n txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height');\n }\n\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n","showdown.subParser('makeMarkdown.links', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes() && node.hasAttribute('href')) {\n var children = node.childNodes,\n childrenLength = children.length;\n txt = '[';\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '](';\n txt += '<' + node.getAttribute('href') + '>';\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n","showdown.subParser('makeMarkdown.list', function (node, globals, type) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var listItems = node.childNodes,\n listItemsLenght = listItems.length,\n listNum = node.getAttribute('start') || 1;\n\n for (var i = 0; i < listItemsLenght; ++i) {\n if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') {\n continue;\n }\n\n // define the bullet to use in list\n var bullet = '';\n if (type === 'ol') {\n bullet = listNum.toString() + '. ';\n } else {\n bullet = '- ';\n }\n\n // parse list item\n txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals);\n ++listNum;\n }\n\n // add comment at the end to prevent consecutive lists to be parsed as one\n txt += '\\n\\n';\n return txt.trim();\n});\n","showdown.subParser('makeMarkdown.listItem', function (node, globals) {\n 'use strict';\n\n var listItemTxt = '';\n\n var children = node.childNodes,\n childrenLenght = children.length;\n\n for (var i = 0; i < childrenLenght; ++i) {\n listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n // if it's only one liner, we need to add a newline at the end\n if (!/\\n$/.test(listItemTxt)) {\n listItemTxt += '\\n';\n } else {\n // it's multiparagraph, so we need to indent\n listItemTxt = listItemTxt\n .split('\\n')\n .join('\\n ')\n .replace(/^ {4}$/gm, '')\n .replace(/\\n\\n+/g, '\\n\\n');\n }\n\n return listItemTxt;\n});\n","\n\nshowdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) {\n 'use strict';\n\n spansOnly = spansOnly || false;\n\n var txt = '';\n\n // edge case of text without wrapper paragraph\n if (node.nodeType === 3) {\n return showdown.subParser('makeMarkdown.txt')(node, globals);\n }\n\n // HTML comment\n if (node.nodeType === 8) {\n return '\\n\\n';\n }\n\n // process only node elements\n if (node.nodeType !== 1) {\n return '';\n }\n\n var tagName = node.tagName.toLowerCase();\n\n switch (tagName) {\n\n //\n // BLOCKS\n //\n case 'h1':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\\n\\n'; }\n break;\n case 'h2':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\\n\\n'; }\n break;\n case 'h3':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\\n\\n'; }\n break;\n case 'h4':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\\n\\n'; }\n break;\n case 'h5':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\\n\\n'; }\n break;\n case 'h6':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\\n\\n'; }\n break;\n\n case 'p':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\\n\\n'; }\n break;\n\n case 'blockquote':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\\n\\n'; }\n break;\n\n case 'hr':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\\n\\n'; }\n break;\n\n case 'ol':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\\n\\n'; }\n break;\n\n case 'ul':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\\n\\n'; }\n break;\n\n case 'precode':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\\n\\n'; }\n break;\n\n case 'pre':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\\n\\n'; }\n break;\n\n case 'table':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\\n\\n'; }\n break;\n\n //\n // SPANS\n //\n case 'code':\n txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals);\n break;\n\n case 'em':\n case 'i':\n txt = showdown.subParser('makeMarkdown.emphasis')(node, globals);\n break;\n\n case 'strong':\n case 'b':\n txt = showdown.subParser('makeMarkdown.strong')(node, globals);\n break;\n\n case 'del':\n txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals);\n break;\n\n case 'a':\n txt = showdown.subParser('makeMarkdown.links')(node, globals);\n break;\n\n case 'img':\n txt = showdown.subParser('makeMarkdown.image')(node, globals);\n break;\n\n default:\n txt = node.outerHTML + '\\n\\n';\n }\n\n // common normalization\n // TODO eventually\n\n return txt;\n});\n","showdown.subParser('makeMarkdown.paragraph', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n\n // some text normalization\n txt = txt.trim();\n\n return txt;\n});\n","showdown.subParser('makeMarkdown.pre', function (node, globals) {\n 'use strict';\n\n var num = node.getAttribute('prenum');\n return '
' + globals.preList[num] + '
';\n});\n","showdown.subParser('makeMarkdown.strikethrough', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '~~';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '~~';\n }\n return txt;\n});\n","showdown.subParser('makeMarkdown.strong', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '**';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '**';\n }\n return txt;\n});\n","showdown.subParser('makeMarkdown.table', function (node, globals) {\n 'use strict';\n\n var txt = '',\n tableArray = [[], []],\n headings = node.querySelectorAll('thead>tr>th'),\n rows = node.querySelectorAll('tbody>tr'),\n i, ii;\n for (i = 0; i < headings.length; ++i) {\n var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals),\n allign = '---';\n\n if (headings[i].hasAttribute('style')) {\n var style = headings[i].getAttribute('style').toLowerCase().replace(/\\s/g, '');\n switch (style) {\n case 'text-align:left;':\n allign = ':---';\n break;\n case 'text-align:right;':\n allign = '---:';\n break;\n case 'text-align:center;':\n allign = ':---:';\n break;\n }\n }\n tableArray[0][i] = headContent.trim();\n tableArray[1][i] = allign;\n }\n\n for (i = 0; i < rows.length; ++i) {\n var r = tableArray.push([]) - 1,\n cols = rows[i].getElementsByTagName('td');\n\n for (ii = 0; ii < headings.length; ++ii) {\n var cellContent = ' ';\n if (typeof cols[ii] !== 'undefined') {\n cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals);\n }\n tableArray[r].push(cellContent);\n }\n }\n\n var cellSpacesCount = 3;\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n var strLen = tableArray[i][ii].length;\n if (strLen > cellSpacesCount) {\n cellSpacesCount = strLen;\n }\n }\n }\n\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n if (i === 1) {\n if (tableArray[i][ii].slice(-1) === ':') {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':';\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-');\n }\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount);\n }\n }\n txt += '| ' + tableArray[i].join(' | ') + ' |\\n';\n }\n\n return txt.trim();\n});\n","showdown.subParser('makeMarkdown.tableCell', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true);\n }\n return txt.trim();\n});\n","showdown.subParser('makeMarkdown.txt', function (node) {\n 'use strict';\n\n var txt = node.nodeValue;\n\n // multiple spaces are collapsed\n txt = txt.replace(/ +/g, ' ');\n\n // replace the custom ¨NBSP; with a space\n txt = txt.replace(/¨NBSP;/g, ' ');\n\n // \", <, > and & should replace escaped html entities\n txt = showdown.helper.unescapeHTMLEntities(txt);\n\n // escape markdown magic characters\n // emphasis, strong and strikethrough - can appear everywhere\n // we also escape pipe (|) because of tables\n // and escape ` because of code blocks and spans\n txt = txt.replace(/([*_~|`])/g, '\\\\$1');\n\n // escape > because of blockquotes\n txt = txt.replace(/^(\\s*)>/g, '\\\\$1>');\n\n // hash character, only troublesome at the beginning of a line because of headers\n txt = txt.replace(/^#/gm, '\\\\#');\n\n // horizontal rules\n txt = txt.replace(/^(\\s*)([-=]{3,})(\\s*)$/, '$1\\\\$2$3');\n\n // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer\n txt = txt.replace(/^( {0,3}\\d+)\\./gm, '$1\\\\.');\n\n // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped)\n txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\\\$2');\n\n // images and links, ] followed by ( is problematic, so we escape it\n txt = txt.replace(/]([\\s]*)\\(/g, '\\\\]$1\\\\(');\n\n // reference URIs must also be escaped\n txt = txt.replace(/^ {0,3}\\[([\\S \\t]*?)]:/gm, '\\\\[$1]:');\n\n return txt;\n});\n","var root = this;\n\n// AMD Loader\nif (typeof define === 'function' && define.amd) {\n define(function () {\n 'use strict';\n return showdown;\n });\n\n// CommonJS/nodeJS Loader\n} else if (typeof module !== 'undefined' && module.exports) {\n module.exports = showdown;\n\n// Regular Browser loader\n} else {\n root.showdown = showdown;\n}\n"]} \ No newline at end of file diff --git a/node_modules/showdown/dist/showdown.min.js b/node_modules/showdown/dist/showdown.min.js new file mode 100644 index 0000000..2e2adad --- /dev/null +++ b/node_modules/showdown/dist/showdown.min.js @@ -0,0 +1,3 @@ +/*! showdown v 1.9.0 - 10-11-2018 */ +(function(){function e(e){"use strict";var r={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(r));var t={};for(var a in r)r.hasOwnProperty(a)&&(t[a]=r[a].defaultValue);return t}function r(e,r){"use strict";var t=r?"Error in "+r+" extension->":"Error in unnamed extension",n={valid:!0,error:""};a.helper.isArray(e)||(e=[e]);for(var s=0;s").replace(/&/g,"&")};var c=function(e,r,t,a){"use strict";var n,s,o,i,l,c=a||"",u=c.indexOf("g")>-1,d=new RegExp(r+"|"+t,"g"+c.replace(/g/g,"")),p=new RegExp(r,c.replace(/g/g,"")),h=[];do{for(n=0;o=d.exec(e);)if(p.test(o[0]))n++||(i=(s=d.lastIndex)-o[0].length);else if(n&&!--n){l=o.index+o[0].length;var _={left:{start:i,end:s},match:{start:s,end:o.index},right:{start:o.index,end:l},wholeMatch:{start:i,end:l}};if(h.push(_),!u)return h}}while(n&&(d.lastIndex=s));return h};a.helper.matchRecursiveRegExp=function(e,r,t,a){"use strict";for(var n=c(e,r,t,a),s=[],o=0;o0){var d=[];0!==i[0].wholeMatch.start&&d.push(e.slice(0,i[0].wholeMatch.start));for(var p=0;p=0?n+(t||0):n},a.helper.splitAtIndex=function(e,r){"use strict";if(!a.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,r),e.substring(r)]},a.helper.encodeEmailAddress=function(e){"use strict";var r=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,function(e){if("@"===e)e=r[Math.floor(2*Math.random())](e);else{var t=Math.random();e=t>.9?r[2](e):t>.45?r[1](e):r[0](e)}return e})},a.helper.padEnd=function(e,r,t){"use strict";return r>>=0,t=String(t||" "),e.length>r?String(e):((r-=e.length)>t.length&&(t+=t.repeat(r/t.length)),String(e)+t.slice(0,r))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),a.helper.regexes={asteriskDashAndColon:/([*_:~])/g},a.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:"S"},a.Converter=function(e){"use strict";function t(e,t){if(t=t||null,a.helper.isString(e)){if(e=a.helper.stdExtName(e),t=e,a.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new a.Converter));a.helper.isArray(e)||(e=[e]);var n=r(e,t);if(!n.valid)throw Error(n.error);for(var s=0;s[ \t]+¨NBSP;<"),!r){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");r=window.document}var n=r.createElement("div");n.innerHTML=e;var s={preList:function(e){for(var r=e.querySelectorAll("pre"),t=[],n=0;n'}else t.push(r[n].innerHTML),r[n].innerHTML="",r[n].setAttribute("prenum",n.toString());return t}(n)};t(n);for(var o=n.childNodes,i="",l=0;l? ?(['"].*['"])?\)$/m)>-1)o="";else if(!o){if(s||(s=n.toLowerCase().replace(/ ?\n/g," ")),o="#"+s,a.helper.isUndefined(t.gUrls[s]))return e;o=t.gUrls[s],a.helper.isUndefined(t.gTitles[s])||(c=t.gTitles[s])}var u='
"};return e=(e=t.converter._dispatch("anchors.before",e,r,t)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,n),e=e.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n),e=e.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n),e=e.replace(/\[([^\[\]]+)]()()()()()/g,n),r.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,t,n,s,o){if("\\"===n)return t+s;if(!a.helper.isString(r.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var i=r.ghMentionsLink.replace(/\{u}/g,o),l="";return r.openLinksInNewWindow&&(l=' target="¨E95Eblank"'),t+'"+s+""})),e=t.converter._dispatch("anchors.after",e,r,t)});var u=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,d=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,p=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,h=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,_=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,g=function(e){"use strict";return function(r,t,n,s,o,i,l){var c=n=n.replace(a.helper.regexes.asteriskDashAndColon,a.helper.escapeCharactersCallback),u="",d="",p=t||"",h=l||"";return/^www\./i.test(n)&&(n=n.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&i&&(u=i),e.openLinksInNewWindow&&(d=' target="¨E95Eblank"'),p+'"+c+""+u+h}},m=function(e,r){"use strict";return function(t,n,s){var o="mailto:";return n=n||"",s=a.subParser("unescapeSpecialChars")(s,e,r),e.encodeEmails?(o=a.helper.encodeEmailAddress(o+s),s=a.helper.encodeEmailAddress(s)):o+=s,n+''+s+""}};a.subParser("autoLinks",function(e,r,t){"use strict";return e=t.converter._dispatch("autoLinks.before",e,r,t),e=e.replace(p,g(r)),e=e.replace(_,m(r,t)),e=t.converter._dispatch("autoLinks.after",e,r,t)}),a.subParser("simplifiedAutoLinks",function(e,r,t){"use strict";return r.simplifiedAutoLink?(e=t.converter._dispatch("simplifiedAutoLinks.before",e,r,t),e=r.excludeTrailingPunctuationFromURLs?e.replace(d,g(r)):e.replace(u,g(r)),e=e.replace(h,m(r,t)),e=t.converter._dispatch("simplifiedAutoLinks.after",e,r,t)):e}),a.subParser("blockGamut",function(e,r,t){"use strict";return e=t.converter._dispatch("blockGamut.before",e,r,t),e=a.subParser("blockQuotes")(e,r,t),e=a.subParser("headers")(e,r,t),e=a.subParser("horizontalRule")(e,r,t),e=a.subParser("lists")(e,r,t),e=a.subParser("codeBlocks")(e,r,t),e=a.subParser("tables")(e,r,t),e=a.subParser("hashHTMLBlocks")(e,r,t),e=a.subParser("paragraphs")(e,r,t),e=t.converter._dispatch("blockGamut.after",e,r,t)}),a.subParser("blockQuotes",function(e,r,t){"use strict";e=t.converter._dispatch("blockQuotes.before",e,r,t),e+="\n\n";var n=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return r.splitAdjacentBlockquotes&&(n=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(n,function(e){return e=e.replace(/^[ \t]*>[ \t]?/gm,""),e=e.replace(/¨0/g,""),e=e.replace(/^[ \t]+$/gm,""),e=a.subParser("githubCodeBlocks")(e,r,t),e=a.subParser("blockGamut")(e,r,t),e=e.replace(/(^|\n)/g,"$1 "),e=e.replace(/(\s*
[^\r]+?<\/pre>)/gm,function(e,r){var t=r;return t=t.replace(/^  /gm,"¨0"),t=t.replace(/¨0/g,"")}),a.subParser("hashBlock")("
\n"+e+"\n
",r,t)}),e=t.converter._dispatch("blockQuotes.after",e,r,t)}),a.subParser("codeBlocks",function(e,r,t){"use strict";e=t.converter._dispatch("codeBlocks.before",e,r,t);return e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,n,s){var o=n,i=s,l="\n";return o=a.subParser("outdent")(o,r,t),o=a.subParser("encodeCode")(o,r,t),o=a.subParser("detab")(o,r,t),o=o.replace(/^\n+/g,""),o=o.replace(/\n+$/g,""),r.omitExtraWLInCodeBlocks&&(l=""),o="
"+o+l+"
",a.subParser("hashBlock")(o,r,t)+i}),e=e.replace(/¨0/,""),e=t.converter._dispatch("codeBlocks.after",e,r,t)}),a.subParser("codeSpans",function(e,r,t){"use strict";return void 0===(e=t.converter._dispatch("codeSpans.before",e,r,t))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,n,s,o){var i=o;return i=i.replace(/^([ \t]*)/g,""),i=i.replace(/[ \t]*$/g,""),i=a.subParser("encodeCode")(i,r,t),i=n+""+i+"",i=a.subParser("hashHTMLSpans")(i,r,t)}),e=t.converter._dispatch("codeSpans.after",e,r,t)}),a.subParser("completeHTMLDocument",function(e,r,t){"use strict";if(!r.completeHTMLDocument)return e;e=t.converter._dispatch("completeHTMLDocument.before",e,r,t);var a="html",n="\n",s="",o='\n',i="",l="";void 0!==t.metadata.parsed.doctype&&(n="\n","html"!==(a=t.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==a||(o=''));for(var c in t.metadata.parsed)if(t.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":s=""+t.metadata.parsed.title+"\n";break;case"charset":o="html"===a||"html5"===a?'\n':'\n';break;case"language":case"lang":i=' lang="'+t.metadata.parsed[c]+'"',l+='\n';break;default:l+='\n'}return e=n+"\n\n"+s+o+l+"\n\n"+e.trim()+"\n\n",e=t.converter._dispatch("completeHTMLDocument.after",e,r,t)}),a.subParser("detab",function(e,r,t){"use strict";return e=t.converter._dispatch("detab.before",e,r,t),e=e.replace(/\t(?=\t)/g," "),e=e.replace(/\t/g,"¨A¨B"),e=e.replace(/¨B(.+?)¨A/g,function(e,r){for(var t=r,a=4-t.length%4,n=0;n/g,">"),e=t.converter._dispatch("encodeAmpsAndAngles.after",e,r,t)}),a.subParser("encodeBackslashEscapes",function(e,r,t){"use strict";return e=t.converter._dispatch("encodeBackslashEscapes.before",e,r,t),e=e.replace(/\\(\\)/g,a.helper.escapeCharactersCallback),e=e.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,a.helper.escapeCharactersCallback),e=t.converter._dispatch("encodeBackslashEscapes.after",e,r,t)}),a.subParser("encodeCode",function(e,r,t){"use strict";return e=t.converter._dispatch("encodeCode.before",e,r,t),e=e.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,a.helper.escapeCharactersCallback),e=t.converter._dispatch("encodeCode.after",e,r,t)}),a.subParser("escapeSpecialCharsWithinTagAttributes",function(e,r,t){"use strict";return e=(e=t.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,r,t)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,a.helper.escapeCharactersCallback)}),e=e.replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,a.helper.escapeCharactersCallback)}),e=t.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,r,t)}),a.subParser("githubCodeBlocks",function(e,r,t){"use strict";return r.ghCodeBlocks?(e=t.converter._dispatch("githubCodeBlocks.before",e,r,t),e+="¨0",e=e.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,n,s,o){var i=r.omitExtraWLInCodeBlocks?"":"\n";return o=a.subParser("encodeCode")(o,r,t),o=a.subParser("detab")(o,r,t),o=o.replace(/^\n+/g,""),o=o.replace(/\n+$/g,""),o="
"+o+i+"
",o=a.subParser("hashBlock")(o,r,t),"\n\n¨G"+(t.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"}),e=e.replace(/¨0/,""),t.converter._dispatch("githubCodeBlocks.after",e,r,t)):e}),a.subParser("hashBlock",function(e,r,t){"use strict";return e=t.converter._dispatch("hashBlock.before",e,r,t),e=e.replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(t.gHtmlBlocks.push(e)-1)+"K\n\n",e=t.converter._dispatch("hashBlock.after",e,r,t)}),a.subParser("hashCodeTags",function(e,r,t){"use strict";e=t.converter._dispatch("hashCodeTags.before",e,r,t);return e=a.helper.replaceRecursiveRegExp(e,function(e,n,s,o){var i=s+a.subParser("encodeCode")(n,r,t)+o;return"¨C"+(t.gHtmlSpans.push(i)-1)+"C"},"]*>","
","gim"),e=t.converter._dispatch("hashCodeTags.after",e,r,t)}),a.subParser("hashElement",function(e,r,t){"use strict";return function(e,r){var a=r;return a=a.replace(/\n\n/g,"\n"),a=a.replace(/^\n/,""),a=a.replace(/\n+$/g,""),a="\n\n¨K"+(t.gHtmlBlocks.push(a)-1)+"K\n\n"}}),a.subParser("hashHTMLBlocks",function(e,r,t){"use strict";e=t.converter._dispatch("hashHTMLBlocks.before",e,r,t);var n=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],s=function(e,r,a,n){var s=e;return-1!==a.search(/\bmarkdown\b/)&&(s=a+t.converter.makeHtml(r)+n),"\n\n¨K"+(t.gHtmlBlocks.push(s)-1)+"K\n\n"};r.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,r){return"<"+r+">"}));for(var o=0;o]*>)","im"),c="<"+n[o]+"\\b[^>]*>",u="";-1!==(i=a.helper.regexIndexOf(e,l));){var d=a.helper.splitAtIndex(e,i),p=a.helper.replaceRecursiveRegExp(d[1],s,c,u,"im");if(p===d[1])break;e=d[0].concat(p)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,a.subParser("hashElement")(e,r,t)),e=a.helper.replaceRecursiveRegExp(e,function(e){return"\n\n¨K"+(t.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm"),e=e.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,a.subParser("hashElement")(e,r,t)),e=t.converter._dispatch("hashHTMLBlocks.after",e,r,t)}),a.subParser("hashHTMLSpans",function(e,r,t){"use strict";function a(e){return"¨C"+(t.gHtmlSpans.push(e)-1)+"C"}return e=t.converter._dispatch("hashHTMLSpans.before",e,r,t),e=e.replace(/<[^>]+?\/>/gi,function(e){return a(e)}),e=e.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return a(e)}),e=e.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return a(e)}),e=e.replace(/<[^>]+?>/gi,function(e){return a(e)}),e=t.converter._dispatch("hashHTMLSpans.after",e,r,t)}),a.subParser("unhashHTMLSpans",function(e,r,t){"use strict";e=t.converter._dispatch("unhashHTMLSpans.before",e,r,t);for(var a=0;a]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=t.converter._dispatch("hashPreCodeTags.after",e,r,t)}),a.subParser("headers",function(e,r,t){"use strict";function n(e){var n,s;if(r.customizedHeaderId){var o=e.match(/\{([^{]+?)}\s*$/);o&&o[1]&&(e=o[1])}return n=e,s=a.helper.isString(r.prefixHeaderId)?r.prefixHeaderId:!0===r.prefixHeaderId?"section-":"",r.rawPrefixHeaderId||(n=s+n),n=r.ghCompatibleHeaderId?n.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():r.rawHeaderId?n.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():n.replace(/[^\w]/g,"").toLowerCase(),r.rawPrefixHeaderId&&(n=s+n),t.hashLinkCounts[n]?n=n+"-"+t.hashLinkCounts[n]++:t.hashLinkCounts[n]=1,n}e=t.converter._dispatch("headers.before",e,r,t);var s=isNaN(parseInt(r.headerLevelStart))?1:parseInt(r.headerLevelStart),o=r.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,i=r.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(o,function(e,o){var i=a.subParser("spanGamut")(o,r,t),l=r.noHeaderId?"":' id="'+n(o)+'"',c=""+i+"";return a.subParser("hashBlock")(c,r,t)})).replace(i,function(e,o){var i=a.subParser("spanGamut")(o,r,t),l=r.noHeaderId?"":' id="'+n(o)+'"',c=s+1,u=""+i+"";return a.subParser("hashBlock")(u,r,t)});var l=r.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;return e=e.replace(l,function(e,o,i){var l=i;r.customizedHeaderId&&(l=i.replace(/\s?\{([^{]+?)}\s*$/,""));var c=a.subParser("spanGamut")(l,r,t),u=r.noHeaderId?"":' id="'+n(i)+'"',d=s-1+o.length,p=""+c+"";return a.subParser("hashBlock")(p,r,t)}),e=t.converter._dispatch("headers.after",e,r,t)}),a.subParser("horizontalRule",function(e,r,t){"use strict";e=t.converter._dispatch("horizontalRule.before",e,r,t);var n=a.subParser("hashBlock")("
",r,t);return e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,n),e=e.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,n),e=e.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,n),e=t.converter._dispatch("horizontalRule.after",e,r,t)}),a.subParser("images",function(e,r,t){"use strict";function n(e,r,n,s,o,i,l,c){var u=t.gUrls,d=t.gTitles,p=t.gDimensions;if(n=n.toLowerCase(),c||(c=""),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)s="";else if(""===s||null===s){if(""!==n&&null!==n||(n=r.toLowerCase().replace(/ ?\n/g," ")),s="#"+n,a.helper.isUndefined(u[n]))return e;s=u[n],a.helper.isUndefined(d[n])||(c=d[n]),a.helper.isUndefined(p[n])||(o=p[n].width,i=p[n].height)}r=r.replace(/"/g,""").replace(a.helper.regexes.asteriskDashAndColon,a.helper.escapeCharactersCallback);var h=''+r+'"}return e=(e=t.converter._dispatch("images.before",e,r,t)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,n),e=e.replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(e,r,t,a,s,o,i,l){return a=a.replace(/\s/g,""),n(e,r,t,a,s,o,0,l)}),e=e.replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,n),e=e.replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,n),e=e.replace(/!\[([^\[\]]+)]()()()()()/g,n),e=t.converter._dispatch("images.after",e,r,t)}),a.subParser("italicsAndBold",function(e,r,t){"use strict";function a(e,r,t){return r+e+t}return e=t.converter._dispatch("italicsAndBold.before",e,r,t),e=r.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,r){return a(r,"","")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,r){return a(r,"","")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,r){return a(r,"","")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/__(\S[\s\S]*?)__/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e}),e=r.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,r,t){return a(t,r+"","")})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,r,t){return a(t,r+"","")})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,r,t){return a(t,r+"","")}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e}),e=t.converter._dispatch("italicsAndBold.after",e,r,t)}),a.subParser("lists",function(e,r,t){"use strict";function n(e,n){t.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var s=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return r.disableForced4SpacesIndentedSublists&&(s=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=e.replace(s,function(e,n,s,i,l,c,u){u=u&&""!==u.trim();var d=a.subParser("outdent")(l,r,t),p="";return c&&r.tasklists&&(p=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e='-1?(d=a.subParser("githubCodeBlocks")(d,r,t),d=a.subParser("blockGamut")(d,r,t)):(d=(d=a.subParser("lists")(d,r,t)).replace(/\n$/,""),d=(d=a.subParser("hashHTMLBlocks")(d,r,t)).replace(/\n\n+/g,"\n\n"),d=o?a.subParser("paragraphs")(d,r,t):a.subParser("spanGamut")(d,r,t)),d=d.replace("¨A",""),d=""+d+"\n"}),e=e.replace(/¨0/g,""),t.gListLevel--,n&&(e=e.replace(/\s+$/,"")),e}function s(e,r){if("ol"===r){var t=e.match(/^ *(\d+)\./);if(t&&"1"!==t[1])return' start="'+t[1]+'"'}return""}function o(e,t,a){var o=r.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,i=r.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===t?o:i,c="";if(-1!==e.search(l))!function r(u){var d=u.search(l),p=s(e,t);-1!==d?(c+="\n\n<"+t+p+">\n"+n(u.slice(0,d),!!a)+"\n",l="ul"===(t="ul"===t?"ol":"ul")?o:i,r(u.slice(d))):c+="\n\n<"+t+p+">\n"+n(u,!!a)+"\n"}(e);else{var u=s(e,t);c="\n\n<"+t+u+">\n"+n(e,!!a)+"\n"}return c}return e=t.converter._dispatch("lists.before",e,r,t),e+="¨0",e=t.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,r,t){return o(r,t.search(/[*+-]/g)>-1?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,r,t,a){return o(t,a.search(/[*+-]/g)>-1?"ul":"ol",!1)}),e=e.replace(/¨0/,""),e=t.converter._dispatch("lists.after",e,r,t)}),a.subParser("metadata",function(e,r,t){"use strict";function a(e){t.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,r,a){return t.metadata.parsed[r]=a,""})}return r.metadata?(e=t.converter._dispatch("metadata.before",e,r,t),e=e.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(e,r,t){return a(t),"¨M"}),e=e.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,r,n){return r&&(t.metadata.format=r),a(n),"¨M"}),e=e.replace(/¨M/g,""),e=t.converter._dispatch("metadata.after",e,r,t)):e}),a.subParser("outdent",function(e,r,t){"use strict";return e=t.converter._dispatch("outdent.before",e,r,t),e=e.replace(/^(\t|[ ]{1,4})/gm,"¨0"),e=e.replace(/¨0/g,""),e=t.converter._dispatch("outdent.after",e,r,t)}),a.subParser("paragraphs",function(e,r,t){"use strict";for(var n=(e=(e=(e=t.converter._dispatch("paragraphs.before",e,r,t)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),s=[],o=n.length,i=0;i=0?s.push(l):l.search(/\S/)>=0&&(l=(l=a.subParser("spanGamut")(l,r,t)).replace(/^([ \t]*)/g,"

"),l+="

",s.push(l))}for(o=s.length,i=0;i]*>\s*]*>/.test(u)&&(d=!0)}s[i]=u}return e=s.join("\n"),e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,""),t.converter._dispatch("paragraphs.after",e,r,t)}),a.subParser("runExtension",function(e,r,t,a){"use strict";if(e.filter)r=e.filter(r,a.converter,t);else if(e.regex){var n=e.regex;n instanceof RegExp||(n=new RegExp(n,"g")),r=r.replace(n,e.replace)}return r}),a.subParser("spanGamut",function(e,r,t){"use strict";return e=t.converter._dispatch("spanGamut.before",e,r,t),e=a.subParser("codeSpans")(e,r,t),e=a.subParser("escapeSpecialCharsWithinTagAttributes")(e,r,t),e=a.subParser("encodeBackslashEscapes")(e,r,t),e=a.subParser("images")(e,r,t),e=a.subParser("anchors")(e,r,t),e=a.subParser("autoLinks")(e,r,t),e=a.subParser("simplifiedAutoLinks")(e,r,t),e=a.subParser("emoji")(e,r,t),e=a.subParser("underline")(e,r,t),e=a.subParser("italicsAndBold")(e,r,t),e=a.subParser("strikethrough")(e,r,t),e=a.subParser("ellipsis")(e,r,t),e=a.subParser("hashHTMLSpans")(e,r,t),e=a.subParser("encodeAmpsAndAngles")(e,r,t),r.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=t.converter._dispatch("spanGamut.after",e,r,t)}),a.subParser("strikethrough",function(e,r,t){"use strict";return r.strikethrough&&(e=(e=t.converter._dispatch("strikethrough.before",e,r,t)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,n){return function(e){return r.simplifiedAutoLink&&(e=a.subParser("simplifiedAutoLinks")(e,r,t)),""+e+""}(n)}),e=t.converter._dispatch("strikethrough.after",e,r,t)),e}),a.subParser("stripLinkDefinitions",function(e,r,t){"use strict";var n=function(e,n,s,o,i,l,c){return n=n.toLowerCase(),s.match(/^data:.+?\/.+?;base64,/)?t.gUrls[n]=s.replace(/\s/g,""):t.gUrls[n]=a.subParser("encodeAmpsAndAngles")(s,r,t),l?l+c:(c&&(t.gTitles[n]=c.replace(/"|'/g,""")),r.parseImgDimensions&&o&&i&&(t.gDimensions[n]={width:o,height:i}),"")};return e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,n),e=e.replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,n),e=e.replace(/¨0/,"")}),a.subParser("tables",function(e,r,t){"use strict";function n(e){return/^:[ \t]*--*$/.test(e)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(e)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(e)?' style="text-align:center;"':""}function s(e,n){var s="";return e=e.trim(),(r.tablesHeaderId||r.tableHeaderId)&&(s=' id="'+e.replace(/ /g,"_").toLowerCase()+'"'),e=a.subParser("spanGamut")(e,r,t),""+e+"\n"}function o(e,n){return""+a.subParser("spanGamut")(e,r,t)+"\n"}function i(e){var i,l=e.split("\n");for(i=0;i\n\n\n",n=0;n\n";for(var s=0;s\n"}return t+="\n\n"}(p,_)}if(!r.tables)return e;return e=t.converter._dispatch("tables.before",e,r,t),e=e.replace(/\\(\|)/g,a.helper.escapeCharactersCallback),e=e.replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,i),e=e.replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,i),e=t.converter._dispatch("tables.after",e,r,t)}),a.subParser("underline",function(e,r,t){"use strict";return r.underline?(e=t.converter._dispatch("underline.before",e,r,t),e=r.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,r){return""+r+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,r){return""+r+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,r){return/\S$/.test(r)?""+r+"":e}),e=e.replace(/(_)/g,a.helper.escapeCharactersCallback),e=t.converter._dispatch("underline.after",e,r,t)):e}),a.subParser("unescapeSpecialChars",function(e,r,t){"use strict";return e=t.converter._dispatch("unescapeSpecialChars.before",e,r,t),e=e.replace(/¨E(\d+)E/g,function(e,r){var t=parseInt(r);return String.fromCharCode(t)}),e=t.converter._dispatch("unescapeSpecialChars.after",e,r,t)}),a.subParser("makeMarkdown.blockquote",function(e,r){"use strict";var t="";if(e.hasChildNodes())for(var n=e.childNodes,s=n.length,o=0;o "+t.split("\n").join("\n> ")}),a.subParser("makeMarkdown.codeBlock",function(e,r){"use strict";var t=e.getAttribute("language"),a=e.getAttribute("precodenum");return"```"+t+"\n"+r.preList[a]+"\n```"}),a.subParser("makeMarkdown.codeSpan",function(e){"use strict";return"`"+e.innerHTML+"`"}),a.subParser("makeMarkdown.emphasis",function(e,r){"use strict";var t="";if(e.hasChildNodes()){t+="*";for(var n=e.childNodes,s=n.length,o=0;o",e.hasAttribute("width")&&e.hasAttribute("height")&&(r+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"),r}),a.subParser("makeMarkdown.links",function(e,r){"use strict";var t="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,s=n.length;t="[";for(var o=0;o",e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"}return t}),a.subParser("makeMarkdown.list",function(e,r,t){"use strict";var n="";if(!e.hasChildNodes())return"";for(var s=e.childNodes,o=s.length,i=e.getAttribute("start")||1,l=0;l"+r.preList[t]+""}),a.subParser("makeMarkdown.strikethrough",function(e,r){"use strict";var t="";if(e.hasChildNodes()){t+="~~";for(var n=e.childNodes,s=n.length,o=0;otr>th"),l=e.querySelectorAll("tbody>tr");for(t=0;t_&&(_=g)}for(t=0;t/g,"\\$1>"),r=r.replace(/^#/gm,"\\#"),r=r.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),r=r.replace(/^( {0,3}\d+)\./gm,"$1\\."),r=r.replace(/^( {0,3})([+-])/gm,"$1\\$2"),r=r.replace(/]([\s]*)\(/g,"\\]$1\\("),r=r.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")});"function"==typeof define&&define.amd?define(function(){"use strict";return a}):"undefined"!=typeof module&&module.exports?module.exports=a:this.showdown=a}).call(this); +//# sourceMappingURL=showdown.min.js.map diff --git a/node_modules/showdown/dist/showdown.min.js.map b/node_modules/showdown/dist/showdown.min.js.map new file mode 100644 index 0000000..e20c108 --- /dev/null +++ b/node_modules/showdown/dist/showdown.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["showdown.js"],"names":["getDefaultOpts","simple","defaultOptions","omitExtraWLInCodeBlocks","defaultValue","describe","type","noHeaderId","prefixHeaderId","rawPrefixHeaderId","ghCompatibleHeaderId","rawHeaderId","headerLevelStart","parseImgDimensions","simplifiedAutoLink","excludeTrailingPunctuationFromURLs","literalMidWordUnderscores","literalMidWordAsterisks","strikethrough","tables","tablesHeaderId","ghCodeBlocks","tasklists","smoothLivePreview","smartIndentationFix","description","disableForced4SpacesIndentedSublists","simpleLineBreaks","requireSpaceBeforeHeadingText","ghMentions","ghMentionsLink","encodeEmails","openLinksInNewWindow","backslashEscapesHTMLTags","emoji","underline","completeHTMLDocument","metadata","splitAdjacentBlockquotes","JSON","parse","stringify","ret","opt","hasOwnProperty","validate","extension","name","errMsg","valid","error","showdown","helper","isArray","i","length","baseMsg","ext","isString","toLowerCase","isUndefined","listeners","filter","regex","ln","RegExp","replace","escapeCharactersCallback","wholeMatch","m1","charCodeAt","parsers","extensions","globalOptions","setFlavor","flavor","github","original","ghost","vanilla","allOn","options","allOptionsOn","setOption","key","value","this","getOption","getOptions","resetOptions","Error","preset","option","getFlavor","getFlavorOptions","getDefaultOptions","subParser","func","stdExtName","validExtension","getAllExtensions","removeExtension","resetExtensions","validateExtension","console","warn","a","String","isFunction","toString","call","Array","forEach","obj","callback","prop","s","escapeCharacters","text","charsToEscape","afterBackslash","regexString","unescapeHTMLEntities","txt","rgxFindMatchPos","str","left","right","flags","t","m","start","end","f","g","indexOf","x","l","pos","exec","test","lastIndex","index","match","push","matchRecursiveRegExp","matchPos","results","slice","replaceRecursiveRegExp","replacement","repStr","finalStr","lng","bits","join","regexIndexOf","fromIndex","substring","search","splitAtIndex","encodeEmailAddress","mail","encode","ch","Math","floor","random","r","padEnd","targetLength","padString","repeat","msg","alert","log","regexes","asteriskDashAndColon","emojis","+1","-1","100","1234","1st_place_medal","2nd_place_medal","3rd_place_medal","8ball","ab","abc","abcd","accept","aerial_tramway","airplane","alarm_clock","alembic","alien","ambulance","amphora","anchor","angel","anger","angry","anguished","ant","apple","aquarius","aries","arrow_backward","arrow_double_down","arrow_double_up","arrow_down","arrow_down_small","arrow_forward","arrow_heading_down","arrow_heading_up","arrow_left","arrow_lower_left","arrow_lower_right","arrow_right","arrow_right_hook","arrow_up","arrow_up_down","arrow_up_small","arrow_upper_left","arrow_upper_right","arrows_clockwise","arrows_counterclockwise","art","articulated_lorry","artificial_satellite","astonished","athletic_shoe","atm","atom_symbol","avocado","b","baby","baby_bottle","baby_chick","baby_symbol","back","bacon","badminton","baggage_claim","baguette_bread","balance_scale","balloon","ballot_box","ballot_box_with_check","bamboo","banana","bangbang","bank","bar_chart","barber","baseball","basketball","basketball_man","basketball_woman","bat","bath","bathtub","battery","beach_umbrella","bear","bed","bee","beer","beers","beetle","beginner","bell","bellhop_bell","bento","biking_man","bike","biking_woman","bikini","biohazard","bird","birthday","black_circle","black_flag","black_heart","black_joker","black_large_square","black_medium_small_square","black_medium_square","black_nib","black_small_square","black_square_button","blonde_man","blonde_woman","blossom","blowfish","blue_book","blue_car","blue_heart","blush","boar","boat","bomb","book","bookmark","bookmark_tabs","books","boom","boot","bouquet","bowing_man","bow_and_arrow","bowing_woman","bowling","boxing_glove","boy","bread","bride_with_veil","bridge_at_night","briefcase","broken_heart","bug","building_construction","bulb","bullettrain_front","bullettrain_side","burrito","bus","business_suit_levitating","busstop","bust_in_silhouette","busts_in_silhouette","butterfly","cactus","cake","calendar","call_me_hand","calling","camel","camera","camera_flash","camping","cancer","candle","candy","canoe","capital_abcd","capricorn","car","card_file_box","card_index","card_index_dividers","carousel_horse","carrot","cat","cat2","cd","chains","champagne","chart","chart_with_downwards_trend","chart_with_upwards_trend","checkered_flag","cheese","cherries","cherry_blossom","chestnut","chicken","children_crossing","chipmunk","chocolate_bar","christmas_tree","church","cinema","circus_tent","city_sunrise","city_sunset","cityscape","cl","clamp","clap","clapper","classical_building","clinking_glasses","clipboard","clock1","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","closed_book","closed_lock_with_key","closed_umbrella","cloud","cloud_with_lightning","cloud_with_lightning_and_rain","cloud_with_rain","cloud_with_snow","clown_face","clubs","cocktail","coffee","coffin","cold_sweat","comet","computer","computer_mouse","confetti_ball","confounded","confused","congratulations","construction","construction_worker_man","construction_worker_woman","control_knobs","convenience_store","cookie","cool","policeman","copyright","corn","couch_and_lamp","couple","couple_with_heart_woman_man","couple_with_heart_man_man","couple_with_heart_woman_woman","couplekiss_man_man","couplekiss_man_woman","couplekiss_woman_woman","cow","cow2","cowboy_hat_face","crab","crayon","credit_card","crescent_moon","cricket","crocodile","croissant","crossed_fingers","crossed_flags","crossed_swords","crown","cry","crying_cat_face","crystal_ball","cucumber","cupid","curly_loop","currency_exchange","curry","custard","customs","cyclone","dagger","dancer","dancing_women","dancing_men","dango","dark_sunglasses","dart","dash","date","deciduous_tree","deer","department_store","derelict_house","desert","desert_island","desktop_computer","male_detective","diamond_shape_with_a_dot_inside","diamonds","disappointed","disappointed_relieved","dizzy","dizzy_face","do_not_litter","dog","dog2","dollar","dolls","dolphin","door","doughnut","dove","dragon","dragon_face","dress","dromedary_camel","drooling_face","droplet","drum","duck","dvd","e-mail","eagle","ear","ear_of_rice","earth_africa","earth_americas","earth_asia","egg","eggplant","eight_pointed_black_star","eight_spoked_asterisk","electric_plug","elephant","email","envelope_with_arrow","euro","european_castle","european_post_office","evergreen_tree","exclamation","expressionless","eye","eye_speech_bubble","eyeglasses","eyes","face_with_head_bandage","face_with_thermometer","fist_oncoming","factory","fallen_leaf","family_man_woman_boy","family_man_boy","family_man_boy_boy","family_man_girl","family_man_girl_boy","family_man_girl_girl","family_man_man_boy","family_man_man_boy_boy","family_man_man_girl","family_man_man_girl_boy","family_man_man_girl_girl","family_man_woman_boy_boy","family_man_woman_girl","family_man_woman_girl_boy","family_man_woman_girl_girl","family_woman_boy","family_woman_boy_boy","family_woman_girl","family_woman_girl_boy","family_woman_girl_girl","family_woman_woman_boy","family_woman_woman_boy_boy","family_woman_woman_girl","family_woman_woman_girl_boy","family_woman_woman_girl_girl","fast_forward","fax","fearful","feet","female_detective","ferris_wheel","ferry","field_hockey","file_cabinet","file_folder","film_projector","film_strip","fire","fire_engine","fireworks","first_quarter_moon","first_quarter_moon_with_face","fish","fish_cake","fishing_pole_and_fish","fist_raised","fist_left","fist_right","flashlight","fleur_de_lis","flight_arrival","flight_departure","floppy_disk","flower_playing_cards","flushed","fog","foggy","football","footprints","fork_and_knife","fountain","fountain_pen","four_leaf_clover","fox_face","framed_picture","free","fried_egg","fried_shrimp","fries","frog","frowning","frowning_face","frowning_man","frowning_woman","middle_finger","fuelpump","full_moon","full_moon_with_face","funeral_urn","game_die","gear","gem","gemini","gift","gift_heart","girl","globe_with_meridians","goal_net","goat","golf","golfing_man","golfing_woman","gorilla","grapes","green_apple","green_book","green_heart","green_salad","grey_exclamation","grey_question","grimacing","grin","grinning","guardsman","guardswoman","guitar","gun","haircut_woman","haircut_man","hamburger","hammer","hammer_and_pick","hammer_and_wrench","hamster","hand","handbag","handshake","hankey","hatched_chick","hatching_chick","headphones","hear_no_evil","heart","heart_decoration","heart_eyes","heart_eyes_cat","heartbeat","heartpulse","hearts","heavy_check_mark","heavy_division_sign","heavy_dollar_sign","heavy_heart_exclamation","heavy_minus_sign","heavy_multiplication_x","heavy_plus_sign","helicopter","herb","hibiscus","high_brightness","high_heel","hocho","hole","honey_pot","horse","horse_racing","hospital","hot_pepper","hotdog","hotel","hotsprings","hourglass","hourglass_flowing_sand","house","house_with_garden","houses","hugs","hushed","ice_cream","ice_hockey","ice_skate","icecream","id","ideograph_advantage","imp","inbox_tray","incoming_envelope","tipping_hand_woman","information_source","innocent","interrobang","iphone","izakaya_lantern","jack_o_lantern","japan","japanese_castle","japanese_goblin","japanese_ogre","jeans","joy","joy_cat","joystick","kaaba","keyboard","keycap_ten","kick_scooter","kimono","kiss","kissing","kissing_cat","kissing_closed_eyes","kissing_heart","kissing_smiling_eyes","kiwi_fruit","koala","koko","label","large_blue_circle","large_blue_diamond","large_orange_diamond","last_quarter_moon","last_quarter_moon_with_face","latin_cross","laughing","leaves","ledger","left_luggage","left_right_arrow","leftwards_arrow_with_hook","lemon","leo","leopard","level_slider","libra","light_rail","link","lion","lips","lipstick","lizard","lock","lock_with_ink_pen","lollipop","loop","loud_sound","loudspeaker","love_hotel","love_letter","low_brightness","lying_face","mag","mag_right","mahjong","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","man","man_artist","man_astronaut","man_cartwheeling","man_cook","man_dancing","man_facepalming","man_factory_worker","man_farmer","man_firefighter","man_health_worker","man_in_tuxedo","man_judge","man_juggling","man_mechanic","man_office_worker","man_pilot","man_playing_handball","man_playing_water_polo","man_scientist","man_shrugging","man_singer","man_student","man_teacher","man_technologist","man_with_gua_pi_mao","man_with_turban","tangerine","mans_shoe","mantelpiece_clock","maple_leaf","martial_arts_uniform","mask","massage_woman","massage_man","meat_on_bone","medal_military","medal_sports","mega","melon","memo","men_wrestling","menorah","mens","metal","metro","microphone","microscope","milk_glass","milky_way","minibus","minidisc","mobile_phone_off","money_mouth_face","money_with_wings","moneybag","monkey","monkey_face","monorail","moon","mortar_board","mosque","motor_boat","motor_scooter","motorcycle","motorway","mount_fuji","mountain","mountain_biking_man","mountain_biking_woman","mountain_cableway","mountain_railway","mountain_snow","mouse","mouse2","movie_camera","moyai","mrs_claus","muscle","mushroom","musical_keyboard","musical_note","musical_score","mute","nail_care","name_badge","national_park","nauseated_face","necktie","negative_squared_cross_mark","nerd_face","neutral_face","new","new_moon","new_moon_with_face","newspaper","newspaper_roll","next_track_button","ng","no_good_man","no_good_woman","night_with_stars","no_bell","no_bicycles","no_entry","no_entry_sign","no_mobile_phones","no_mouth","no_pedestrians","no_smoking","non-potable_water","nose","notebook","notebook_with_decorative_cover","notes","nut_and_bolt","o","o2","ocean","octopus","oden","office","oil_drum","ok","ok_hand","ok_man","ok_woman","old_key","older_man","older_woman","om","on","oncoming_automobile","oncoming_bus","oncoming_police_car","oncoming_taxi","open_file_folder","open_hands","open_mouth","open_umbrella","ophiuchus","orange_book","orthodox_cross","outbox_tray","owl","ox","package","page_facing_up","page_with_curl","pager","paintbrush","palm_tree","pancakes","panda_face","paperclip","paperclips","parasol_on_ground","parking","part_alternation_mark","partly_sunny","passenger_ship","passport_control","pause_button","peace_symbol","peach","peanuts","pear","pen","pencil2","penguin","pensive","performing_arts","persevere","person_fencing","pouting_woman","phone","pick","pig","pig2","pig_nose","pill","pineapple","ping_pong","pisces","pizza","place_of_worship","plate_with_cutlery","play_or_pause_button","point_down","point_left","point_right","point_up","point_up_2","police_car","policewoman","poodle","popcorn","post_office","postal_horn","postbox","potable_water","potato","pouch","poultry_leg","pound","rage","pouting_cat","pouting_man","pray","prayer_beads","pregnant_woman","previous_track_button","prince","princess","printer","purple_heart","purse","pushpin","put_litter_in_its_place","question","rabbit","rabbit2","racehorse","racing_car","radio","radio_button","radioactive","railway_car","railway_track","rainbow","rainbow_flag","raised_back_of_hand","raised_hand_with_fingers_splayed","raised_hands","raising_hand_woman","raising_hand_man","ram","ramen","rat","record_button","recycle","red_circle","registered","relaxed","relieved","reminder_ribbon","repeat_one","rescue_worker_helmet","restroom","revolving_hearts","rewind","rhinoceros","ribbon","rice","rice_ball","rice_cracker","rice_scene","right_anger_bubble","ring","robot","rocket","rofl","roll_eyes","roller_coaster","rooster","rose","rosette","rotating_light","round_pushpin","rowing_man","rowing_woman","rugby_football","running_man","running_shirt_with_sash","running_woman","sa","sagittarius","sake","sandal","santa","satellite","saxophone","school","school_satchel","scissors","scorpion","scorpius","scream","scream_cat","scroll","seat","secret","see_no_evil","seedling","selfie","shallow_pan_of_food","shamrock","shark","shaved_ice","sheep","shell","shield","shinto_shrine","ship","shirt","shopping","shopping_cart","shower","shrimp","signal_strength","six_pointed_star","ski","skier","skull","skull_and_crossbones","sleeping","sleeping_bed","sleepy","slightly_frowning_face","slightly_smiling_face","slot_machine","small_airplane","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","smile","smile_cat","smiley","smiley_cat","smiling_imp","smirk","smirk_cat","smoking","snail","snake","sneezing_face","snowboarder","snowflake","snowman","snowman_with_snow","sob","soccer","soon","sos","sound","space_invader","spades","spaghetti","sparkle","sparkler","sparkles","sparkling_heart","speak_no_evil","speaker","speaking_head","speech_balloon","speedboat","spider","spider_web","spiral_calendar","spiral_notepad","spoon","squid","stadium","star","star2","star_and_crescent","star_of_david","stars","station","statue_of_liberty","steam_locomotive","stew","stop_button","stop_sign","stopwatch","straight_ruler","strawberry","stuck_out_tongue","stuck_out_tongue_closed_eyes","stuck_out_tongue_winking_eye","studio_microphone","stuffed_flatbread","sun_behind_large_cloud","sun_behind_rain_cloud","sun_behind_small_cloud","sun_with_face","sunflower","sunglasses","sunny","sunrise","sunrise_over_mountains","surfing_man","surfing_woman","sushi","suspension_railway","sweat","sweat_drops","sweat_smile","sweet_potato","swimming_man","swimming_woman","symbols","synagogue","syringe","taco","tada","tanabata_tree","taurus","taxi","tea","telephone_receiver","telescope","tennis","tent","thermometer","thinking","thought_balloon","ticket","tickets","tiger","tiger2","timer_clock","tipping_hand_man","tired_face","tm","toilet","tokyo_tower","tomato","tongue","top","tophat","tornado","trackball","tractor","traffic_light","train","train2","tram","triangular_flag_on_post","triangular_ruler","trident","triumph","trolleybus","trophy","tropical_drink","tropical_fish","truck","trumpet","tulip","tumbler_glass","turkey","turtle","tv","twisted_rightwards_arrows","two_hearts","two_men_holding_hands","two_women_holding_hands","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7981","u7a7a","umbrella","unamused","underage","unicorn","unlock","up","upside_down_face","v","vertical_traffic_light","vhs","vibration_mode","video_camera","video_game","violin","virgo","volcano","volleyball","vs","vulcan_salute","walking_man","walking_woman","waning_crescent_moon","waning_gibbous_moon","warning","wastebasket","watch","water_buffalo","watermelon","wave","wavy_dash","waxing_crescent_moon","wc","weary","wedding","weight_lifting_man","weight_lifting_woman","whale","whale2","wheel_of_dharma","wheelchair","white_check_mark","white_circle","white_flag","white_flower","white_large_square","white_medium_small_square","white_medium_square","white_small_square","white_square_button","wilted_flower","wind_chime","wind_face","wine_glass","wink","wolf","woman","woman_artist","woman_astronaut","woman_cartwheeling","woman_cook","woman_facepalming","woman_factory_worker","woman_farmer","woman_firefighter","woman_health_worker","woman_judge","woman_juggling","woman_mechanic","woman_office_worker","woman_pilot","woman_playing_handball","woman_playing_water_polo","woman_scientist","woman_shrugging","woman_singer","woman_student","woman_teacher","woman_technologist","woman_with_turban","womans_clothes","womans_hat","women_wrestling","womens","world_map","worried","wrench","writing_hand","yellow_heart","yen","yin_yang","yum","zap","zipper_mouth_face","zzz","octocat","Converter","converterOptions","_parseExtension","langExtensions","outputModifiers","legacyExtensionLoading","validExt","listen","setConvFlavor","parsed","raw","format","gOpt","_constructor","_dispatch","evtName","globals","ei","nText","makeHtml","gHtmlBlocks","gHtmlMdBlocks","gHtmlSpans","gUrls","gTitles","gDimensions","gListLevel","hashLinkCounts","converter","rsp","rgx","rTrimInputText","makeMarkdown","makeMd","src","HTMLParser","clean","node","n","childNodes","child","nodeType","nodeValue","split","removeChild","window","document","doc","createElement","innerHTML","preList","pres","querySelectorAll","presPH","childElementCount","firstChild","tagName","content","trim","language","getAttribute","classes","className","c","matches","outerHTML","setAttribute","substitutePreCodeTags","nodes","mdDoc","addExtension","useExtension","extensionName","splice","output","getMetadata","getMetadataFormat","_setMetadataPair","_setMetadataFormat","_setMetadataRaw","writeAnchorTag","linkText","linkId","url","m5","m6","title","result","wm","st","escape","mentions","username","lnk","target","simpleURLRegex","simpleURLRegex2","delimUrlRegex","simpleMailRegex","delimMailRegex","replaceLink","leadingMagicChars","m2","m3","trailingPunctuation","trailingMagicChars","lnkTxt","append","lmc","tmc","replaceMail","href","bq","pre","codeblock","nextChar","doctype","doctypeParsed","charset","lang","meta","leadingText","numSpaces","emojiCode","delim","blockText","blockTags","repFunc","inside","opTagPos","rgx1","patLeft","patRight","subTexts","newSubText1","concat","hashHTMLSpan","html","repText","limit","num","$1","headerId","prefix","customizedHeaderId","isNaN","parseInt","setextRegexH1","setextRegexH2","spanGamut","hID","hashBlock","matchFound","hLevel","atxStyle","hText","span","header","writeImageTag","altText","width","height","gDims","parseInside","lead","processListItems","listStr","trimTrailing","isParagraphed","m4","taskbtn","checked","item","bulletStyle","otp","wm2","styleStartNumber","list","listType","res","parseConsecutiveLists","olRgx","ulRgx","counterRxg","parseCL","style","parseMetadataContents","wholematch","grafs","grafsOut","grafsOutIt","codeFlag","$2","re","replaceFunc","blankLines","parseStyles","sLine","parseHeaders","tableHeaderId","parseCells","cell","parseTable","rawTable","tableLines","rawHeaders","map","rawStyles","rawCells","headers","styles","cells","shift","row","ii","tb","tblLgn","buildTable","charCodeToReplace","fromCharCode","hasChildNodes","children","childrenLength","innerTxt","headerLevel","headerMark","hasAttribute","listItems","listItemsLenght","listNum","listItemTxt","childrenLenght","spansOnly","data","tableArray","headings","rows","headContent","allign","cols","getElementsByTagName","cellContent","cellSpacesCount","strLen","define","amd","module","exports"],"mappings":";CACA,WAKA,SAASA,EAAgBC,GACvB,aAEA,IAAIC,GACFC,yBACEC,cAAc,EACdC,SAAU,wDACVC,KAAM,WAERC,YACEH,cAAc,EACdC,SAAU,kCACVC,KAAM,WAERE,gBACEJ,cAAc,EACdC,SAAU,4JACVC,KAAM,UAERG,mBACEL,cAAc,EACdC,SAAU,uKACVC,KAAM,WAERI,sBACEN,cAAc,EACdC,SAAU,oIACVC,KAAM,WAERK,aACEP,cAAc,EACdC,SAAU,2JACVC,KAAM,WAERM,kBACER,cAAc,EACdC,SAAU,gCACVC,KAAM,WAERO,oBACET,cAAc,EACdC,SAAU,sCACVC,KAAM,WAERQ,oBACEV,cAAc,EACdC,SAAU,iCACVC,KAAM,WAERS,oCACEX,cAAc,EACdC,SAAU,sEACVC,KAAM,WAERU,2BACEZ,cAAc,EACdC,SAAU,mDACVC,KAAM,WAERW,yBACEb,cAAc,EACdC,SAAU,+CACVC,KAAM,WAERY,eACEd,cAAc,EACdC,SAAU,oCACVC,KAAM,WAERa,QACEf,cAAc,EACdC,SAAU,6BACVC,KAAM,WAERc,gBACEhB,cAAc,EACdC,SAAU,6BACVC,KAAM,WAERe,cACEjB,cAAc,EACdC,SAAU,6CACVC,KAAM,WAERgB,WACElB,cAAc,EACdC,SAAU,mCACVC,KAAM,WAERiB,mBACEnB,cAAc,EACdC,SAAU,kEACVC,KAAM,WAERkB,qBACEpB,cAAc,EACdqB,YAAa,kDACbnB,KAAM,WAERoB,sCACEtB,cAAc,EACdqB,YAAa,oEACbnB,KAAM,WAERqB,kBACEvB,cAAc,EACdqB,YAAa,gDACbnB,KAAM,WAERsB,+BACExB,cAAc,EACdqB,YAAa,6EACbnB,KAAM,WAERuB,YACEzB,cAAc,EACdqB,YAAa,2BACbnB,KAAM,WAERwB,gBACE1B,aAAc,yBACdqB,YAAa,yFACbnB,KAAM,UAERyB,cACE3B,cAAc,EACdqB,YAAa,0IACbnB,KAAM,WAER0B,sBACE5B,cAAc,EACdqB,YAAa,gCACbnB,KAAM,WAER2B,0BACE7B,cAAc,EACdqB,YAAa,oDACbnB,KAAM,WAER4B,OACE9B,cAA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","file":"showdown.min.js"} \ No newline at end of file diff --git a/node_modules/showdown/license.txt b/node_modules/showdown/license.txt new file mode 100644 index 0000000..2e8af8a --- /dev/null +++ b/node_modules/showdown/license.txt @@ -0,0 +1,34 @@ +Showdown Copyright (c) 2007, John Fraser + +All rights reserved. + +Original Markdown copyright (c) 2004, John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. diff --git a/node_modules/showdown/package.json b/node_modules/showdown/package.json new file mode 100644 index 0000000..7f9a3b5 --- /dev/null +++ b/node_modules/showdown/package.json @@ -0,0 +1,161 @@ +{ + "_args": [ + [ + "showdown", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client" + ] + ], + "_from": "showdown@latest", + "_hasShrinkwrap": false, + "_id": "showdown@1.9.0", + "_inCache": true, + "_installable": true, + "_location": "/showdown", + "_nodeVersion": "8.11.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/showdown_1.9.0_1541892356844_0.8295120867287602" + }, + "_npmUser": { + "email": "estevao.santos@gmail.com", + "name": "tivie" + }, + "_npmVersion": "6.4.1", + "_phantomChildren": {}, + "_requested": { + "name": "showdown", + "raw": "showdown", + "rawSpec": "", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER" + ], + "_resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.0.tgz", + "_shasum": "d49d2a0b6db21b7c2e96ef855f7b3b2a28ef46f4", + "_shrinkwrap": null, + "_spec": "showdown", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client", + "author": { + "name": "Estevão Santos" + }, + "bin": { + "showdown": "bin/showdown.js" + }, + "bugs": { + "url": "https://github.com/showdownjs/showdown/issues" + }, + "contributors": [ + { + "name": "Cat Chen" + }, + { + "name": "John Gruber" + }, + { + "name": "Corey Innis" + }, + { + "name": "Remy Sharp" + }, + { + "name": "Konstantin Käfer" + }, + { + "name": "Roger Braun" + }, + { + "name": "Dominic Tarr" + }, + { + "name": "John Fraser" + }, + { + "name": "Titus Stone" + }, + { + "name": "Rob Sutherland" + }, + { + "name": "Pavel Lang" + }, + { + "name": "Ben Combee" + }, + { + "name": "Adam Backstrom" + }, + { + "name": "Pascal Deschênes" + }, + { + "name": "Estevão Santos" + } + ], + "dependencies": { + "yargs": "^10.0.3" + }, + "description": "A Markdown to HTML converter written in Javascript", + "devDependencies": { + "chai": "^4.0.2", + "grunt": "^1.0.3", + "grunt-contrib-clean": "^1.0.0", + "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-jshint": "^1.1.0", + "grunt-contrib-uglify": "^3.1.0", + "grunt-conventional-changelog": "^6.1.0", + "grunt-conventional-github-releaser": "^1.0.0", + "grunt-endline": "^0.6.1", + "grunt-eslint": "^19.0.0", + "grunt-simple-mocha": "^0.4.0", + "jsdom": "^13.0.0", + "load-grunt-tasks": "^3.2.0", + "performance-now": "^2.0.0", + "quiet-grunt": "^0.2.3", + "semver": "^5.4.1", + "semver-sort": "0.0.4", + "sinon": "^4.0.0", + "source-map-support": "^0.5.0" + }, + "directories": {}, + "dist": { + "fileCount": 767, + "integrity": "sha512-x7xDCRIaOlicbC57nMhGfKamu+ghwsdVkHMttyn+DelwzuHOx4OHCVL/UW/2QOLH7BxfCcCCVVUix3boKXJKXQ==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb52kFCRA9TVsSAnZWagAAg0AP/3MogJAJxaUlGFYtZFAG\nhmS1k4kiemmxWB6LWzfVEamf961liL2WSlXSfh/IOXyZ9B/26t3iLO2kXgre\nUGpNN4RnIZApoh5Jg7QIZVAQyJU9Z15x6ePjlyNEkTMlGUnAIfDSFtah7W0U\nPGffEvIbdX3ikiPlqxU5BX5xbewm5g2waaEgbW1SHeD7v+AIgn790oAUw26D\noPrGPIdtSHYQ4EYKLlOFrZcGTuxckOdL2ZaC6EOd6OQ/8oXx6yAKXQOnU+uJ\nUchZMk2PNrYUp+hy6HIkQzz+L3mfdUAbb92z1WDydPSrC4OnARuGhBTxT6ug\ntvywmKIFr7oY7b6OcQDCck4QbfHgP5kGysMs4DKcgYyEe61qM/UC4olpB/gK\ngPmEes2NIa1U3JPJY983Aygzia+bWMo75BrbKwUVEtFKswJW1kcIG25xQWf8\niEIcC3Zjd7oBOpwNrJ3cCAEMCcXg6LL0pGL40bdZm97YweMuUG+EqSoDuq+C\n1mj5cfJ/0dKQaPn7llogh5RzrxythGx9q7C7rgvj/LSXShSHj/vpqj7Cecyb\nbXx2rkMeTqr4koqHMYBSLIymxRcljVOXkL683GeC6H8ODnXAUubtWJWl9DQP\ngaeRMJ+Dt8+LRxhHQ/OUynMFWfFTqs4tLWZcGM/FR7SYqVL7Dk8kZLHpea5h\ndaNK\r\n=ZSrA\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "d49d2a0b6db21b7c2e96ef855f7b3b2a28ef46f4", + "tarball": "https://registry.npmjs.org/showdown/-/showdown-1.9.0.tgz", + "unpackedSize": 1333197 + }, + "gitHead": "8afa1fff0e1de2481e0545be17a906e2a68bb4e2", + "homepage": "http://showdownjs.com/", + "keywords": [ + "converter", + "markdown" + ], + "license": "BSD-3-Clause", + "main": "./dist/showdown.js", + "maintainers": [ + { + "name": "pdeschen", + "email": "pdeschen@rassemblr.com" + }, + { + "name": "tivie", + "email": "estevao.santos@gmail.com" + } + ], + "name": "showdown", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/showdownjs/showdown.git", + "web": "https://github.com/showdownjs/showdown" + }, + "scripts": { + "test": "grunt test" + }, + "version": "1.9.0" +} diff --git a/node_modules/showdown/performance.json b/node_modules/showdown/performance.json new file mode 100644 index 0000000..e9b5113 --- /dev/null +++ b/node_modules/showdown/performance.json @@ -0,0 +1 @@ +{"1.9.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3936490399999775,"maxTime":9.154145999999855,"minTime":0.1039659999999003},{"name":"performance.testfile.md","time":49.28604768000001,"maxTime":177.703806,"minTime":26.15487600000006}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":6.101473349999969,"maxTime":16.106017999999494,"minTime":2.3755520000004253},{"name":"anchors","time":0.7673005500000272,"maxTime":3.5068249999994805,"minTime":0.3227470000001631},{"name":"autoLinks","time":0.24398885000014162,"maxTime":0.5475550000001022,"minTime":0.1238549999998213},{"name":"blockQuotes","time":2.39676685000004,"maxTime":3.9998349999996208,"minTime":2.0133280000000013},{"name":"codeBlocks","time":0.22560649999995802,"maxTime":0.3432389999998122,"minTime":0.2076310000002195},{"name":"codeSpans","time":0.3156803499997295,"maxTime":1.136395000000448,"minTime":0.25765599999976985},{"name":"detab","time":0.09548314999992727,"maxTime":0.1841260000001057,"minTime":0.08528200000000652},{"name":"encodeAmpsAndAngles","time":0.1041621500000474,"maxTime":0.15278500000022177,"minTime":0.09643300000061572},{"name":"encodeBackslashEscapes","time":0.06167165000006207,"maxTime":0.13681400000041322,"minTime":0.0557490000001053},{"name":"encodeCode","time":0.5582229499999357,"maxTime":1.4690870000003997,"minTime":0.4854770000001736},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2429643500000566,"maxTime":0.7139010000000781,"minTime":0.19226200000048266},{"name":"githubCodeBlocks","time":0.21287450000004354,"maxTime":0.40682400000059715,"minTime":0.18593400000008842},{"name":"hashBlock","time":0.04615199999998367,"maxTime":0.14736100000027363,"minTime":0.03616299999976036},{"name":"hashElement","time":0.0030586500000481464,"maxTime":0.05032500000015716,"minTime":0.0003010000000358559},{"name":"hashHTMLSpans","time":4.914028949999965,"maxTime":7.36442100000022,"minTime":4.474463000000469},{"name":"hashPreCodeTags","time":0.1344178499998634,"maxTime":0.23384899999928166,"minTime":0.11029499999949621},{"name":"headers","time":1.5151488000000426,"maxTime":3.8660350000000108,"minTime":1.1529700000000958},{"name":"horizontalRule","time":0.21591819999998735,"maxTime":0.2929129999993165,"minTime":0.19437199999993027},{"name":"images","time":0.1438803000000007,"maxTime":0.2862829999994574,"minTime":0.12355399999978545},{"name":"italicsAndBold","time":0.2337130000000343,"maxTime":0.656343000000561,"minTime":0.18985200000042823},{"name":"lists","time":4.48329264999993,"maxTime":7.663963999999396,"minTime":2.481929000000491},{"name":"outdent","time":0.28611790000009024,"maxTime":0.5382139999992432,"minTime":0.1790019999998549},{"name":"paragraphs","time":10.25719725000008,"maxTime":18.655751000000237,"minTime":5.229348000000755},{"name":"spanGamut","time":10.287920150000037,"maxTime":31.12385600000016,"minTime":6.1023629999999685},{"name":"strikethrough","time":0.006765400000085719,"maxTime":0.106075000000601,"minTime":0.0009039999995366088},{"name":"stripLinkDefinitions","time":0.4384660999999596,"maxTime":0.6777389999997467,"minTime":0.3917570000003252},{"name":"tables","time":0.007413199999791687,"maxTime":0.09552799999983108,"minTime":0.0009039999995366088},{"name":"unescapeSpecialChars","time":0.041104299999869906,"maxTime":0.08648799999991752,"minTime":0.007834999999431602}]}],"1.8.7":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.33883280000000016,"maxTime":9.453979000000004,"minTime":0.10396600000001399},{"name":"performance.testfile.md","time":31.606076540000007,"maxTime":62.065620999999965,"minTime":24.85089999999991}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":3.9868116500000497,"maxTime":7.593740000000253,"minTime":2.211011999999755},{"name":"anchors","time":0.7631257499999947,"maxTime":7.965909000000011,"minTime":0.28959800000029645},{"name":"autoLinks","time":0.09381050000001778,"maxTime":0.1928649999999834,"minTime":0.07111800000029689},{"name":"blockQuotes","time":2.9216417500000262,"maxTime":9.315057000000252,"minTime":2.0208590000002005},{"name":"codeBlocks","time":0.23919720000003508,"maxTime":0.3462520000002769,"minTime":0.2049179999999069},{"name":"codeSpans","time":0.28953800000001595,"maxTime":0.3781959999996616,"minTime":0.24288799999976618},{"name":"detab","time":0.09350929999993696,"maxTime":0.16061999999965337,"minTime":0.08377500000005966},{"name":"encodeAmpsAndAngles","time":0.2622806499999797,"maxTime":1.4684820000002219,"minTime":0.09341799999992872},{"name":"encodeBackslashEscapes","time":0.0919119000000137,"maxTime":0.17659199999980046,"minTime":0.05364000000008673},{"name":"encodeCode","time":0.5350182500000074,"maxTime":1.1794870000003357,"minTime":0.4565459999998893},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.18979079999999157,"maxTime":0.2516279999999824,"minTime":0.17478299999993396},{"name":"githubCodeBlocks","time":0.21962444999999206,"maxTime":0.44569799999999304,"minTime":0.18352299999969546},{"name":"hashBlock","time":0.0413153000000193,"maxTime":0.09432299999980387,"minTime":0.03555899999992107},{"name":"hashElement","time":0.0017178000000058092,"maxTime":0.024711000000024796,"minTime":0.00030099999958110857},{"name":"hashHTMLSpans","time":4.397085900000002,"maxTime":5.805222999999842,"minTime":4.070948999999928},{"name":"hashPreCodeTags","time":0.11919945000004191,"maxTime":0.22119199999997363,"minTime":0.10788400000001275},{"name":"headers","time":1.3265012499999784,"maxTime":3.3853760000001785,"minTime":1.0848630000000412},{"name":"horizontalRule","time":0.2119551499999716,"maxTime":0.27031199999964883,"minTime":0.19828899999993155},{"name":"images","time":0.2279720999999654,"maxTime":1.3355869999995775,"minTime":0.12264999999979409},{"name":"italicsAndBold","time":0.21115654999998695,"maxTime":0.36282699999992474,"minTime":0.1901519999996708},{"name":"lists","time":2.6773367000000237,"maxTime":4.027855000000272,"minTime":2.23542099999986},{"name":"outdent","time":0.14778250000003937,"maxTime":0.21757500000012442,"minTime":0.1353070000000116},{"name":"paragraphs","time":5.846387499999992,"maxTime":7.678721000000223,"minTime":4.920155999999679},{"name":"spanGamut","time":4.081857800000011,"maxTime":5.226328000000194,"minTime":3.633086000000276},{"name":"strikethrough","time":0.004595649999987472,"maxTime":0.07895400000006703,"minTime":0.0003010000000358559},{"name":"stripLinkDefinitions","time":0.32735740000002805,"maxTime":1.680934999999863,"minTime":0.22058900000001813},{"name":"tables","time":0.0027121500000021116,"maxTime":0.04279100000030667,"minTime":0.0003010000000358559},{"name":"unescapeSpecialChars","time":0.009658349999972416,"maxTime":0.04158599999982471,"minTime":0.007233000000269385}]}],"1.8.6":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.45411727999999585,"maxTime":9.635387000000037,"minTime":0.08739200000002256},{"name":"performance.testfile.md","time":31.98737462000001,"maxTime":60.66882399999997,"minTime":27.815873999999894}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":5.333244149999996,"maxTime":15.245030000000042,"minTime":2.412311999999929},{"name":"anchors","time":0.3991541500000039,"maxTime":0.6699029999999766,"minTime":0.29050199999983306},{"name":"autoLinks","time":0.11754180000002634,"maxTime":0.29050199999983306,"minTime":0.07202300000017203},{"name":"blockQuotes","time":2.896627800000033,"maxTime":6.028219000000263,"minTime":1.9973519999998643},{"name":"codeBlocks","time":0.30523805000000265,"maxTime":1.1201209999999264,"minTime":0.1892480000001342},{"name":"codeSpans","time":0.29353060000003095,"maxTime":0.6256039999998393,"minTime":0.23475199999984397},{"name":"detab","time":0.12911374999996497,"maxTime":0.7654300000003786,"minTime":0.08708999999998923},{"name":"encodeAmpsAndAngles","time":0.11029435000000376,"maxTime":0.16634600000043065,"minTime":0.09432199999992008},{"name":"encodeBackslashEscapes","time":0.09931010000000243,"maxTime":0.34926499999983207,"minTime":0.06810500000028696},{"name":"encodeCode","time":0.9484710999999834,"maxTime":1.385609999999815,"minTime":0.8416729999999006},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.21427540000001954,"maxTime":0.4731200000001081,"minTime":0.16182600000001912},{"name":"githubCodeBlocks","time":0.16141849999999067,"maxTime":0.2519290000000183,"minTime":0.14766199999985474},{"name":"hashBlock","time":0.04166174999995746,"maxTime":0.06961200000023382,"minTime":0.03706700000020646},{"name":"hashElement","time":0.0017780000001039297,"maxTime":0.02320400000007794,"minTime":0.0003020000003743917},{"name":"hashHTMLSpans","time":4.291640700000016,"maxTime":5.134413000000222,"minTime":3.9208739999999125},{"name":"hashPreCodeTags","time":0.13144915000002583,"maxTime":0.3613190000000941,"minTime":0.10969199999999546},{"name":"headers","time":1.550358849999975,"maxTime":3.809976000000006,"minTime":1.1493510000000242},{"name":"horizontalRule","time":0.2135671499999944,"maxTime":0.28748899999982314,"minTime":0.20100000000002183},{"name":"images","time":0.17642580000001545,"maxTime":0.4318359999997483,"minTime":0.13229299999966315},{"name":"italicsAndBold","time":0.32444914999998675,"maxTime":1.5516539999998713,"minTime":0.22842399999990448},{"name":"lists","time":2.931177999999977,"maxTime":3.8349889999999505,"minTime":2.5855889999998},{"name":"outdent","time":0.15392984999996315,"maxTime":0.2724209999996674,"minTime":0.13681300000007468},{"name":"paragraphs","time":6.5485914500000035,"maxTime":8.260927000000265,"minTime":5.729882000000089},{"name":"spanGamut","time":4.222872200000029,"maxTime":5.584631000000172,"minTime":3.756336999999803},{"name":"strikethrough","time":0.00494234999996479,"maxTime":0.08709099999987302,"minTime":0.0003010000000358559},{"name":"stripLinkDefinitions","time":0.24242145000005166,"maxTime":0.37276999999994587,"minTime":0.2239039999999477},{"name":"tables","time":0.0029532999999901223,"maxTime":0.04218899999978021,"minTime":0.0006020000000717118},{"name":"unescapeSpecialChars","time":0.009808949999978722,"maxTime":0.05303699999967648,"minTime":0.007231999999930849}]}],"1.8.4":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.7357727200000045,"maxTime":11.075555000000008,"minTime":0.11662300000000414},{"name":"performance.testfile.md","time":32.917593419999996,"maxTime":62.42667800000004,"minTime":27.940666000000192}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":5.259524950000037,"maxTime":17.332808000000114,"minTime":2.340292000000318},{"name":"anchors","time":0.5218948500000351,"maxTime":2.8983949999997094,"minTime":0.306775000000016},{"name":"autoLinks","time":0.12436755000001085,"maxTime":0.30014600000004066,"minTime":0.07142100000010032},{"name":"blockQuotes","time":2.24432690000001,"maxTime":3.3329420000000027,"minTime":2.0148330000001806},{"name":"codeBlocks","time":0.24412445000000388,"maxTime":0.8169630000002144,"minTime":0.19015300000000934},{"name":"codeSpans","time":0.3541780499999959,"maxTime":1.2014869999998155,"minTime":0.24288900000010472},{"name":"detab","time":0.09634199999998146,"maxTime":0.1431420000003527,"minTime":0.08769299999994473},{"name":"encodeAmpsAndAngles","time":0.1376722000000427,"maxTime":0.19768599999997605,"minTime":0.09613100000024133},{"name":"encodeBackslashEscapes","time":0.0932680999999775,"maxTime":0.1841260000001057,"minTime":0.07051599999977043},{"name":"encodeCode","time":0.9610537499999964,"maxTime":1.6110220000000481,"minTime":0.8582480000000032},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2516583999999966,"maxTime":0.5204329999996844,"minTime":0.1582090000001699},{"name":"githubCodeBlocks","time":0.26234104999991814,"maxTime":0.3896469999999681,"minTime":0.16092100000014398},{"name":"hashBlock","time":0.051877600000034364,"maxTime":0.12867700000015247,"minTime":0.03736699999990378},{"name":"hashElement","time":0.002682149999986905,"maxTime":0.040380999999797496,"minTime":0.0003020000003743917},{"name":"hashHTMLSpans","time":4.239888850000034,"maxTime":4.673051000000214,"minTime":4.043529000000035},{"name":"hashPreCodeTags","time":0.13398059999999531,"maxTime":0.3372110000000248,"minTime":0.11270500000000538},{"name":"headers","time":1.4121460499999785,"maxTime":4.474761999999828,"minTime":1.076727000000119},{"name":"horizontalRule","time":0.3580051499999854,"maxTime":2.6859419999996135,"minTime":0.19648099999994884},{"name":"images","time":0.18359815000001162,"maxTime":0.4803540000002613,"minTime":0.13048499999968044},{"name":"italicsAndBold","time":0.29952790000002094,"maxTime":0.4577519999998003,"minTime":0.23414999999977226},{"name":"lists","time":3.073871250000002,"maxTime":4.651354000000083,"minTime":2.6256719999996676},{"name":"outdent","time":0.20359270000003563,"maxTime":0.9311750000001666,"minTime":0.13681300000007468},{"name":"paragraphs","time":6.405547999999953,"maxTime":8.019855000000007,"minTime":5.821198000000095},{"name":"spanGamut","time":4.135636349999913,"maxTime":6.038471999999729,"minTime":3.839814999999817},{"name":"strikethrough","time":0.007217349999996259,"maxTime":0.1319909999997435,"minTime":0.0003010000000358559},{"name":"stripLinkDefinitions","time":0.24829814999998234,"maxTime":0.40260499999976673,"minTime":0.21667100000013306},{"name":"tables","time":0.0033450000000129878,"maxTime":0.04008000000021639,"minTime":0.0006029999999555002},{"name":"unescapeSpecialChars","time":0.009387199999969198,"maxTime":0.03947699999980614,"minTime":0.006930999999894993}]}],"1.8.3":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.9269011799999908,"maxTime":32.65378700000008,"minTime":0.14705900000001293},{"name":"performance.testfile.md","time":32.484542280000035,"maxTime":62.282010000000014,"minTime":28.40262900000016}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":5.454346750000013,"maxTime":18.356191000000308,"minTime":2.3848909999996977},{"name":"anchors","time":0.504325800000015,"maxTime":3.1102430000000822,"minTime":0.2902009999997972},{"name":"autoLinks","time":0.11421199999999772,"maxTime":0.28417399999989357,"minTime":0.06931099999974322},{"name":"blockQuotes","time":2.268720650000046,"maxTime":3.373623999999836,"minTime":1.996752000000015},{"name":"codeBlocks","time":0.2502117500000395,"maxTime":0.8398649999999179,"minTime":0.19196000000010827},{"name":"codeSpans","time":0.3517671000000064,"maxTime":1.230717999999797,"minTime":0.2486149999999725},{"name":"detab","time":0.11473945000000185,"maxTime":0.17900200000030964,"minTime":0.08739199999990888},{"name":"encodeAmpsAndAngles","time":0.10544264999996358,"maxTime":0.16212700000005498,"minTime":0.09462399999983973},{"name":"encodeBackslashEscapes","time":0.10833570000006602,"maxTime":0.2347530000001825,"minTime":0.07503700000006575},{"name":"encodeCode","time":0.9939308499999925,"maxTime":1.9153870000000097,"minTime":0.8467970000001515},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.23689210000002275,"maxTime":0.4746280000003935,"minTime":0.1600180000000364},{"name":"githubCodeBlocks","time":0.2020106000000169,"maxTime":0.7714579999997113,"minTime":0.15127899999970396},{"name":"hashBlock","time":0.07104355000003579,"maxTime":0.4927090000001044,"minTime":0.03917600000022503},{"name":"hashElement","time":0.0024862499999926515,"maxTime":0.036463999999796215,"minTime":0.0006019999996169645},{"name":"hashHTMLSpans","time":4.161957949999987,"maxTime":4.708306999999877,"minTime":3.9594499999998334},{"name":"hashPreCodeTags","time":0.1303646000000299,"maxTime":0.3314860000000408,"minTime":0.11240400000042428},{"name":"headers","time":1.4091020500000013,"maxTime":4.621517999999924,"minTime":1.043880000000172},{"name":"horizontalRule","time":0.3509834499999897,"maxTime":2.6549019999997654,"minTime":0.19617999999991298},{"name":"images","time":0.19913270000001831,"maxTime":0.5445410000002084,"minTime":0.1307859999997163},{"name":"italicsAndBold","time":0.268699450000031,"maxTime":0.35710100000005696,"minTime":0.23475200000029872},{"name":"lists","time":3.0566478999999847,"maxTime":4.403038999999808,"minTime":2.6856400000001486},{"name":"outdent","time":0.15278490000002876,"maxTime":0.3073779999999715,"minTime":0.13621100000000297},{"name":"paragraphs","time":6.455042899999944,"maxTime":7.90051799999992,"minTime":5.708189999999831},{"name":"spanGamut","time":4.255919250000034,"maxTime":5.54154299999982,"minTime":3.929916999999932},{"name":"strikethrough","time":0.005107850000035797,"maxTime":0.08889899999985573,"minTime":0.0003010000000358559},{"name":"stripLinkDefinitions","time":0.24843364999996992,"maxTime":0.3935639999999694,"minTime":0.22480699999960052},{"name":"tables","time":0.0021395500000380707,"maxTime":0.028025000000070577,"minTime":0.0006020000000717118},{"name":"unescapeSpecialChars","time":0.008935100000007879,"maxTime":0.03887399999985064,"minTime":0.006930999999894993}]}],"1.8.2":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.36118707999999744,"maxTime":8.97694100000001,"minTime":0.10366399999998066},{"name":"performance.testfile.md","time":33.109353200000044,"maxTime":56.477973000000134,"minTime":29.178900000000112}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":5.488247100000035,"maxTime":20.713954999999714,"minTime":2.3207030000003215},{"name":"anchors","time":0.5058775499999456,"maxTime":3.1581569999998464,"minTime":0.29200900000023466},{"name":"autoLinks","time":0.14073085000002267,"maxTime":0.36463400000002366,"minTime":0.07232500000009168},{"name":"blockQuotes","time":2.3000001499999825,"maxTime":3.6421259999997346,"minTime":2.046473999999762},{"name":"codeBlocks","time":0.24317504999999073,"maxTime":0.8772320000002765,"minTime":0.18924799999967945},{"name":"codeSpans","time":0.26844330000001265,"maxTime":1.1755699999998797,"minTime":0.1594150000000809},{"name":"detab","time":0.0950761500000226,"maxTime":0.17207199999984368,"minTime":0.0891990000000078},{"name":"encodeAmpsAndAngles","time":0.10803434999995716,"maxTime":0.22993099999985134,"minTime":0.09733700000015233},{"name":"encodeBackslashEscapes","time":0.07844164999999066,"maxTime":0.11903299999994488,"minTime":0.07413300000007439},{"name":"encodeCode","time":1.0021724500000346,"maxTime":1.5441220000002431,"minTime":0.850713999999698},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.25580170000000635,"maxTime":0.5656359999998131,"minTime":0.16363400000000183},{"name":"githubCodeBlocks","time":0.2531047000000399,"maxTime":0.9986770000000433,"minTime":0.15248300000030213},{"name":"hashBlock","time":0.04166155000000345,"maxTime":0.08015899999963949,"minTime":0.037066000000322674},{"name":"hashElement","time":0.002244949999999335,"maxTime":0.0322439999999915,"minTime":0.00030099999958110857},{"name":"hashHTMLSpans","time":4.444473249999987,"maxTime":5.282380000000103,"minTime":3.9871729999999843},{"name":"hashPreCodeTags","time":0.15179035000001023,"maxTime":0.2648869999998169,"minTime":0.11722499999996217},{"name":"headers","time":1.4647912000000134,"maxTime":4.970481000000291,"minTime":1.0589469999999892},{"name":"horizontalRule","time":0.24510365000001003,"maxTime":0.5623199999999997,"minTime":0.20461699999987104},{"name":"images","time":0.31239540000003674,"maxTime":2.6151230000000396,"minTime":0.1310880000000907},{"name":"italicsAndBold","time":0.287217499999997,"maxTime":0.42671299999983603,"minTime":0.24379300000009607},{"name":"lists","time":3.260661600000026,"maxTime":4.098372000000381,"minTime":2.7923170000003665},{"name":"outdent","time":0.17895719999999074,"maxTime":0.37729099999978644,"minTime":0.1410319999999956},{"name":"paragraphs","time":6.661300749999964,"maxTime":9.04655300000013,"minTime":5.883574999999837},{"name":"spanGamut","time":4.560794749999991,"maxTime":6.1731730000001335,"minTime":4.0085690000000795},{"name":"strikethrough","time":0.005469599999855745,"maxTime":0.09703499999977794,"minTime":0.00030099999958110857},{"name":"stripLinkDefinitions","time":0.25079934999998843,"maxTime":0.4017010000002301,"minTime":0.21576699999968696},{"name":"tables","time":0.005861300000015035,"maxTime":0.08618700000033641,"minTime":0.001205000000027212},{"name":"unescapeSpecialChars","time":0.013244550000035816,"maxTime":0.06358499999987544,"minTime":0.007835999999770138}]}],"1.8.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3569385800000009,"maxTime":9.000459999999975,"minTime":0.09070699999995213},{"name":"performance.testfile.md","time":31.433715060000004,"maxTime":57.438766999999984,"minTime":26.734683000000132}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.177346950000015,"maxTime":7.660953999999947,"minTime":2.346321999999873},{"name":"anchors","time":0.541678950000005,"maxTime":3.749413000000004,"minTime":0.30014600000004066},{"name":"autoLinks","time":0.08653315000001385,"maxTime":0.18322200000011435,"minTime":0.06931100000019796},{"name":"blockQuotes","time":2.048646549999944,"maxTime":3.5523299999999836,"minTime":1.8153400000001056},{"name":"codeBlocks","time":0.26372769999998125,"maxTime":1.1626129999999648,"minTime":0.18472799999972267},{"name":"codeSpans","time":0.27142715000002227,"maxTime":0.7904450000000907,"minTime":0.16303100000004633},{"name":"detab","time":0.09152044999998452,"maxTime":0.11963699999978417,"minTime":0.08648700000003373},{"name":"encodeAmpsAndAngles","time":0.10590985000001182,"maxTime":0.14615600000024642,"minTime":0.09703500000023269},{"name":"encodeBackslashEscapes","time":0.09130940000002283,"maxTime":0.15218199999981152,"minTime":0.07684500000004846},{"name":"encodeCode","time":0.961777750000033,"maxTime":1.551958999999897,"minTime":0.8615639999998166},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.23877579999996215,"maxTime":0.48698400000012043,"minTime":0.17297599999983504},{"name":"githubCodeBlocks","time":0.22202060000001894,"maxTime":0.9139990000003309,"minTime":0.1404299999999239},{"name":"hashBlock","time":0.0631934499999943,"maxTime":0.402002999999695,"minTime":0.035257999999885214},{"name":"hashElement","time":0.0014766499999950612,"maxTime":0.02531300000009651,"minTime":0},{"name":"hashHTMLSpans","time":4.30338740000002,"maxTime":4.888522000000194,"minTime":4.0212320000000545},{"name":"hashPreCodeTags","time":0.16443229999997583,"maxTime":0.5409259999996721,"minTime":0.11029499999995096},{"name":"headers","time":1.1587860999999975,"maxTime":3.7789459999999053,"minTime":0.9682419999999183},{"name":"horizontalRule","time":0.2442149499999914,"maxTime":0.4185769999999138,"minTime":0.1940709999998944},{"name":"images","time":0.32417875000003277,"maxTime":3.0575109999999768,"minTime":0.13319700000010926},{"name":"italicsAndBold","time":0.28938759999996366,"maxTime":0.41917899999998554,"minTime":0.23656099999971048},{"name":"lists","time":2.6713588999999955,"maxTime":3.1388750000000982,"minTime":2.4942840000003343},{"name":"outdent","time":0.15887245000001257,"maxTime":0.2525319999999738,"minTime":0.13862199999994118},{"name":"paragraphs","time":5.593502349999949,"maxTime":6.832538999999997,"minTime":5.159435999999914},{"name":"spanGamut","time":5.069422249999979,"maxTime":9.599546000000373,"minTime":4.127910000000156},{"name":"strikethrough","time":0.003405200000020159,"maxTime":0.062079000000267115,"minTime":0},{"name":"stripLinkDefinitions","time":0.2712614000000258,"maxTime":0.4004960000002029,"minTime":0.22480799999993906},{"name":"tables","time":0.0018532499999764696,"maxTime":0.03103899999996429,"minTime":0},{"name":"unescapeSpecialChars","time":0.008362499999998363,"maxTime":0.03797099999974307,"minTime":0.006628999999975349}]}],"1.7.6":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3132123199999978,"maxTime":6.2674990000000435,"minTime":0.09161100000005717},{"name":"performance.testfile.md","time":30.962222960000013,"maxTime":54.58250999999996,"minTime":26.38147600000002}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.098720800000001,"maxTime":7.07210699999996,"minTime":2.3604820000000473},{"name":"anchors","time":0.573802499999988,"maxTime":4.501581999999871,"minTime":0.2944200000001729},{"name":"autoLinks","time":0.08704519999992044,"maxTime":0.21034299999973882,"minTime":0.06629800000018804},{"name":"blockQuotes","time":2.176025850000019,"maxTime":4.601932000000033,"minTime":1.8228730000000724},{"name":"codeBlocks","time":0.2823659499999621,"maxTime":0.8853699999999662,"minTime":0.19256300000006377},{"name":"codeSpans","time":0.26464649999998074,"maxTime":0.7636240000001635,"minTime":0.16604400000005626},{"name":"detab","time":0.10188689999999952,"maxTime":0.15459400000008827,"minTime":0.09070699999983844},{"name":"encodeAmpsAndAngles","time":0.1072658999999021,"maxTime":0.17538599999988946,"minTime":0.09823999999980515},{"name":"encodeBackslashEscapes","time":0.1198171499999944,"maxTime":0.8715069999998377,"minTime":0.07292699999970864},{"name":"encodeCode","time":0.982675499999982,"maxTime":1.8424599999998463,"minTime":0.8727119999998649},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.3008235499999728,"maxTime":0.3890440000000126,"minTime":0.2772429999999986},{"name":"githubCodeBlocks","time":0.20439130000002023,"maxTime":0.8889859999999317,"minTime":0.1461549999999079},{"name":"hashBlock","time":0.06328369999998813,"maxTime":0.4149600000000646,"minTime":0.034957000000304106},{"name":"hashElement","time":0.0017929999999978462,"maxTime":0.031942999999955646,"minTime":0},{"name":"hashHTMLSpans","time":4.130528449999997,"maxTime":4.411176999999952,"minTime":3.987779000000046},{"name":"hashPreCodeTags","time":0.26229599999996933,"maxTime":2.428888999999799,"minTime":0.10848600000008446},{"name":"headers","time":1.263836200000037,"maxTime":4.308414999999968,"minTime":0.9534750000002532},{"name":"horizontalRule","time":0.2299157000000605,"maxTime":0.33088400000042384,"minTime":0.19376899999997477},{"name":"images","time":0.18361319999996795,"maxTime":0.5638280000002851,"minTime":0.13379999999961},{"name":"italicsAndBold","time":0.31194355000000085,"maxTime":0.8284139999996114,"minTime":0.25132699999994657},{"name":"lists","time":2.641733750000003,"maxTime":3.2741790000000037,"minTime":2.4511889999998857},{"name":"outdent","time":0.1594599499999731,"maxTime":0.2401769999996759,"minTime":0.14404600000034407},{"name":"paragraphs","time":6.723880100000019,"maxTime":12.671812000000045,"minTime":5.367362999999841},{"name":"spanGamut","time":4.990629550000063,"maxTime":9.206274000000121,"minTime":4.172807000000375},{"name":"strikethrough","time":0.0031943499999670167,"maxTime":0.0581609999999273,"minTime":0},{"name":"stripLinkDefinitions","time":0.245947799999999,"maxTime":0.38994800000000396,"minTime":0.21908299999995506},{"name":"tables","time":0.0024710999999797423,"maxTime":0.043695999999727064,"minTime":0},{"name":"unescapeSpecialChars","time":0.010472100000015416,"maxTime":0.05092800000011266,"minTime":0.006930999999894993}]}],"1.7.5":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.5624536399999989,"maxTime":14.434112000000027,"minTime":0.1175269999999955},{"name":"performance.testfile.md","time":30.396062639999997,"maxTime":57.88561900000002,"minTime":26.627980999999863}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.279682000000003,"maxTime":8.3917220000003,"minTime":2.3574690000000373},{"name":"anchors","time":0.6018129999999928,"maxTime":5.340845000000172,"minTime":0.2853789999999208},{"name":"autoLinks","time":0.09221340000001418,"maxTime":0.19316600000001927,"minTime":0.06478999999990265},{"name":"blockQuotes","time":2.0676297999999633,"maxTime":4.429558999999699,"minTime":1.7363850000001548},{"name":"codeBlocks","time":0.2791716500000575,"maxTime":0.9365990000001148,"minTime":0.18141300000024785},{"name":"codeSpans","time":0.22182445000000825,"maxTime":0.5915520000003198,"minTime":0.1576060000002144},{"name":"detab","time":0.12001294999997754,"maxTime":0.14494999999988067,"minTime":0.09130899999991016},{"name":"encodeAmpsAndAngles","time":0.1162462000000005,"maxTime":0.22179400000004534,"minTime":0.09643299999970623},{"name":"encodeBackslashEscapes","time":0.13970635000002857,"maxTime":0.9139979999999923,"minTime":0.07111899999972593},{"name":"encodeCode","time":1.1949925000000348,"maxTime":2.009107000000313,"minTime":0.8612610000000132},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.30746834999999917,"maxTime":0.46829899999966074,"minTime":0.2691060000001926},{"name":"githubCodeBlocks","time":0.19697799999999005,"maxTime":0.8374539999999797,"minTime":0.14404599999988932},{"name":"hashBlock","time":0.059848400000032595,"maxTime":0.4420820000000276,"minTime":0.03616199999987657},{"name":"hashElement","time":0.00222985000002609,"maxTime":0.0406820000002881,"minTime":0},{"name":"hashHTMLSpans","time":4.289491099999987,"maxTime":4.712226999999984,"minTime":4.001941999999872},{"name":"hashPreCodeTags","time":0.28119055000001936,"maxTime":2.4391359999999622,"minTime":0.10758299999997689},{"name":"headers","time":1.2212554000000182,"maxTime":4.602836000000025,"minTime":0.9082720000001245},{"name":"horizontalRule","time":0.20826354999994692,"maxTime":0.3522789999997258,"minTime":0.19316600000001927},{"name":"images","time":0.1816696500000262,"maxTime":0.6337419999999838,"minTime":0.12807400000019697},{"name":"italicsAndBold","time":0.33532845000006545,"maxTime":1.2762219999999616,"minTime":0.23897100000021965},{"name":"lists","time":3.142624149999983,"maxTime":6.410941999999977,"minTime":2.3930279999999584},{"name":"outdent","time":0.3979791999999634,"maxTime":0.5846209999999701,"minTime":0.15851100000008955},{"name":"paragraphs","time":5.925721800000019,"maxTime":11.595988000000034,"minTime":4.961444000000029},{"name":"spanGamut","time":4.442833449999966,"maxTime":6.011651999999685,"minTime":4.023940000000039},{"name":"strikethrough","time":0.00299849999998969,"maxTime":0.054544999999961874,"minTime":0},{"name":"stripLinkDefinitions","time":0.24257244999998875,"maxTime":0.42400099999986196,"minTime":0.21486400000003414},{"name":"tables","time":0.0026519000000007507,"maxTime":0.04851700000017445,"minTime":0},{"name":"unescapeSpecialChars","time":0.00845289999997476,"maxTime":0.04098400000020774,"minTime":0.006327999999939493}]}],"1.7.4":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.9721513400000095,"maxTime":25.185683999999924,"minTime":0.16001700000003893},{"name":"performance.testfile.md","time":30.397026539999985,"maxTime":61.91279899999995,"minTime":26.54959800000006}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":3.9990743000000064,"maxTime":6.602594000000408,"minTime":2.3143739999995887},{"name":"anchors","time":0.5273032499999545,"maxTime":3.822632999999769,"minTime":0.2850779999998849},{"name":"autoLinks","time":0.08963684999998804,"maxTime":0.18834400000014284,"minTime":0.06328400000029433},{"name":"blockQuotes","time":2.05724574999997,"maxTime":4.121875000000273,"minTime":1.7803800000001502},{"name":"codeBlocks","time":0.24737865000001874,"maxTime":1.0845610000001216,"minTime":0.18623500000012427},{"name":"codeSpans","time":0.26315439999996215,"maxTime":1.0170579999999063,"minTime":0.16182500000013533},{"name":"detab","time":0.1229059499999721,"maxTime":0.1579079999996793,"minTime":0.0970340000003489},{"name":"encodeAmpsAndAngles","time":0.11849099999999453,"maxTime":0.17116699999996854,"minTime":0.09613099999978658},{"name":"encodeBackslashEscapes","time":0.07934549999995397,"maxTime":0.14645599999994374,"minTime":0.07111799999984214},{"name":"encodeCode","time":0.9450961000000007,"maxTime":1.4528110000001107,"minTime":0.8663830000000416},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2850024500000245,"maxTime":0.4384650000001784,"minTime":0.245600000000195},{"name":"githubCodeBlocks","time":0.22539534999998523,"maxTime":0.9688430000001063,"minTime":0.1416349999999511},{"name":"hashBlock","time":0.06790930000001935,"maxTime":0.5767860000000837,"minTime":0.03555899999992107},{"name":"hashElement","time":0.0022601500000064335,"maxTime":0.04068300000017189,"minTime":0},{"name":"hashHTMLSpans","time":4.125777100000005,"maxTime":4.527794000000085,"minTime":3.95040599999993},{"name":"hashPreCodeTags","time":0.14892740000002505,"maxTime":0.5373079999999391,"minTime":0.10969100000011167},{"name":"headers","time":1.1714858000000277,"maxTime":3.876875999999811,"minTime":0.8841630000001715},{"name":"horizontalRule","time":0.3806509500000175,"maxTime":3.456793000000289,"minTime":0.1967819999999847},{"name":"images","time":0.19467249999997877,"maxTime":0.6180699999999888,"minTime":0.132593999999699},{"name":"italicsAndBold","time":0.2980658500000118,"maxTime":0.5623199999999997,"minTime":0.24499800000012328},{"name":"lists","time":3.7902082000000066,"maxTime":6.13881500000025,"minTime":2.612108000000262},{"name":"outdent","time":0.16693305000001146,"maxTime":0.2763379999996687,"minTime":0.13892200000009325},{"name":"paragraphs","time":5.349426699999981,"maxTime":6.076133999999911,"minTime":4.8972499999999854},{"name":"spanGamut","time":4.370021999999949,"maxTime":6.111091000000215,"minTime":3.9455849999999373},{"name":"strikethrough","time":0.002681949999941935,"maxTime":0.048215999999683845,"minTime":0},{"name":"stripLinkDefinitions","time":0.2550632000000178,"maxTime":0.400796000000355,"minTime":0.21817700000019613},{"name":"tables","time":0.001913599999966209,"maxTime":0.03284799999983079,"minTime":0},{"name":"unescapeSpecialChars","time":0.008859800000004725,"maxTime":0.04008000000021639,"minTime":0.006630000000313885}]}],"1.7.3":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.2769780200000014,"maxTime":5.742551000000049,"minTime":0.08799399999998059},{"name":"performance.testfile.md","time":30.73344694000001,"maxTime":54.768493000000035,"minTime":26.97154599999999}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.315576899999996,"maxTime":8.270586999999978,"minTime":2.3387870000001385},{"name":"anchors","time":0.5248635000000377,"maxTime":3.812093999999888,"minTime":0.28809199999977864},{"name":"autoLinks","time":0.0845591499999955,"maxTime":0.21998700000040117,"minTime":0.06268099999988408},{"name":"blockQuotes","time":2.032795400000032,"maxTime":3.6222429999997985,"minTime":1.7451259999998001},{"name":"codeBlocks","time":0.25076970000002347,"maxTime":1.059552000000167,"minTime":0.17809899999974732},{"name":"codeSpans","time":0.24638479999996435,"maxTime":0.7494609999998829,"minTime":0.1570040000001427},{"name":"detab","time":0.1421171499999673,"maxTime":0.7524739999998928,"minTime":0.08739100000002509},{"name":"encodeAmpsAndAngles","time":0.10028979999999592,"maxTime":0.12927999999965323,"minTime":0.09492600000021412},{"name":"encodeBackslashEscapes","time":0.07875814999997602,"maxTime":0.1247600000001512,"minTime":0.06991299999981493},{"name":"encodeCode","time":0.9767702500000042,"maxTime":1.773754000000281,"minTime":0.8516189999995731},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.27073390000000475,"maxTime":0.4414790000000721,"minTime":0.24409500000001572},{"name":"githubCodeBlocks","time":0.23499365000002398,"maxTime":0.9848159999996824,"minTime":0.1392240000000129},{"name":"hashBlock","time":0.0681052000000136,"maxTime":0.5496650000000045,"minTime":0.03616199999987657},{"name":"hashElement","time":0.001687549999996918,"maxTime":0.029532000000017433,"minTime":0},{"name":"hashHTMLSpans","time":4.197401899999977,"maxTime":4.563965999999709,"minTime":4.005560999999943},{"name":"hashPreCodeTags","time":0.13869685000001936,"maxTime":0.5433360000001812,"minTime":0.10577400000011039},{"name":"headers","time":1.148419750000039,"maxTime":4.214097000000038,"minTime":0.8796440000000985},{"name":"horizontalRule","time":0.21377854999998364,"maxTime":0.27302400000007765,"minTime":0.1985909999998512},{"name":"images","time":0.3095482500000116,"maxTime":3.095480999999836,"minTime":0.11993800000027477},{"name":"italicsAndBold","time":0.2785843000000341,"maxTime":0.3778940000001967,"minTime":0.23505399999976362},{"name":"lists","time":3.8429223499999354,"maxTime":8.277819999999792,"minTime":2.629892999999811},{"name":"outdent","time":0.19257850000001325,"maxTime":0.3863329999999223,"minTime":0.14404500000000553},{"name":"paragraphs","time":5.540976899999987,"maxTime":8.153060000000096,"minTime":4.83608600000025},{"name":"spanGamut","time":4.637932300000012,"maxTime":5.775095999999849,"minTime":4.142072999999982},{"name":"strikethrough","time":0.0028779499999927794,"maxTime":0.051530999999613414,"minTime":0},{"name":"stripLinkDefinitions","time":0.16675279999994927,"maxTime":0.27483299999994415,"minTime":0.1416349999999511},{"name":"tables","time":0.0021245000000135405,"maxTime":0.03646299999991243,"minTime":0},{"name":"unescapeSpecialChars","time":0.009130949999985205,"maxTime":0.031942999999955646,"minTime":0.00783499999988635}]}],"1.7.2":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.2924792600000001,"maxTime":5.779913000000079,"minTime":0.0870909999999867},{"name":"performance.testfile.md","time":30.395544379999997,"maxTime":53.85987,"minTime":26.054209000000128}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.303097000000003,"maxTime":7.7980609999999615,"minTime":2.377357999999731},{"name":"anchors","time":0.3474425999999994,"maxTime":0.6473019999998542,"minTime":0.28688599999986764},{"name":"autoLinks","time":0.08811514999999873,"maxTime":0.16544199999998455,"minTime":0.06328399999983958},{"name":"blockQuotes","time":2.1012153500000297,"maxTime":5.12055700000019,"minTime":1.7381930000001375},{"name":"codeBlocks","time":0.23850445000000492,"maxTime":0.8784390000000712,"minTime":0.18412599999965096},{"name":"codeSpans","time":0.2522458500000312,"maxTime":0.6283170000001519,"minTime":0.16031900000007226},{"name":"detab","time":0.09415714999997818,"maxTime":0.12867700000015247,"minTime":0.08769299999994473},{"name":"encodeAmpsAndAngles","time":0.1305904000000055,"maxTime":0.7331880000001547,"minTime":0.09251499999982116},{"name":"encodeBackslashEscapes","time":0.07973749999998744,"maxTime":0.1157189999998991,"minTime":0.07021500000018932},{"name":"encodeCode","time":0.9388443000000052,"maxTime":1.4799349999998412,"minTime":0.8573440000000119},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.28453565000002073,"maxTime":0.4731209999999919,"minTime":0.24349200000006022},{"name":"githubCodeBlocks","time":0.2144414500000039,"maxTime":1.046893000000182,"minTime":0.13952599999993254},{"name":"hashBlock","time":0.06795475000005809,"maxTime":0.5532809999999699,"minTime":0.03616200000033132},{"name":"hashElement","time":0.0016724999999723877,"maxTime":0.029833999999937078,"minTime":0},{"name":"hashHTMLSpans","time":4.323498449999988,"maxTime":6.161724999999933,"minTime":4.0037499999998545},{"name":"hashPreCodeTags","time":0.1474811499999987,"maxTime":0.5584039999998822,"minTime":0.1087880000000041},{"name":"headers","time":1.1759319999999889,"maxTime":4.491336000000047,"minTime":0.8841640000000552},{"name":"horizontalRule","time":0.21614389999997458,"maxTime":0.2636819999997897,"minTime":0.19316600000001927},{"name":"images","time":0.15570804999995289,"maxTime":0.5587049999999181,"minTime":0.11782799999991767},{"name":"italicsAndBold","time":0.3219485000000077,"maxTime":1.012539999999717,"minTime":0.2365599999998267},{"name":"lists","time":2.753399100000024,"maxTime":5.612964000000375,"minTime":2.3276349999996455},{"name":"outdent","time":0.16286519999998744,"maxTime":0.2323420000002443,"minTime":0.1398269999999684},{"name":"paragraphs","time":5.108954950000021,"maxTime":6.168355000000247,"minTime":4.741155999999592},{"name":"spanGamut","time":4.422869150000042,"maxTime":6.14906800000017,"minTime":4.000737000000299},{"name":"strikethrough","time":0.0028779999999869687,"maxTime":0.051230000000032305,"minTime":0},{"name":"stripLinkDefinitions","time":0.1603637499999877,"maxTime":0.2257119999999304,"minTime":0.14193599999998696},{"name":"tables","time":0.002470999999968626,"maxTime":0.04339399999980742,"minTime":0},{"name":"unescapeSpecialChars","time":0.011074649999977737,"maxTime":0.04640800000015588,"minTime":0.006628999999975349}]}],"1.7.1":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":1.0738219599999979,"maxTime":20.566299000000072,"minTime":0.3242529999999988},{"name":"performance.testfile.md","time":30.4629232,"maxTime":82.115725,"minTime":26.02165500000001}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.232850950000011,"maxTime":9.06222600000001,"minTime":2.35927700000002},{"name":"anchors","time":0.35050129999999624,"maxTime":0.7627189999998336,"minTime":0.28568100000029517},{"name":"autoLinks","time":0.08923019999999723,"maxTime":0.19015300000000934,"minTime":0.06509199999982229},{"name":"blockQuotes","time":2.073701349999965,"maxTime":4.988563999999769,"minTime":1.7291510000000017},{"name":"codeBlocks","time":0.2560277500000211,"maxTime":0.9369000000001506,"minTime":0.1790019999998549},{"name":"codeSpans","time":0.24160820000001876,"maxTime":0.8386599999998907,"minTime":0.1576060000002144},{"name":"detab","time":0.09915939999998499,"maxTime":0.16815399999995861,"minTime":0.08618599999999788},{"name":"encodeAmpsAndAngles","time":0.13123839999998382,"maxTime":0.646096999999827,"minTime":0.09311699999989287},{"name":"encodeBackslashEscapes","time":0.07607604999996057,"maxTime":0.1404299999999239,"minTime":0.07021399999985078},{"name":"encodeCode","time":0.9938553500000807,"maxTime":1.7056470000002264,"minTime":0.8648769999999786},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.26711740000000644,"maxTime":0.37518199999976787,"minTime":0.24951800000008006},{"name":"githubCodeBlocks","time":0.19164420000001883,"maxTime":0.9664330000000518,"minTime":0.14012899999988804},{"name":"hashBlock","time":0.05914020000000164,"maxTime":0.39748199999985445,"minTime":0.03646299999991243},{"name":"hashElement","time":0.0017327499999964858,"maxTime":0.030737999999928434,"minTime":0},{"name":"hashHTMLSpans","time":4.116996499999937,"maxTime":5.5849379999999655,"minTime":3.89044100000001},{"name":"hashPreCodeTags","time":0.1423884499999531,"maxTime":0.5294739999999365,"minTime":0.1081850000000486},{"name":"headers","time":1.1452692999999954,"maxTime":4.103494999999839,"minTime":0.8639729999999872},{"name":"horizontalRule","time":0.21682209999996757,"maxTime":0.36583999999993466,"minTime":0.19407000000001062},{"name":"images","time":0.15055509999997413,"maxTime":0.5526780000000144,"minTime":0.11662299999989045},{"name":"italicsAndBold","time":0.3119285999999647,"maxTime":1.2412650000001122,"minTime":0.23625899999979083},{"name":"lists","time":4.022899600000005,"maxTime":7.077227000000221,"minTime":2.4975970000000416},{"name":"outdent","time":0.17451229999999213,"maxTime":0.26066899999977977,"minTime":0.14826499999981024},{"name":"paragraphs","time":6.5566433999999845,"maxTime":8.645457999999962,"minTime":4.997002000000066},{"name":"spanGamut","time":5.072655700000018,"maxTime":6.34705299999996,"minTime":4.136643999999706},{"name":"strikethrough","time":0.006192800000076204,"maxTime":0.11029400000006717,"minTime":0},{"name":"stripLinkDefinitions","time":0.16428144999997585,"maxTime":0.27694100000007893,"minTime":0.1416349999999511},{"name":"tables","time":0.004354600000010578,"maxTime":0.08015999999997803,"minTime":0},{"name":"unescapeSpecialChars","time":0.009130899999991015,"maxTime":0.04580600000008417,"minTime":0.006930999999894993}]}],"1.7.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.39255787999999486,"maxTime":9.953321000000074,"minTime":0.09673299999997198},{"name":"performance.testfile.md","time":29.416470079999975,"maxTime":54.25341800000001,"minTime":25.948727999999846}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.0619999999999665,"maxTime":7.184810000000198,"minTime":2.325826999999663},{"name":"anchors","time":0.4883242500000051,"maxTime":4.085716999999931,"minTime":0.28085900000041875},{"name":"autoLinks","time":0.08583980000000793,"maxTime":0.19979499999999462,"minTime":0.06298299999980372},{"name":"blockQuotes","time":2.071019450000017,"maxTime":4.554016000000047,"minTime":1.7333710000002611},{"name":"codeBlocks","time":0.2531195000000025,"maxTime":0.8639729999999872,"minTime":0.17809799999986353},{"name":"codeSpans","time":0.2609549000000243,"maxTime":0.5924559999998564,"minTime":0.15971599999966202},{"name":"detab","time":0.09453374999998232,"maxTime":0.1298820000001797,"minTime":0.08859699999993609},{"name":"encodeAmpsAndAngles","time":0.10304694999997537,"maxTime":0.19196099999999205,"minTime":0.09462400000029447},{"name":"encodeBackslashEscapes","time":0.1064521499999728,"maxTime":0.5894419999999627,"minTime":0.07051600000022518},{"name":"encodeCode","time":0.9265486000000009,"maxTime":1.1821999999997388,"minTime":0.8347420000000056},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2759772000000112,"maxTime":0.6171669999998812,"minTime":0.24530000000004293},{"name":"githubCodeBlocks","time":0.1951549499999828,"maxTime":0.9799929999999222,"minTime":0.1386210000000574},{"name":"hashBlock","time":0.062304449999965074,"maxTime":0.4833670000002712,"minTime":0.03495699999984936},{"name":"hashElement","time":0.0014464500000030966,"maxTime":0.024711000000024796,"minTime":0},{"name":"hashHTMLSpans","time":4.1203715999999755,"maxTime":4.609765000000152,"minTime":3.8587989999996353},{"name":"hashPreCodeTags","time":0.14734550000000582,"maxTime":0.5351989999999205,"minTime":0.10487000000011903},{"name":"headers","time":1.3076671999999916,"maxTime":4.252966000000015,"minTime":0.8564390000001367},{"name":"horizontalRule","time":0.2203779999999597,"maxTime":0.3742779999997765,"minTime":0.19407000000001062},{"name":"images","time":0.15025354999997945,"maxTime":0.506872000000385,"minTime":0.1163219999998546},{"name":"italicsAndBold","time":0.30579589999997553,"maxTime":0.872110000000248,"minTime":0.24138200000015786},{"name":"lists","time":3.447394599999984,"maxTime":4.893336999999974,"minTime":2.407492000000275},{"name":"outdent","time":0.26698190000001887,"maxTime":0.8684939999998278,"minTime":0.1808109999997214},{"name":"paragraphs","time":5.866655149999997,"maxTime":8.331147999999757,"minTime":4.9695779999997285},{"name":"spanGamut","time":5.038527899999986,"maxTime":7.123635999999806,"minTime":4.11615299999994},{"name":"strikethrough","time":0.003992900000002919,"maxTime":0.07322800000019924,"minTime":0},{"name":"stripLinkDefinitions","time":0.15298084999997172,"maxTime":0.24288900000010472,"minTime":0.13952599999993254},{"name":"tables","time":0.0024410000000443686,"maxTime":0.043695999999727064,"minTime":0},{"name":"unescapeSpecialChars","time":0.008663700000033714,"maxTime":0.0406820000002881,"minTime":0.006628999999975349}]}],"1.6.4":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.37575447999999595,"maxTime":6.3811059999999316,"minTime":0.182617999999934},{"name":"performance.testfile.md","time":33.83478732000001,"maxTime":61.04858100000001,"minTime":30.186325000000124}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.5643760500000328,"maxTime":8.346818999999869,"minTime":1.8710879999998724},{"name":"anchors","time":0.4985702000000174,"maxTime":4.221624999999676,"minTime":0.27031199999964883},{"name":"autoLinks","time":0.08000864999996793,"maxTime":0.17357799999990675,"minTime":0.06087299999990137},{"name":"blockQuotes","time":3.3429765499999804,"maxTime":7.305651000000125,"minTime":2.8504790000001776},{"name":"codeBlocks","time":0.22134235000003172,"maxTime":0.8220859999996719,"minTime":0.17176999999992404},{"name":"codeSpans","time":0.22901160000001256,"maxTime":0.7443360000002031,"minTime":0.15579799999977695},{"name":"detab","time":0.0973213499999929,"maxTime":0.15429100000028484,"minTime":0.08618699999988166},{"name":"encodeAmpsAndAngles","time":0.11678870000000643,"maxTime":0.19979600000033315,"minTime":0.09432200000037483},{"name":"encodeBackslashEscapes","time":0.08623155000002498,"maxTime":0.2296289999999317,"minTime":0.06810499999983222},{"name":"encodeCode","time":0.8853238499999861,"maxTime":1.1647219999999834,"minTime":0.8163599999998041},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2983526000000438,"maxTime":0.4954210000000785,"minTime":0.2401769999996759},{"name":"githubCodeBlocks","time":0.18343240000001515,"maxTime":0.7847170000000006,"minTime":0.1331980000004478},{"name":"hashBlock","time":0.0443587499999694,"maxTime":0.09763799999973344,"minTime":0.035257999999885214},{"name":"hashElement","time":0.00200395000001663,"maxTime":0.03345000000035725,"minTime":0},{"name":"hashHTMLSpans","time":4.199521549999963,"maxTime":4.551605000000109,"minTime":3.9874759999997877},{"name":"hashPreCodeTags","time":0.1295205500000293,"maxTime":0.3134050000003299,"minTime":0.10637700000006589},{"name":"headers","time":1.2236204000000044,"maxTime":4.009776000000329,"minTime":0.944735000000037},{"name":"horizontalRule","time":0.41190154999999323,"maxTime":4.175217999999859,"minTime":0.19648000000006505},{"name":"images","time":0.08806979999997111,"maxTime":0.20250800000030722,"minTime":0.0732279999997445},{"name":"italicsAndBold","time":0.2764291999999841,"maxTime":0.4137550000000374,"minTime":0.23324500000035187},{"name":"lists","time":5.0047764500000085,"maxTime":6.109288000000106,"minTime":4.663406000000123},{"name":"outdent","time":0.1521370000000161,"maxTime":0.3366089999999531,"minTime":0.13922500000035143},{"name":"paragraphs","time":5.336081549999994,"maxTime":7.117005000000063,"minTime":4.843312999999853},{"name":"spanGamut","time":4.449883849999901,"maxTime":6.152983999999833,"minTime":3.8569910000001073},{"name":"strikethrough","time":0.002606700000001183,"maxTime":0.04881900000009409,"minTime":0},{"name":"stripLinkDefinitions","time":0.18040370000001077,"maxTime":0.3161169999998492,"minTime":0.14705999999978303},{"name":"tables","time":0.0031190500000320754,"maxTime":0.05544899999995323,"minTime":0},{"name":"unescapeSpecialChars","time":0.009281650000002629,"maxTime":0.047313000000031025,"minTime":0.006628999999975349}]}],"1.6.3":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3880986600000119,"maxTime":6.064399999999978,"minTime":0.17418099999997594},{"name":"performance.testfile.md","time":26.898552680000012,"maxTime":49.06275100000005,"minTime":24.84523399999989}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.6158222500000194,"maxTime":8.18079200000011,"minTime":1.8985149999998612},{"name":"anchors","time":0.5154769000000442,"maxTime":4.690839000000324,"minTime":0.2639840000001641},{"name":"autoLinks","time":0.09307249999999385,"maxTime":0.18834400000014284,"minTime":0.07262600000012753},{"name":"blockQuotes","time":4.5183903999999755,"maxTime":8.952854000000116,"minTime":3.035816000000068},{"name":"codeBlocks","time":0.22262349999998604,"maxTime":0.347758999999769,"minTime":0.18834500000002663},{"name":"codeSpans","time":0.31763950000004115,"maxTime":1.0948100000000522,"minTime":0.1771950000002107},{"name":"detab","time":0.0919273999999632,"maxTime":0.13651200000003882,"minTime":0.08739199999990888},{"name":"encodeAmpsAndAngles","time":0.0438916999999492,"maxTime":0.08919999999989159,"minTime":0.038271000000349886},{"name":"encodeBackslashEscapes","time":0.10785369999998692,"maxTime":0.2651890000001913,"minTime":0.07835100000011153},{"name":"encodeCode","time":1.5346329500000138,"maxTime":9.895783999999821,"minTime":0.8645779999997103},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2937122499999759,"maxTime":0.5234480000003714,"minTime":0.25343700000030367},{"name":"githubCodeBlocks","time":0.20775164999997742,"maxTime":0.7901440000000548,"minTime":0.1416349999999511},{"name":"hashBlock","time":0.042234400000006646,"maxTime":0.12325299999974959,"minTime":0.035860999999840715},{"name":"hashElement","time":0.0016724999999951252,"maxTime":0.028929000000061933,"minTime":0},{"name":"hashHTMLSpans","time":0.4103353000000197,"maxTime":1.5980680000002394,"minTime":0.2404790000000503},{"name":"hashPreCodeTags","time":0.13196184999997057,"maxTime":0.3950719999998,"minTime":0.11029400000006717},{"name":"headers","time":1.0150126000000683,"maxTime":1.501936999999998,"minTime":0.8055130000002464},{"name":"horizontalRule","time":0.22018260000002102,"maxTime":0.35710100000005696,"minTime":0.1946739999998499},{"name":"images","time":0.1582398000000012,"maxTime":0.978186999999707,"minTime":0.07684500000004846},{"name":"italicsAndBold","time":0.28757974999998626,"maxTime":0.6394679999998516,"minTime":0.24078000000008615},{"name":"lists","time":5.151319100000023,"maxTime":6.331397000000379,"minTime":4.629061999999976},{"name":"outdent","time":0.18019314999994548,"maxTime":0.36342999999988024,"minTime":0.14253999999982625},{"name":"paragraphs","time":4.547636500000022,"maxTime":6.308794999999918,"minTime":4.002250999999887},{"name":"spanGamut","time":1.5190982500000245,"maxTime":1.863557999999557,"minTime":1.3720530000000508},{"name":"strikethrough","time":0.003450399999996989,"maxTime":0.06539299999985815,"minTime":0},{"name":"stripLinkDefinitions","time":0.1786111499999606,"maxTime":0.3128030000002582,"minTime":0.1443480000002637},{"name":"tables","time":0.0035106999999925392,"maxTime":0.06268099999988408,"minTime":0.00030099999958110857},{"name":"unescapeSpecialChars","time":0.01146649999998317,"maxTime":0.04881900000009409,"minTime":0.006628999999975349}]}],"1.6.2":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.6130621400000001,"maxTime":5.893518999999998,"minTime":0.16875699999999938},{"name":"performance.testfile.md","time":25.970254839999992,"maxTime":62.88168,"minTime":23.709682999999927}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.6685977000000323,"maxTime":8.478507000000036,"minTime":1.8846490000000813},{"name":"anchors","time":0.5002727000000278,"maxTime":3.841318999999885,"minTime":0.2676000000001295},{"name":"autoLinks","time":0.09846654999997781,"maxTime":0.21064500000011321,"minTime":0.07202299999994466},{"name":"blockQuotes","time":3.221817550000014,"maxTime":5.825714999999946,"minTime":2.791112000000112},{"name":"codeBlocks","time":0.17663659999998343,"maxTime":0.3712639999998828,"minTime":0.1570040000001427},{"name":"codeSpans","time":0.2181328999999778,"maxTime":0.483066000000008,"minTime":0.15097700000001169},{"name":"detab","time":0.13492999999998573,"maxTime":0.6545340000000124,"minTime":0.08498099999997066},{"name":"encodeAmpsAndAngles","time":0.04158639999994875,"maxTime":0.11752699999988181,"minTime":0.03616199999987657},{"name":"encodeBackslashEscapes","time":0.0800689000000034,"maxTime":0.13319799999999304,"minTime":0.06780399999979636},{"name":"encodeCode","time":0.5599700499999927,"maxTime":0.9821019999999407,"minTime":0.48396900000011556},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.35280645000001415,"maxTime":0.5683480000000145,"minTime":0.2914060000000518},{"name":"githubCodeBlocks","time":0.17996669999999995,"maxTime":0.7729650000001129,"minTime":0.1274710000000141},{"name":"hashBlock","time":0.057723849999990764,"maxTime":0.31159699999989243,"minTime":0.037368000000014945},{"name":"hashElement","time":0.0025463500000000748,"maxTime":0.04610600000000886,"minTime":0},{"name":"hashHTMLSpans","time":0.47458235000001425,"maxTime":2.325223000000051,"minTime":0.2344510000000355},{"name":"hashPreCodeTags","time":0.12186629999998785,"maxTime":0.3073779999999715,"minTime":0.10697999999979402},{"name":"headers","time":0.8577350000000024,"maxTime":0.9540770000000975,"minTime":0.7801970000000438},{"name":"horizontalRule","time":0.22663095000001476,"maxTime":0.41797300000007453,"minTime":0.1967819999999847},{"name":"images","time":0.17053435000000264,"maxTime":1.4528119999999944,"minTime":0.07714599999985694},{"name":"italicsAndBold","time":0.10093754999998054,"maxTime":0.20220699999981662,"minTime":0.0882960000001276},{"name":"lists","time":4.9306124000000064,"maxTime":5.460477999999966,"minTime":4.55642499999999},{"name":"outdent","time":0.16260889999998654,"maxTime":0.31461000000012973,"minTime":0.1416349999999511},{"name":"paragraphs","time":3.7896679000000177,"maxTime":5.563840999999911,"minTime":3.278396000000157},{"name":"spanGamut","time":1.4417527499999891,"maxTime":2.0124210000001312,"minTime":1.2032939999999144},{"name":"strikethrough","time":0.004233999999985372,"maxTime":0.08196800000018811,"minTime":0},{"name":"stripBlankLines","time":0.08623144999999113,"maxTime":0.1304850000001352,"minTime":0.0804600000001301},{"name":"stripLinkDefinitions","time":0.15983660000002828,"maxTime":0.21727400000008856,"minTime":0.1446480000001884},{"name":"tables","time":0.004143600000008974,"maxTime":0.07593999999994594,"minTime":0},{"name":"unescapeSpecialChars","time":0.00991439999999102,"maxTime":0.0581609999999273,"minTime":0.006628999999975349}]}],"1.6.1":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3172682400000001,"maxTime":5.4981469999999995,"minTime":0.16062000000000154},{"name":"readme.md","time":26.0144148,"maxTime":46.79858399999999,"minTime":24.245484999999917}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.6414157500000215,"maxTime":7.791727999999921,"minTime":1.9364810000001853},{"name":"anchors","time":0.47462755000000245,"maxTime":4.062812000000122,"minTime":0.25885999999991327},{"name":"autoLinks","time":0.08906409999998459,"maxTime":0.19708299999979317,"minTime":0.06870800000001509},{"name":"blockQuotes","time":3.213485000000014,"maxTime":6.05383699999993,"minTime":2.880010000000084},{"name":"codeBlocks","time":0.16200620000001892,"maxTime":0.2691060000001926,"minTime":0.15308599999980288},{"name":"codeSpans","time":0.169494799999984,"maxTime":0.39868699999988166,"minTime":0.1410319999999956},{"name":"detab","time":0.12471390000000611,"maxTime":0.6647800000000643,"minTime":0.08558400000015354},{"name":"encodeAmpsAndAngles","time":0.04181244999999763,"maxTime":0.08920000000011896,"minTime":0.03796999999985928},{"name":"encodeBackslashEscapes","time":0.07586505000000443,"maxTime":0.13289599999984603,"minTime":0.06810500000005959},{"name":"encodeCode","time":0.5765897500000051,"maxTime":0.970348999999942,"minTime":0.4791480000001229},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.24603789999998754,"maxTime":0.35047099999997045,"minTime":0.22119199999997363},{"name":"githubCodeBlocks","time":0.1767573999999968,"maxTime":0.815454999999929,"minTime":0.1250600000000759},{"name":"hashBlock","time":0.06537804999999253,"maxTime":0.42972599999984595,"minTime":0.0376690000000508},{"name":"hashElement","time":0.0020039500000052614,"maxTime":0.034051999999974214,"minTime":0},{"name":"hashHTMLSpans","time":0.42437735000000887,"maxTime":2.3210050000000138,"minTime":0.24078000000008615},{"name":"hashPreCodeTags","time":0.12225794999998243,"maxTime":0.23836899999992056,"minTime":0.10396600000012768},{"name":"headers","time":0.8037480999999957,"maxTime":0.9462419999999838,"minTime":0.7256529999999657},{"name":"horizontalRule","time":0.2186149999999884,"maxTime":0.27362700000003315,"minTime":0.19437100000004648},{"name":"images","time":0.12388539999997192,"maxTime":0.9019430000000739,"minTime":0.07081799999991745},{"name":"italicsAndBold","time":0.10089220000002115,"maxTime":0.15037400000005618,"minTime":0.08950099999992744},{"name":"lists","time":4.938929699999983,"maxTime":5.421000999999933,"minTime":4.623625999999831},{"name":"outdent","time":0.1648239000000217,"maxTime":0.3372110000000248,"minTime":0.1404290000000401},{"name":"paragraphs","time":3.4947812,"maxTime":4.554917999999816,"minTime":3.1714170000000195},{"name":"spanGamut","time":1.318997649999983,"maxTime":1.9916279999999915,"minTime":1.1469409999999698},{"name":"strikethrough","time":0.007458499999995638,"maxTime":0.14314200000012534,"minTime":0},{"name":"stripBlankLines","time":0.09447364999999763,"maxTime":0.1545929999999771,"minTime":0.0822689999999966},{"name":"stripLinkDefinitions","time":0.1762751000000094,"maxTime":0.3112949999999728,"minTime":0.1464570000000549},{"name":"tables","time":0.0023505499999828317,"maxTime":0.03947699999980614,"minTime":0},{"name":"unescapeSpecialChars","time":0.008332400000006146,"maxTime":0.03375200000004952,"minTime":0.0066299999998591375}]}],"1.6.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3075345600000001,"maxTime":5.369168,"minTime":0.1570040000000006},{"name":"readme.md","time":25.81825956,"maxTime":47.795452,"minTime":23.775378000000046}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.652987649999966,"maxTime":8.557761999999911,"minTime":1.8804290000000492},{"name":"anchors","time":0.5166509500000303,"maxTime":4.142066999999997,"minTime":0.27121600000009494},{"name":"autoLinks","time":0.0885518999999931,"maxTime":0.19437100000004648,"minTime":0.0705159999999978},{"name":"blockGamut","time":17.371581599999978,"maxTime":22.94093699999985,"minTime":14.081522999999834},{"name":"blockQuotes","time":3.011308699999995,"maxTime":4.110426000000189,"minTime":2.7742359999999735},{"name":"codeBlocks","time":0.24291900000000624,"maxTime":0.8344409999999698,"minTime":0.19346700000005512},{"name":"codeSpans","time":0.2271433000000002,"maxTime":0.4583549999999832,"minTime":0.19135800000003655},{"name":"detab","time":0.09469964999999547,"maxTime":0.13289599999984603,"minTime":0.08950099999992744},{"name":"encodeAmpsAndAngles","time":0.040486450000014426,"maxTime":0.07262600000012753,"minTime":0.03766799999993964},{"name":"encodeBackslashEscapes","time":0.09959649999997282,"maxTime":0.5095850000000155,"minTime":0.06840699999997923},{"name":"encodeCode","time":0.5320952499999863,"maxTime":0.7057630000001609,"minTime":0.4794489999999314},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.38607564999999794,"maxTime":0.7018459999999322,"minTime":0.326663999999937},{"name":"githubCodeBlocks","time":0.21441115000002356,"maxTime":0.7780880000000252,"minTime":0.15579800000000432},{"name":"hashBlock","time":0.056638900000007195,"maxTime":0.27995499999997264,"minTime":0.035257999999885214},{"name":"hashElement","time":0.001958799999999883,"maxTime":0.033148999999866646,"minTime":0},{"name":"hashHTMLSpans","time":0.38414695000003574,"maxTime":1.9973540000000867,"minTime":0.2356569999999465},{"name":"hashPreCodeTags","time":0.1327451500000393,"maxTime":0.20009700000014163,"minTime":0.1157189999998991},{"name":"headers","time":0.9440720999999825,"maxTime":2.4683650000001762,"minTime":0.7823069999999461},{"name":"images","time":0.12035954999996648,"maxTime":0.4857769999998709,"minTime":0.08588499999996202},{"name":"italicsAndBold","time":0.11076150000000098,"maxTime":0.4447930000001179,"minTime":0.08799499999986438},{"name":"lists","time":5.782546349999995,"maxTime":13.248890999999958,"minTime":4.463608999999906},{"name":"outdent","time":0.3057505000000219,"maxTime":0.9561860000001161,"minTime":0.22541000000001077},{"name":"paragraphs","time":6.582542549999971,"maxTime":8.810596000000032,"minTime":4.498867000000246},{"name":"spanGamut","time":2.43690389999997,"maxTime":3.067450000000008,"minTime":1.6474849999999606},{"name":"strikethrough","time":0.005228549999992537,"maxTime":0.10035000000016225,"minTime":0},{"name":"stripBlankLines","time":0.12142940000005638,"maxTime":0.17508399999996982,"minTime":0.09191199999986566},{"name":"stripLinkDefinitions","time":0.24673084999997172,"maxTime":0.572566000000279,"minTime":0.17146900000034293},{"name":"tables","time":0.005650249999962398,"maxTime":0.0985419999997248,"minTime":0.00030099999958110857},{"name":"unescapeSpecialChars","time":0.016694800000050237,"maxTime":0.06569400000034875,"minTime":0.011450999999851774}]}]} \ No newline at end of file diff --git a/node_modules/showdown/performance.log.md b/node_modules/showdown/performance.log.md new file mode 100644 index 0000000..09c3264 --- /dev/null +++ b/node_modules/showdown/performance.log.md @@ -0,0 +1,785 @@ +# Performance Tests for showdown + + +## [version 1.9.0](https://github.com/showdownjs/showdown/tree/1.9.0) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.394|9.154|0.104| +|performance.testfile.md|49.286|177.704|26.155| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|6.101|16.106|2.376| +|anchors|0.767|3.507|0.323| +|autoLinks|0.244|0.548|0.124| +|blockQuotes|2.397|4.000|2.013| +|codeBlocks|0.226|0.343|0.208| +|codeSpans|0.316|1.136|0.258| +|detab|0.095|0.184|0.085| +|encodeAmpsAndAngles|0.104|0.153|0.096| +|encodeBackslashEscapes|0.062|0.137|0.056| +|encodeCode|0.558|1.469|0.485| +|escapeSpecialCharsWithinTagAttributes|0.243|0.714|0.192| +|githubCodeBlocks|0.213|0.407|0.186| +|hashBlock|0.046|0.147|0.036| +|hashElement|0.003|0.050|0.000| +|hashHTMLSpans|4.914|7.364|4.474| +|hashPreCodeTags|0.134|0.234|0.110| +|headers|1.515|3.866|1.153| +|horizontalRule|0.216|0.293|0.194| +|images|0.144|0.286|0.124| +|italicsAndBold|0.234|0.656|0.190| +|lists|4.483|7.664|2.482| +|outdent|0.286|0.538|0.179| +|paragraphs|10.257|18.656|5.229| +|spanGamut|10.288|31.124|6.102| +|strikethrough|0.007|0.106|0.001| +|stripLinkDefinitions|0.438|0.678|0.392| +|tables|0.007|0.096|0.001| +|unescapeSpecialChars|0.041|0.086|0.008| + + +## [version 1.8.7](https://github.com/showdownjs/showdown/tree/1.8.7) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.339|9.454|0.104| +|performance.testfile.md|31.606|62.066|24.851| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|3.987|7.594|2.211| +|anchors|0.763|7.966|0.290| +|autoLinks|0.094|0.193|0.071| +|blockQuotes|2.922|9.315|2.021| +|codeBlocks|0.239|0.346|0.205| +|codeSpans|0.290|0.378|0.243| +|detab|0.094|0.161|0.084| +|encodeAmpsAndAngles|0.262|1.468|0.093| +|encodeBackslashEscapes|0.092|0.177|0.054| +|encodeCode|0.535|1.179|0.457| +|escapeSpecialCharsWithinTagAttributes|0.190|0.252|0.175| +|githubCodeBlocks|0.220|0.446|0.184| +|hashBlock|0.041|0.094|0.036| +|hashElement|0.002|0.025|0.000| +|hashHTMLSpans|4.397|5.805|4.071| +|hashPreCodeTags|0.119|0.221|0.108| +|headers|1.327|3.385|1.085| +|horizontalRule|0.212|0.270|0.198| +|images|0.228|1.336|0.123| +|italicsAndBold|0.211|0.363|0.190| +|lists|2.677|4.028|2.235| +|outdent|0.148|0.218|0.135| +|paragraphs|5.846|7.679|4.920| +|spanGamut|4.082|5.226|3.633| +|strikethrough|0.005|0.079|0.000| +|stripLinkDefinitions|0.327|1.681|0.221| +|tables|0.003|0.043|0.000| +|unescapeSpecialChars|0.010|0.042|0.007| + + +## [version 1.8.6](https://github.com/showdownjs/showdown/tree/1.8.6) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.454|9.635|0.087| +|performance.testfile.md|31.987|60.669|27.816| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|5.333|15.245|2.412| +|anchors|0.399|0.670|0.291| +|autoLinks|0.118|0.291|0.072| +|blockQuotes|2.897|6.028|1.997| +|codeBlocks|0.305|1.120|0.189| +|codeSpans|0.294|0.626|0.235| +|detab|0.129|0.765|0.087| +|encodeAmpsAndAngles|0.110|0.166|0.094| +|encodeBackslashEscapes|0.099|0.349|0.068| +|encodeCode|0.948|1.386|0.842| +|escapeSpecialCharsWithinTagAttributes|0.214|0.473|0.162| +|githubCodeBlocks|0.161|0.252|0.148| +|hashBlock|0.042|0.070|0.037| +|hashElement|0.002|0.023|0.000| +|hashHTMLSpans|4.292|5.134|3.921| +|hashPreCodeTags|0.131|0.361|0.110| +|headers|1.550|3.810|1.149| +|horizontalRule|0.214|0.287|0.201| +|images|0.176|0.432|0.132| +|italicsAndBold|0.324|1.552|0.228| +|lists|2.931|3.835|2.586| +|outdent|0.154|0.272|0.137| +|paragraphs|6.549|8.261|5.730| +|spanGamut|4.223|5.585|3.756| +|strikethrough|0.005|0.087|0.000| +|stripLinkDefinitions|0.242|0.373|0.224| +|tables|0.003|0.042|0.001| +|unescapeSpecialChars|0.010|0.053|0.007| + + +## [version 1.8.4](https://github.com/showdownjs/showdown/tree/1.8.4) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.736|11.076|0.117| +|performance.testfile.md|32.918|62.427|27.941| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|5.260|17.333|2.340| +|anchors|0.522|2.898|0.307| +|autoLinks|0.124|0.300|0.071| +|blockQuotes|2.244|3.333|2.015| +|codeBlocks|0.244|0.817|0.190| +|codeSpans|0.354|1.201|0.243| +|detab|0.096|0.143|0.088| +|encodeAmpsAndAngles|0.138|0.198|0.096| +|encodeBackslashEscapes|0.093|0.184|0.071| +|encodeCode|0.961|1.611|0.858| +|escapeSpecialCharsWithinTagAttributes|0.252|0.520|0.158| +|githubCodeBlocks|0.262|0.390|0.161| +|hashBlock|0.052|0.129|0.037| +|hashElement|0.003|0.040|0.000| +|hashHTMLSpans|4.240|4.673|4.044| +|hashPreCodeTags|0.134|0.337|0.113| +|headers|1.412|4.475|1.077| +|horizontalRule|0.358|2.686|0.196| +|images|0.184|0.480|0.130| +|italicsAndBold|0.300|0.458|0.234| +|lists|3.074|4.651|2.626| +|outdent|0.204|0.931|0.137| +|paragraphs|6.406|8.020|5.821| +|spanGamut|4.136|6.038|3.840| +|strikethrough|0.007|0.132|0.000| +|stripLinkDefinitions|0.248|0.403|0.217| +|tables|0.003|0.040|0.001| +|unescapeSpecialChars|0.009|0.039|0.007| + + +## [version 1.8.3](https://github.com/showdownjs/showdown/tree/1.8.3) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.927|32.654|0.147| +|performance.testfile.md|32.485|62.282|28.403| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|5.454|18.356|2.385| +|anchors|0.504|3.110|0.290| +|autoLinks|0.114|0.284|0.069| +|blockQuotes|2.269|3.374|1.997| +|codeBlocks|0.250|0.840|0.192| +|codeSpans|0.352|1.231|0.249| +|detab|0.115|0.179|0.087| +|encodeAmpsAndAngles|0.105|0.162|0.095| +|encodeBackslashEscapes|0.108|0.235|0.075| +|encodeCode|0.994|1.915|0.847| +|escapeSpecialCharsWithinTagAttributes|0.237|0.475|0.160| +|githubCodeBlocks|0.202|0.771|0.151| +|hashBlock|0.071|0.493|0.039| +|hashElement|0.002|0.036|0.001| +|hashHTMLSpans|4.162|4.708|3.959| +|hashPreCodeTags|0.130|0.331|0.112| +|headers|1.409|4.622|1.044| +|horizontalRule|0.351|2.655|0.196| +|images|0.199|0.545|0.131| +|italicsAndBold|0.269|0.357|0.235| +|lists|3.057|4.403|2.686| +|outdent|0.153|0.307|0.136| +|paragraphs|6.455|7.901|5.708| +|spanGamut|4.256|5.542|3.930| +|strikethrough|0.005|0.089|0.000| +|stripLinkDefinitions|0.248|0.394|0.225| +|tables|0.002|0.028|0.001| +|unescapeSpecialChars|0.009|0.039|0.007| + + +## [version 1.8.2](https://github.com/showdownjs/showdown/tree/1.8.2) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.361|8.977|0.104| +|performance.testfile.md|33.109|56.478|29.179| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|5.488|20.714|2.321| +|anchors|0.506|3.158|0.292| +|autoLinks|0.141|0.365|0.072| +|blockQuotes|2.300|3.642|2.046| +|codeBlocks|0.243|0.877|0.189| +|codeSpans|0.268|1.176|0.159| +|detab|0.095|0.172|0.089| +|encodeAmpsAndAngles|0.108|0.230|0.097| +|encodeBackslashEscapes|0.078|0.119|0.074| +|encodeCode|1.002|1.544|0.851| +|escapeSpecialCharsWithinTagAttributes|0.256|0.566|0.164| +|githubCodeBlocks|0.253|0.999|0.152| +|hashBlock|0.042|0.080|0.037| +|hashElement|0.002|0.032|0.000| +|hashHTMLSpans|4.444|5.282|3.987| +|hashPreCodeTags|0.152|0.265|0.117| +|headers|1.465|4.970|1.059| +|horizontalRule|0.245|0.562|0.205| +|images|0.312|2.615|0.131| +|italicsAndBold|0.287|0.427|0.244| +|lists|3.261|4.098|2.792| +|outdent|0.179|0.377|0.141| +|paragraphs|6.661|9.047|5.884| +|spanGamut|4.561|6.173|4.009| +|strikethrough|0.005|0.097|0.000| +|stripLinkDefinitions|0.251|0.402|0.216| +|tables|0.006|0.086|0.001| +|unescapeSpecialChars|0.013|0.064|0.008| + + +## [version 1.8.0](https://github.com/showdownjs/showdown/tree/1.8.0) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.357|9.000|0.091| +|performance.testfile.md|31.434|57.439|26.735| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|4.177|7.661|2.346| +|anchors|0.542|3.749|0.300| +|autoLinks|0.087|0.183|0.069| +|blockQuotes|2.049|3.552|1.815| +|codeBlocks|0.264|1.163|0.185| +|codeSpans|0.271|0.790|0.163| +|detab|0.092|0.120|0.086| +|encodeAmpsAndAngles|0.106|0.146|0.097| +|encodeBackslashEscapes|0.091|0.152|0.077| +|encodeCode|0.962|1.552|0.862| +|escapeSpecialCharsWithinTagAttributes|0.239|0.487|0.173| +|githubCodeBlocks|0.222|0.914|0.140| +|hashBlock|0.063|0.402|0.035| +|hashElement|0.001|0.025|0.000| +|hashHTMLSpans|4.303|4.889|4.021| +|hashPreCodeTags|0.164|0.541|0.110| +|headers|1.159|3.779|0.968| +|horizontalRule|0.244|0.419|0.194| +|images|0.324|3.058|0.133| +|italicsAndBold|0.289|0.419|0.237| +|lists|2.671|3.139|2.494| +|outdent|0.159|0.253|0.139| +|paragraphs|5.594|6.833|5.159| +|spanGamut|5.069|9.600|4.128| +|strikethrough|0.003|0.062|0.000| +|stripLinkDefinitions|0.271|0.400|0.225| +|tables|0.002|0.031|0.000| +|unescapeSpecialChars|0.008|0.038|0.007| + + +## [version 1.7.6](https://github.com/showdownjs/showdown/tree/1.7.6) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.313|6.267|0.092| +|performance.testfile.md|30.962|54.583|26.381| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|4.099|7.072|2.360| +|anchors|0.574|4.502|0.294| +|autoLinks|0.087|0.210|0.066| +|blockQuotes|2.176|4.602|1.823| +|codeBlocks|0.282|0.885|0.193| +|codeSpans|0.265|0.764|0.166| +|detab|0.102|0.155|0.091| +|encodeAmpsAndAngles|0.107|0.175|0.098| +|encodeBackslashEscapes|0.120|0.872|0.073| +|encodeCode|0.983|1.842|0.873| +|escapeSpecialCharsWithinTagAttributes|0.301|0.389|0.277| +|githubCodeBlocks|0.204|0.889|0.146| +|hashBlock|0.063|0.415|0.035| +|hashElement|0.002|0.032|0.000| +|hashHTMLSpans|4.131|4.411|3.988| +|hashPreCodeTags|0.262|2.429|0.108| +|headers|1.264|4.308|0.953| +|horizontalRule|0.230|0.331|0.194| +|images|0.184|0.564|0.134| +|italicsAndBold|0.312|0.828|0.251| +|lists|2.642|3.274|2.451| +|outdent|0.159|0.240|0.144| +|paragraphs|6.724|12.672|5.367| +|spanGamut|4.991|9.206|4.173| +|strikethrough|0.003|0.058|0.000| +|stripLinkDefinitions|0.246|0.390|0.219| +|tables|0.002|0.044|0.000| +|unescapeSpecialChars|0.010|0.051|0.007| + + +## [version 1.7.5](https://github.com/showdownjs/showdown/tree/1.7.5) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.562|14.434|0.118| +|performance.testfile.md|30.396|57.886|26.628| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|4.280|8.392|2.357| +|anchors|0.602|5.341|0.285| +|autoLinks|0.092|0.193|0.065| +|blockQuotes|2.068|4.430|1.736| +|codeBlocks|0.279|0.937|0.181| +|codeSpans|0.222|0.592|0.158| +|detab|0.120|0.145|0.091| +|encodeAmpsAndAngles|0.116|0.222|0.096| +|encodeBackslashEscapes|0.140|0.914|0.071| +|encodeCode|1.195|2.009|0.861| +|escapeSpecialCharsWithinTagAttributes|0.307|0.468|0.269| +|githubCodeBlocks|0.197|0.837|0.144| +|hashBlock|0.060|0.442|0.036| +|hashElement|0.002|0.041|0.000| +|hashHTMLSpans|4.289|4.712|4.002| +|hashPreCodeTags|0.281|2.439|0.108| +|headers|1.221|4.603|0.908| +|horizontalRule|0.208|0.352|0.193| +|images|0.182|0.634|0.128| +|italicsAndBold|0.335|1.276|0.239| +|lists|3.143|6.411|2.393| +|outdent|0.398|0.585|0.159| +|paragraphs|5.926|11.596|4.961| +|spanGamut|4.443|6.012|4.024| +|strikethrough|0.003|0.055|0.000| +|stripLinkDefinitions|0.243|0.424|0.215| +|tables|0.003|0.049|0.000| +|unescapeSpecialChars|0.008|0.041|0.006| + + +## [version 1.7.4](https://github.com/showdownjs/showdown/tree/1.7.4) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.972|25.186|0.160| +|performance.testfile.md|30.397|61.913|26.550| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|3.999|6.603|2.314| +|anchors|0.527|3.823|0.285| +|autoLinks|0.090|0.188|0.063| +|blockQuotes|2.057|4.122|1.780| +|codeBlocks|0.247|1.085|0.186| +|codeSpans|0.263|1.017|0.162| +|detab|0.123|0.158|0.097| +|encodeAmpsAndAngles|0.118|0.171|0.096| +|encodeBackslashEscapes|0.079|0.146|0.071| +|encodeCode|0.945|1.453|0.866| +|escapeSpecialCharsWithinTagAttributes|0.285|0.438|0.246| +|githubCodeBlocks|0.225|0.969|0.142| +|hashBlock|0.068|0.577|0.036| +|hashElement|0.002|0.041|0.000| +|hashHTMLSpans|4.126|4.528|3.950| +|hashPreCodeTags|0.149|0.537|0.110| +|headers|1.171|3.877|0.884| +|horizontalRule|0.381|3.457|0.197| +|images|0.195|0.618|0.133| +|italicsAndBold|0.298|0.562|0.245| +|lists|3.790|6.139|2.612| +|outdent|0.167|0.276|0.139| +|paragraphs|5.349|6.076|4.897| +|spanGamut|4.370|6.111|3.946| +|strikethrough|0.003|0.048|0.000| +|stripLinkDefinitions|0.255|0.401|0.218| +|tables|0.002|0.033|0.000| +|unescapeSpecialChars|0.009|0.040|0.007| + + +## [version 1.7.3](https://github.com/showdownjs/showdown/tree/1.7.3) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.277|5.743|0.088| +|performance.testfile.md|30.733|54.768|26.972| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|4.316|8.271|2.339| +|anchors|0.525|3.812|0.288| +|autoLinks|0.085|0.220|0.063| +|blockQuotes|2.033|3.622|1.745| +|codeBlocks|0.251|1.060|0.178| +|codeSpans|0.246|0.749|0.157| +|detab|0.142|0.752|0.087| +|encodeAmpsAndAngles|0.100|0.129|0.095| +|encodeBackslashEscapes|0.079|0.125|0.070| +|encodeCode|0.977|1.774|0.852| +|escapeSpecialCharsWithinTagAttributes|0.271|0.441|0.244| +|githubCodeBlocks|0.235|0.985|0.139| +|hashBlock|0.068|0.550|0.036| +|hashElement|0.002|0.030|0.000| +|hashHTMLSpans|4.197|4.564|4.006| +|hashPreCodeTags|0.139|0.543|0.106| +|headers|1.148|4.214|0.880| +|horizontalRule|0.214|0.273|0.199| +|images|0.310|3.095|0.120| +|italicsAndBold|0.279|0.378|0.235| +|lists|3.843|8.278|2.630| +|outdent|0.193|0.386|0.144| +|paragraphs|5.541|8.153|4.836| +|spanGamut|4.638|5.775|4.142| +|strikethrough|0.003|0.052|0.000| +|stripLinkDefinitions|0.167|0.275|0.142| +|tables|0.002|0.036|0.000| +|unescapeSpecialChars|0.009|0.032|0.008| + + +## [version 1.7.2](https://github.com/showdownjs/showdown/tree/1.7.2) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.292|5.780|0.087| +|performance.testfile.md|30.396|53.860|26.054| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|4.303|7.798|2.377| +|anchors|0.347|0.647|0.287| +|autoLinks|0.088|0.165|0.063| +|blockQuotes|2.101|5.121|1.738| +|codeBlocks|0.239|0.878|0.184| +|codeSpans|0.252|0.628|0.160| +|detab|0.094|0.129|0.088| +|encodeAmpsAndAngles|0.131|0.733|0.093| +|encodeBackslashEscapes|0.080|0.116|0.070| +|encodeCode|0.939|1.480|0.857| +|escapeSpecialCharsWithinTagAttributes|0.285|0.473|0.243| +|githubCodeBlocks|0.214|1.047|0.140| +|hashBlock|0.068|0.553|0.036| +|hashElement|0.002|0.030|0.000| +|hashHTMLSpans|4.323|6.162|4.004| +|hashPreCodeTags|0.147|0.558|0.109| +|headers|1.176|4.491|0.884| +|horizontalRule|0.216|0.264|0.193| +|images|0.156|0.559|0.118| +|italicsAndBold|0.322|1.013|0.237| +|lists|2.753|5.613|2.328| +|outdent|0.163|0.232|0.140| +|paragraphs|5.109|6.168|4.741| +|spanGamut|4.423|6.149|4.001| +|strikethrough|0.003|0.051|0.000| +|stripLinkDefinitions|0.160|0.226|0.142| +|tables|0.002|0.043|0.000| +|unescapeSpecialChars|0.011|0.046|0.007| + + +## [version 1.7.1](https://github.com/showdownjs/showdown/tree/1.7.1) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|1.074|20.566|0.324| +|performance.testfile.md|30.463|82.116|26.022| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|4.233|9.062|2.359| +|anchors|0.351|0.763|0.286| +|autoLinks|0.089|0.190|0.065| +|blockQuotes|2.074|4.989|1.729| +|codeBlocks|0.256|0.937|0.179| +|codeSpans|0.242|0.839|0.158| +|detab|0.099|0.168|0.086| +|encodeAmpsAndAngles|0.131|0.646|0.093| +|encodeBackslashEscapes|0.076|0.140|0.070| +|encodeCode|0.994|1.706|0.865| +|escapeSpecialCharsWithinTagAttributes|0.267|0.375|0.250| +|githubCodeBlocks|0.192|0.966|0.140| +|hashBlock|0.059|0.397|0.036| +|hashElement|0.002|0.031|0.000| +|hashHTMLSpans|4.117|5.585|3.890| +|hashPreCodeTags|0.142|0.529|0.108| +|headers|1.145|4.103|0.864| +|horizontalRule|0.217|0.366|0.194| +|images|0.151|0.553|0.117| +|italicsAndBold|0.312|1.241|0.236| +|lists|4.023|7.077|2.498| +|outdent|0.175|0.261|0.148| +|paragraphs|6.557|8.645|4.997| +|spanGamut|5.073|6.347|4.137| +|strikethrough|0.006|0.110|0.000| +|stripLinkDefinitions|0.164|0.277|0.142| +|tables|0.004|0.080|0.000| +|unescapeSpecialChars|0.009|0.046|0.007| + + +## [version 1.7.0](https://github.com/showdownjs/showdown/tree/1.7.0) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.393|9.953|0.097| +|performance.testfile.md|29.416|54.253|25.949| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|4.062|7.185|2.326| +|anchors|0.488|4.086|0.281| +|autoLinks|0.086|0.200|0.063| +|blockQuotes|2.071|4.554|1.733| +|codeBlocks|0.253|0.864|0.178| +|codeSpans|0.261|0.592|0.160| +|detab|0.095|0.130|0.089| +|encodeAmpsAndAngles|0.103|0.192|0.095| +|encodeBackslashEscapes|0.106|0.589|0.071| +|encodeCode|0.927|1.182|0.835| +|escapeSpecialCharsWithinTagAttributes|0.276|0.617|0.245| +|githubCodeBlocks|0.195|0.980|0.139| +|hashBlock|0.062|0.483|0.035| +|hashElement|0.001|0.025|0.000| +|hashHTMLSpans|4.120|4.610|3.859| +|hashPreCodeTags|0.147|0.535|0.105| +|headers|1.308|4.253|0.856| +|horizontalRule|0.220|0.374|0.194| +|images|0.150|0.507|0.116| +|italicsAndBold|0.306|0.872|0.241| +|lists|3.447|4.893|2.407| +|outdent|0.267|0.868|0.181| +|paragraphs|5.867|8.331|4.970| +|spanGamut|5.039|7.124|4.116| +|strikethrough|0.004|0.073|0.000| +|stripLinkDefinitions|0.153|0.243|0.140| +|tables|0.002|0.044|0.000| +|unescapeSpecialChars|0.009|0.041|0.007| + + +## [version 1.6.4](https://github.com/showdownjs/showdown/tree/1.6.4) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.376|6.381|0.183| +|performance.testfile.md|33.835|61.049|30.186| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|2.564|8.347|1.871| +|anchors|0.499|4.222|0.270| +|autoLinks|0.080|0.174|0.061| +|blockQuotes|3.343|7.306|2.850| +|codeBlocks|0.221|0.822|0.172| +|codeSpans|0.229|0.744|0.156| +|detab|0.097|0.154|0.086| +|encodeAmpsAndAngles|0.117|0.200|0.094| +|encodeBackslashEscapes|0.086|0.230|0.068| +|encodeCode|0.885|1.165|0.816| +|escapeSpecialCharsWithinTagAttributes|0.298|0.495|0.240| +|githubCodeBlocks|0.183|0.785|0.133| +|hashBlock|0.044|0.098|0.035| +|hashElement|0.002|0.033|0.000| +|hashHTMLSpans|4.200|4.552|3.987| +|hashPreCodeTags|0.130|0.313|0.106| +|headers|1.224|4.010|0.945| +|horizontalRule|0.412|4.175|0.196| +|images|0.088|0.203|0.073| +|italicsAndBold|0.276|0.414|0.233| +|lists|5.005|6.109|4.663| +|outdent|0.152|0.337|0.139| +|paragraphs|5.336|7.117|4.843| +|spanGamut|4.450|6.153|3.857| +|strikethrough|0.003|0.049|0.000| +|stripLinkDefinitions|0.180|0.316|0.147| +|tables|0.003|0.055|0.000| +|unescapeSpecialChars|0.009|0.047|0.007| + + +## [version 1.6.3](https://github.com/showdownjs/showdown/tree/1.6.3) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.388|6.064|0.174| +|performance.testfile.md|26.899|49.063|24.845| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|2.616|8.181|1.899| +|anchors|0.515|4.691|0.264| +|autoLinks|0.093|0.188|0.073| +|blockQuotes|4.518|8.953|3.036| +|codeBlocks|0.223|0.348|0.188| +|codeSpans|0.318|1.095|0.177| +|detab|0.092|0.137|0.087| +|encodeAmpsAndAngles|0.044|0.089|0.038| +|encodeBackslashEscapes|0.108|0.265|0.078| +|encodeCode|1.535|9.896|0.865| +|escapeSpecialCharsWithinTagAttributes|0.294|0.523|0.253| +|githubCodeBlocks|0.208|0.790|0.142| +|hashBlock|0.042|0.123|0.036| +|hashElement|0.002|0.029|0.000| +|hashHTMLSpans|0.410|1.598|0.240| +|hashPreCodeTags|0.132|0.395|0.110| +|headers|1.015|1.502|0.806| +|horizontalRule|0.220|0.357|0.195| +|images|0.158|0.978|0.077| +|italicsAndBold|0.288|0.639|0.241| +|lists|5.151|6.331|4.629| +|outdent|0.180|0.363|0.143| +|paragraphs|4.548|6.309|4.002| +|spanGamut|1.519|1.864|1.372| +|strikethrough|0.003|0.065|0.000| +|stripLinkDefinitions|0.179|0.313|0.144| +|tables|0.004|0.063|0.000| +|unescapeSpecialChars|0.011|0.049|0.007| + + +## [version 1.6.2](https://github.com/showdownjs/showdown/tree/1.6.2) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.613|5.894|0.169| +|performance.testfile.md|25.970|62.882|23.710| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|2.669|8.479|1.885| +|anchors|0.500|3.841|0.268| +|autoLinks|0.098|0.211|0.072| +|blockQuotes|3.222|5.826|2.791| +|codeBlocks|0.177|0.371|0.157| +|codeSpans|0.218|0.483|0.151| +|detab|0.135|0.655|0.085| +|encodeAmpsAndAngles|0.042|0.118|0.036| +|encodeBackslashEscapes|0.080|0.133|0.068| +|encodeCode|0.560|0.982|0.484| +|escapeSpecialCharsWithinTagAttributes|0.353|0.568|0.291| +|githubCodeBlocks|0.180|0.773|0.127| +|hashBlock|0.058|0.312|0.037| +|hashElement|0.003|0.046|0.000| +|hashHTMLSpans|0.475|2.325|0.234| +|hashPreCodeTags|0.122|0.307|0.107| +|headers|0.858|0.954|0.780| +|horizontalRule|0.227|0.418|0.197| +|images|0.171|1.453|0.077| +|italicsAndBold|0.101|0.202|0.088| +|lists|4.931|5.460|4.556| +|outdent|0.163|0.315|0.142| +|paragraphs|3.790|5.564|3.278| +|spanGamut|1.442|2.012|1.203| +|strikethrough|0.004|0.082|0.000| +|stripBlankLines|0.086|0.130|0.080| +|stripLinkDefinitions|0.160|0.217|0.145| +|tables|0.004|0.076|0.000| +|unescapeSpecialChars|0.010|0.058|0.007| + + +## [version 1.6.1](https://github.com/showdownjs/showdown/tree/1.6.1) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.317|5.498|0.161| +|readme.md|26.014|46.799|24.245| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|2.641|7.792|1.936| +|anchors|0.475|4.063|0.259| +|autoLinks|0.089|0.197|0.069| +|blockQuotes|3.213|6.054|2.880| +|codeBlocks|0.162|0.269|0.153| +|codeSpans|0.169|0.399|0.141| +|detab|0.125|0.665|0.086| +|encodeAmpsAndAngles|0.042|0.089|0.038| +|encodeBackslashEscapes|0.076|0.133|0.068| +|encodeCode|0.577|0.970|0.479| +|escapeSpecialCharsWithinTagAttributes|0.246|0.350|0.221| +|githubCodeBlocks|0.177|0.815|0.125| +|hashBlock|0.065|0.430|0.038| +|hashElement|0.002|0.034|0.000| +|hashHTMLSpans|0.424|2.321|0.241| +|hashPreCodeTags|0.122|0.238|0.104| +|headers|0.804|0.946|0.726| +|horizontalRule|0.219|0.274|0.194| +|images|0.124|0.902|0.071| +|italicsAndBold|0.101|0.150|0.090| +|lists|4.939|5.421|4.624| +|outdent|0.165|0.337|0.140| +|paragraphs|3.495|4.555|3.171| +|spanGamut|1.319|1.992|1.147| +|strikethrough|0.007|0.143|0.000| +|stripBlankLines|0.094|0.155|0.082| +|stripLinkDefinitions|0.176|0.311|0.146| +|tables|0.002|0.039|0.000| +|unescapeSpecialChars|0.008|0.034|0.007| + + +## [version 1.6.0](https://github.com/showdownjs/showdown/tree/1.6.0) + +### Test Suite: Basic (50 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|Simple "Hello World"|0.308|5.369|0.157| +|readme.md|25.818|47.795|23.775| + +### Test Suite: subParsers (20 cycles) +| test | avgTime | max | min | +|:-----|--------:|----:|----:| +|hashHTMLBlocks|2.653|8.558|1.880| +|anchors|0.517|4.142|0.271| +|autoLinks|0.089|0.194|0.071| +|blockGamut|17.372|22.941|14.082| +|blockQuotes|3.011|4.110|2.774| +|codeBlocks|0.243|0.834|0.193| +|codeSpans|0.227|0.458|0.191| +|detab|0.095|0.133|0.090| +|encodeAmpsAndAngles|0.040|0.073|0.038| +|encodeBackslashEscapes|0.100|0.510|0.068| +|encodeCode|0.532|0.706|0.479| +|escapeSpecialCharsWithinTagAttributes|0.386|0.702|0.327| +|githubCodeBlocks|0.214|0.778|0.156| +|hashBlock|0.057|0.280|0.035| +|hashElement|0.002|0.033|0.000| +|hashHTMLSpans|0.384|1.997|0.236| +|hashPreCodeTags|0.133|0.200|0.116| +|headers|0.944|2.468|0.782| +|images|0.120|0.486|0.086| +|italicsAndBold|0.111|0.445|0.088| +|lists|5.783|13.249|4.464| +|outdent|0.306|0.956|0.225| +|paragraphs|6.583|8.811|4.499| +|spanGamut|2.437|3.067|1.647| +|strikethrough|0.005|0.100|0.000| +|stripBlankLines|0.121|0.175|0.092| +|stripLinkDefinitions|0.247|0.573|0.171| +|tables|0.006|0.099|0.000| +|unescapeSpecialChars|0.017|0.066|0.011| + + diff --git a/node_modules/showdown/src/cli/cli.js b/node_modules/showdown/src/cli/cli.js new file mode 100644 index 0000000..3080c77 --- /dev/null +++ b/node_modules/showdown/src/cli/cli.js @@ -0,0 +1,45 @@ +/** + * Created by tivie + */ +'use strict'; + +var yargs = require('yargs'); + +yargs + .version() + .alias('v', 'version') + .option('h', { + alias: 'help', + description: 'Show help' + }) + .option('q', { + alias: 'quiet', + description: 'Quiet mode. Only print errors', + type: 'boolean', + default: false + }) + .option('m', { + alias: 'mute', + description: 'Mute mode. Does not print anything', + type: 'boolean', + default: false + }) + .usage('Usage: showdown [options]') + .demand(1, 'You must provide a valid command') + .command('makehtml', 'Converts markdown into html') + .example('showdown makehtml -i foo.md -o bar.html', 'Converts \'foo.md\' to \'bar.html\'') + .wrap(yargs.terminalWidth()); + +var argv = yargs.argv, + command = argv._[0]; + +if (command === 'makehtml') { + require('./makehtml.cmd.js').run(); +} else { + yargs.showHelp(); +} + +if (argv.help) { + yargs.showHelp(); +} +process.exit(0); diff --git a/node_modules/showdown/src/cli/makehtml.cmd.js b/node_modules/showdown/src/cli/makehtml.cmd.js new file mode 100644 index 0000000..eabc716 --- /dev/null +++ b/node_modules/showdown/src/cli/makehtml.cmd.js @@ -0,0 +1,195 @@ +var yargs = require('yargs'), + fs = require('fs'), + Messenger = require('./messenger.js'), + showdown = require('../../dist/showdown'), + showdownOptions = showdown.getDefaultOptions(false); + +yargs.reset() + .usage('Usage: showdown makehtml [options]') + .example('showdown makehtml -i', 'Reads from stdin and outputs to stdout') + .example('showdown makehtml -i foo.md -o bar.html', 'Reads \'foo.md\' and writes to \'bar.html\'') + .example('showdown makehtml -i --flavor="github"', 'Parses stdin using GFM style') + .version() + .alias('v', 'version') + .config('c') + .alias('c', 'config') + .help('h') + .alias('h', 'help') + .option('i', { + alias : 'input', + describe: 'Input source. Usually a md file. If omitted or empty, reads from stdin', + type: 'string' + }) + .option('o', { + alias : 'output', + describe: 'Output target. Usually a html file. If omitted or empty, writes to stdout', + type: 'string', + default: false + }) + .option('u', { + alias : 'encoding', + describe: 'Input encoding', + type: 'string' + }) + .option('a', { + alias : 'append', + describe: 'Append data to output instead of overwriting', + type: 'string', + default: false + }) + .option('e', { + alias : 'extensions', + describe: 'Load the specified extensions. Should be valid paths to node compatible extensions', + type: 'array' + }) + .option('p', { + alias : 'flavor', + describe: 'Run with a predetermined flavor of options. Default is vanilla', + type: 'string' + }) + .option('q', { + alias: 'quiet', + description: 'Quiet mode. Only print errors', + type: 'boolean', + default: false + }) + .option('m', { + alias: 'mute', + description: 'Mute mode. Does not print anything', + type: 'boolean', + default: false + }); + +// load showdown default options +for (var opt in showdownOptions) { + if (showdownOptions.hasOwnProperty(opt)) { + if (showdownOptions[opt].defaultValue === false) { + showdownOptions[opt].default = null; + } else { + showdownOptions[opt].default = showdownOptions[opt].defaultValue; + } + yargs.option(opt, showdownOptions[opt]); + } +} + +function run () { + 'use strict'; + var argv = yargs.argv, + readMode = (!argv.i || argv.i === '') ? 'stdin' : 'file', + writeMode = (!argv.o || argv.o === '') ? 'stdout' : 'file', + msgMode = (writeMode === 'file') ? 'stdout' : 'stderr', + /** + * MSG object + * @type {Messenger} + */ + messenger = new Messenger(msgMode, argv.q, argv.m), + read = (readMode === 'stdin') ? readFromStdIn : readFromFile, + write = (writeMode === 'stdout') ? writeToStdOut : writeToFile, + enc = argv.encoding || 'utf8', + flavor = argv.p, + append = argv.a || false, + options = parseOptions(flavor), + converter = new showdown.Converter(options), + md, html; + + // Load extensions + if (argv.e) { + messenger.printMsg('Loading extensions'); + for (var i = 0; i < argv.e.length; ++i) { + try { + var ext = require(argv.e[i]); + converter.addExtension(ext, argv.e[i]); + } catch (e) { + messenger.printError('Could not load extension ' + argv.e[i] + '. Reason:'); + messenger.errorExit(e); + } + } + } + + messenger.printMsg('...'); + // read the input + messenger.printMsg('Reading data from ' + readMode + '...'); + md = read(enc); + + // process the input + messenger.printMsg('Parsing markdown...'); + html = converter.makeHtml(md); + + // write the output + messenger.printMsg('Writing data to ' + writeMode + '...'); + write(html, append); + messenger.okExit(); + + function parseOptions (flavor) { + var options = {}, + flavorOpts = showdown.getFlavorOptions(flavor) || {}; + + // if flavor is not undefined, let's tell the user we're loading that preset + if (flavor) { + messenger.printMsg('Loading ' + flavor + ' flavor.'); + } + + for (var opt in argv) { + if (argv.hasOwnProperty(opt)) { + // first we load the default options + if (showdownOptions.hasOwnProperty(opt) && showdownOptions[opt].default !== null) { + options[opt] = showdownOptions[opt].default; + } + + // we now override defaults with flavor, if a flavor was indeed passed + if (flavorOpts.hasOwnProperty(opt)) { + options[opt] = flavorOpts[opt]; + } + + // lastly we override with explicit passed options + // being careful not to pass CLI specific options, such as -v, -h or --extensions + if (showdownOptions.hasOwnProperty(opt)) { + if (argv[opt] === true) { + messenger.printMsg('Enabling option ' + opt); + options[opt] = argv[opt]; + } else if (argv[opt] === false) { + options[opt] = argv[opt]; + } + } + } + } + return options; + } + + function readFromStdIn () { + try { + var size = fs.fstatSync(process.stdin.fd).size; + return size > 0 ? fs.readSync(process.stdin.fd, size)[0] : ''; + } catch (e) { + var err = new Error('Could not read from stdin, reason: ' + e.message); + messenger.errorExit(err); + } + } + + function readFromFile (encoding) { + try { + return fs.readFileSync(argv.i, encoding); + } catch (err) { + messenger.errorExit(err); + } + } + + function writeToStdOut (html) { + return process.stdout.write(html); + } + + function writeToFile (html, append) { + // If a flag is passed, it means we should append instead of overwriting. + // Only works with files, obviously + var write = (append) ? fs.appendFileSync : fs.writeFileSync; + try { + write(argv.o, html); + } catch (err) { + messenger.errorExit(err); + } + } +} + +module.exports = exports = { + run: run +}; diff --git a/node_modules/showdown/src/cli/messenger.js b/node_modules/showdown/src/cli/messenger.js new file mode 100644 index 0000000..906fb2e --- /dev/null +++ b/node_modules/showdown/src/cli/messenger.js @@ -0,0 +1,40 @@ +function Messenger (writeMode, supress, mute) { + 'use strict'; + writeMode = writeMode || 'stderr'; + supress = (!!supress || !!mute); + mute = !!mute; + this._print = (writeMode === 'stdout') ? console.log : console.error; + + this.errorExit = function (e) { + if (!mute) { + console.error('ERROR: ' + e.message); + console.error('Run \'showdown -h\' for help'); + } + process.exit(1); + }; + + this.okExit = function () { + if (!mute) { + this._print('\n'); + this._print('DONE!'); + } + process.exit(0); + }; + + this.printMsg = function (msg) { + if (supress || mute || !msg) { + return; + } + this._print(msg); + }; + + this.printError = function (msg) { + if (mute) { + return; + } + console.error(msg); + }; + +} + +module.exports = Messenger; diff --git a/node_modules/showdown/src/converter.js b/node_modules/showdown/src/converter.js new file mode 100644 index 0000000..bf11cc9 --- /dev/null +++ b/node_modules/showdown/src/converter.js @@ -0,0 +1,602 @@ +/** + * Created by Estevao on 31-05-2015. + */ + +/** + * Showdown Converter class + * @class + * @param {object} [converterOptions] + * @returns {Converter} + */ +showdown.Converter = function (converterOptions) { + 'use strict'; + + var + /** + * Options used by this converter + * @private + * @type {{}} + */ + options = {}, + + /** + * Language extensions used by this converter + * @private + * @type {Array} + */ + langExtensions = [], + + /** + * Output modifiers extensions used by this converter + * @private + * @type {Array} + */ + outputModifiers = [], + + /** + * Event listeners + * @private + * @type {{}} + */ + listeners = {}, + + /** + * The flavor set in this converter + */ + setConvFlavor = setFlavor, + + /** + * Metadata of the document + * @type {{parsed: {}, raw: string, format: string}} + */ + metadata = { + parsed: {}, + raw: '', + format: '' + }; + + _constructor(); + + /** + * Converter constructor + * @private + */ + function _constructor () { + converterOptions = converterOptions || {}; + + for (var gOpt in globalOptions) { + if (globalOptions.hasOwnProperty(gOpt)) { + options[gOpt] = globalOptions[gOpt]; + } + } + + // Merge options + if (typeof converterOptions === 'object') { + for (var opt in converterOptions) { + if (converterOptions.hasOwnProperty(opt)) { + options[opt] = converterOptions[opt]; + } + } + } else { + throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions + + ' was passed instead.'); + } + + if (options.extensions) { + showdown.helper.forEach(options.extensions, _parseExtension); + } + } + + /** + * Parse extension + * @param {*} ext + * @param {string} [name=''] + * @private + */ + function _parseExtension (ext, name) { + + name = name || null; + // If it's a string, the extension was previously loaded + if (showdown.helper.isString(ext)) { + ext = showdown.helper.stdExtName(ext); + name = ext; + + // LEGACY_SUPPORT CODE + if (showdown.extensions[ext]) { + console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' + + 'Please inform the developer that the extension should be updated!'); + legacyExtensionLoading(showdown.extensions[ext], ext); + return; + // END LEGACY SUPPORT CODE + + } else if (!showdown.helper.isUndefined(extensions[ext])) { + ext = extensions[ext]; + + } else { + throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.'); + } + } + + if (typeof ext === 'function') { + ext = ext(); + } + + if (!showdown.helper.isArray(ext)) { + ext = [ext]; + } + + var validExt = validate(ext, name); + if (!validExt.valid) { + throw Error(validExt.error); + } + + for (var i = 0; i < ext.length; ++i) { + switch (ext[i].type) { + + case 'lang': + langExtensions.push(ext[i]); + break; + + case 'output': + outputModifiers.push(ext[i]); + break; + } + if (ext[i].hasOwnProperty('listeners')) { + for (var ln in ext[i].listeners) { + if (ext[i].listeners.hasOwnProperty(ln)) { + listen(ln, ext[i].listeners[ln]); + } + } + } + } + + } + + /** + * LEGACY_SUPPORT + * @param {*} ext + * @param {string} name + */ + function legacyExtensionLoading (ext, name) { + if (typeof ext === 'function') { + ext = ext(new showdown.Converter()); + } + if (!showdown.helper.isArray(ext)) { + ext = [ext]; + } + var valid = validate(ext, name); + + if (!valid.valid) { + throw Error(valid.error); + } + + for (var i = 0; i < ext.length; ++i) { + switch (ext[i].type) { + case 'lang': + langExtensions.push(ext[i]); + break; + case 'output': + outputModifiers.push(ext[i]); + break; + default:// should never reach here + throw Error('Extension loader error: Type unrecognized!!!'); + } + } + } + + /** + * Listen to an event + * @param {string} name + * @param {function} callback + */ + function listen (name, callback) { + if (!showdown.helper.isString(name)) { + throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given'); + } + + if (typeof callback !== 'function') { + throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given'); + } + + if (!listeners.hasOwnProperty(name)) { + listeners[name] = []; + } + listeners[name].push(callback); + } + + function rTrimInputText (text) { + var rsp = text.match(/^\s*/)[0].length, + rgx = new RegExp('^\\s{0,' + rsp + '}', 'gm'); + return text.replace(rgx, ''); + } + + /** + * Dispatch an event + * @private + * @param {string} evtName Event name + * @param {string} text Text + * @param {{}} options Converter Options + * @param {{}} globals + * @returns {string} + */ + this._dispatch = function dispatch (evtName, text, options, globals) { + if (listeners.hasOwnProperty(evtName)) { + for (var ei = 0; ei < listeners[evtName].length; ++ei) { + var nText = listeners[evtName][ei](evtName, text, this, options, globals); + if (nText && typeof nText !== 'undefined') { + text = nText; + } + } + } + return text; + }; + + /** + * Listen to an event + * @param {string} name + * @param {function} callback + * @returns {showdown.Converter} + */ + this.listen = function (name, callback) { + listen(name, callback); + return this; + }; + + /** + * Converts a markdown string into HTML + * @param {string} text + * @returns {*} + */ + this.makeHtml = function (text) { + //check if text is not falsy + if (!text) { + return text; + } + + var globals = { + gHtmlBlocks: [], + gHtmlMdBlocks: [], + gHtmlSpans: [], + gUrls: {}, + gTitles: {}, + gDimensions: {}, + gListLevel: 0, + hashLinkCounts: {}, + langExtensions: langExtensions, + outputModifiers: outputModifiers, + converter: this, + ghCodeBlocks: [], + metadata: { + parsed: {}, + raw: '', + format: '' + } + }; + + // This lets us use ¨ trema as an escape char to avoid md5 hashes + // The choice of character is arbitrary; anything that isn't + // magic in Markdown will work. + text = text.replace(/¨/g, '¨T'); + + // Replace $ with ¨D + // RegExp interprets $ as a special character + // when it's in a replacement string + text = text.replace(/\$/g, '¨D'); + + // Standardize line endings + text = text.replace(/\r\n/g, '\n'); // DOS to Unix + text = text.replace(/\r/g, '\n'); // Mac to Unix + + // Stardardize line spaces + text = text.replace(/\u00A0/g, ' '); + + if (options.smartIndentationFix) { + text = rTrimInputText(text); + } + + // Make sure text begins and ends with a couple of newlines: + text = '\n\n' + text + '\n\n'; + + // detab + text = showdown.subParser('detab')(text, options, globals); + + /** + * Strip any lines consisting only of spaces and tabs. + * This makes subsequent regexs easier to write, because we can + * match consecutive blank lines with /\n+/ instead of something + * contorted like /[ \t]*\n+/ + */ + text = text.replace(/^[ \t]+$/mg, ''); + + //run languageExtensions + showdown.helper.forEach(langExtensions, function (ext) { + text = showdown.subParser('runExtension')(ext, text, options, globals); + }); + + // run the sub parsers + text = showdown.subParser('metadata')(text, options, globals); + text = showdown.subParser('hashPreCodeTags')(text, options, globals); + text = showdown.subParser('githubCodeBlocks')(text, options, globals); + text = showdown.subParser('hashHTMLBlocks')(text, options, globals); + text = showdown.subParser('hashCodeTags')(text, options, globals); + text = showdown.subParser('stripLinkDefinitions')(text, options, globals); + text = showdown.subParser('blockGamut')(text, options, globals); + text = showdown.subParser('unhashHTMLSpans')(text, options, globals); + text = showdown.subParser('unescapeSpecialChars')(text, options, globals); + + // attacklab: Restore dollar signs + text = text.replace(/¨D/g, '$$'); + + // attacklab: Restore tremas + text = text.replace(/¨T/g, '¨'); + + // render a complete html document instead of a partial if the option is enabled + text = showdown.subParser('completeHTMLDocument')(text, options, globals); + + // Run output modifiers + showdown.helper.forEach(outputModifiers, function (ext) { + text = showdown.subParser('runExtension')(ext, text, options, globals); + }); + + // update metadata + metadata = globals.metadata; + return text; + }; + + /** + * Converts an HTML string into a markdown string + * @param src + * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used. + * @returns {string} + */ + this.makeMarkdown = this.makeMd = function (src, HTMLParser) { + + // replace \r\n with \n + src = src.replace(/\r\n/g, '\n'); + src = src.replace(/\r/g, '\n'); // old macs + + // due to an edge case, we need to find this: > < + // to prevent removing of non silent white spaces + // ex: this is sparta + src = src.replace(/>[ \t]+¨NBSP;<'); + + if (!HTMLParser) { + if (window && window.document) { + HTMLParser = window.document; + } else { + throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM'); + } + } + + var doc = HTMLParser.createElement('div'); + doc.innerHTML = src; + + var globals = { + preList: substitutePreCodeTags(doc) + }; + + // remove all newlines and collapse spaces + clean(doc); + + // some stuff, like accidental reference links must now be escaped + // TODO + // doc.innerHTML = doc.innerHTML.replace(/\[[\S\t ]]/); + + var nodes = doc.childNodes, + mdDoc = ''; + + for (var i = 0; i < nodes.length; i++) { + mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals); + } + + function clean (node) { + for (var n = 0; n < node.childNodes.length; ++n) { + var child = node.childNodes[n]; + if (child.nodeType === 3) { + if (!/\S/.test(child.nodeValue)) { + node.removeChild(child); + --n; + } else { + child.nodeValue = child.nodeValue.split('\n').join(' '); + child.nodeValue = child.nodeValue.replace(/(\s)+/g, '$1'); + } + } else if (child.nodeType === 1) { + clean(child); + } + } + } + + // find all pre tags and replace contents with placeholder + // we need this so that we can remove all indentation from html + // to ease up parsing + function substitutePreCodeTags (doc) { + + var pres = doc.querySelectorAll('pre'), + presPH = []; + + for (var i = 0; i < pres.length; ++i) { + + if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') { + var content = pres[i].firstChild.innerHTML.trim(), + language = pres[i].firstChild.getAttribute('data-language') || ''; + + // if data-language attribute is not defined, then we look for class language-* + if (language === '') { + var classes = pres[i].firstChild.className.split(' '); + for (var c = 0; c < classes.length; ++c) { + var matches = classes[c].match(/^language-(.+)$/); + if (matches !== null) { + language = matches[1]; + break; + } + } + } + + // unescape html entities in content + content = showdown.helper.unescapeHTMLEntities(content); + + presPH.push(content); + pres[i].outerHTML = ''; + } else { + presPH.push(pres[i].innerHTML); + pres[i].innerHTML = ''; + pres[i].setAttribute('prenum', i.toString()); + } + } + return presPH; + } + + return mdDoc; + }; + + /** + * Set an option of this Converter instance + * @param {string} key + * @param {*} value + */ + this.setOption = function (key, value) { + options[key] = value; + }; + + /** + * Get the option of this Converter instance + * @param {string} key + * @returns {*} + */ + this.getOption = function (key) { + return options[key]; + }; + + /** + * Get the options of this Converter instance + * @returns {{}} + */ + this.getOptions = function () { + return options; + }; + + /** + * Add extension to THIS converter + * @param {{}} extension + * @param {string} [name=null] + */ + this.addExtension = function (extension, name) { + name = name || null; + _parseExtension(extension, name); + }; + + /** + * Use a global registered extension with THIS converter + * @param {string} extensionName Name of the previously registered extension + */ + this.useExtension = function (extensionName) { + _parseExtension(extensionName); + }; + + /** + * Set the flavor THIS converter should use + * @param {string} name + */ + this.setFlavor = function (name) { + if (!flavor.hasOwnProperty(name)) { + throw Error(name + ' flavor was not found'); + } + var preset = flavor[name]; + setConvFlavor = name; + for (var option in preset) { + if (preset.hasOwnProperty(option)) { + options[option] = preset[option]; + } + } + }; + + /** + * Get the currently set flavor of this converter + * @returns {string} + */ + this.getFlavor = function () { + return setConvFlavor; + }; + + /** + * Remove an extension from THIS converter. + * Note: This is a costly operation. It's better to initialize a new converter + * and specify the extensions you wish to use + * @param {Array} extension + */ + this.removeExtension = function (extension) { + if (!showdown.helper.isArray(extension)) { + extension = [extension]; + } + for (var a = 0; a < extension.length; ++a) { + var ext = extension[a]; + for (var i = 0; i < langExtensions.length; ++i) { + if (langExtensions[i] === ext) { + langExtensions[i].splice(i, 1); + } + } + for (var ii = 0; ii < outputModifiers.length; ++i) { + if (outputModifiers[ii] === ext) { + outputModifiers[ii].splice(i, 1); + } + } + } + }; + + /** + * Get all extension of THIS converter + * @returns {{language: Array, output: Array}} + */ + this.getAllExtensions = function () { + return { + language: langExtensions, + output: outputModifiers + }; + }; + + /** + * Get the metadata of the previously parsed document + * @param raw + * @returns {string|{}} + */ + this.getMetadata = function (raw) { + if (raw) { + return metadata.raw; + } else { + return metadata.parsed; + } + }; + + /** + * Get the metadata format of the previously parsed document + * @returns {string} + */ + this.getMetadataFormat = function () { + return metadata.format; + }; + + /** + * Private: set a single key, value metadata pair + * @param {string} key + * @param {string} value + */ + this._setMetadataPair = function (key, value) { + metadata.parsed[key] = value; + }; + + /** + * Private: set metadata format + * @param {string} format + */ + this._setMetadataFormat = function (format) { + metadata.format = format; + }; + + /** + * Private: set metadata raw text + * @param {string} raw + */ + this._setMetadataRaw = function (raw) { + metadata.raw = raw; + }; +}; diff --git a/node_modules/showdown/src/helpers.js b/node_modules/showdown/src/helpers.js new file mode 100644 index 0000000..ff9d433 --- /dev/null +++ b/node_modules/showdown/src/helpers.js @@ -0,0 +1,1603 @@ +/** + * showdownjs helper functions + */ + +if (!showdown.hasOwnProperty('helper')) { + showdown.helper = {}; +} + +/** + * Check if var is string + * @static + * @param {string} a + * @returns {boolean} + */ +showdown.helper.isString = function (a) { + 'use strict'; + return (typeof a === 'string' || a instanceof String); +}; + +/** + * Check if var is a function + * @static + * @param {*} a + * @returns {boolean} + */ +showdown.helper.isFunction = function (a) { + 'use strict'; + var getType = {}; + return a && getType.toString.call(a) === '[object Function]'; +}; + +/** + * isArray helper function + * @static + * @param {*} a + * @returns {boolean} + */ +showdown.helper.isArray = function (a) { + 'use strict'; + return Array.isArray(a); +}; + +/** + * Check if value is undefined + * @static + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + */ +showdown.helper.isUndefined = function (value) { + 'use strict'; + return typeof value === 'undefined'; +}; + +/** + * ForEach helper function + * Iterates over Arrays and Objects (own properties only) + * @static + * @param {*} obj + * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object + */ +showdown.helper.forEach = function (obj, callback) { + 'use strict'; + // check if obj is defined + if (showdown.helper.isUndefined(obj)) { + throw new Error('obj param is required'); + } + + if (showdown.helper.isUndefined(callback)) { + throw new Error('callback param is required'); + } + + if (!showdown.helper.isFunction(callback)) { + throw new Error('callback param must be a function/closure'); + } + + if (typeof obj.forEach === 'function') { + obj.forEach(callback); + } else if (showdown.helper.isArray(obj)) { + for (var i = 0; i < obj.length; i++) { + callback(obj[i], i, obj); + } + } else if (typeof (obj) === 'object') { + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) { + callback(obj[prop], prop, obj); + } + } + } else { + throw new Error('obj does not seem to be an array or an iterable object'); + } +}; + +/** + * Standardidize extension name + * @static + * @param {string} s extension name + * @returns {string} + */ +showdown.helper.stdExtName = function (s) { + 'use strict'; + return s.replace(/[_?*+\/\\.^-]/g, '').replace(/\s/g, '').toLowerCase(); +}; + +function escapeCharactersCallback (wholeMatch, m1) { + 'use strict'; + var charCodeToEscape = m1.charCodeAt(0); + return '¨E' + charCodeToEscape + 'E'; +} + +/** + * Callback used to escape characters when passing through String.replace + * @static + * @param {string} wholeMatch + * @param {string} m1 + * @returns {string} + */ +showdown.helper.escapeCharactersCallback = escapeCharactersCallback; + +/** + * Escape characters in a string + * @static + * @param {string} text + * @param {string} charsToEscape + * @param {boolean} afterBackslash + * @returns {XML|string|void|*} + */ +showdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) { + 'use strict'; + // First we have to escape the escape characters so that + // we can build a character class out of them + var regexString = '([' + charsToEscape.replace(/([\[\]\\])/g, '\\$1') + '])'; + + if (afterBackslash) { + regexString = '\\\\' + regexString; + } + + var regex = new RegExp(regexString, 'g'); + text = text.replace(regex, escapeCharactersCallback); + + return text; +}; + +/** + * Unescape HTML entities + * @param txt + * @returns {string} + */ +showdown.helper.unescapeHTMLEntities = function (txt) { + 'use strict'; + + return txt + .replace(/"/g, '"') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/&/g, '&'); +}; + +var rgxFindMatchPos = function (str, left, right, flags) { + 'use strict'; + var f = flags || '', + g = f.indexOf('g') > -1, + x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')), + l = new RegExp(left, f.replace(/g/g, '')), + pos = [], + t, s, m, start, end; + + do { + t = 0; + while ((m = x.exec(str))) { + if (l.test(m[0])) { + if (!(t++)) { + s = x.lastIndex; + start = s - m[0].length; + } + } else if (t) { + if (!--t) { + end = m.index + m[0].length; + var obj = { + left: {start: start, end: s}, + match: {start: s, end: m.index}, + right: {start: m.index, end: end}, + wholeMatch: {start: start, end: end} + }; + pos.push(obj); + if (!g) { + return pos; + } + } + } + } + } while (t && (x.lastIndex = s)); + + return pos; +}; + +/** + * matchRecursiveRegExp + * + * (c) 2007 Steven Levithan + * MIT License + * + * Accepts a string to search, a left and right format delimiter + * as regex patterns, and optional regex flags. Returns an array + * of matches, allowing nested instances of left/right delimiters. + * Use the "g" flag to return all matches, otherwise only the + * first is returned. Be careful to ensure that the left and + * right format delimiters produce mutually exclusive matches. + * Backreferences are not supported within the right delimiter + * due to how it is internally combined with the left delimiter. + * When matching strings whose format delimiters are unbalanced + * to the left or right, the output is intentionally as a + * conventional regex library with recursion support would + * produce, e.g. "<" and ">" both produce ["x"] when using + * "<" and ">" as the delimiters (both strings contain a single, + * balanced instance of ""). + * + * examples: + * matchRecursiveRegExp("test", "\\(", "\\)") + * returns: [] + * matchRecursiveRegExp(">>t<>", "<", ">", "g") + * returns: ["t<>", ""] + * matchRecursiveRegExp("
test
", "]*>", "", "gi") + * returns: ["test"] + */ +showdown.helper.matchRecursiveRegExp = function (str, left, right, flags) { + 'use strict'; + + var matchPos = rgxFindMatchPos (str, left, right, flags), + results = []; + + for (var i = 0; i < matchPos.length; ++i) { + results.push([ + str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end), + str.slice(matchPos[i].match.start, matchPos[i].match.end), + str.slice(matchPos[i].left.start, matchPos[i].left.end), + str.slice(matchPos[i].right.start, matchPos[i].right.end) + ]); + } + return results; +}; + +/** + * + * @param {string} str + * @param {string|function} replacement + * @param {string} left + * @param {string} right + * @param {string} flags + * @returns {string} + */ +showdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) { + 'use strict'; + + if (!showdown.helper.isFunction(replacement)) { + var repStr = replacement; + replacement = function () { + return repStr; + }; + } + + var matchPos = rgxFindMatchPos(str, left, right, flags), + finalStr = str, + lng = matchPos.length; + + if (lng > 0) { + var bits = []; + if (matchPos[0].wholeMatch.start !== 0) { + bits.push(str.slice(0, matchPos[0].wholeMatch.start)); + } + for (var i = 0; i < lng; ++i) { + bits.push( + replacement( + str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end), + str.slice(matchPos[i].match.start, matchPos[i].match.end), + str.slice(matchPos[i].left.start, matchPos[i].left.end), + str.slice(matchPos[i].right.start, matchPos[i].right.end) + ) + ); + if (i < lng - 1) { + bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start)); + } + } + if (matchPos[lng - 1].wholeMatch.end < str.length) { + bits.push(str.slice(matchPos[lng - 1].wholeMatch.end)); + } + finalStr = bits.join(''); + } + return finalStr; +}; + +/** + * Returns the index within the passed String object of the first occurrence of the specified regex, + * starting the search at fromIndex. Returns -1 if the value is not found. + * + * @param {string} str string to search + * @param {RegExp} regex Regular expression to search + * @param {int} [fromIndex = 0] Index to start the search + * @returns {Number} + * @throws InvalidArgumentError + */ +showdown.helper.regexIndexOf = function (str, regex, fromIndex) { + 'use strict'; + if (!showdown.helper.isString(str)) { + throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string'; + } + if (regex instanceof RegExp === false) { + throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp'; + } + var indexOf = str.substring(fromIndex || 0).search(regex); + return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf; +}; + +/** + * Splits the passed string object at the defined index, and returns an array composed of the two substrings + * @param {string} str string to split + * @param {int} index index to split string at + * @returns {[string,string]} + * @throws InvalidArgumentError + */ +showdown.helper.splitAtIndex = function (str, index) { + 'use strict'; + if (!showdown.helper.isString(str)) { + throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string'; + } + return [str.substring(0, index), str.substring(index)]; +}; + +/** + * Obfuscate an e-mail address through the use of Character Entities, + * transforming ASCII characters into their equivalent decimal or hex entities. + * + * Since it has a random component, subsequent calls to this function produce different results + * + * @param {string} mail + * @returns {string} + */ +showdown.helper.encodeEmailAddress = function (mail) { + 'use strict'; + var encode = [ + function (ch) { + return '&#' + ch.charCodeAt(0) + ';'; + }, + function (ch) { + return '&#x' + ch.charCodeAt(0).toString(16) + ';'; + }, + function (ch) { + return ch; + } + ]; + + mail = mail.replace(/./g, function (ch) { + if (ch === '@') { + // this *must* be encoded. I insist. + ch = encode[Math.floor(Math.random() * 2)](ch); + } else { + var r = Math.random(); + // roughly 10% raw, 45% hex, 45% dec + ch = ( + r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch) + ); + } + return ch; + }); + + return mail; +}; + +/** + * + * @param str + * @param targetLength + * @param padString + * @returns {string} + */ +showdown.helper.padEnd = function padEnd (str, targetLength, padString) { + 'use strict'; + /*jshint bitwise: false*/ + // eslint-disable-next-line space-infix-ops + targetLength = targetLength>>0; //floor if number or convert non-number to 0; + /*jshint bitwise: true*/ + padString = String(padString || ' '); + if (str.length > targetLength) { + return String(str); + } else { + targetLength = targetLength - str.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed + } + return String(str) + padString.slice(0,targetLength); + } +}; + +/** + * POLYFILLS + */ +// use this instead of builtin is undefined for IE8 compatibility +if (typeof(console) === 'undefined') { + console = { + warn: function (msg) { + 'use strict'; + alert(msg); + }, + log: function (msg) { + 'use strict'; + alert(msg); + }, + error: function (msg) { + 'use strict'; + throw msg; + } + }; +} + +/** + * Common regexes. + * We declare some common regexes to improve performance + */ +showdown.helper.regexes = { + asteriskDashAndColon: /([*_:~])/g +}; + +/** + * EMOJIS LIST + */ +showdown.helper.emojis = { + '+1':'\ud83d\udc4d', + '-1':'\ud83d\udc4e', + '100':'\ud83d\udcaf', + '1234':'\ud83d\udd22', + '1st_place_medal':'\ud83e\udd47', + '2nd_place_medal':'\ud83e\udd48', + '3rd_place_medal':'\ud83e\udd49', + '8ball':'\ud83c\udfb1', + 'a':'\ud83c\udd70\ufe0f', + 'ab':'\ud83c\udd8e', + 'abc':'\ud83d\udd24', + 'abcd':'\ud83d\udd21', + 'accept':'\ud83c\ude51', + 'aerial_tramway':'\ud83d\udea1', + 'airplane':'\u2708\ufe0f', + 'alarm_clock':'\u23f0', + 'alembic':'\u2697\ufe0f', + 'alien':'\ud83d\udc7d', + 'ambulance':'\ud83d\ude91', + 'amphora':'\ud83c\udffa', + 'anchor':'\u2693\ufe0f', + 'angel':'\ud83d\udc7c', + 'anger':'\ud83d\udca2', + 'angry':'\ud83d\ude20', + 'anguished':'\ud83d\ude27', + 'ant':'\ud83d\udc1c', + 'apple':'\ud83c\udf4e', + 'aquarius':'\u2652\ufe0f', + 'aries':'\u2648\ufe0f', + 'arrow_backward':'\u25c0\ufe0f', + 'arrow_double_down':'\u23ec', + 'arrow_double_up':'\u23eb', + 'arrow_down':'\u2b07\ufe0f', + 'arrow_down_small':'\ud83d\udd3d', + 'arrow_forward':'\u25b6\ufe0f', + 'arrow_heading_down':'\u2935\ufe0f', + 'arrow_heading_up':'\u2934\ufe0f', + 'arrow_left':'\u2b05\ufe0f', + 'arrow_lower_left':'\u2199\ufe0f', + 'arrow_lower_right':'\u2198\ufe0f', + 'arrow_right':'\u27a1\ufe0f', + 'arrow_right_hook':'\u21aa\ufe0f', + 'arrow_up':'\u2b06\ufe0f', + 'arrow_up_down':'\u2195\ufe0f', + 'arrow_up_small':'\ud83d\udd3c', + 'arrow_upper_left':'\u2196\ufe0f', + 'arrow_upper_right':'\u2197\ufe0f', + 'arrows_clockwise':'\ud83d\udd03', + 'arrows_counterclockwise':'\ud83d\udd04', + 'art':'\ud83c\udfa8', + 'articulated_lorry':'\ud83d\ude9b', + 'artificial_satellite':'\ud83d\udef0', + 'astonished':'\ud83d\ude32', + 'athletic_shoe':'\ud83d\udc5f', + 'atm':'\ud83c\udfe7', + 'atom_symbol':'\u269b\ufe0f', + 'avocado':'\ud83e\udd51', + 'b':'\ud83c\udd71\ufe0f', + 'baby':'\ud83d\udc76', + 'baby_bottle':'\ud83c\udf7c', + 'baby_chick':'\ud83d\udc24', + 'baby_symbol':'\ud83d\udebc', + 'back':'\ud83d\udd19', + 'bacon':'\ud83e\udd53', + 'badminton':'\ud83c\udff8', + 'baggage_claim':'\ud83d\udec4', + 'baguette_bread':'\ud83e\udd56', + 'balance_scale':'\u2696\ufe0f', + 'balloon':'\ud83c\udf88', + 'ballot_box':'\ud83d\uddf3', + 'ballot_box_with_check':'\u2611\ufe0f', + 'bamboo':'\ud83c\udf8d', + 'banana':'\ud83c\udf4c', + 'bangbang':'\u203c\ufe0f', + 'bank':'\ud83c\udfe6', + 'bar_chart':'\ud83d\udcca', + 'barber':'\ud83d\udc88', + 'baseball':'\u26be\ufe0f', + 'basketball':'\ud83c\udfc0', + 'basketball_man':'\u26f9\ufe0f', + 'basketball_woman':'\u26f9\ufe0f‍\u2640\ufe0f', + 'bat':'\ud83e\udd87', + 'bath':'\ud83d\udec0', + 'bathtub':'\ud83d\udec1', + 'battery':'\ud83d\udd0b', + 'beach_umbrella':'\ud83c\udfd6', + 'bear':'\ud83d\udc3b', + 'bed':'\ud83d\udecf', + 'bee':'\ud83d\udc1d', + 'beer':'\ud83c\udf7a', + 'beers':'\ud83c\udf7b', + 'beetle':'\ud83d\udc1e', + 'beginner':'\ud83d\udd30', + 'bell':'\ud83d\udd14', + 'bellhop_bell':'\ud83d\udece', + 'bento':'\ud83c\udf71', + 'biking_man':'\ud83d\udeb4', + 'bike':'\ud83d\udeb2', + 'biking_woman':'\ud83d\udeb4‍\u2640\ufe0f', + 'bikini':'\ud83d\udc59', + 'biohazard':'\u2623\ufe0f', + 'bird':'\ud83d\udc26', + 'birthday':'\ud83c\udf82', + 'black_circle':'\u26ab\ufe0f', + 'black_flag':'\ud83c\udff4', + 'black_heart':'\ud83d\udda4', + 'black_joker':'\ud83c\udccf', + 'black_large_square':'\u2b1b\ufe0f', + 'black_medium_small_square':'\u25fe\ufe0f', + 'black_medium_square':'\u25fc\ufe0f', + 'black_nib':'\u2712\ufe0f', + 'black_small_square':'\u25aa\ufe0f', + 'black_square_button':'\ud83d\udd32', + 'blonde_man':'\ud83d\udc71', + 'blonde_woman':'\ud83d\udc71‍\u2640\ufe0f', + 'blossom':'\ud83c\udf3c', + 'blowfish':'\ud83d\udc21', + 'blue_book':'\ud83d\udcd8', + 'blue_car':'\ud83d\ude99', + 'blue_heart':'\ud83d\udc99', + 'blush':'\ud83d\ude0a', + 'boar':'\ud83d\udc17', + 'boat':'\u26f5\ufe0f', + 'bomb':'\ud83d\udca3', + 'book':'\ud83d\udcd6', + 'bookmark':'\ud83d\udd16', + 'bookmark_tabs':'\ud83d\udcd1', + 'books':'\ud83d\udcda', + 'boom':'\ud83d\udca5', + 'boot':'\ud83d\udc62', + 'bouquet':'\ud83d\udc90', + 'bowing_man':'\ud83d\ude47', + 'bow_and_arrow':'\ud83c\udff9', + 'bowing_woman':'\ud83d\ude47‍\u2640\ufe0f', + 'bowling':'\ud83c\udfb3', + 'boxing_glove':'\ud83e\udd4a', + 'boy':'\ud83d\udc66', + 'bread':'\ud83c\udf5e', + 'bride_with_veil':'\ud83d\udc70', + 'bridge_at_night':'\ud83c\udf09', + 'briefcase':'\ud83d\udcbc', + 'broken_heart':'\ud83d\udc94', + 'bug':'\ud83d\udc1b', + 'building_construction':'\ud83c\udfd7', + 'bulb':'\ud83d\udca1', + 'bullettrain_front':'\ud83d\ude85', + 'bullettrain_side':'\ud83d\ude84', + 'burrito':'\ud83c\udf2f', + 'bus':'\ud83d\ude8c', + 'business_suit_levitating':'\ud83d\udd74', + 'busstop':'\ud83d\ude8f', + 'bust_in_silhouette':'\ud83d\udc64', + 'busts_in_silhouette':'\ud83d\udc65', + 'butterfly':'\ud83e\udd8b', + 'cactus':'\ud83c\udf35', + 'cake':'\ud83c\udf70', + 'calendar':'\ud83d\udcc6', + 'call_me_hand':'\ud83e\udd19', + 'calling':'\ud83d\udcf2', + 'camel':'\ud83d\udc2b', + 'camera':'\ud83d\udcf7', + 'camera_flash':'\ud83d\udcf8', + 'camping':'\ud83c\udfd5', + 'cancer':'\u264b\ufe0f', + 'candle':'\ud83d\udd6f', + 'candy':'\ud83c\udf6c', + 'canoe':'\ud83d\udef6', + 'capital_abcd':'\ud83d\udd20', + 'capricorn':'\u2651\ufe0f', + 'car':'\ud83d\ude97', + 'card_file_box':'\ud83d\uddc3', + 'card_index':'\ud83d\udcc7', + 'card_index_dividers':'\ud83d\uddc2', + 'carousel_horse':'\ud83c\udfa0', + 'carrot':'\ud83e\udd55', + 'cat':'\ud83d\udc31', + 'cat2':'\ud83d\udc08', + 'cd':'\ud83d\udcbf', + 'chains':'\u26d3', + 'champagne':'\ud83c\udf7e', + 'chart':'\ud83d\udcb9', + 'chart_with_downwards_trend':'\ud83d\udcc9', + 'chart_with_upwards_trend':'\ud83d\udcc8', + 'checkered_flag':'\ud83c\udfc1', + 'cheese':'\ud83e\uddc0', + 'cherries':'\ud83c\udf52', + 'cherry_blossom':'\ud83c\udf38', + 'chestnut':'\ud83c\udf30', + 'chicken':'\ud83d\udc14', + 'children_crossing':'\ud83d\udeb8', + 'chipmunk':'\ud83d\udc3f', + 'chocolate_bar':'\ud83c\udf6b', + 'christmas_tree':'\ud83c\udf84', + 'church':'\u26ea\ufe0f', + 'cinema':'\ud83c\udfa6', + 'circus_tent':'\ud83c\udfaa', + 'city_sunrise':'\ud83c\udf07', + 'city_sunset':'\ud83c\udf06', + 'cityscape':'\ud83c\udfd9', + 'cl':'\ud83c\udd91', + 'clamp':'\ud83d\udddc', + 'clap':'\ud83d\udc4f', + 'clapper':'\ud83c\udfac', + 'classical_building':'\ud83c\udfdb', + 'clinking_glasses':'\ud83e\udd42', + 'clipboard':'\ud83d\udccb', + 'clock1':'\ud83d\udd50', + 'clock10':'\ud83d\udd59', + 'clock1030':'\ud83d\udd65', + 'clock11':'\ud83d\udd5a', + 'clock1130':'\ud83d\udd66', + 'clock12':'\ud83d\udd5b', + 'clock1230':'\ud83d\udd67', + 'clock130':'\ud83d\udd5c', + 'clock2':'\ud83d\udd51', + 'clock230':'\ud83d\udd5d', + 'clock3':'\ud83d\udd52', + 'clock330':'\ud83d\udd5e', + 'clock4':'\ud83d\udd53', + 'clock430':'\ud83d\udd5f', + 'clock5':'\ud83d\udd54', + 'clock530':'\ud83d\udd60', + 'clock6':'\ud83d\udd55', + 'clock630':'\ud83d\udd61', + 'clock7':'\ud83d\udd56', + 'clock730':'\ud83d\udd62', + 'clock8':'\ud83d\udd57', + 'clock830':'\ud83d\udd63', + 'clock9':'\ud83d\udd58', + 'clock930':'\ud83d\udd64', + 'closed_book':'\ud83d\udcd5', + 'closed_lock_with_key':'\ud83d\udd10', + 'closed_umbrella':'\ud83c\udf02', + 'cloud':'\u2601\ufe0f', + 'cloud_with_lightning':'\ud83c\udf29', + 'cloud_with_lightning_and_rain':'\u26c8', + 'cloud_with_rain':'\ud83c\udf27', + 'cloud_with_snow':'\ud83c\udf28', + 'clown_face':'\ud83e\udd21', + 'clubs':'\u2663\ufe0f', + 'cocktail':'\ud83c\udf78', + 'coffee':'\u2615\ufe0f', + 'coffin':'\u26b0\ufe0f', + 'cold_sweat':'\ud83d\ude30', + 'comet':'\u2604\ufe0f', + 'computer':'\ud83d\udcbb', + 'computer_mouse':'\ud83d\uddb1', + 'confetti_ball':'\ud83c\udf8a', + 'confounded':'\ud83d\ude16', + 'confused':'\ud83d\ude15', + 'congratulations':'\u3297\ufe0f', + 'construction':'\ud83d\udea7', + 'construction_worker_man':'\ud83d\udc77', + 'construction_worker_woman':'\ud83d\udc77‍\u2640\ufe0f', + 'control_knobs':'\ud83c\udf9b', + 'convenience_store':'\ud83c\udfea', + 'cookie':'\ud83c\udf6a', + 'cool':'\ud83c\udd92', + 'policeman':'\ud83d\udc6e', + 'copyright':'\u00a9\ufe0f', + 'corn':'\ud83c\udf3d', + 'couch_and_lamp':'\ud83d\udecb', + 'couple':'\ud83d\udc6b', + 'couple_with_heart_woman_man':'\ud83d\udc91', + 'couple_with_heart_man_man':'\ud83d\udc68‍\u2764\ufe0f‍\ud83d\udc68', + 'couple_with_heart_woman_woman':'\ud83d\udc69‍\u2764\ufe0f‍\ud83d\udc69', + 'couplekiss_man_man':'\ud83d\udc68‍\u2764\ufe0f‍\ud83d\udc8b‍\ud83d\udc68', + 'couplekiss_man_woman':'\ud83d\udc8f', + 'couplekiss_woman_woman':'\ud83d\udc69‍\u2764\ufe0f‍\ud83d\udc8b‍\ud83d\udc69', + 'cow':'\ud83d\udc2e', + 'cow2':'\ud83d\udc04', + 'cowboy_hat_face':'\ud83e\udd20', + 'crab':'\ud83e\udd80', + 'crayon':'\ud83d\udd8d', + 'credit_card':'\ud83d\udcb3', + 'crescent_moon':'\ud83c\udf19', + 'cricket':'\ud83c\udfcf', + 'crocodile':'\ud83d\udc0a', + 'croissant':'\ud83e\udd50', + 'crossed_fingers':'\ud83e\udd1e', + 'crossed_flags':'\ud83c\udf8c', + 'crossed_swords':'\u2694\ufe0f', + 'crown':'\ud83d\udc51', + 'cry':'\ud83d\ude22', + 'crying_cat_face':'\ud83d\ude3f', + 'crystal_ball':'\ud83d\udd2e', + 'cucumber':'\ud83e\udd52', + 'cupid':'\ud83d\udc98', + 'curly_loop':'\u27b0', + 'currency_exchange':'\ud83d\udcb1', + 'curry':'\ud83c\udf5b', + 'custard':'\ud83c\udf6e', + 'customs':'\ud83d\udec3', + 'cyclone':'\ud83c\udf00', + 'dagger':'\ud83d\udde1', + 'dancer':'\ud83d\udc83', + 'dancing_women':'\ud83d\udc6f', + 'dancing_men':'\ud83d\udc6f‍\u2642\ufe0f', + 'dango':'\ud83c\udf61', + 'dark_sunglasses':'\ud83d\udd76', + 'dart':'\ud83c\udfaf', + 'dash':'\ud83d\udca8', + 'date':'\ud83d\udcc5', + 'deciduous_tree':'\ud83c\udf33', + 'deer':'\ud83e\udd8c', + 'department_store':'\ud83c\udfec', + 'derelict_house':'\ud83c\udfda', + 'desert':'\ud83c\udfdc', + 'desert_island':'\ud83c\udfdd', + 'desktop_computer':'\ud83d\udda5', + 'male_detective':'\ud83d\udd75\ufe0f', + 'diamond_shape_with_a_dot_inside':'\ud83d\udca0', + 'diamonds':'\u2666\ufe0f', + 'disappointed':'\ud83d\ude1e', + 'disappointed_relieved':'\ud83d\ude25', + 'dizzy':'\ud83d\udcab', + 'dizzy_face':'\ud83d\ude35', + 'do_not_litter':'\ud83d\udeaf', + 'dog':'\ud83d\udc36', + 'dog2':'\ud83d\udc15', + 'dollar':'\ud83d\udcb5', + 'dolls':'\ud83c\udf8e', + 'dolphin':'\ud83d\udc2c', + 'door':'\ud83d\udeaa', + 'doughnut':'\ud83c\udf69', + 'dove':'\ud83d\udd4a', + 'dragon':'\ud83d\udc09', + 'dragon_face':'\ud83d\udc32', + 'dress':'\ud83d\udc57', + 'dromedary_camel':'\ud83d\udc2a', + 'drooling_face':'\ud83e\udd24', + 'droplet':'\ud83d\udca7', + 'drum':'\ud83e\udd41', + 'duck':'\ud83e\udd86', + 'dvd':'\ud83d\udcc0', + 'e-mail':'\ud83d\udce7', + 'eagle':'\ud83e\udd85', + 'ear':'\ud83d\udc42', + 'ear_of_rice':'\ud83c\udf3e', + 'earth_africa':'\ud83c\udf0d', + 'earth_americas':'\ud83c\udf0e', + 'earth_asia':'\ud83c\udf0f', + 'egg':'\ud83e\udd5a', + 'eggplant':'\ud83c\udf46', + 'eight_pointed_black_star':'\u2734\ufe0f', + 'eight_spoked_asterisk':'\u2733\ufe0f', + 'electric_plug':'\ud83d\udd0c', + 'elephant':'\ud83d\udc18', + 'email':'\u2709\ufe0f', + 'end':'\ud83d\udd1a', + 'envelope_with_arrow':'\ud83d\udce9', + 'euro':'\ud83d\udcb6', + 'european_castle':'\ud83c\udff0', + 'european_post_office':'\ud83c\udfe4', + 'evergreen_tree':'\ud83c\udf32', + 'exclamation':'\u2757\ufe0f', + 'expressionless':'\ud83d\ude11', + 'eye':'\ud83d\udc41', + 'eye_speech_bubble':'\ud83d\udc41‍\ud83d\udde8', + 'eyeglasses':'\ud83d\udc53', + 'eyes':'\ud83d\udc40', + 'face_with_head_bandage':'\ud83e\udd15', + 'face_with_thermometer':'\ud83e\udd12', + 'fist_oncoming':'\ud83d\udc4a', + 'factory':'\ud83c\udfed', + 'fallen_leaf':'\ud83c\udf42', + 'family_man_woman_boy':'\ud83d\udc6a', + 'family_man_boy':'\ud83d\udc68‍\ud83d\udc66', + 'family_man_boy_boy':'\ud83d\udc68‍\ud83d\udc66‍\ud83d\udc66', + 'family_man_girl':'\ud83d\udc68‍\ud83d\udc67', + 'family_man_girl_boy':'\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc66', + 'family_man_girl_girl':'\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc67', + 'family_man_man_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc66', + 'family_man_man_boy_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc66‍\ud83d\udc66', + 'family_man_man_girl':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67', + 'family_man_man_girl_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc66', + 'family_man_man_girl_girl':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc67', + 'family_man_woman_boy_boy':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', + 'family_man_woman_girl':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67', + 'family_man_woman_girl_boy':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', + 'family_man_woman_girl_girl':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', + 'family_woman_boy':'\ud83d\udc69‍\ud83d\udc66', + 'family_woman_boy_boy':'\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', + 'family_woman_girl':'\ud83d\udc69‍\ud83d\udc67', + 'family_woman_girl_boy':'\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', + 'family_woman_girl_girl':'\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', + 'family_woman_woman_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc66', + 'family_woman_woman_boy_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', + 'family_woman_woman_girl':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67', + 'family_woman_woman_girl_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', + 'family_woman_woman_girl_girl':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', + 'fast_forward':'\u23e9', + 'fax':'\ud83d\udce0', + 'fearful':'\ud83d\ude28', + 'feet':'\ud83d\udc3e', + 'female_detective':'\ud83d\udd75\ufe0f‍\u2640\ufe0f', + 'ferris_wheel':'\ud83c\udfa1', + 'ferry':'\u26f4', + 'field_hockey':'\ud83c\udfd1', + 'file_cabinet':'\ud83d\uddc4', + 'file_folder':'\ud83d\udcc1', + 'film_projector':'\ud83d\udcfd', + 'film_strip':'\ud83c\udf9e', + 'fire':'\ud83d\udd25', + 'fire_engine':'\ud83d\ude92', + 'fireworks':'\ud83c\udf86', + 'first_quarter_moon':'\ud83c\udf13', + 'first_quarter_moon_with_face':'\ud83c\udf1b', + 'fish':'\ud83d\udc1f', + 'fish_cake':'\ud83c\udf65', + 'fishing_pole_and_fish':'\ud83c\udfa3', + 'fist_raised':'\u270a', + 'fist_left':'\ud83e\udd1b', + 'fist_right':'\ud83e\udd1c', + 'flags':'\ud83c\udf8f', + 'flashlight':'\ud83d\udd26', + 'fleur_de_lis':'\u269c\ufe0f', + 'flight_arrival':'\ud83d\udeec', + 'flight_departure':'\ud83d\udeeb', + 'floppy_disk':'\ud83d\udcbe', + 'flower_playing_cards':'\ud83c\udfb4', + 'flushed':'\ud83d\ude33', + 'fog':'\ud83c\udf2b', + 'foggy':'\ud83c\udf01', + 'football':'\ud83c\udfc8', + 'footprints':'\ud83d\udc63', + 'fork_and_knife':'\ud83c\udf74', + 'fountain':'\u26f2\ufe0f', + 'fountain_pen':'\ud83d\udd8b', + 'four_leaf_clover':'\ud83c\udf40', + 'fox_face':'\ud83e\udd8a', + 'framed_picture':'\ud83d\uddbc', + 'free':'\ud83c\udd93', + 'fried_egg':'\ud83c\udf73', + 'fried_shrimp':'\ud83c\udf64', + 'fries':'\ud83c\udf5f', + 'frog':'\ud83d\udc38', + 'frowning':'\ud83d\ude26', + 'frowning_face':'\u2639\ufe0f', + 'frowning_man':'\ud83d\ude4d‍\u2642\ufe0f', + 'frowning_woman':'\ud83d\ude4d', + 'middle_finger':'\ud83d\udd95', + 'fuelpump':'\u26fd\ufe0f', + 'full_moon':'\ud83c\udf15', + 'full_moon_with_face':'\ud83c\udf1d', + 'funeral_urn':'\u26b1\ufe0f', + 'game_die':'\ud83c\udfb2', + 'gear':'\u2699\ufe0f', + 'gem':'\ud83d\udc8e', + 'gemini':'\u264a\ufe0f', + 'ghost':'\ud83d\udc7b', + 'gift':'\ud83c\udf81', + 'gift_heart':'\ud83d\udc9d', + 'girl':'\ud83d\udc67', + 'globe_with_meridians':'\ud83c\udf10', + 'goal_net':'\ud83e\udd45', + 'goat':'\ud83d\udc10', + 'golf':'\u26f3\ufe0f', + 'golfing_man':'\ud83c\udfcc\ufe0f', + 'golfing_woman':'\ud83c\udfcc\ufe0f‍\u2640\ufe0f', + 'gorilla':'\ud83e\udd8d', + 'grapes':'\ud83c\udf47', + 'green_apple':'\ud83c\udf4f', + 'green_book':'\ud83d\udcd7', + 'green_heart':'\ud83d\udc9a', + 'green_salad':'\ud83e\udd57', + 'grey_exclamation':'\u2755', + 'grey_question':'\u2754', + 'grimacing':'\ud83d\ude2c', + 'grin':'\ud83d\ude01', + 'grinning':'\ud83d\ude00', + 'guardsman':'\ud83d\udc82', + 'guardswoman':'\ud83d\udc82‍\u2640\ufe0f', + 'guitar':'\ud83c\udfb8', + 'gun':'\ud83d\udd2b', + 'haircut_woman':'\ud83d\udc87', + 'haircut_man':'\ud83d\udc87‍\u2642\ufe0f', + 'hamburger':'\ud83c\udf54', + 'hammer':'\ud83d\udd28', + 'hammer_and_pick':'\u2692', + 'hammer_and_wrench':'\ud83d\udee0', + 'hamster':'\ud83d\udc39', + 'hand':'\u270b', + 'handbag':'\ud83d\udc5c', + 'handshake':'\ud83e\udd1d', + 'hankey':'\ud83d\udca9', + 'hatched_chick':'\ud83d\udc25', + 'hatching_chick':'\ud83d\udc23', + 'headphones':'\ud83c\udfa7', + 'hear_no_evil':'\ud83d\ude49', + 'heart':'\u2764\ufe0f', + 'heart_decoration':'\ud83d\udc9f', + 'heart_eyes':'\ud83d\ude0d', + 'heart_eyes_cat':'\ud83d\ude3b', + 'heartbeat':'\ud83d\udc93', + 'heartpulse':'\ud83d\udc97', + 'hearts':'\u2665\ufe0f', + 'heavy_check_mark':'\u2714\ufe0f', + 'heavy_division_sign':'\u2797', + 'heavy_dollar_sign':'\ud83d\udcb2', + 'heavy_heart_exclamation':'\u2763\ufe0f', + 'heavy_minus_sign':'\u2796', + 'heavy_multiplication_x':'\u2716\ufe0f', + 'heavy_plus_sign':'\u2795', + 'helicopter':'\ud83d\ude81', + 'herb':'\ud83c\udf3f', + 'hibiscus':'\ud83c\udf3a', + 'high_brightness':'\ud83d\udd06', + 'high_heel':'\ud83d\udc60', + 'hocho':'\ud83d\udd2a', + 'hole':'\ud83d\udd73', + 'honey_pot':'\ud83c\udf6f', + 'horse':'\ud83d\udc34', + 'horse_racing':'\ud83c\udfc7', + 'hospital':'\ud83c\udfe5', + 'hot_pepper':'\ud83c\udf36', + 'hotdog':'\ud83c\udf2d', + 'hotel':'\ud83c\udfe8', + 'hotsprings':'\u2668\ufe0f', + 'hourglass':'\u231b\ufe0f', + 'hourglass_flowing_sand':'\u23f3', + 'house':'\ud83c\udfe0', + 'house_with_garden':'\ud83c\udfe1', + 'houses':'\ud83c\udfd8', + 'hugs':'\ud83e\udd17', + 'hushed':'\ud83d\ude2f', + 'ice_cream':'\ud83c\udf68', + 'ice_hockey':'\ud83c\udfd2', + 'ice_skate':'\u26f8', + 'icecream':'\ud83c\udf66', + 'id':'\ud83c\udd94', + 'ideograph_advantage':'\ud83c\ude50', + 'imp':'\ud83d\udc7f', + 'inbox_tray':'\ud83d\udce5', + 'incoming_envelope':'\ud83d\udce8', + 'tipping_hand_woman':'\ud83d\udc81', + 'information_source':'\u2139\ufe0f', + 'innocent':'\ud83d\ude07', + 'interrobang':'\u2049\ufe0f', + 'iphone':'\ud83d\udcf1', + 'izakaya_lantern':'\ud83c\udfee', + 'jack_o_lantern':'\ud83c\udf83', + 'japan':'\ud83d\uddfe', + 'japanese_castle':'\ud83c\udfef', + 'japanese_goblin':'\ud83d\udc7a', + 'japanese_ogre':'\ud83d\udc79', + 'jeans':'\ud83d\udc56', + 'joy':'\ud83d\ude02', + 'joy_cat':'\ud83d\ude39', + 'joystick':'\ud83d\udd79', + 'kaaba':'\ud83d\udd4b', + 'key':'\ud83d\udd11', + 'keyboard':'\u2328\ufe0f', + 'keycap_ten':'\ud83d\udd1f', + 'kick_scooter':'\ud83d\udef4', + 'kimono':'\ud83d\udc58', + 'kiss':'\ud83d\udc8b', + 'kissing':'\ud83d\ude17', + 'kissing_cat':'\ud83d\ude3d', + 'kissing_closed_eyes':'\ud83d\ude1a', + 'kissing_heart':'\ud83d\ude18', + 'kissing_smiling_eyes':'\ud83d\ude19', + 'kiwi_fruit':'\ud83e\udd5d', + 'koala':'\ud83d\udc28', + 'koko':'\ud83c\ude01', + 'label':'\ud83c\udff7', + 'large_blue_circle':'\ud83d\udd35', + 'large_blue_diamond':'\ud83d\udd37', + 'large_orange_diamond':'\ud83d\udd36', + 'last_quarter_moon':'\ud83c\udf17', + 'last_quarter_moon_with_face':'\ud83c\udf1c', + 'latin_cross':'\u271d\ufe0f', + 'laughing':'\ud83d\ude06', + 'leaves':'\ud83c\udf43', + 'ledger':'\ud83d\udcd2', + 'left_luggage':'\ud83d\udec5', + 'left_right_arrow':'\u2194\ufe0f', + 'leftwards_arrow_with_hook':'\u21a9\ufe0f', + 'lemon':'\ud83c\udf4b', + 'leo':'\u264c\ufe0f', + 'leopard':'\ud83d\udc06', + 'level_slider':'\ud83c\udf9a', + 'libra':'\u264e\ufe0f', + 'light_rail':'\ud83d\ude88', + 'link':'\ud83d\udd17', + 'lion':'\ud83e\udd81', + 'lips':'\ud83d\udc44', + 'lipstick':'\ud83d\udc84', + 'lizard':'\ud83e\udd8e', + 'lock':'\ud83d\udd12', + 'lock_with_ink_pen':'\ud83d\udd0f', + 'lollipop':'\ud83c\udf6d', + 'loop':'\u27bf', + 'loud_sound':'\ud83d\udd0a', + 'loudspeaker':'\ud83d\udce2', + 'love_hotel':'\ud83c\udfe9', + 'love_letter':'\ud83d\udc8c', + 'low_brightness':'\ud83d\udd05', + 'lying_face':'\ud83e\udd25', + 'm':'\u24c2\ufe0f', + 'mag':'\ud83d\udd0d', + 'mag_right':'\ud83d\udd0e', + 'mahjong':'\ud83c\udc04\ufe0f', + 'mailbox':'\ud83d\udceb', + 'mailbox_closed':'\ud83d\udcea', + 'mailbox_with_mail':'\ud83d\udcec', + 'mailbox_with_no_mail':'\ud83d\udced', + 'man':'\ud83d\udc68', + 'man_artist':'\ud83d\udc68‍\ud83c\udfa8', + 'man_astronaut':'\ud83d\udc68‍\ud83d\ude80', + 'man_cartwheeling':'\ud83e\udd38‍\u2642\ufe0f', + 'man_cook':'\ud83d\udc68‍\ud83c\udf73', + 'man_dancing':'\ud83d\udd7a', + 'man_facepalming':'\ud83e\udd26‍\u2642\ufe0f', + 'man_factory_worker':'\ud83d\udc68‍\ud83c\udfed', + 'man_farmer':'\ud83d\udc68‍\ud83c\udf3e', + 'man_firefighter':'\ud83d\udc68‍\ud83d\ude92', + 'man_health_worker':'\ud83d\udc68‍\u2695\ufe0f', + 'man_in_tuxedo':'\ud83e\udd35', + 'man_judge':'\ud83d\udc68‍\u2696\ufe0f', + 'man_juggling':'\ud83e\udd39‍\u2642\ufe0f', + 'man_mechanic':'\ud83d\udc68‍\ud83d\udd27', + 'man_office_worker':'\ud83d\udc68‍\ud83d\udcbc', + 'man_pilot':'\ud83d\udc68‍\u2708\ufe0f', + 'man_playing_handball':'\ud83e\udd3e‍\u2642\ufe0f', + 'man_playing_water_polo':'\ud83e\udd3d‍\u2642\ufe0f', + 'man_scientist':'\ud83d\udc68‍\ud83d\udd2c', + 'man_shrugging':'\ud83e\udd37‍\u2642\ufe0f', + 'man_singer':'\ud83d\udc68‍\ud83c\udfa4', + 'man_student':'\ud83d\udc68‍\ud83c\udf93', + 'man_teacher':'\ud83d\udc68‍\ud83c\udfeb', + 'man_technologist':'\ud83d\udc68‍\ud83d\udcbb', + 'man_with_gua_pi_mao':'\ud83d\udc72', + 'man_with_turban':'\ud83d\udc73', + 'tangerine':'\ud83c\udf4a', + 'mans_shoe':'\ud83d\udc5e', + 'mantelpiece_clock':'\ud83d\udd70', + 'maple_leaf':'\ud83c\udf41', + 'martial_arts_uniform':'\ud83e\udd4b', + 'mask':'\ud83d\ude37', + 'massage_woman':'\ud83d\udc86', + 'massage_man':'\ud83d\udc86‍\u2642\ufe0f', + 'meat_on_bone':'\ud83c\udf56', + 'medal_military':'\ud83c\udf96', + 'medal_sports':'\ud83c\udfc5', + 'mega':'\ud83d\udce3', + 'melon':'\ud83c\udf48', + 'memo':'\ud83d\udcdd', + 'men_wrestling':'\ud83e\udd3c‍\u2642\ufe0f', + 'menorah':'\ud83d\udd4e', + 'mens':'\ud83d\udeb9', + 'metal':'\ud83e\udd18', + 'metro':'\ud83d\ude87', + 'microphone':'\ud83c\udfa4', + 'microscope':'\ud83d\udd2c', + 'milk_glass':'\ud83e\udd5b', + 'milky_way':'\ud83c\udf0c', + 'minibus':'\ud83d\ude90', + 'minidisc':'\ud83d\udcbd', + 'mobile_phone_off':'\ud83d\udcf4', + 'money_mouth_face':'\ud83e\udd11', + 'money_with_wings':'\ud83d\udcb8', + 'moneybag':'\ud83d\udcb0', + 'monkey':'\ud83d\udc12', + 'monkey_face':'\ud83d\udc35', + 'monorail':'\ud83d\ude9d', + 'moon':'\ud83c\udf14', + 'mortar_board':'\ud83c\udf93', + 'mosque':'\ud83d\udd4c', + 'motor_boat':'\ud83d\udee5', + 'motor_scooter':'\ud83d\udef5', + 'motorcycle':'\ud83c\udfcd', + 'motorway':'\ud83d\udee3', + 'mount_fuji':'\ud83d\uddfb', + 'mountain':'\u26f0', + 'mountain_biking_man':'\ud83d\udeb5', + 'mountain_biking_woman':'\ud83d\udeb5‍\u2640\ufe0f', + 'mountain_cableway':'\ud83d\udea0', + 'mountain_railway':'\ud83d\ude9e', + 'mountain_snow':'\ud83c\udfd4', + 'mouse':'\ud83d\udc2d', + 'mouse2':'\ud83d\udc01', + 'movie_camera':'\ud83c\udfa5', + 'moyai':'\ud83d\uddff', + 'mrs_claus':'\ud83e\udd36', + 'muscle':'\ud83d\udcaa', + 'mushroom':'\ud83c\udf44', + 'musical_keyboard':'\ud83c\udfb9', + 'musical_note':'\ud83c\udfb5', + 'musical_score':'\ud83c\udfbc', + 'mute':'\ud83d\udd07', + 'nail_care':'\ud83d\udc85', + 'name_badge':'\ud83d\udcdb', + 'national_park':'\ud83c\udfde', + 'nauseated_face':'\ud83e\udd22', + 'necktie':'\ud83d\udc54', + 'negative_squared_cross_mark':'\u274e', + 'nerd_face':'\ud83e\udd13', + 'neutral_face':'\ud83d\ude10', + 'new':'\ud83c\udd95', + 'new_moon':'\ud83c\udf11', + 'new_moon_with_face':'\ud83c\udf1a', + 'newspaper':'\ud83d\udcf0', + 'newspaper_roll':'\ud83d\uddde', + 'next_track_button':'\u23ed', + 'ng':'\ud83c\udd96', + 'no_good_man':'\ud83d\ude45‍\u2642\ufe0f', + 'no_good_woman':'\ud83d\ude45', + 'night_with_stars':'\ud83c\udf03', + 'no_bell':'\ud83d\udd15', + 'no_bicycles':'\ud83d\udeb3', + 'no_entry':'\u26d4\ufe0f', + 'no_entry_sign':'\ud83d\udeab', + 'no_mobile_phones':'\ud83d\udcf5', + 'no_mouth':'\ud83d\ude36', + 'no_pedestrians':'\ud83d\udeb7', + 'no_smoking':'\ud83d\udead', + 'non-potable_water':'\ud83d\udeb1', + 'nose':'\ud83d\udc43', + 'notebook':'\ud83d\udcd3', + 'notebook_with_decorative_cover':'\ud83d\udcd4', + 'notes':'\ud83c\udfb6', + 'nut_and_bolt':'\ud83d\udd29', + 'o':'\u2b55\ufe0f', + 'o2':'\ud83c\udd7e\ufe0f', + 'ocean':'\ud83c\udf0a', + 'octopus':'\ud83d\udc19', + 'oden':'\ud83c\udf62', + 'office':'\ud83c\udfe2', + 'oil_drum':'\ud83d\udee2', + 'ok':'\ud83c\udd97', + 'ok_hand':'\ud83d\udc4c', + 'ok_man':'\ud83d\ude46‍\u2642\ufe0f', + 'ok_woman':'\ud83d\ude46', + 'old_key':'\ud83d\udddd', + 'older_man':'\ud83d\udc74', + 'older_woman':'\ud83d\udc75', + 'om':'\ud83d\udd49', + 'on':'\ud83d\udd1b', + 'oncoming_automobile':'\ud83d\ude98', + 'oncoming_bus':'\ud83d\ude8d', + 'oncoming_police_car':'\ud83d\ude94', + 'oncoming_taxi':'\ud83d\ude96', + 'open_file_folder':'\ud83d\udcc2', + 'open_hands':'\ud83d\udc50', + 'open_mouth':'\ud83d\ude2e', + 'open_umbrella':'\u2602\ufe0f', + 'ophiuchus':'\u26ce', + 'orange_book':'\ud83d\udcd9', + 'orthodox_cross':'\u2626\ufe0f', + 'outbox_tray':'\ud83d\udce4', + 'owl':'\ud83e\udd89', + 'ox':'\ud83d\udc02', + 'package':'\ud83d\udce6', + 'page_facing_up':'\ud83d\udcc4', + 'page_with_curl':'\ud83d\udcc3', + 'pager':'\ud83d\udcdf', + 'paintbrush':'\ud83d\udd8c', + 'palm_tree':'\ud83c\udf34', + 'pancakes':'\ud83e\udd5e', + 'panda_face':'\ud83d\udc3c', + 'paperclip':'\ud83d\udcce', + 'paperclips':'\ud83d\udd87', + 'parasol_on_ground':'\u26f1', + 'parking':'\ud83c\udd7f\ufe0f', + 'part_alternation_mark':'\u303d\ufe0f', + 'partly_sunny':'\u26c5\ufe0f', + 'passenger_ship':'\ud83d\udef3', + 'passport_control':'\ud83d\udec2', + 'pause_button':'\u23f8', + 'peace_symbol':'\u262e\ufe0f', + 'peach':'\ud83c\udf51', + 'peanuts':'\ud83e\udd5c', + 'pear':'\ud83c\udf50', + 'pen':'\ud83d\udd8a', + 'pencil2':'\u270f\ufe0f', + 'penguin':'\ud83d\udc27', + 'pensive':'\ud83d\ude14', + 'performing_arts':'\ud83c\udfad', + 'persevere':'\ud83d\ude23', + 'person_fencing':'\ud83e\udd3a', + 'pouting_woman':'\ud83d\ude4e', + 'phone':'\u260e\ufe0f', + 'pick':'\u26cf', + 'pig':'\ud83d\udc37', + 'pig2':'\ud83d\udc16', + 'pig_nose':'\ud83d\udc3d', + 'pill':'\ud83d\udc8a', + 'pineapple':'\ud83c\udf4d', + 'ping_pong':'\ud83c\udfd3', + 'pisces':'\u2653\ufe0f', + 'pizza':'\ud83c\udf55', + 'place_of_worship':'\ud83d\uded0', + 'plate_with_cutlery':'\ud83c\udf7d', + 'play_or_pause_button':'\u23ef', + 'point_down':'\ud83d\udc47', + 'point_left':'\ud83d\udc48', + 'point_right':'\ud83d\udc49', + 'point_up':'\u261d\ufe0f', + 'point_up_2':'\ud83d\udc46', + 'police_car':'\ud83d\ude93', + 'policewoman':'\ud83d\udc6e‍\u2640\ufe0f', + 'poodle':'\ud83d\udc29', + 'popcorn':'\ud83c\udf7f', + 'post_office':'\ud83c\udfe3', + 'postal_horn':'\ud83d\udcef', + 'postbox':'\ud83d\udcee', + 'potable_water':'\ud83d\udeb0', + 'potato':'\ud83e\udd54', + 'pouch':'\ud83d\udc5d', + 'poultry_leg':'\ud83c\udf57', + 'pound':'\ud83d\udcb7', + 'rage':'\ud83d\ude21', + 'pouting_cat':'\ud83d\ude3e', + 'pouting_man':'\ud83d\ude4e‍\u2642\ufe0f', + 'pray':'\ud83d\ude4f', + 'prayer_beads':'\ud83d\udcff', + 'pregnant_woman':'\ud83e\udd30', + 'previous_track_button':'\u23ee', + 'prince':'\ud83e\udd34', + 'princess':'\ud83d\udc78', + 'printer':'\ud83d\udda8', + 'purple_heart':'\ud83d\udc9c', + 'purse':'\ud83d\udc5b', + 'pushpin':'\ud83d\udccc', + 'put_litter_in_its_place':'\ud83d\udeae', + 'question':'\u2753', + 'rabbit':'\ud83d\udc30', + 'rabbit2':'\ud83d\udc07', + 'racehorse':'\ud83d\udc0e', + 'racing_car':'\ud83c\udfce', + 'radio':'\ud83d\udcfb', + 'radio_button':'\ud83d\udd18', + 'radioactive':'\u2622\ufe0f', + 'railway_car':'\ud83d\ude83', + 'railway_track':'\ud83d\udee4', + 'rainbow':'\ud83c\udf08', + 'rainbow_flag':'\ud83c\udff3\ufe0f‍\ud83c\udf08', + 'raised_back_of_hand':'\ud83e\udd1a', + 'raised_hand_with_fingers_splayed':'\ud83d\udd90', + 'raised_hands':'\ud83d\ude4c', + 'raising_hand_woman':'\ud83d\ude4b', + 'raising_hand_man':'\ud83d\ude4b‍\u2642\ufe0f', + 'ram':'\ud83d\udc0f', + 'ramen':'\ud83c\udf5c', + 'rat':'\ud83d\udc00', + 'record_button':'\u23fa', + 'recycle':'\u267b\ufe0f', + 'red_circle':'\ud83d\udd34', + 'registered':'\u00ae\ufe0f', + 'relaxed':'\u263a\ufe0f', + 'relieved':'\ud83d\ude0c', + 'reminder_ribbon':'\ud83c\udf97', + 'repeat':'\ud83d\udd01', + 'repeat_one':'\ud83d\udd02', + 'rescue_worker_helmet':'\u26d1', + 'restroom':'\ud83d\udebb', + 'revolving_hearts':'\ud83d\udc9e', + 'rewind':'\u23ea', + 'rhinoceros':'\ud83e\udd8f', + 'ribbon':'\ud83c\udf80', + 'rice':'\ud83c\udf5a', + 'rice_ball':'\ud83c\udf59', + 'rice_cracker':'\ud83c\udf58', + 'rice_scene':'\ud83c\udf91', + 'right_anger_bubble':'\ud83d\uddef', + 'ring':'\ud83d\udc8d', + 'robot':'\ud83e\udd16', + 'rocket':'\ud83d\ude80', + 'rofl':'\ud83e\udd23', + 'roll_eyes':'\ud83d\ude44', + 'roller_coaster':'\ud83c\udfa2', + 'rooster':'\ud83d\udc13', + 'rose':'\ud83c\udf39', + 'rosette':'\ud83c\udff5', + 'rotating_light':'\ud83d\udea8', + 'round_pushpin':'\ud83d\udccd', + 'rowing_man':'\ud83d\udea3', + 'rowing_woman':'\ud83d\udea3‍\u2640\ufe0f', + 'rugby_football':'\ud83c\udfc9', + 'running_man':'\ud83c\udfc3', + 'running_shirt_with_sash':'\ud83c\udfbd', + 'running_woman':'\ud83c\udfc3‍\u2640\ufe0f', + 'sa':'\ud83c\ude02\ufe0f', + 'sagittarius':'\u2650\ufe0f', + 'sake':'\ud83c\udf76', + 'sandal':'\ud83d\udc61', + 'santa':'\ud83c\udf85', + 'satellite':'\ud83d\udce1', + 'saxophone':'\ud83c\udfb7', + 'school':'\ud83c\udfeb', + 'school_satchel':'\ud83c\udf92', + 'scissors':'\u2702\ufe0f', + 'scorpion':'\ud83e\udd82', + 'scorpius':'\u264f\ufe0f', + 'scream':'\ud83d\ude31', + 'scream_cat':'\ud83d\ude40', + 'scroll':'\ud83d\udcdc', + 'seat':'\ud83d\udcba', + 'secret':'\u3299\ufe0f', + 'see_no_evil':'\ud83d\ude48', + 'seedling':'\ud83c\udf31', + 'selfie':'\ud83e\udd33', + 'shallow_pan_of_food':'\ud83e\udd58', + 'shamrock':'\u2618\ufe0f', + 'shark':'\ud83e\udd88', + 'shaved_ice':'\ud83c\udf67', + 'sheep':'\ud83d\udc11', + 'shell':'\ud83d\udc1a', + 'shield':'\ud83d\udee1', + 'shinto_shrine':'\u26e9', + 'ship':'\ud83d\udea2', + 'shirt':'\ud83d\udc55', + 'shopping':'\ud83d\udecd', + 'shopping_cart':'\ud83d\uded2', + 'shower':'\ud83d\udebf', + 'shrimp':'\ud83e\udd90', + 'signal_strength':'\ud83d\udcf6', + 'six_pointed_star':'\ud83d\udd2f', + 'ski':'\ud83c\udfbf', + 'skier':'\u26f7', + 'skull':'\ud83d\udc80', + 'skull_and_crossbones':'\u2620\ufe0f', + 'sleeping':'\ud83d\ude34', + 'sleeping_bed':'\ud83d\udecc', + 'sleepy':'\ud83d\ude2a', + 'slightly_frowning_face':'\ud83d\ude41', + 'slightly_smiling_face':'\ud83d\ude42', + 'slot_machine':'\ud83c\udfb0', + 'small_airplane':'\ud83d\udee9', + 'small_blue_diamond':'\ud83d\udd39', + 'small_orange_diamond':'\ud83d\udd38', + 'small_red_triangle':'\ud83d\udd3a', + 'small_red_triangle_down':'\ud83d\udd3b', + 'smile':'\ud83d\ude04', + 'smile_cat':'\ud83d\ude38', + 'smiley':'\ud83d\ude03', + 'smiley_cat':'\ud83d\ude3a', + 'smiling_imp':'\ud83d\ude08', + 'smirk':'\ud83d\ude0f', + 'smirk_cat':'\ud83d\ude3c', + 'smoking':'\ud83d\udeac', + 'snail':'\ud83d\udc0c', + 'snake':'\ud83d\udc0d', + 'sneezing_face':'\ud83e\udd27', + 'snowboarder':'\ud83c\udfc2', + 'snowflake':'\u2744\ufe0f', + 'snowman':'\u26c4\ufe0f', + 'snowman_with_snow':'\u2603\ufe0f', + 'sob':'\ud83d\ude2d', + 'soccer':'\u26bd\ufe0f', + 'soon':'\ud83d\udd1c', + 'sos':'\ud83c\udd98', + 'sound':'\ud83d\udd09', + 'space_invader':'\ud83d\udc7e', + 'spades':'\u2660\ufe0f', + 'spaghetti':'\ud83c\udf5d', + 'sparkle':'\u2747\ufe0f', + 'sparkler':'\ud83c\udf87', + 'sparkles':'\u2728', + 'sparkling_heart':'\ud83d\udc96', + 'speak_no_evil':'\ud83d\ude4a', + 'speaker':'\ud83d\udd08', + 'speaking_head':'\ud83d\udde3', + 'speech_balloon':'\ud83d\udcac', + 'speedboat':'\ud83d\udea4', + 'spider':'\ud83d\udd77', + 'spider_web':'\ud83d\udd78', + 'spiral_calendar':'\ud83d\uddd3', + 'spiral_notepad':'\ud83d\uddd2', + 'spoon':'\ud83e\udd44', + 'squid':'\ud83e\udd91', + 'stadium':'\ud83c\udfdf', + 'star':'\u2b50\ufe0f', + 'star2':'\ud83c\udf1f', + 'star_and_crescent':'\u262a\ufe0f', + 'star_of_david':'\u2721\ufe0f', + 'stars':'\ud83c\udf20', + 'station':'\ud83d\ude89', + 'statue_of_liberty':'\ud83d\uddfd', + 'steam_locomotive':'\ud83d\ude82', + 'stew':'\ud83c\udf72', + 'stop_button':'\u23f9', + 'stop_sign':'\ud83d\uded1', + 'stopwatch':'\u23f1', + 'straight_ruler':'\ud83d\udccf', + 'strawberry':'\ud83c\udf53', + 'stuck_out_tongue':'\ud83d\ude1b', + 'stuck_out_tongue_closed_eyes':'\ud83d\ude1d', + 'stuck_out_tongue_winking_eye':'\ud83d\ude1c', + 'studio_microphone':'\ud83c\udf99', + 'stuffed_flatbread':'\ud83e\udd59', + 'sun_behind_large_cloud':'\ud83c\udf25', + 'sun_behind_rain_cloud':'\ud83c\udf26', + 'sun_behind_small_cloud':'\ud83c\udf24', + 'sun_with_face':'\ud83c\udf1e', + 'sunflower':'\ud83c\udf3b', + 'sunglasses':'\ud83d\ude0e', + 'sunny':'\u2600\ufe0f', + 'sunrise':'\ud83c\udf05', + 'sunrise_over_mountains':'\ud83c\udf04', + 'surfing_man':'\ud83c\udfc4', + 'surfing_woman':'\ud83c\udfc4‍\u2640\ufe0f', + 'sushi':'\ud83c\udf63', + 'suspension_railway':'\ud83d\ude9f', + 'sweat':'\ud83d\ude13', + 'sweat_drops':'\ud83d\udca6', + 'sweat_smile':'\ud83d\ude05', + 'sweet_potato':'\ud83c\udf60', + 'swimming_man':'\ud83c\udfca', + 'swimming_woman':'\ud83c\udfca‍\u2640\ufe0f', + 'symbols':'\ud83d\udd23', + 'synagogue':'\ud83d\udd4d', + 'syringe':'\ud83d\udc89', + 'taco':'\ud83c\udf2e', + 'tada':'\ud83c\udf89', + 'tanabata_tree':'\ud83c\udf8b', + 'taurus':'\u2649\ufe0f', + 'taxi':'\ud83d\ude95', + 'tea':'\ud83c\udf75', + 'telephone_receiver':'\ud83d\udcde', + 'telescope':'\ud83d\udd2d', + 'tennis':'\ud83c\udfbe', + 'tent':'\u26fa\ufe0f', + 'thermometer':'\ud83c\udf21', + 'thinking':'\ud83e\udd14', + 'thought_balloon':'\ud83d\udcad', + 'ticket':'\ud83c\udfab', + 'tickets':'\ud83c\udf9f', + 'tiger':'\ud83d\udc2f', + 'tiger2':'\ud83d\udc05', + 'timer_clock':'\u23f2', + 'tipping_hand_man':'\ud83d\udc81‍\u2642\ufe0f', + 'tired_face':'\ud83d\ude2b', + 'tm':'\u2122\ufe0f', + 'toilet':'\ud83d\udebd', + 'tokyo_tower':'\ud83d\uddfc', + 'tomato':'\ud83c\udf45', + 'tongue':'\ud83d\udc45', + 'top':'\ud83d\udd1d', + 'tophat':'\ud83c\udfa9', + 'tornado':'\ud83c\udf2a', + 'trackball':'\ud83d\uddb2', + 'tractor':'\ud83d\ude9c', + 'traffic_light':'\ud83d\udea5', + 'train':'\ud83d\ude8b', + 'train2':'\ud83d\ude86', + 'tram':'\ud83d\ude8a', + 'triangular_flag_on_post':'\ud83d\udea9', + 'triangular_ruler':'\ud83d\udcd0', + 'trident':'\ud83d\udd31', + 'triumph':'\ud83d\ude24', + 'trolleybus':'\ud83d\ude8e', + 'trophy':'\ud83c\udfc6', + 'tropical_drink':'\ud83c\udf79', + 'tropical_fish':'\ud83d\udc20', + 'truck':'\ud83d\ude9a', + 'trumpet':'\ud83c\udfba', + 'tulip':'\ud83c\udf37', + 'tumbler_glass':'\ud83e\udd43', + 'turkey':'\ud83e\udd83', + 'turtle':'\ud83d\udc22', + 'tv':'\ud83d\udcfa', + 'twisted_rightwards_arrows':'\ud83d\udd00', + 'two_hearts':'\ud83d\udc95', + 'two_men_holding_hands':'\ud83d\udc6c', + 'two_women_holding_hands':'\ud83d\udc6d', + 'u5272':'\ud83c\ude39', + 'u5408':'\ud83c\ude34', + 'u55b6':'\ud83c\ude3a', + 'u6307':'\ud83c\ude2f\ufe0f', + 'u6708':'\ud83c\ude37\ufe0f', + 'u6709':'\ud83c\ude36', + 'u6e80':'\ud83c\ude35', + 'u7121':'\ud83c\ude1a\ufe0f', + 'u7533':'\ud83c\ude38', + 'u7981':'\ud83c\ude32', + 'u7a7a':'\ud83c\ude33', + 'umbrella':'\u2614\ufe0f', + 'unamused':'\ud83d\ude12', + 'underage':'\ud83d\udd1e', + 'unicorn':'\ud83e\udd84', + 'unlock':'\ud83d\udd13', + 'up':'\ud83c\udd99', + 'upside_down_face':'\ud83d\ude43', + 'v':'\u270c\ufe0f', + 'vertical_traffic_light':'\ud83d\udea6', + 'vhs':'\ud83d\udcfc', + 'vibration_mode':'\ud83d\udcf3', + 'video_camera':'\ud83d\udcf9', + 'video_game':'\ud83c\udfae', + 'violin':'\ud83c\udfbb', + 'virgo':'\u264d\ufe0f', + 'volcano':'\ud83c\udf0b', + 'volleyball':'\ud83c\udfd0', + 'vs':'\ud83c\udd9a', + 'vulcan_salute':'\ud83d\udd96', + 'walking_man':'\ud83d\udeb6', + 'walking_woman':'\ud83d\udeb6‍\u2640\ufe0f', + 'waning_crescent_moon':'\ud83c\udf18', + 'waning_gibbous_moon':'\ud83c\udf16', + 'warning':'\u26a0\ufe0f', + 'wastebasket':'\ud83d\uddd1', + 'watch':'\u231a\ufe0f', + 'water_buffalo':'\ud83d\udc03', + 'watermelon':'\ud83c\udf49', + 'wave':'\ud83d\udc4b', + 'wavy_dash':'\u3030\ufe0f', + 'waxing_crescent_moon':'\ud83c\udf12', + 'wc':'\ud83d\udebe', + 'weary':'\ud83d\ude29', + 'wedding':'\ud83d\udc92', + 'weight_lifting_man':'\ud83c\udfcb\ufe0f', + 'weight_lifting_woman':'\ud83c\udfcb\ufe0f‍\u2640\ufe0f', + 'whale':'\ud83d\udc33', + 'whale2':'\ud83d\udc0b', + 'wheel_of_dharma':'\u2638\ufe0f', + 'wheelchair':'\u267f\ufe0f', + 'white_check_mark':'\u2705', + 'white_circle':'\u26aa\ufe0f', + 'white_flag':'\ud83c\udff3\ufe0f', + 'white_flower':'\ud83d\udcae', + 'white_large_square':'\u2b1c\ufe0f', + 'white_medium_small_square':'\u25fd\ufe0f', + 'white_medium_square':'\u25fb\ufe0f', + 'white_small_square':'\u25ab\ufe0f', + 'white_square_button':'\ud83d\udd33', + 'wilted_flower':'\ud83e\udd40', + 'wind_chime':'\ud83c\udf90', + 'wind_face':'\ud83c\udf2c', + 'wine_glass':'\ud83c\udf77', + 'wink':'\ud83d\ude09', + 'wolf':'\ud83d\udc3a', + 'woman':'\ud83d\udc69', + 'woman_artist':'\ud83d\udc69‍\ud83c\udfa8', + 'woman_astronaut':'\ud83d\udc69‍\ud83d\ude80', + 'woman_cartwheeling':'\ud83e\udd38‍\u2640\ufe0f', + 'woman_cook':'\ud83d\udc69‍\ud83c\udf73', + 'woman_facepalming':'\ud83e\udd26‍\u2640\ufe0f', + 'woman_factory_worker':'\ud83d\udc69‍\ud83c\udfed', + 'woman_farmer':'\ud83d\udc69‍\ud83c\udf3e', + 'woman_firefighter':'\ud83d\udc69‍\ud83d\ude92', + 'woman_health_worker':'\ud83d\udc69‍\u2695\ufe0f', + 'woman_judge':'\ud83d\udc69‍\u2696\ufe0f', + 'woman_juggling':'\ud83e\udd39‍\u2640\ufe0f', + 'woman_mechanic':'\ud83d\udc69‍\ud83d\udd27', + 'woman_office_worker':'\ud83d\udc69‍\ud83d\udcbc', + 'woman_pilot':'\ud83d\udc69‍\u2708\ufe0f', + 'woman_playing_handball':'\ud83e\udd3e‍\u2640\ufe0f', + 'woman_playing_water_polo':'\ud83e\udd3d‍\u2640\ufe0f', + 'woman_scientist':'\ud83d\udc69‍\ud83d\udd2c', + 'woman_shrugging':'\ud83e\udd37‍\u2640\ufe0f', + 'woman_singer':'\ud83d\udc69‍\ud83c\udfa4', + 'woman_student':'\ud83d\udc69‍\ud83c\udf93', + 'woman_teacher':'\ud83d\udc69‍\ud83c\udfeb', + 'woman_technologist':'\ud83d\udc69‍\ud83d\udcbb', + 'woman_with_turban':'\ud83d\udc73‍\u2640\ufe0f', + 'womans_clothes':'\ud83d\udc5a', + 'womans_hat':'\ud83d\udc52', + 'women_wrestling':'\ud83e\udd3c‍\u2640\ufe0f', + 'womens':'\ud83d\udeba', + 'world_map':'\ud83d\uddfa', + 'worried':'\ud83d\ude1f', + 'wrench':'\ud83d\udd27', + 'writing_hand':'\u270d\ufe0f', + 'x':'\u274c', + 'yellow_heart':'\ud83d\udc9b', + 'yen':'\ud83d\udcb4', + 'yin_yang':'\u262f\ufe0f', + 'yum':'\ud83d\ude0b', + 'zap':'\u26a1\ufe0f', + 'zipper_mouth_face':'\ud83e\udd10', + 'zzz':'\ud83d\udca4', + + /* special emojis :P */ + 'octocat': ':octocat:', + 'showdown': 'S' +}; diff --git a/node_modules/showdown/src/loader.js b/node_modules/showdown/src/loader.js new file mode 100644 index 0000000..f26cf73 --- /dev/null +++ b/node_modules/showdown/src/loader.js @@ -0,0 +1,17 @@ +var root = this; + +// AMD Loader +if (typeof define === 'function' && define.amd) { + define(function () { + 'use strict'; + return showdown; + }); + +// CommonJS/nodeJS Loader +} else if (typeof module !== 'undefined' && module.exports) { + module.exports = showdown; + +// Regular Browser loader +} else { + root.showdown = showdown; +} diff --git a/node_modules/showdown/src/options.js b/node_modules/showdown/src/options.js new file mode 100644 index 0000000..24899b4 --- /dev/null +++ b/node_modules/showdown/src/options.js @@ -0,0 +1,192 @@ +/** + * Created by Tivie on 13-07-2015. + */ + +function getDefaultOpts (simple) { + 'use strict'; + + var defaultOptions = { + omitExtraWLInCodeBlocks: { + defaultValue: false, + describe: 'Omit the default extra whiteline added to code blocks', + type: 'boolean' + }, + noHeaderId: { + defaultValue: false, + describe: 'Turn on/off generated header id', + type: 'boolean' + }, + prefixHeaderId: { + defaultValue: false, + describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \'section-\' prefix', + type: 'string' + }, + rawPrefixHeaderId: { + defaultValue: false, + describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)', + type: 'boolean' + }, + ghCompatibleHeaderId: { + defaultValue: false, + describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)', + type: 'boolean' + }, + rawHeaderId: { + defaultValue: false, + describe: 'Remove only spaces, \' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids', + type: 'boolean' + }, + headerLevelStart: { + defaultValue: false, + describe: 'The header blocks level start', + type: 'integer' + }, + parseImgDimensions: { + defaultValue: false, + describe: 'Turn on/off image dimension parsing', + type: 'boolean' + }, + simplifiedAutoLink: { + defaultValue: false, + describe: 'Turn on/off GFM autolink style', + type: 'boolean' + }, + excludeTrailingPunctuationFromURLs: { + defaultValue: false, + describe: 'Excludes trailing punctuation from links generated with autoLinking', + type: 'boolean' + }, + literalMidWordUnderscores: { + defaultValue: false, + describe: 'Parse midword underscores as literal underscores', + type: 'boolean' + }, + literalMidWordAsterisks: { + defaultValue: false, + describe: 'Parse midword asterisks as literal asterisks', + type: 'boolean' + }, + strikethrough: { + defaultValue: false, + describe: 'Turn on/off strikethrough support', + type: 'boolean' + }, + tables: { + defaultValue: false, + describe: 'Turn on/off tables support', + type: 'boolean' + }, + tablesHeaderId: { + defaultValue: false, + describe: 'Add an id to table headers', + type: 'boolean' + }, + ghCodeBlocks: { + defaultValue: true, + describe: 'Turn on/off GFM fenced code blocks support', + type: 'boolean' + }, + tasklists: { + defaultValue: false, + describe: 'Turn on/off GFM tasklist support', + type: 'boolean' + }, + smoothLivePreview: { + defaultValue: false, + describe: 'Prevents weird effects in live previews due to incomplete input', + type: 'boolean' + }, + smartIndentationFix: { + defaultValue: false, + description: 'Tries to smartly fix indentation in es6 strings', + type: 'boolean' + }, + disableForced4SpacesIndentedSublists: { + defaultValue: false, + description: 'Disables the requirement of indenting nested sublists by 4 spaces', + type: 'boolean' + }, + simpleLineBreaks: { + defaultValue: false, + description: 'Parses simple line breaks as
(GFM Style)', + type: 'boolean' + }, + requireSpaceBeforeHeadingText: { + defaultValue: false, + description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)', + type: 'boolean' + }, + ghMentions: { + defaultValue: false, + description: 'Enables github @mentions', + type: 'boolean' + }, + ghMentionsLink: { + defaultValue: 'https://github.com/{u}', + description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.', + type: 'string' + }, + encodeEmails: { + defaultValue: true, + description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities', + type: 'boolean' + }, + openLinksInNewWindow: { + defaultValue: false, + description: 'Open all links in new windows', + type: 'boolean' + }, + backslashEscapesHTMLTags: { + defaultValue: false, + description: 'Support for HTML Tag escaping. ex: \
foo\
', + type: 'boolean' + }, + emoji: { + defaultValue: false, + description: 'Enable emoji support. Ex: `this is a :smile: emoji`', + type: 'boolean' + }, + underline: { + defaultValue: false, + description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``', + type: 'boolean' + }, + completeHTMLDocument: { + defaultValue: false, + description: 'Outputs a complete html document, including ``, `` and `` tags', + type: 'boolean' + }, + metadata: { + defaultValue: false, + description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).', + type: 'boolean' + }, + splitAdjacentBlockquotes: { + defaultValue: false, + description: 'Split adjacent blockquote blocks', + type: 'boolean' + } + }; + if (simple === false) { + return JSON.parse(JSON.stringify(defaultOptions)); + } + var ret = {}; + for (var opt in defaultOptions) { + if (defaultOptions.hasOwnProperty(opt)) { + ret[opt] = defaultOptions[opt].defaultValue; + } + } + return ret; +} + +function allOptionsOn () { + 'use strict'; + var options = getDefaultOpts(true), + ret = {}; + for (var opt in options) { + if (options.hasOwnProperty(opt)) { + ret[opt] = true; + } + } + return ret; +} diff --git a/node_modules/showdown/src/showdown.js b/node_modules/showdown/src/showdown.js new file mode 100644 index 0000000..df881a8 --- /dev/null +++ b/node_modules/showdown/src/showdown.js @@ -0,0 +1,380 @@ +/** + * Created by Tivie on 06-01-2015. + */ + +// Private properties +var showdown = {}, + parsers = {}, + extensions = {}, + globalOptions = getDefaultOpts(true), + setFlavor = 'vanilla', + flavor = { + github: { + omitExtraWLInCodeBlocks: true, + simplifiedAutoLink: true, + excludeTrailingPunctuationFromURLs: true, + literalMidWordUnderscores: true, + strikethrough: true, + tables: true, + tablesHeaderId: true, + ghCodeBlocks: true, + tasklists: true, + disableForced4SpacesIndentedSublists: true, + simpleLineBreaks: true, + requireSpaceBeforeHeadingText: true, + ghCompatibleHeaderId: true, + ghMentions: true, + backslashEscapesHTMLTags: true, + emoji: true, + splitAdjacentBlockquotes: true + }, + original: { + noHeaderId: true, + ghCodeBlocks: false + }, + ghost: { + omitExtraWLInCodeBlocks: true, + parseImgDimensions: true, + simplifiedAutoLink: true, + excludeTrailingPunctuationFromURLs: true, + literalMidWordUnderscores: true, + strikethrough: true, + tables: true, + tablesHeaderId: true, + ghCodeBlocks: true, + tasklists: true, + smoothLivePreview: true, + simpleLineBreaks: true, + requireSpaceBeforeHeadingText: true, + ghMentions: false, + encodeEmails: true + }, + vanilla: getDefaultOpts(true), + allOn: allOptionsOn() + }; + +/** + * helper namespace + * @type {{}} + */ +showdown.helper = {}; + +/** + * TODO LEGACY SUPPORT CODE + * @type {{}} + */ +showdown.extensions = {}; + +/** + * Set a global option + * @static + * @param {string} key + * @param {*} value + * @returns {showdown} + */ +showdown.setOption = function (key, value) { + 'use strict'; + globalOptions[key] = value; + return this; +}; + +/** + * Get a global option + * @static + * @param {string} key + * @returns {*} + */ +showdown.getOption = function (key) { + 'use strict'; + return globalOptions[key]; +}; + +/** + * Get the global options + * @static + * @returns {{}} + */ +showdown.getOptions = function () { + 'use strict'; + return globalOptions; +}; + +/** + * Reset global options to the default values + * @static + */ +showdown.resetOptions = function () { + 'use strict'; + globalOptions = getDefaultOpts(true); +}; + +/** + * Set the flavor showdown should use as default + * @param {string} name + */ +showdown.setFlavor = function (name) { + 'use strict'; + if (!flavor.hasOwnProperty(name)) { + throw Error(name + ' flavor was not found'); + } + showdown.resetOptions(); + var preset = flavor[name]; + setFlavor = name; + for (var option in preset) { + if (preset.hasOwnProperty(option)) { + globalOptions[option] = preset[option]; + } + } +}; + +/** + * Get the currently set flavor + * @returns {string} + */ +showdown.getFlavor = function () { + 'use strict'; + return setFlavor; +}; + +/** + * Get the options of a specified flavor. Returns undefined if the flavor was not found + * @param {string} name Name of the flavor + * @returns {{}|undefined} + */ +showdown.getFlavorOptions = function (name) { + 'use strict'; + if (flavor.hasOwnProperty(name)) { + return flavor[name]; + } +}; + +/** + * Get the default options + * @static + * @param {boolean} [simple=true] + * @returns {{}} + */ +showdown.getDefaultOptions = function (simple) { + 'use strict'; + return getDefaultOpts(simple); +}; + +/** + * Get or set a subParser + * + * subParser(name) - Get a registered subParser + * subParser(name, func) - Register a subParser + * @static + * @param {string} name + * @param {function} [func] + * @returns {*} + */ +showdown.subParser = function (name, func) { + 'use strict'; + if (showdown.helper.isString(name)) { + if (typeof func !== 'undefined') { + parsers[name] = func; + } else { + if (parsers.hasOwnProperty(name)) { + return parsers[name]; + } else { + throw Error('SubParser named ' + name + ' not registered!'); + } + } + } +}; + +/** + * Gets or registers an extension + * @static + * @param {string} name + * @param {object|function=} ext + * @returns {*} + */ +showdown.extension = function (name, ext) { + 'use strict'; + + if (!showdown.helper.isString(name)) { + throw Error('Extension \'name\' must be a string'); + } + + name = showdown.helper.stdExtName(name); + + // Getter + if (showdown.helper.isUndefined(ext)) { + if (!extensions.hasOwnProperty(name)) { + throw Error('Extension named ' + name + ' is not registered!'); + } + return extensions[name]; + + // Setter + } else { + // Expand extension if it's wrapped in a function + if (typeof ext === 'function') { + ext = ext(); + } + + // Ensure extension is an array + if (!showdown.helper.isArray(ext)) { + ext = [ext]; + } + + var validExtension = validate(ext, name); + + if (validExtension.valid) { + extensions[name] = ext; + } else { + throw Error(validExtension.error); + } + } +}; + +/** + * Gets all extensions registered + * @returns {{}} + */ +showdown.getAllExtensions = function () { + 'use strict'; + return extensions; +}; + +/** + * Remove an extension + * @param {string} name + */ +showdown.removeExtension = function (name) { + 'use strict'; + delete extensions[name]; +}; + +/** + * Removes all extensions + */ +showdown.resetExtensions = function () { + 'use strict'; + extensions = {}; +}; + +/** + * Validate extension + * @param {array} extension + * @param {string} name + * @returns {{valid: boolean, error: string}} + */ +function validate (extension, name) { + 'use strict'; + + var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension', + ret = { + valid: true, + error: '' + }; + + if (!showdown.helper.isArray(extension)) { + extension = [extension]; + } + + for (var i = 0; i < extension.length; ++i) { + var baseMsg = errMsg + ' sub-extension ' + i + ': ', + ext = extension[i]; + if (typeof ext !== 'object') { + ret.valid = false; + ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given'; + return ret; + } + + if (!showdown.helper.isString(ext.type)) { + ret.valid = false; + ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + ' given'; + return ret; + } + + var type = ext.type = ext.type.toLowerCase(); + + // normalize extension type + if (type === 'language') { + type = ext.type = 'lang'; + } + + if (type === 'html') { + type = ext.type = 'output'; + } + + if (type !== 'lang' && type !== 'output' && type !== 'listener') { + ret.valid = false; + ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"'; + return ret; + } + + if (type === 'listener') { + if (showdown.helper.isUndefined(ext.listeners)) { + ret.valid = false; + ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"'; + return ret; + } + } else { + if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) { + ret.valid = false; + ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method'; + return ret; + } + } + + if (ext.listeners) { + if (typeof ext.listeners !== 'object') { + ret.valid = false; + ret.error = baseMsg + '"listeners" property must be an object but ' + typeof ext.listeners + ' given'; + return ret; + } + for (var ln in ext.listeners) { + if (ext.listeners.hasOwnProperty(ln)) { + if (typeof ext.listeners[ln] !== 'function') { + ret.valid = false; + ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln + + ' must be a function but ' + typeof ext.listeners[ln] + ' given'; + return ret; + } + } + } + } + + if (ext.filter) { + if (typeof ext.filter !== 'function') { + ret.valid = false; + ret.error = baseMsg + '"filter" must be a function, but ' + typeof ext.filter + ' given'; + return ret; + } + } else if (ext.regex) { + if (showdown.helper.isString(ext.regex)) { + ext.regex = new RegExp(ext.regex, 'g'); + } + if (!(ext.regex instanceof RegExp)) { + ret.valid = false; + ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given'; + return ret; + } + if (showdown.helper.isUndefined(ext.replace)) { + ret.valid = false; + ret.error = baseMsg + '"regex" extensions must implement a replace string or function'; + return ret; + } + } + } + return ret; +} + +/** + * Validate extension + * @param {object} ext + * @returns {boolean} + */ +showdown.validateExtension = function (ext) { + 'use strict'; + + var validateExtension = validate(ext, null); + if (!validateExtension.valid) { + console.warn(validateExtension.error); + return false; + } + return true; +}; diff --git a/node_modules/showdown/src/subParsers/anchors.js b/node_modules/showdown/src/subParsers/anchors.js new file mode 100644 index 0000000..5a39a66 --- /dev/null +++ b/node_modules/showdown/src/subParsers/anchors.js @@ -0,0 +1,98 @@ +/** + * Turn Markdown link shortcuts into XHTML tags. + */ +showdown.subParser('anchors', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('anchors.before', text, options, globals); + + var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) { + if (showdown.helper.isUndefined(title)) { + title = ''; + } + linkId = linkId.toLowerCase(); + + // Special case for explicit empty url + if (wholeMatch.search(/\(? ?(['"].*['"])?\)$/m) > -1) { + url = ''; + } else if (!url) { + if (!linkId) { + // lower-case and turn embedded newlines into spaces + linkId = linkText.toLowerCase().replace(/ ?\n/g, ' '); + } + url = '#' + linkId; + + if (!showdown.helper.isUndefined(globals.gUrls[linkId])) { + url = globals.gUrls[linkId]; + if (!showdown.helper.isUndefined(globals.gTitles[linkId])) { + title = globals.gTitles[linkId]; + } + } else { + return wholeMatch; + } + } + + //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance + url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); + + var result = ''; + + return result; + }; + + // First, handle reference-style links: [link text] [id] + text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g, writeAnchorTag); + + // Next, inline-style links: [link text](url "optional title") + // cases with crazy urls like ./image/cat1).png + text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, + writeAnchorTag); + + // normal cases + text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, + writeAnchorTag); + + // handle reference-style shortcuts: [link text] + // These must come last in case you've also got [link test][1] + // or [link test](/foo) + text = text.replace(/\[([^\[\]]+)]()()()()()/g, writeAnchorTag); + + // Lastly handle GithubMentions if option is enabled + if (options.ghMentions) { + text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi, function (wm, st, escape, mentions, username) { + if (escape === '\\') { + return st + mentions; + } + + //check if options.ghMentionsLink is a string + if (!showdown.helper.isString(options.ghMentionsLink)) { + throw new Error('ghMentionsLink option must be a string'); + } + var lnk = options.ghMentionsLink.replace(/\{u}/g, username), + target = ''; + if (options.openLinksInNewWindow) { + target = ' target="¨E95Eblank"'; + } + return st + '' + mentions + ''; + }); + } + + text = globals.converter._dispatch('anchors.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/autoLinks.js b/node_modules/showdown/src/subParsers/autoLinks.js new file mode 100644 index 0000000..f75e97e --- /dev/null +++ b/node_modules/showdown/src/subParsers/autoLinks.js @@ -0,0 +1,79 @@ +// url allowed chars [a-z\d_.~:/?#[]@!$&'()*+,;=-] + +var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi, + simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi, + delimUrlRegex = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi, + simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi, + delimMailRegex = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, + + replaceLink = function (options) { + 'use strict'; + return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) { + link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); + var lnkTxt = link, + append = '', + target = '', + lmc = leadingMagicChars || '', + tmc = trailingMagicChars || ''; + if (/^www\./i.test(link)) { + link = link.replace(/^www\./i, 'http://www.'); + } + if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) { + append = trailingPunctuation; + } + if (options.openLinksInNewWindow) { + target = ' target="¨E95Eblank"'; + } + return lmc + '' + lnkTxt + '' + append + tmc; + }; + }, + + replaceMail = function (options, globals) { + 'use strict'; + return function (wholeMatch, b, mail) { + var href = 'mailto:'; + b = b || ''; + mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals); + if (options.encodeEmails) { + href = showdown.helper.encodeEmailAddress(href + mail); + mail = showdown.helper.encodeEmailAddress(mail); + } else { + href = href + mail; + } + return b + '' + mail + ''; + }; + }; + +showdown.subParser('autoLinks', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('autoLinks.before', text, options, globals); + + text = text.replace(delimUrlRegex, replaceLink(options)); + text = text.replace(delimMailRegex, replaceMail(options, globals)); + + text = globals.converter._dispatch('autoLinks.after', text, options, globals); + + return text; +}); + +showdown.subParser('simplifiedAutoLinks', function (text, options, globals) { + 'use strict'; + + if (!options.simplifiedAutoLink) { + return text; + } + + text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals); + + if (options.excludeTrailingPunctuationFromURLs) { + text = text.replace(simpleURLRegex2, replaceLink(options)); + } else { + text = text.replace(simpleURLRegex, replaceLink(options)); + } + text = text.replace(simpleMailRegex, replaceMail(options, globals)); + + text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals); + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/blockGamut.js b/node_modules/showdown/src/subParsers/blockGamut.js new file mode 100644 index 0000000..b9de6fd --- /dev/null +++ b/node_modules/showdown/src/subParsers/blockGamut.js @@ -0,0 +1,32 @@ +/** + * These are all the transformations that form block-level + * tags like paragraphs, headers, and list items. + */ +showdown.subParser('blockGamut', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('blockGamut.before', text, options, globals); + + // we parse blockquotes first so that we can have headings and hrs + // inside blockquotes + text = showdown.subParser('blockQuotes')(text, options, globals); + text = showdown.subParser('headers')(text, options, globals); + + // Do Horizontal Rules: + text = showdown.subParser('horizontalRule')(text, options, globals); + + text = showdown.subParser('lists')(text, options, globals); + text = showdown.subParser('codeBlocks')(text, options, globals); + text = showdown.subParser('tables')(text, options, globals); + + // We already ran _HashHTMLBlocks() before, in Markdown(), but that + // was to escape raw HTML in the original Markdown source. This time, + // we're escaping the markup we've just created, so that we don't wrap + //

tags around block-level tags. + text = showdown.subParser('hashHTMLBlocks')(text, options, globals); + text = showdown.subParser('paragraphs')(text, options, globals); + + text = globals.converter._dispatch('blockGamut.after', text, options, globals); + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/blockQuotes.js b/node_modules/showdown/src/subParsers/blockQuotes.js new file mode 100644 index 0000000..2cf4174 --- /dev/null +++ b/node_modules/showdown/src/subParsers/blockQuotes.js @@ -0,0 +1,42 @@ +showdown.subParser('blockQuotes', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('blockQuotes.before', text, options, globals); + + // add a couple extra lines after the text and endtext mark + text = text + '\n\n'; + + var rgx = /(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm; + + if (options.splitAdjacentBlockquotes) { + rgx = /^ {0,3}>[\s\S]*?(?:\n\n)/gm; + } + + text = text.replace(rgx, function (bq) { + // attacklab: hack around Konqueror 3.5.4 bug: + // "----------bug".replace(/^-/g,"") == "bug" + bq = bq.replace(/^[ \t]*>[ \t]?/gm, ''); // trim one level of quoting + + // attacklab: clean up hack + bq = bq.replace(/¨0/g, ''); + + bq = bq.replace(/^[ \t]+$/gm, ''); // trim whitespace-only lines + bq = showdown.subParser('githubCodeBlocks')(bq, options, globals); + bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse + + bq = bq.replace(/(^|\n)/g, '$1 '); + // These leading spaces screw with

 content, so we need to fix that:
+    bq = bq.replace(/(\s*
[^\r]+?<\/pre>)/gm, function (wholeMatch, m1) {
+      var pre = m1;
+      // attacklab: hack around Konqueror 3.5.4 bug:
+      pre = pre.replace(/^  /mg, '¨0');
+      pre = pre.replace(/¨0/g, '');
+      return pre;
+    });
+
+    return showdown.subParser('hashBlock')('
\n' + bq + '\n
', options, globals); + }); + + text = globals.converter._dispatch('blockQuotes.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/codeBlocks.js b/node_modules/showdown/src/subParsers/codeBlocks.js new file mode 100644 index 0000000..7099d82 --- /dev/null +++ b/node_modules/showdown/src/subParsers/codeBlocks.js @@ -0,0 +1,38 @@ +/** + * Process Markdown `
` blocks.
+ */
+showdown.subParser('codeBlocks', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);
+
+  // sentinel workarounds for lack of \A and \Z, safari\khtml bug
+  text += '¨0';
+
+  var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;
+  text = text.replace(pattern, function (wholeMatch, m1, m2) {
+    var codeblock = m1,
+        nextChar = m2,
+        end = '\n';
+
+    codeblock = showdown.subParser('outdent')(codeblock, options, globals);
+    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
+    codeblock = showdown.subParser('detab')(codeblock, options, globals);
+    codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
+    codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing newlines
+
+    if (options.omitExtraWLInCodeBlocks) {
+      end = '';
+    }
+
+    codeblock = '
' + codeblock + end + '
'; + + return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar; + }); + + // strip sentinel + text = text.replace(/¨0/, ''); + + text = globals.converter._dispatch('codeBlocks.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/codeSpans.js b/node_modules/showdown/src/subParsers/codeSpans.js new file mode 100644 index 0000000..090234d --- /dev/null +++ b/node_modules/showdown/src/subParsers/codeSpans.js @@ -0,0 +1,48 @@ +/** + * + * * Backtick quotes are used for spans. + * + * * You can use multiple backticks as the delimiters if you want to + * include literal backticks in the code span. So, this input: + * + * Just type ``foo `bar` baz`` at the prompt. + * + * Will translate to: + * + *

Just type foo `bar` baz at the prompt.

+ * + * There's no arbitrary limit to the number of backticks you + * can use as delimters. If you need three consecutive backticks + * in your code, use four for delimiters, etc. + * + * * You can use spaces to get literal backticks at the edges: + * + * ... type `` `bar` `` ... + * + * Turns to: + * + * ... type `bar` ... + */ +showdown.subParser('codeSpans', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('codeSpans.before', text, options, globals); + + if (typeof(text) === 'undefined') { + text = ''; + } + text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, + function (wholeMatch, m1, m2, m3) { + var c = m3; + c = c.replace(/^([ \t]*)/g, ''); // leading whitespace + c = c.replace(/[ \t]*$/g, ''); // trailing whitespace + c = showdown.subParser('encodeCode')(c, options, globals); + c = m1 + '' + c + ''; + c = showdown.subParser('hashHTMLSpans')(c, options, globals); + return c; + } + ); + + text = globals.converter._dispatch('codeSpans.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/completeHTMLDocument.js b/node_modules/showdown/src/subParsers/completeHTMLDocument.js new file mode 100644 index 0000000..5252796 --- /dev/null +++ b/node_modules/showdown/src/subParsers/completeHTMLDocument.js @@ -0,0 +1,62 @@ +/** + * Create a full HTML document from the processed markdown + */ +showdown.subParser('completeHTMLDocument', function (text, options, globals) { + 'use strict'; + + if (!options.completeHTMLDocument) { + return text; + } + + text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals); + + var doctype = 'html', + doctypeParsed = '\n', + title = '', + charset = '\n', + lang = '', + metadata = ''; + + if (typeof globals.metadata.parsed.doctype !== 'undefined') { + doctypeParsed = '\n'; + doctype = globals.metadata.parsed.doctype.toString().toLowerCase(); + if (doctype === 'html' || doctype === 'html5') { + charset = ''; + } + } + + for (var meta in globals.metadata.parsed) { + if (globals.metadata.parsed.hasOwnProperty(meta)) { + switch (meta.toLowerCase()) { + case 'doctype': + break; + + case 'title': + title = '' + globals.metadata.parsed.title + '\n'; + break; + + case 'charset': + if (doctype === 'html' || doctype === 'html5') { + charset = '\n'; + } else { + charset = '\n'; + } + break; + + case 'language': + case 'lang': + lang = ' lang="' + globals.metadata.parsed[meta] + '"'; + metadata += '\n'; + break; + + default: + metadata += '\n'; + } + } + } + + text = doctypeParsed + '\n\n' + title + charset + metadata + '\n\n' + text.trim() + '\n\n'; + + text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/detab.js b/node_modules/showdown/src/subParsers/detab.js new file mode 100644 index 0000000..1fad02d --- /dev/null +++ b/node_modules/showdown/src/subParsers/detab.js @@ -0,0 +1,33 @@ +/** + * Convert all tabs to spaces + */ +showdown.subParser('detab', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('detab.before', text, options, globals); + + // expand first n-1 tabs + text = text.replace(/\t(?=\t)/g, ' '); // g_tab_width + + // replace the nth with two sentinels + text = text.replace(/\t/g, '¨A¨B'); + + // use the sentinel to anchor our regex so it doesn't explode + text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) { + var leadingText = m1, + numSpaces = 4 - leadingText.length % 4; // g_tab_width + + // there *must* be a better way to do this: + for (var i = 0; i < numSpaces; i++) { + leadingText += ' '; + } + + return leadingText; + }); + + // clean up sentinels + text = text.replace(/¨A/g, ' '); // g_tab_width + text = text.replace(/¨B/g, ''); + + text = globals.converter._dispatch('detab.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/ellipsis.js b/node_modules/showdown/src/subParsers/ellipsis.js new file mode 100644 index 0000000..ebfa3aa --- /dev/null +++ b/node_modules/showdown/src/subParsers/ellipsis.js @@ -0,0 +1,11 @@ +showdown.subParser('ellipsis', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('ellipsis.before', text, options, globals); + + text = text.replace(/\.\.\./g, '…'); + + text = globals.converter._dispatch('ellipsis.after', text, options, globals); + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/emoji.js b/node_modules/showdown/src/subParsers/emoji.js new file mode 100644 index 0000000..838b3cc --- /dev/null +++ b/node_modules/showdown/src/subParsers/emoji.js @@ -0,0 +1,27 @@ +/** + * Turn emoji codes into emojis + * + * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis + */ +showdown.subParser('emoji', function (text, options, globals) { + 'use strict'; + + if (!options.emoji) { + return text; + } + + text = globals.converter._dispatch('emoji.before', text, options, globals); + + var emojiRgx = /:([\S]+?):/g; + + text = text.replace(emojiRgx, function (wm, emojiCode) { + if (showdown.helper.emojis.hasOwnProperty(emojiCode)) { + return showdown.helper.emojis[emojiCode]; + } + return wm; + }); + + text = globals.converter._dispatch('emoji.after', text, options, globals); + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/encodeAmpsAndAngles.js b/node_modules/showdown/src/subParsers/encodeAmpsAndAngles.js new file mode 100644 index 0000000..b6f69d1 --- /dev/null +++ b/node_modules/showdown/src/subParsers/encodeAmpsAndAngles.js @@ -0,0 +1,23 @@ +/** + * Smart processing for ampersands and angle brackets that need to be encoded. + */ +showdown.subParser('encodeAmpsAndAngles', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals); + + // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: + // http://bumppo.net/projects/amputator/ + text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, '&'); + + // Encode naked <'s + text = text.replace(/<(?![a-z\/?$!])/gi, '<'); + + // Encode < + text = text.replace(/ + text = text.replace(/>/g, '>'); + + text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/encodeBackslashEscapes.js b/node_modules/showdown/src/subParsers/encodeBackslashEscapes.js new file mode 100644 index 0000000..7909ed9 --- /dev/null +++ b/node_modules/showdown/src/subParsers/encodeBackslashEscapes.js @@ -0,0 +1,21 @@ +/** + * Returns the string, with after processing the following backslash escape sequences. + * + * attacklab: The polite way to do this is with the new escapeCharacters() function: + * + * text = escapeCharacters(text,"\\",true); + * text = escapeCharacters(text,"`*_{}[]()>#+-.!",true); + * + * ...but we're sidestepping its use of the (slow) RegExp constructor + * as an optimization for Firefox. This function gets called a LOT. + */ +showdown.subParser('encodeBackslashEscapes', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals); + + text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback); + text = text.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback); + + text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/encodeCode.js b/node_modules/showdown/src/subParsers/encodeCode.js new file mode 100644 index 0000000..debda4d --- /dev/null +++ b/node_modules/showdown/src/subParsers/encodeCode.js @@ -0,0 +1,23 @@ +/** + * Encode/escape certain characters inside Markdown code runs. + * The point is that in code, these characters are literals, + * and lose their special Markdown meanings. + */ +showdown.subParser('encodeCode', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('encodeCode.before', text, options, globals); + + // Encode all ampersands; HTML entities are not + // entities within a Markdown code span. + text = text + .replace(/&/g, '&') + // Do the angle bracket song and dance: + .replace(//g, '>') + // Now, escape characters that are magic in Markdown: + .replace(/([*_{}\[\]\\=~-])/g, showdown.helper.escapeCharactersCallback); + + text = globals.converter._dispatch('encodeCode.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/escapeSpecialCharsWithinTagAttributes.js b/node_modules/showdown/src/subParsers/escapeSpecialCharsWithinTagAttributes.js new file mode 100644 index 0000000..80ff99d --- /dev/null +++ b/node_modules/showdown/src/subParsers/escapeSpecialCharsWithinTagAttributes.js @@ -0,0 +1,26 @@ +/** + * Within tags -- meaning between < and > -- encode [\ ` * _ ~ =] so they + * don't conflict with their use in Markdown for code, italics and strong. + */ +showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals); + + // Build a regex to find HTML tags. + var tags = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi, + comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi; + + text = text.replace(tags, function (wholeMatch) { + return wholeMatch + .replace(/(.)<\/?code>(?=.)/g, '$1`') + .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback); + }); + + text = text.replace(comments, function (wholeMatch) { + return wholeMatch + .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback); + }); + + text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/githubCodeBlocks.js b/node_modules/showdown/src/subParsers/githubCodeBlocks.js new file mode 100644 index 0000000..e5a2f1d --- /dev/null +++ b/node_modules/showdown/src/subParsers/githubCodeBlocks.js @@ -0,0 +1,46 @@ +/** + * Handle github codeblocks prior to running HashHTML so that + * HTML contained within the codeblock gets escaped properly + * Example: + * ```ruby + * def hello_world(x) + * puts "Hello, #{x}" + * end + * ``` + */ +showdown.subParser('githubCodeBlocks', function (text, options, globals) { + 'use strict'; + + // early exit if option is not enabled + if (!options.ghCodeBlocks) { + return text; + } + + text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals); + + text += '¨0'; + + text = text.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function (wholeMatch, delim, language, codeblock) { + var end = (options.omitExtraWLInCodeBlocks) ? '' : '\n'; + + // First parse the github code block + codeblock = showdown.subParser('encodeCode')(codeblock, options, globals); + codeblock = showdown.subParser('detab')(codeblock, options, globals); + codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines + codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing whitespace + + codeblock = '
' + codeblock + end + '
'; + + codeblock = showdown.subParser('hashBlock')(codeblock, options, globals); + + // Since GHCodeblocks can be false positives, we need to + // store the primitive text and the parsed text in a global var, + // and then return a token + return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n'; + }); + + // attacklab: strip sentinel + text = text.replace(/¨0/, ''); + + return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals); +}); diff --git a/node_modules/showdown/src/subParsers/hashBlock.js b/node_modules/showdown/src/subParsers/hashBlock.js new file mode 100644 index 0000000..ab166c3 --- /dev/null +++ b/node_modules/showdown/src/subParsers/hashBlock.js @@ -0,0 +1,8 @@ +showdown.subParser('hashBlock', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('hashBlock.before', text, options, globals); + text = text.replace(/(^\n+|\n+$)/g, ''); + text = '\n\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\n\n'; + text = globals.converter._dispatch('hashBlock.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/hashCodeTags.js b/node_modules/showdown/src/subParsers/hashCodeTags.js new file mode 100644 index 0000000..93a2c11 --- /dev/null +++ b/node_modules/showdown/src/subParsers/hashCodeTags.js @@ -0,0 +1,18 @@ +/** + * Hash and escape elements that should not be parsed as markdown + */ +showdown.subParser('hashCodeTags', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('hashCodeTags.before', text, options, globals); + + var repFunc = function (wholeMatch, match, left, right) { + var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right; + return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C'; + }; + + // Hash naked + text = showdown.helper.replaceRecursiveRegExp(text, repFunc, ']*>', '', 'gim'); + + text = globals.converter._dispatch('hashCodeTags.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/hashElement.js b/node_modules/showdown/src/subParsers/hashElement.js new file mode 100644 index 0000000..80ad42d --- /dev/null +++ b/node_modules/showdown/src/subParsers/hashElement.js @@ -0,0 +1,19 @@ +showdown.subParser('hashElement', function (text, options, globals) { + 'use strict'; + + return function (wholeMatch, m1) { + var blockText = m1; + + // Undo double lines + blockText = blockText.replace(/\n\n/g, '\n'); + blockText = blockText.replace(/^\n/, ''); + + // strip trailing blank lines + blockText = blockText.replace(/\n+$/g, ''); + + // Replace the element text with a marker ("¨KxK" where x is its key) + blockText = '\n\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\n\n'; + + return blockText; + }; +}); diff --git a/node_modules/showdown/src/subParsers/hashHTMLBlocks.js b/node_modules/showdown/src/subParsers/hashHTMLBlocks.js new file mode 100644 index 0000000..b16b103 --- /dev/null +++ b/node_modules/showdown/src/subParsers/hashHTMLBlocks.js @@ -0,0 +1,98 @@ +showdown.subParser('hashHTMLBlocks', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals); + + var blockTags = [ + 'pre', + 'div', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'blockquote', + 'table', + 'dl', + 'ol', + 'ul', + 'script', + 'noscript', + 'form', + 'fieldset', + 'iframe', + 'math', + 'style', + 'section', + 'header', + 'footer', + 'nav', + 'article', + 'aside', + 'address', + 'audio', + 'canvas', + 'figure', + 'hgroup', + 'output', + 'video', + 'p' + ], + repFunc = function (wholeMatch, match, left, right) { + var txt = wholeMatch; + // check if this html element is marked as markdown + // if so, it's contents should be parsed as markdown + if (left.search(/\bmarkdown\b/) !== -1) { + txt = left + globals.converter.makeHtml(match) + right; + } + return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n'; + }; + + if (options.backslashEscapesHTMLTags) { + // encode backslash escaped HTML tags + text = text.replace(/\\<(\/?[^>]+?)>/g, function (wm, inside) { + return '<' + inside + '>'; + }); + } + + // hash HTML Blocks + for (var i = 0; i < blockTags.length; ++i) { + + var opTagPos, + rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\b[^>]*>)', 'im'), + patLeft = '<' + blockTags[i] + '\\b[^>]*>', + patRight = ''; + // 1. Look for the first position of the first opening HTML tag in the text + while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) { + + // if the HTML tag is \ escaped, we need to escape it and break + + + //2. Split the text in that position + var subTexts = showdown.helper.splitAtIndex(text, opTagPos), + //3. Match recursively + newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im'); + + // prevent an infinite loop + if (newSubText1 === subTexts[1]) { + break; + } + text = subTexts[0].concat(newSubText1); + } + } + // HR SPECIAL CASE + text = text.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, + showdown.subParser('hashElement')(text, options, globals)); + + // Special case for standalone HTML comments + text = showdown.helper.replaceRecursiveRegExp(text, function (txt) { + return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n'; + }, '^ {0,3}', 'gm'); + + // PHP and ASP-style processor instructions ( and <%...%>) + text = text.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, + showdown.subParser('hashElement')(text, options, globals)); + + text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/hashHTMLSpans.js b/node_modules/showdown/src/subParsers/hashHTMLSpans.js new file mode 100644 index 0000000..545aa92 --- /dev/null +++ b/node_modules/showdown/src/subParsers/hashHTMLSpans.js @@ -0,0 +1,64 @@ +/** + * Hash span elements that should not be parsed as markdown + */ +showdown.subParser('hashHTMLSpans', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals); + + function hashHTMLSpan (html) { + return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C'; + } + + // Hash Self Closing tags + text = text.replace(/<[^>]+?\/>/gi, function (wm) { + return hashHTMLSpan(wm); + }); + + // Hash tags without properties + text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function (wm) { + return hashHTMLSpan(wm); + }); + + // Hash tags with properties + text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function (wm) { + return hashHTMLSpan(wm); + }); + + // Hash self closing tags without /> + text = text.replace(/<[^>]+?>/gi, function (wm) { + return hashHTMLSpan(wm); + }); + + /*showdown.helper.matchRecursiveRegExp(text, ']*>', '', 'gi');*/ + + text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals); + return text; +}); + +/** + * Unhash HTML spans + */ +showdown.subParser('unhashHTMLSpans', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals); + + for (var i = 0; i < globals.gHtmlSpans.length; ++i) { + var repText = globals.gHtmlSpans[i], + // limiter to prevent infinite loop (assume 10 as limit for recurse) + limit = 0; + + while (/¨C(\d+)C/.test(repText)) { + var num = RegExp.$1; + repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]); + if (limit === 10) { + console.error('maximum nesting of 10 spans reached!!!'); + break; + } + ++limit; + } + text = text.replace('¨C' + i + 'C', repText); + } + + text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/hashPreCodeTags.js b/node_modules/showdown/src/subParsers/hashPreCodeTags.js new file mode 100644 index 0000000..87113f3 --- /dev/null +++ b/node_modules/showdown/src/subParsers/hashPreCodeTags.js @@ -0,0 +1,19 @@ +/** + * Hash and escape
 elements that should not be parsed as markdown
+ */
+showdown.subParser('hashPreCodeTags', function (text, options, globals) {
+  'use strict';
+  text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);
+
+  var repFunc = function (wholeMatch, match, left, right) {
+    // encode html entities
+    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
+    return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
+  };
+
+  // Hash 

+  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}]*>\\s*]*>', '^ {0,3}\\s*
', 'gim'); + + text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/headers.js b/node_modules/showdown/src/subParsers/headers.js new file mode 100644 index 0000000..2d0e8a3 --- /dev/null +++ b/node_modules/showdown/src/subParsers/headers.js @@ -0,0 +1,126 @@ +showdown.subParser('headers', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('headers.before', text, options, globals); + + var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart), + + // Set text-style headers: + // Header 1 + // ======== + // + // Header 2 + // -------- + // + setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm, + setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm; + + text = text.replace(setextRegexH1, function (wholeMatch, m1) { + + var spanGamut = showdown.subParser('spanGamut')(m1, options, globals), + hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"', + hLevel = headerLevelStart, + hashBlock = '' + spanGamut + ''; + return showdown.subParser('hashBlock')(hashBlock, options, globals); + }); + + text = text.replace(setextRegexH2, function (matchFound, m1) { + var spanGamut = showdown.subParser('spanGamut')(m1, options, globals), + hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"', + hLevel = headerLevelStart + 1, + hashBlock = '' + spanGamut + ''; + return showdown.subParser('hashBlock')(hashBlock, options, globals); + }); + + // atx-style headers: + // # Header 1 + // ## Header 2 + // ## Header 2 with closing hashes ## + // ... + // ###### Header 6 + // + var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm; + + text = text.replace(atxStyle, function (wholeMatch, m1, m2) { + var hText = m2; + if (options.customizedHeaderId) { + hText = m2.replace(/\s?\{([^{]+?)}\s*$/, ''); + } + + var span = showdown.subParser('spanGamut')(hText, options, globals), + hID = (options.noHeaderId) ? '' : ' id="' + headerId(m2) + '"', + hLevel = headerLevelStart - 1 + m1.length, + header = '' + span + ''; + + return showdown.subParser('hashBlock')(header, options, globals); + }); + + function headerId (m) { + var title, + prefix; + + // It is separate from other options to allow combining prefix and customized + if (options.customizedHeaderId) { + var match = m.match(/\{([^{]+?)}\s*$/); + if (match && match[1]) { + m = match[1]; + } + } + + title = m; + + // Prefix id to prevent causing inadvertent pre-existing style matches. + if (showdown.helper.isString(options.prefixHeaderId)) { + prefix = options.prefixHeaderId; + } else if (options.prefixHeaderId === true) { + prefix = 'section-'; + } else { + prefix = ''; + } + + if (!options.rawPrefixHeaderId) { + title = prefix + title; + } + + if (options.ghCompatibleHeaderId) { + title = title + .replace(/ /g, '-') + // replace previously escaped chars (&, ¨ and $) + .replace(/&/g, '') + .replace(/¨T/g, '') + .replace(/¨D/g, '') + // replace rest of the chars (&~$ are repeated as they might have been escaped) + // borrowed from github's redcarpet (some they should produce similar results) + .replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, '') + .toLowerCase(); + } else if (options.rawHeaderId) { + title = title + .replace(/ /g, '-') + // replace previously escaped chars (&, ¨ and $) + .replace(/&/g, '&') + .replace(/¨T/g, '¨') + .replace(/¨D/g, '$') + // replace " and ' + .replace(/["']/g, '-') + .toLowerCase(); + } else { + title = title + .replace(/[^\w]/g, '') + .toLowerCase(); + } + + if (options.rawPrefixHeaderId) { + title = prefix + title; + } + + if (globals.hashLinkCounts[title]) { + title = title + '-' + (globals.hashLinkCounts[title]++); + } else { + globals.hashLinkCounts[title] = 1; + } + return title; + } + + text = globals.converter._dispatch('headers.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/horizontalRule.js b/node_modules/showdown/src/subParsers/horizontalRule.js new file mode 100644 index 0000000..e8e98e2 --- /dev/null +++ b/node_modules/showdown/src/subParsers/horizontalRule.js @@ -0,0 +1,15 @@ +/** + * Turn Markdown link shortcuts into XHTML tags. + */ +showdown.subParser('horizontalRule', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('horizontalRule.before', text, options, globals); + + var key = showdown.subParser('hashBlock')('
', options, globals); + text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key); + text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key); + text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key); + + text = globals.converter._dispatch('horizontalRule.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/images.js b/node_modules/showdown/src/subParsers/images.js new file mode 100644 index 0000000..e3d8e06 --- /dev/null +++ b/node_modules/showdown/src/subParsers/images.js @@ -0,0 +1,104 @@ +/** + * Turn Markdown image shortcuts into tags. + */ +showdown.subParser('images', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('images.before', text, options, globals); + + var inlineRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, + crazyRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g, + base64RegExp = /!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, + referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g, + refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g; + + function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) { + url = url.replace(/\s/g, ''); + return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title); + } + + function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) { + + var gUrls = globals.gUrls, + gTitles = globals.gTitles, + gDims = globals.gDimensions; + + linkId = linkId.toLowerCase(); + + if (!title) { + title = ''; + } + // Special case for explicit empty url + if (wholeMatch.search(/\(? ?(['"].*['"])?\)$/m) > -1) { + url = ''; + + } else if (url === '' || url === null) { + if (linkId === '' || linkId === null) { + // lower-case and turn embedded newlines into spaces + linkId = altText.toLowerCase().replace(/ ?\n/g, ' '); + } + url = '#' + linkId; + + if (!showdown.helper.isUndefined(gUrls[linkId])) { + url = gUrls[linkId]; + if (!showdown.helper.isUndefined(gTitles[linkId])) { + title = gTitles[linkId]; + } + if (!showdown.helper.isUndefined(gDims[linkId])) { + width = gDims[linkId].width; + height = gDims[linkId].height; + } + } else { + return wholeMatch; + } + } + + altText = altText + .replace(/"/g, '"') + //altText = showdown.helper.escapeCharacters(altText, '*_', false); + .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); + //url = showdown.helper.escapeCharacters(url, '*_', false); + url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); + var result = '' + altText + 'x "optional title") + + // base64 encoded images + text = text.replace(base64RegExp, writeImageTagBase64); + + // cases with crazy urls like ./image/cat1).png + text = text.replace(crazyRegExp, writeImageTag); + + // normal cases + text = text.replace(inlineRegExp, writeImageTag); + + // handle reference-style shortcuts: ![img text] + text = text.replace(refShortcutRegExp, writeImageTag); + + text = globals.converter._dispatch('images.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/italicsAndBold.js b/node_modules/showdown/src/subParsers/italicsAndBold.js new file mode 100644 index 0000000..11842da --- /dev/null +++ b/node_modules/showdown/src/subParsers/italicsAndBold.js @@ -0,0 +1,70 @@ +showdown.subParser('italicsAndBold', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('italicsAndBold.before', text, options, globals); + + // it's faster to have 3 separate regexes for each case than have just one + // because of backtracing, in some cases, it could lead to an exponential effect + // called "catastrophic backtrace". Ominous! + + function parseInside (txt, left, right) { + /* + if (options.simplifiedAutoLink) { + txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals); + } + */ + return left + txt + right; + } + + // Parse underscores + if (options.literalMidWordUnderscores) { + text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) { + return parseInside (txt, '', ''); + }); + text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) { + return parseInside (txt, '', ''); + }); + text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function (wm, txt) { + return parseInside (txt, '', ''); + }); + } else { + text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) { + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) { + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + text = text.replace(/_([^\s_][\s\S]*?)_/g, function (wm, m) { + // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it) + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + } + + // Now parse asterisks + if (options.literalMidWordAsterisks) { + text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function (wm, lead, txt) { + return parseInside (txt, lead + '', ''); + }); + text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function (wm, lead, txt) { + return parseInside (txt, lead + '', ''); + }); + text = text.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function (wm, lead, txt) { + return parseInside (txt, lead + '', ''); + }); + } else { + text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function (wm, m) { + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + text = text.replace(/\*\*(\S[\s\S]*?)\*\*/g, function (wm, m) { + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + text = text.replace(/\*([^\s*][\s\S]*?)\*/g, function (wm, m) { + // !/^\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it) + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + } + + + text = globals.converter._dispatch('italicsAndBold.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/lists.js b/node_modules/showdown/src/subParsers/lists.js new file mode 100644 index 0000000..d9556ff --- /dev/null +++ b/node_modules/showdown/src/subParsers/lists.js @@ -0,0 +1,203 @@ +/** + * Form HTML ordered (numbered) and unordered (bulleted) lists. + */ +showdown.subParser('lists', function (text, options, globals) { + 'use strict'; + + /** + * Process the contents of a single ordered or unordered list, splitting it + * into individual list items. + * @param {string} listStr + * @param {boolean} trimTrailing + * @returns {string} + */ + function processListItems (listStr, trimTrailing) { + // The $g_list_level global keeps track of when we're inside a list. + // Each time we enter a list, we increment it; when we leave a list, + // we decrement. If it's zero, we're not in a list anymore. + // + // We do this because when we're not inside a list, we want to treat + // something like this: + // + // I recommend upgrading to version + // 8. Oops, now this line is treated + // as a sub-list. + // + // As a single paragraph, despite the fact that the second line starts + // with a digit-period-space sequence. + // + // Whereas when we're inside a list (or sub-list), that line will be + // treated as the start of a sub-list. What a kludge, huh? This is + // an aspect of Markdown's syntax that's hard to parse perfectly + // without resorting to mind-reading. Perhaps the solution is to + // change the syntax rules such that sub-lists must start with a + // starting cardinal number; e.g. "1." or "a.". + globals.gListLevel++; + + // trim trailing blank lines: + listStr = listStr.replace(/\n{2,}$/, '\n'); + + // attacklab: add sentinel to emulate \z + listStr += '¨0'; + + var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm, + isParagraphed = (/\n[ \t]*\n(?!¨0)/.test(listStr)); + + // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation, + // which is a syntax breaking change + // activating this option reverts to old behavior + if (options.disableForced4SpacesIndentedSublists) { + rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm; + } + + listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) { + checked = (checked && checked.trim() !== ''); + + var item = showdown.subParser('outdent')(m4, options, globals), + bulletStyle = ''; + + // Support for github tasklists + if (taskbtn && options.tasklists) { + bulletStyle = ' class="task-list-item" style="list-style-type: none;"'; + item = item.replace(/^[ \t]*\[(x|X| )?]/m, function () { + var otp = '
  • a
  • + // instead of: + //
    • - - a
    + // So, to prevent it, we will put a marker (¨A)in the beginning of the line + // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser + item = item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function (wm2) { + return '¨A' + wm2; + }); + + // m1 - Leading line or + // Has a double return (multi paragraph) or + // Has sublist + if (m1 || (item.search(/\n{2,}/) > -1)) { + item = showdown.subParser('githubCodeBlocks')(item, options, globals); + item = showdown.subParser('blockGamut')(item, options, globals); + } else { + // Recursion for sub-lists: + item = showdown.subParser('lists')(item, options, globals); + item = item.replace(/\n$/, ''); // chomp(item) + item = showdown.subParser('hashHTMLBlocks')(item, options, globals); + + // Colapse double linebreaks + item = item.replace(/\n\n+/g, '\n\n'); + if (isParagraphed) { + item = showdown.subParser('paragraphs')(item, options, globals); + } else { + item = showdown.subParser('spanGamut')(item, options, globals); + } + } + + // now we need to remove the marker (¨A) + item = item.replace('¨A', ''); + // we can finally wrap the line in list item tags + item = '' + item + '\n'; + + return item; + }); + + // attacklab: strip sentinel + listStr = listStr.replace(/¨0/g, ''); + + globals.gListLevel--; + + if (trimTrailing) { + listStr = listStr.replace(/\s+$/, ''); + } + + return listStr; + } + + function styleStartNumber (list, listType) { + // check if ol and starts by a number different than 1 + if (listType === 'ol') { + var res = list.match(/^ *(\d+)\./); + if (res && res[1] !== '1') { + return ' start="' + res[1] + '"'; + } + } + return ''; + } + + /** + * Check and parse consecutive lists (better fix for issue #142) + * @param {string} list + * @param {string} listType + * @param {boolean} trimTrailing + * @returns {string} + */ + function parseConsecutiveLists (list, listType, trimTrailing) { + // check if we caught 2 or more consecutive lists by mistake + // we use the counterRgx, meaning if listType is UL we look for OL and vice versa + var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\d+\.[ \t]/gm : /^ {0,3}\d+\.[ \t]/gm, + ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \t]/gm : /^ {0,3}[*+-][ \t]/gm, + counterRxg = (listType === 'ul') ? olRgx : ulRgx, + result = ''; + + if (list.search(counterRxg) !== -1) { + (function parseCL (txt) { + var pos = txt.search(counterRxg), + style = styleStartNumber(list, listType); + if (pos !== -1) { + // slice + result += '\n\n<' + listType + style + '>\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '\n'; + + // invert counterType and listType + listType = (listType === 'ul') ? 'ol' : 'ul'; + counterRxg = (listType === 'ul') ? olRgx : ulRgx; + + //recurse + parseCL(txt.slice(pos)); + } else { + result += '\n\n<' + listType + style + '>\n' + processListItems(txt, !!trimTrailing) + '\n'; + } + })(list); + } else { + var style = styleStartNumber(list, listType); + result = '\n\n<' + listType + style + '>\n' + processListItems(list, !!trimTrailing) + '\n'; + } + + return result; + } + + /** Start of list parsing **/ + text = globals.converter._dispatch('lists.before', text, options, globals); + // add sentinel to hack around khtml/safari bug: + // http://bugs.webkit.org/show_bug.cgi?id=11231 + text += '¨0'; + + if (globals.gListLevel) { + text = text.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, + function (wholeMatch, list, m2) { + var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol'; + return parseConsecutiveLists(list, listType, true); + } + ); + } else { + text = text.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, + function (wholeMatch, m1, list, m3) { + var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol'; + return parseConsecutiveLists(list, listType, false); + } + ); + } + + // strip sentinel + text = text.replace(/¨0/, ''); + text = globals.converter._dispatch('lists.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/blockquote.js b/node_modules/showdown/src/subParsers/makeMarkdown/blockquote.js new file mode 100644 index 0000000..143e5a8 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/blockquote.js @@ -0,0 +1,22 @@ +showdown.subParser('makeMarkdown.blockquote', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + var children = node.childNodes, + childrenLength = children.length; + + for (var i = 0; i < childrenLength; ++i) { + var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals); + + if (innerTxt === '') { + continue; + } + txt += innerTxt; + } + } + // cleanup + txt = txt.trim(); + txt = '> ' + txt.split('\n').join('\n> '); + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/codeBlock.js b/node_modules/showdown/src/subParsers/makeMarkdown/codeBlock.js new file mode 100644 index 0000000..bf8cf17 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/codeBlock.js @@ -0,0 +1,7 @@ +showdown.subParser('makeMarkdown.codeBlock', function (node, globals) { + 'use strict'; + + var lang = node.getAttribute('language'), + num = node.getAttribute('precodenum'); + return '```' + lang + '\n' + globals.preList[num] + '\n```'; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/codeSpan.js b/node_modules/showdown/src/subParsers/makeMarkdown/codeSpan.js new file mode 100644 index 0000000..da90429 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/codeSpan.js @@ -0,0 +1,5 @@ +showdown.subParser('makeMarkdown.codeSpan', function (node) { + 'use strict'; + + return '`' + node.innerHTML + '`'; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/emphasis.js b/node_modules/showdown/src/subParsers/makeMarkdown/emphasis.js new file mode 100644 index 0000000..283cd02 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/emphasis.js @@ -0,0 +1,15 @@ +showdown.subParser('makeMarkdown.emphasis', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + txt += '*'; + var children = node.childNodes, + childrenLength = children.length; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + txt += '*'; + } + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/header.js b/node_modules/showdown/src/subParsers/makeMarkdown/header.js new file mode 100644 index 0000000..9a1b0c5 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/header.js @@ -0,0 +1,17 @@ +showdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) { + 'use strict'; + + var headerMark = new Array(headerLevel + 1).join('#'), + txt = ''; + + if (node.hasChildNodes()) { + txt = headerMark + ' '; + var children = node.childNodes, + childrenLength = children.length; + + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + } + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/hr.js b/node_modules/showdown/src/subParsers/makeMarkdown/hr.js new file mode 100644 index 0000000..555451f --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/hr.js @@ -0,0 +1,5 @@ +showdown.subParser('makeMarkdown.hr', function () { + 'use strict'; + + return '---'; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/image.js b/node_modules/showdown/src/subParsers/makeMarkdown/image.js new file mode 100644 index 0000000..b5fa039 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/image.js @@ -0,0 +1,18 @@ +showdown.subParser('makeMarkdown.image', function (node) { + 'use strict'; + + var txt = ''; + if (node.hasAttribute('src')) { + txt += '![' + node.getAttribute('alt') + ']('; + txt += '<' + node.getAttribute('src') + '>'; + if (node.hasAttribute('width') && node.hasAttribute('height')) { + txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height'); + } + + if (node.hasAttribute('title')) { + txt += ' "' + node.getAttribute('title') + '"'; + } + txt += ')'; + } + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/links.js b/node_modules/showdown/src/subParsers/makeMarkdown/links.js new file mode 100644 index 0000000..6b23255 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/links.js @@ -0,0 +1,20 @@ +showdown.subParser('makeMarkdown.links', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes() && node.hasAttribute('href')) { + var children = node.childNodes, + childrenLength = children.length; + txt = '['; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + txt += ']('; + txt += '<' + node.getAttribute('href') + '>'; + if (node.hasAttribute('title')) { + txt += ' "' + node.getAttribute('title') + '"'; + } + txt += ')'; + } + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/list.js b/node_modules/showdown/src/subParsers/makeMarkdown/list.js new file mode 100644 index 0000000..7882e1b --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/list.js @@ -0,0 +1,33 @@ +showdown.subParser('makeMarkdown.list', function (node, globals, type) { + 'use strict'; + + var txt = ''; + if (!node.hasChildNodes()) { + return ''; + } + var listItems = node.childNodes, + listItemsLenght = listItems.length, + listNum = node.getAttribute('start') || 1; + + for (var i = 0; i < listItemsLenght; ++i) { + if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') { + continue; + } + + // define the bullet to use in list + var bullet = ''; + if (type === 'ol') { + bullet = listNum.toString() + '. '; + } else { + bullet = '- '; + } + + // parse list item + txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals); + ++listNum; + } + + // add comment at the end to prevent consecutive lists to be parsed as one + txt += '\n\n'; + return txt.trim(); +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/listItem.js b/node_modules/showdown/src/subParsers/makeMarkdown/listItem.js new file mode 100644 index 0000000..bccd2a0 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/listItem.js @@ -0,0 +1,25 @@ +showdown.subParser('makeMarkdown.listItem', function (node, globals) { + 'use strict'; + + var listItemTxt = ''; + + var children = node.childNodes, + childrenLenght = children.length; + + for (var i = 0; i < childrenLenght; ++i) { + listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + // if it's only one liner, we need to add a newline at the end + if (!/\n$/.test(listItemTxt)) { + listItemTxt += '\n'; + } else { + // it's multiparagraph, so we need to indent + listItemTxt = listItemTxt + .split('\n') + .join('\n ') + .replace(/^ {4}$/gm, '') + .replace(/\n\n+/g, '\n\n'); + } + + return listItemTxt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/node.js b/node_modules/showdown/src/subParsers/makeMarkdown/node.js new file mode 100644 index 0000000..67ab585 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/node.js @@ -0,0 +1,120 @@ + + +showdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) { + 'use strict'; + + spansOnly = spansOnly || false; + + var txt = ''; + + // edge case of text without wrapper paragraph + if (node.nodeType === 3) { + return showdown.subParser('makeMarkdown.txt')(node, globals); + } + + // HTML comment + if (node.nodeType === 8) { + return '\n\n'; + } + + // process only node elements + if (node.nodeType !== 1) { + return ''; + } + + var tagName = node.tagName.toLowerCase(); + + switch (tagName) { + + // + // BLOCKS + // + case 'h1': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\n\n'; } + break; + case 'h2': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\n\n'; } + break; + case 'h3': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\n\n'; } + break; + case 'h4': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\n\n'; } + break; + case 'h5': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\n\n'; } + break; + case 'h6': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\n\n'; } + break; + + case 'p': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\n\n'; } + break; + + case 'blockquote': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\n\n'; } + break; + + case 'hr': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\n\n'; } + break; + + case 'ol': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\n\n'; } + break; + + case 'ul': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\n\n'; } + break; + + case 'precode': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\n\n'; } + break; + + case 'pre': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\n\n'; } + break; + + case 'table': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\n\n'; } + break; + + // + // SPANS + // + case 'code': + txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals); + break; + + case 'em': + case 'i': + txt = showdown.subParser('makeMarkdown.emphasis')(node, globals); + break; + + case 'strong': + case 'b': + txt = showdown.subParser('makeMarkdown.strong')(node, globals); + break; + + case 'del': + txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals); + break; + + case 'a': + txt = showdown.subParser('makeMarkdown.links')(node, globals); + break; + + case 'img': + txt = showdown.subParser('makeMarkdown.image')(node, globals); + break; + + default: + txt = node.outerHTML + '\n\n'; + } + + // common normalization + // TODO eventually + + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/paragraph.js b/node_modules/showdown/src/subParsers/makeMarkdown/paragraph.js new file mode 100644 index 0000000..f899d59 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/paragraph.js @@ -0,0 +1,17 @@ +showdown.subParser('makeMarkdown.paragraph', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + var children = node.childNodes, + childrenLength = children.length; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + } + + // some text normalization + txt = txt.trim(); + + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/pre.js b/node_modules/showdown/src/subParsers/makeMarkdown/pre.js new file mode 100644 index 0000000..621701a --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/pre.js @@ -0,0 +1,6 @@ +showdown.subParser('makeMarkdown.pre', function (node, globals) { + 'use strict'; + + var num = node.getAttribute('prenum'); + return '
    ' + globals.preList[num] + '
    '; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/strikethrough.js b/node_modules/showdown/src/subParsers/makeMarkdown/strikethrough.js new file mode 100644 index 0000000..0676b86 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/strikethrough.js @@ -0,0 +1,15 @@ +showdown.subParser('makeMarkdown.strikethrough', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + txt += '~~'; + var children = node.childNodes, + childrenLength = children.length; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + txt += '~~'; + } + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/strong.js b/node_modules/showdown/src/subParsers/makeMarkdown/strong.js new file mode 100644 index 0000000..05ae9bc --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/strong.js @@ -0,0 +1,15 @@ +showdown.subParser('makeMarkdown.strong', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + txt += '**'; + var children = node.childNodes, + childrenLength = children.length; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + txt += '**'; + } + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/table.js b/node_modules/showdown/src/subParsers/makeMarkdown/table.js new file mode 100644 index 0000000..1fb1f94 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/table.js @@ -0,0 +1,70 @@ +showdown.subParser('makeMarkdown.table', function (node, globals) { + 'use strict'; + + var txt = '', + tableArray = [[], []], + headings = node.querySelectorAll('thead>tr>th'), + rows = node.querySelectorAll('tbody>tr'), + i, ii; + for (i = 0; i < headings.length; ++i) { + var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals), + allign = '---'; + + if (headings[i].hasAttribute('style')) { + var style = headings[i].getAttribute('style').toLowerCase().replace(/\s/g, ''); + switch (style) { + case 'text-align:left;': + allign = ':---'; + break; + case 'text-align:right;': + allign = '---:'; + break; + case 'text-align:center;': + allign = ':---:'; + break; + } + } + tableArray[0][i] = headContent.trim(); + tableArray[1][i] = allign; + } + + for (i = 0; i < rows.length; ++i) { + var r = tableArray.push([]) - 1, + cols = rows[i].getElementsByTagName('td'); + + for (ii = 0; ii < headings.length; ++ii) { + var cellContent = ' '; + if (typeof cols[ii] !== 'undefined') { + cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals); + } + tableArray[r].push(cellContent); + } + } + + var cellSpacesCount = 3; + for (i = 0; i < tableArray.length; ++i) { + for (ii = 0; ii < tableArray[i].length; ++ii) { + var strLen = tableArray[i][ii].length; + if (strLen > cellSpacesCount) { + cellSpacesCount = strLen; + } + } + } + + for (i = 0; i < tableArray.length; ++i) { + for (ii = 0; ii < tableArray[i].length; ++ii) { + if (i === 1) { + if (tableArray[i][ii].slice(-1) === ':') { + tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':'; + } else { + tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-'); + } + } else { + tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount); + } + } + txt += '| ' + tableArray[i].join(' | ') + ' |\n'; + } + + return txt.trim(); +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/tableCell.js b/node_modules/showdown/src/subParsers/makeMarkdown/tableCell.js new file mode 100644 index 0000000..b318ff1 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/tableCell.js @@ -0,0 +1,15 @@ +showdown.subParser('makeMarkdown.tableCell', function (node, globals) { + 'use strict'; + + var txt = ''; + if (!node.hasChildNodes()) { + return ''; + } + var children = node.childNodes, + childrenLength = children.length; + + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true); + } + return txt.trim(); +}); diff --git a/node_modules/showdown/src/subParsers/makeMarkdown/txt.js b/node_modules/showdown/src/subParsers/makeMarkdown/txt.js new file mode 100644 index 0000000..a231bc4 --- /dev/null +++ b/node_modules/showdown/src/subParsers/makeMarkdown/txt.js @@ -0,0 +1,43 @@ +showdown.subParser('makeMarkdown.txt', function (node) { + 'use strict'; + + var txt = node.nodeValue; + + // multiple spaces are collapsed + txt = txt.replace(/ +/g, ' '); + + // replace the custom ¨NBSP; with a space + txt = txt.replace(/¨NBSP;/g, ' '); + + // ", <, > and & should replace escaped html entities + txt = showdown.helper.unescapeHTMLEntities(txt); + + // escape markdown magic characters + // emphasis, strong and strikethrough - can appear everywhere + // we also escape pipe (|) because of tables + // and escape ` because of code blocks and spans + txt = txt.replace(/([*_~|`])/g, '\\$1'); + + // escape > because of blockquotes + txt = txt.replace(/^(\s*)>/g, '\\$1>'); + + // hash character, only troublesome at the beginning of a line because of headers + txt = txt.replace(/^#/gm, '\\#'); + + // horizontal rules + txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, '$1\\$2$3'); + + // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer + txt = txt.replace(/^( {0,3}\d+)\./gm, '$1\\.'); + + // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped) + txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\$2'); + + // images and links, ] followed by ( is problematic, so we escape it + txt = txt.replace(/]([\s]*)\(/g, '\\]$1\\('); + + // reference URIs must also be escaped + txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, '\\[$1]:'); + + return txt; +}); diff --git a/node_modules/showdown/src/subParsers/metadata.js b/node_modules/showdown/src/subParsers/metadata.js new file mode 100644 index 0000000..d601723 --- /dev/null +++ b/node_modules/showdown/src/subParsers/metadata.js @@ -0,0 +1,49 @@ +/** + * Parse metadata at the top of the document + */ +showdown.subParser('metadata', function (text, options, globals) { + 'use strict'; + + if (!options.metadata) { + return text; + } + + text = globals.converter._dispatch('metadata.before', text, options, globals); + + function parseMetadataContents (content) { + // raw is raw so it's not changed in any way + globals.metadata.raw = content; + + // escape chars forbidden in html attributes + // double quotes + content = content + // ampersand first + .replace(/&/g, '&') + // double quotes + .replace(/"/g, '"'); + + content = content.replace(/\n {4}/g, ' '); + content.replace(/^([\S ]+): +([\s\S]+?)$/gm, function (wm, key, value) { + globals.metadata.parsed[key] = value; + return ''; + }); + } + + text = text.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/, function (wholematch, format, content) { + parseMetadataContents(content); + return '¨M'; + }); + + text = text.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/, function (wholematch, format, content) { + if (format) { + globals.metadata.format = format; + } + parseMetadataContents(content); + return '¨M'; + }); + + text = text.replace(/¨M/g, ''); + + text = globals.converter._dispatch('metadata.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/outdent.js b/node_modules/showdown/src/subParsers/outdent.js new file mode 100644 index 0000000..5e26714 --- /dev/null +++ b/node_modules/showdown/src/subParsers/outdent.js @@ -0,0 +1,17 @@ +/** + * Remove one level of line-leading tabs or spaces + */ +showdown.subParser('outdent', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('outdent.before', text, options, globals); + + // attacklab: hack around Konqueror 3.5.4 bug: + // "----------bug".replace(/^-/g,"") == "bug" + text = text.replace(/^(\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width + + // attacklab: clean up hack + text = text.replace(/¨0/g, ''); + + text = globals.converter._dispatch('outdent.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/paragraphs.js b/node_modules/showdown/src/subParsers/paragraphs.js new file mode 100644 index 0000000..dfb804d --- /dev/null +++ b/node_modules/showdown/src/subParsers/paragraphs.js @@ -0,0 +1,70 @@ +/** + * + */ +showdown.subParser('paragraphs', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('paragraphs.before', text, options, globals); + // Strip leading and trailing lines: + text = text.replace(/^\n+/g, ''); + text = text.replace(/\n+$/g, ''); + + var grafs = text.split(/\n{2,}/g), + grafsOut = [], + end = grafs.length; // Wrap

    tags + + for (var i = 0; i < end; i++) { + var str = grafs[i]; + // if this is an HTML marker, copy it + if (str.search(/¨(K|G)(\d+)\1/g) >= 0) { + grafsOut.push(str); + + // test for presence of characters to prevent empty lines being parsed + // as paragraphs (resulting in undesired extra empty paragraphs) + } else if (str.search(/\S/) >= 0) { + str = showdown.subParser('spanGamut')(str, options, globals); + str = str.replace(/^([ \t]*)/g, '

    '); + str += '

    '; + grafsOut.push(str); + } + } + + /** Unhashify HTML blocks */ + end = grafsOut.length; + for (i = 0; i < end; i++) { + var blockText = '', + grafsOutIt = grafsOut[i], + codeFlag = false; + // if this is a marker for an html block... + // use RegExp.test instead of string.search because of QML bug + while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) { + var delim = RegExp.$1, + num = RegExp.$2; + + if (delim === 'K') { + blockText = globals.gHtmlBlocks[num]; + } else { + // we need to check if ghBlock is a false positive + if (codeFlag) { + // use encoded version of all text + blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals); + } else { + blockText = globals.ghCodeBlocks[num].codeblock; + } + } + blockText = blockText.replace(/\$/g, '$$$$'); // Escape any dollar signs + + grafsOutIt = grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, blockText); + // Check if grafsOutIt is a pre->code + if (/^]*>\s*]*>/.test(grafsOutIt)) { + codeFlag = true; + } + } + grafsOut[i] = grafsOutIt; + } + text = grafsOut.join('\n'); + // Strip leading and trailing lines: + text = text.replace(/^\n+/g, ''); + text = text.replace(/\n+$/g, ''); + return globals.converter._dispatch('paragraphs.after', text, options, globals); +}); diff --git a/node_modules/showdown/src/subParsers/runExtension.js b/node_modules/showdown/src/subParsers/runExtension.js new file mode 100644 index 0000000..e8d0263 --- /dev/null +++ b/node_modules/showdown/src/subParsers/runExtension.js @@ -0,0 +1,20 @@ +/** + * Run extension + */ +showdown.subParser('runExtension', function (ext, text, options, globals) { + 'use strict'; + + if (ext.filter) { + text = ext.filter(text, globals.converter, options); + + } else if (ext.regex) { + // TODO remove this when old extension loading mechanism is deprecated + var re = ext.regex; + if (!(re instanceof RegExp)) { + re = new RegExp(re, 'g'); + } + text = text.replace(re, ext.replace); + } + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/spanGamut.js b/node_modules/showdown/src/subParsers/spanGamut.js new file mode 100644 index 0000000..29891df --- /dev/null +++ b/node_modules/showdown/src/subParsers/spanGamut.js @@ -0,0 +1,49 @@ +/** + * These are all the transformations that occur *within* block-level + * tags like paragraphs, headers, and list items. + */ +showdown.subParser('spanGamut', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('spanGamut.before', text, options, globals); + text = showdown.subParser('codeSpans')(text, options, globals); + text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals); + text = showdown.subParser('encodeBackslashEscapes')(text, options, globals); + + // Process anchor and image tags. Images must come first, + // because ![foo][f] looks like an anchor. + text = showdown.subParser('images')(text, options, globals); + text = showdown.subParser('anchors')(text, options, globals); + + // Make links out of things like `` + // Must come after anchors, because you can use < and > + // delimiters in inline links like [this](). + text = showdown.subParser('autoLinks')(text, options, globals); + text = showdown.subParser('simplifiedAutoLinks')(text, options, globals); + text = showdown.subParser('emoji')(text, options, globals); + text = showdown.subParser('underline')(text, options, globals); + text = showdown.subParser('italicsAndBold')(text, options, globals); + text = showdown.subParser('strikethrough')(text, options, globals); + text = showdown.subParser('ellipsis')(text, options, globals); + + // we need to hash HTML tags inside spans + text = showdown.subParser('hashHTMLSpans')(text, options, globals); + + // now we encode amps and angles + text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals); + + // Do hard breaks + if (options.simpleLineBreaks) { + // GFM style hard breaks + // only add line breaks if the text does not contain a block (special case for lists) + if (!/\n\n¨K/.test(text)) { + text = text.replace(/\n+/g, '
    \n'); + } + } else { + // Vanilla hard breaks + text = text.replace(/ +\n/g, '
    \n'); + } + + text = globals.converter._dispatch('spanGamut.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/src/subParsers/strikethrough.js b/node_modules/showdown/src/subParsers/strikethrough.js new file mode 100644 index 0000000..4517c67 --- /dev/null +++ b/node_modules/showdown/src/subParsers/strikethrough.js @@ -0,0 +1,18 @@ +showdown.subParser('strikethrough', function (text, options, globals) { + 'use strict'; + + function parseInside (txt) { + if (options.simplifiedAutoLink) { + txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals); + } + return '' + txt + ''; + } + + if (options.strikethrough) { + text = globals.converter._dispatch('strikethrough.before', text, options, globals); + text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); }); + text = globals.converter._dispatch('strikethrough.after', text, options, globals); + } + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/stripLinkDefinitions.js b/node_modules/showdown/src/subParsers/stripLinkDefinitions.js new file mode 100644 index 0000000..d8bcfb1 --- /dev/null +++ b/node_modules/showdown/src/subParsers/stripLinkDefinitions.js @@ -0,0 +1,53 @@ +/** + * Strips link definitions from text, stores the URLs and titles in + * hash references. + * Link defs are in the form: ^[id]: url "optional title" + */ +showdown.subParser('stripLinkDefinitions', function (text, options, globals) { + 'use strict'; + + var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm, + base64Regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm; + + // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug + text += '¨0'; + + var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) { + linkId = linkId.toLowerCase(); + if (url.match(/^data:.+?\/.+?;base64,/)) { + // remove newlines + globals.gUrls[linkId] = url.replace(/\s/g, ''); + } else { + globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive + } + + if (blankLines) { + // Oops, found blank lines, so it's not a title. + // Put back the parenthetical statement we stole. + return blankLines + title; + + } else { + if (title) { + globals.gTitles[linkId] = title.replace(/"|'/g, '"'); + } + if (options.parseImgDimensions && width && height) { + globals.gDimensions[linkId] = { + width: width, + height: height + }; + } + } + // Completely remove the definition from the text + return ''; + }; + + // first we try to find base64 link references + text = text.replace(base64Regex, replaceFunc); + + text = text.replace(regex, replaceFunc); + + // attacklab: strip sentinel + text = text.replace(/¨0/, ''); + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/tables.js b/node_modules/showdown/src/subParsers/tables.js new file mode 100644 index 0000000..ff79830 --- /dev/null +++ b/node_modules/showdown/src/subParsers/tables.js @@ -0,0 +1,142 @@ +showdown.subParser('tables', function (text, options, globals) { + 'use strict'; + + if (!options.tables) { + return text; + } + + var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm, + //singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm; + singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm; + + function parseStyles (sLine) { + if (/^:[ \t]*--*$/.test(sLine)) { + return ' style="text-align:left;"'; + } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) { + return ' style="text-align:right;"'; + } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) { + return ' style="text-align:center;"'; + } else { + return ''; + } + } + + function parseHeaders (header, style) { + var id = ''; + header = header.trim(); + // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility + if (options.tablesHeaderId || options.tableHeaderId) { + id = ' id="' + header.replace(/ /g, '_').toLowerCase() + '"'; + } + header = showdown.subParser('spanGamut')(header, options, globals); + + return '' + header + '\n'; + } + + function parseCells (cell, style) { + var subText = showdown.subParser('spanGamut')(cell, options, globals); + return '' + subText + '\n'; + } + + function buildTable (headers, cells) { + var tb = '\n\n\n', + tblLgn = headers.length; + + for (var i = 0; i < tblLgn; ++i) { + tb += headers[i]; + } + tb += '\n\n\n'; + + for (i = 0; i < cells.length; ++i) { + tb += '\n'; + for (var ii = 0; ii < tblLgn; ++ii) { + tb += cells[i][ii]; + } + tb += '\n'; + } + tb += '\n
    \n'; + return tb; + } + + function parseTable (rawTable) { + var i, tableLines = rawTable.split('\n'); + + for (i = 0; i < tableLines.length; ++i) { + // strip wrong first and last column if wrapped tables are used + if (/^ {0,3}\|/.test(tableLines[i])) { + tableLines[i] = tableLines[i].replace(/^ {0,3}\|/, ''); + } + if (/\|[ \t]*$/.test(tableLines[i])) { + tableLines[i] = tableLines[i].replace(/\|[ \t]*$/, ''); + } + // parse code spans first, but we only support one line code spans + tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals); + } + + var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}), + rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}), + rawCells = [], + headers = [], + styles = [], + cells = []; + + tableLines.shift(); + tableLines.shift(); + + for (i = 0; i < tableLines.length; ++i) { + if (tableLines[i].trim() === '') { + continue; + } + rawCells.push( + tableLines[i] + .split('|') + .map(function (s) { + return s.trim(); + }) + ); + } + + if (rawHeaders.length < rawStyles.length) { + return rawTable; + } + + for (i = 0; i < rawStyles.length; ++i) { + styles.push(parseStyles(rawStyles[i])); + } + + for (i = 0; i < rawHeaders.length; ++i) { + if (showdown.helper.isUndefined(styles[i])) { + styles[i] = ''; + } + headers.push(parseHeaders(rawHeaders[i], styles[i])); + } + + for (i = 0; i < rawCells.length; ++i) { + var row = []; + for (var ii = 0; ii < headers.length; ++ii) { + if (showdown.helper.isUndefined(rawCells[i][ii])) { + + } + row.push(parseCells(rawCells[i][ii], styles[ii])); + } + cells.push(row); + } + + return buildTable(headers, cells); + } + + text = globals.converter._dispatch('tables.before', text, options, globals); + + // find escaped pipe characters + text = text.replace(/\\(\|)/g, showdown.helper.escapeCharactersCallback); + + // parse multi column tables + text = text.replace(tableRgx, parseTable); + + // parse one column tables + text = text.replace(singeColTblRgx, parseTable); + + text = globals.converter._dispatch('tables.after', text, options, globals); + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/underline.js b/node_modules/showdown/src/subParsers/underline.js new file mode 100644 index 0000000..43491a6 --- /dev/null +++ b/node_modules/showdown/src/subParsers/underline.js @@ -0,0 +1,32 @@ +showdown.subParser('underline', function (text, options, globals) { + 'use strict'; + + if (!options.underline) { + return text; + } + + text = globals.converter._dispatch('underline.before', text, options, globals); + + if (options.literalMidWordUnderscores) { + text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) { + return '' + txt + ''; + }); + text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) { + return '' + txt + ''; + }); + } else { + text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) { + return (/\S$/.test(m)) ? '' + m + '' : wm; + }); + text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) { + return (/\S$/.test(m)) ? '' + m + '' : wm; + }); + } + + // escape remaining underscores to prevent them being parsed by italic and bold + text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback); + + text = globals.converter._dispatch('underline.after', text, options, globals); + + return text; +}); diff --git a/node_modules/showdown/src/subParsers/unescapeSpecialChars.js b/node_modules/showdown/src/subParsers/unescapeSpecialChars.js new file mode 100644 index 0000000..961e08b --- /dev/null +++ b/node_modules/showdown/src/subParsers/unescapeSpecialChars.js @@ -0,0 +1,15 @@ +/** + * Swap back in all the special characters we've hidden. + */ +showdown.subParser('unescapeSpecialChars', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals); + + text = text.replace(/¨E(\d+)E/g, function (wholeMatch, m1) { + var charCodeToReplace = parseInt(m1); + return String.fromCharCode(charCodeToReplace); + }); + + text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals); + return text; +}); diff --git a/node_modules/showdown/test/bootstrap.js b/node_modules/showdown/test/bootstrap.js new file mode 100644 index 0000000..0ece647 --- /dev/null +++ b/node_modules/showdown/test/bootstrap.js @@ -0,0 +1,116 @@ +/** + * Created by Estevao on 08-06-2015. + */ + +//jscs:disable requireCamelCaseOrUpperCaseIdentifiers +(function () { + 'use strict'; + + require('source-map-support').install(); + require('chai').should(); + var fs = require('fs'); + var jsdom = require('jsdom'); + var document = new jsdom.JSDOM('', {}).window.document; // jshint ignore:line + + function getTestSuite (dir) { + return fs.readdirSync(dir) + .filter(filter()) + .map(map(dir)); + } + + function getHtmlToMdTestSuite (dir) { + return fs.readdirSync(dir) + .filter(filter()) + .map(map2(dir)); + } + + function filter () { + return function (file) { + var ext = file.slice(-3); + return (ext === '.md'); + }; + } + + function map (dir) { + return function (file) { + var name = file.replace('.md', ''), + htmlPath = dir + name + '.html', + html = fs.readFileSync(htmlPath, 'utf8'), + mdPath = dir + name + '.md', + md = fs.readFileSync(mdPath, 'utf8'); + + return { + name: name, + input: md, + expected: html + }; + }; + } + + function map2 (dir) { + return function (file) { + var name = file.replace('.md', ''), + htmlPath = dir + name + '.html', + html = fs.readFileSync(htmlPath, 'utf8'), + mdPath = dir + name + '.md', + md = fs.readFileSync(mdPath, 'utf8'); + + return { + name: name, + input: html, + expected: md + }; + }; + } + + function assertion (testCase, converter, type) { + return function () { + //var conv = (type === 'makeMd') ? converter.makeMd : converter.makeHtml; + + testCase.actual = (type === 'makeMd') ? converter.makeMd(testCase.input, document) : converter.makeHtml(testCase.input); + testCase = normalize(testCase); + + // Compare + testCase.actual.should.equal(testCase.expected); + }; + } + + //Normalize input/output + function normalize (testCase) { + + // Normalize line returns + testCase.expected = testCase.expected.replace(/(\r\n)|\n|\r/g, '\n'); + testCase.actual = testCase.actual.replace(/(\r\n)|\n|\r/g, '\n'); + + // Ignore all leading/trailing whitespace + testCase.expected = testCase.expected.split('\n').map(function (x) { + return x.trim(); + }).join('\n'); + testCase.actual = testCase.actual.split('\n').map(function (x) { + return x.trim(); + }).join('\n'); + + // Remove extra lines + testCase.expected = testCase.expected.trim(); + testCase.actual = testCase.actual.trim(); + + //Beautify + //testCase.expected = beautify(testCase.expected, beauOptions); + //testCase.actual = beautify(testCase.actual, beauOptions); + + // Normalize line returns + testCase.expected = testCase.expected.replace(/(\r\n)|\n|\r/g, '\n'); + testCase.actual = testCase.actual.replace(/(\r\n)|\n|\r/g, '\n'); + + return testCase; + } + + module.exports = { + getTestSuite: getTestSuite, + getHtmlToMdTestSuite: getHtmlToMdTestSuite, + assertion: assertion, + normalize: normalize, + showdown: require('../.build/showdown.js') + }; +})(); + diff --git a/node_modules/showdown/test/cases/anchors-by-reference.html b/node_modules/showdown/test/cases/anchors-by-reference.html new file mode 100644 index 0000000..1bba333 --- /dev/null +++ b/node_modules/showdown/test/cases/anchors-by-reference.html @@ -0,0 +1,4 @@ +

    This is an example reference-style link. + This is another reference-style link. + This is a third reference-style link. + This is a fourth reference-style link.

    diff --git a/node_modules/showdown/test/cases/anchors-by-reference.md b/node_modules/showdown/test/cases/anchors-by-reference.md new file mode 100644 index 0000000..5990adf --- /dev/null +++ b/node_modules/showdown/test/cases/anchors-by-reference.md @@ -0,0 +1,11 @@ + +This is [an example][id] reference-style link. +This is [another] [foo] reference-style link. +This is [a third][bar] reference-style link. +This is [a fourth][4] reference-style link. + + [id]: http://example.com/ "Optional Title Here" + [foo]: http://example.com/ (Optional Title Here) + [bar]: http://example.com/ (Optional Title Here) + [4]: + "Optional Title Here" diff --git a/node_modules/showdown/test/cases/anchors-followed-by-brakets.html b/node_modules/showdown/test/cases/anchors-followed-by-brakets.html new file mode 100644 index 0000000..1b1abac --- /dev/null +++ b/node_modules/showdown/test/cases/anchors-followed-by-brakets.html @@ -0,0 +1,4 @@ +

    This is a link (some other text)

    +

    This is a link (some other text)

    +

    This is a link (some other text)

    +

    This is a link (some other text)

    \ No newline at end of file diff --git a/node_modules/showdown/test/cases/anchors-followed-by-brakets.md b/node_modules/showdown/test/cases/anchors-followed-by-brakets.md new file mode 100644 index 0000000..974fdd3 --- /dev/null +++ b/node_modules/showdown/test/cases/anchors-followed-by-brakets.md @@ -0,0 +1,7 @@ +This is a [link](https://en.wikipedia.org/wiki/Textile) (some other text) + +This is a [link](https://en.wikipedia.org/wiki/Textile_(markup) (some other text) + +This is a [link](https://en.wikipedia.org/wiki/Textile_(markup_language)) (some other text) + +This is a [link](https://en.wikipedia.org/wiki/Textile_(markup_language)/foo) (some other text) \ No newline at end of file diff --git a/node_modules/showdown/test/cases/automatic-anchors.html b/node_modules/showdown/test/cases/automatic-anchors.html new file mode 100644 index 0000000..6de71a9 --- /dev/null +++ b/node_modules/showdown/test/cases/automatic-anchors.html @@ -0,0 +1 @@ +

    http://example.com/

    diff --git a/node_modules/showdown/test/cases/automatic-anchors.md b/node_modules/showdown/test/cases/automatic-anchors.md new file mode 100644 index 0000000..9049dad --- /dev/null +++ b/node_modules/showdown/test/cases/automatic-anchors.md @@ -0,0 +1,2 @@ + + diff --git a/node_modules/showdown/test/cases/blockquote-followed-by-code.html b/node_modules/showdown/test/cases/blockquote-followed-by-code.html new file mode 100644 index 0000000..0f48cab --- /dev/null +++ b/node_modules/showdown/test/cases/blockquote-followed-by-code.html @@ -0,0 +1,10 @@ +
    +

    a blockquote +with a 4 space indented line (not code)

    +
    +

    sep

    +
    +

    a blockquote

    +
    +
    with some code after
    +
    diff --git a/node_modules/showdown/test/cases/blockquote-followed-by-code.md b/node_modules/showdown/test/cases/blockquote-followed-by-code.md new file mode 100644 index 0000000..b0426b7 --- /dev/null +++ b/node_modules/showdown/test/cases/blockquote-followed-by-code.md @@ -0,0 +1,8 @@ +> a blockquote + with a 4 space indented line (not code) + +sep + +> a blockquote + + with some code after diff --git a/node_modules/showdown/test/cases/blockquote-inside-code.html b/node_modules/showdown/test/cases/blockquote-inside-code.html new file mode 100644 index 0000000..b46311f --- /dev/null +++ b/node_modules/showdown/test/cases/blockquote-inside-code.html @@ -0,0 +1,7 @@ +
    > this is a pseudo blockquote
    +    > inside a code block
    +
    +

    foo

    +
    > this is another bq
    +    inside code
    +
    diff --git a/node_modules/showdown/test/cases/blockquote-inside-code.md b/node_modules/showdown/test/cases/blockquote-inside-code.md new file mode 100644 index 0000000..eeb225a --- /dev/null +++ b/node_modules/showdown/test/cases/blockquote-inside-code.md @@ -0,0 +1,7 @@ + > this is a pseudo blockquote + > inside a code block + +foo + + > this is another bq + inside code diff --git a/node_modules/showdown/test/cases/blockquote-nested-markdown.html b/node_modules/showdown/test/cases/blockquote-nested-markdown.html new file mode 100644 index 0000000..a73ca6e --- /dev/null +++ b/node_modules/showdown/test/cases/blockquote-nested-markdown.html @@ -0,0 +1,10 @@ +
    +

    This is a header.

    +
      +
    1. This is the first list item.
    2. +
    3. This is the second list item.
    4. +
    +

    Here's some example code:

    +
    return shell_exec("echo $input | $markdown_script");
    +    
    +
    diff --git a/node_modules/showdown/test/cases/blockquote-nested-markdown.md b/node_modules/showdown/test/cases/blockquote-nested-markdown.md new file mode 100644 index 0000000..56b6aa5 --- /dev/null +++ b/node_modules/showdown/test/cases/blockquote-nested-markdown.md @@ -0,0 +1,8 @@ +> ## This is a header. +> +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> return shell_exec("echo $input | $markdown_script"); diff --git a/node_modules/showdown/test/cases/blockquote.html b/node_modules/showdown/test/cases/blockquote.html new file mode 100644 index 0000000..0b47c63 --- /dev/null +++ b/node_modules/showdown/test/cases/blockquote.html @@ -0,0 +1,4 @@ +
    +

    This is a multi line blockquote test

    +

    With more than one line.

    +
    diff --git a/node_modules/showdown/test/cases/blockquote.md b/node_modules/showdown/test/cases/blockquote.md new file mode 100644 index 0000000..5a07ed1 --- /dev/null +++ b/node_modules/showdown/test/cases/blockquote.md @@ -0,0 +1,4 @@ + + > This is a multi line blockquote test + > + > With more than one line. diff --git a/node_modules/showdown/test/cases/code-block-html-escape.html b/node_modules/showdown/test/cases/code-block-html-escape.html new file mode 100644 index 0000000..770e126 --- /dev/null +++ b/node_modules/showdown/test/cases/code-block-html-escape.html @@ -0,0 +1,3 @@ +

    This is some HTML:

    +
    <h1>Heading</h1>
    +
    diff --git a/node_modules/showdown/test/cases/code-block-html-escape.md b/node_modules/showdown/test/cases/code-block-html-escape.md new file mode 100644 index 0000000..728fee3 --- /dev/null +++ b/node_modules/showdown/test/cases/code-block-html-escape.md @@ -0,0 +1,4 @@ + +This is some HTML: + +

    Heading

    diff --git a/node_modules/showdown/test/cases/code-block-with-special-chars.html b/node_modules/showdown/test/cases/code-block-with-special-chars.html new file mode 100644 index 0000000..f97977f --- /dev/null +++ b/node_modules/showdown/test/cases/code-block-with-special-chars.html @@ -0,0 +1,7 @@ +
    //**this** code _has_ special chars
    +var arr = ['foo', 'bar', 'baz'];
    +function () {
    +    return 'foo';
    +}
    +\n
    +
    diff --git a/node_modules/showdown/test/cases/code-block-with-special-chars.md b/node_modules/showdown/test/cases/code-block-with-special-chars.md new file mode 100644 index 0000000..fd25d57 --- /dev/null +++ b/node_modules/showdown/test/cases/code-block-with-special-chars.md @@ -0,0 +1,6 @@ + //**this** code _has_ special chars + var arr = ['foo', 'bar', 'baz']; + function () { + return 'foo'; + } + \n diff --git a/node_modules/showdown/test/cases/code-block.html b/node_modules/showdown/test/cases/code-block.html new file mode 100644 index 0000000..56bc5d0 --- /dev/null +++ b/node_modules/showdown/test/cases/code-block.html @@ -0,0 +1,3 @@ +

    This is a normal paragraph:

    +
    This is a code block.
    +
    diff --git a/node_modules/showdown/test/cases/code-block.md b/node_modules/showdown/test/cases/code-block.md new file mode 100644 index 0000000..2873811 --- /dev/null +++ b/node_modules/showdown/test/cases/code-block.md @@ -0,0 +1,4 @@ + +This is a normal paragraph: + + This is a code block. diff --git a/node_modules/showdown/test/cases/double-emphasis.html b/node_modules/showdown/test/cases/double-emphasis.html new file mode 100644 index 0000000..8391bff --- /dev/null +++ b/node_modules/showdown/test/cases/double-emphasis.html @@ -0,0 +1,4 @@ +

    a strong and em thingy

    +

    barbazingabar

    +

    a strong and em thingy

    +

    barbazingabar

    diff --git a/node_modules/showdown/test/cases/double-emphasis.md b/node_modules/showdown/test/cases/double-emphasis.md new file mode 100644 index 0000000..73f2d39 --- /dev/null +++ b/node_modules/showdown/test/cases/double-emphasis.md @@ -0,0 +1,7 @@ +a ___strong and em___ thingy + +bar___bazinga___bar + +a ***strong and em*** thingy + +bar***bazinga***bar diff --git a/node_modules/showdown/test/cases/doubline-list.html b/node_modules/showdown/test/cases/doubline-list.html new file mode 100644 index 0000000..a2fe204 --- /dev/null +++ b/node_modules/showdown/test/cases/doubline-list.html @@ -0,0 +1,4 @@ +
      +
    • Bird

    • +
    • Magic

    • +
    diff --git a/node_modules/showdown/test/cases/doubline-list.md b/node_modules/showdown/test/cases/doubline-list.md new file mode 100644 index 0000000..bea70ea --- /dev/null +++ b/node_modules/showdown/test/cases/doubline-list.md @@ -0,0 +1,4 @@ + + * Bird + + * Magic diff --git a/node_modules/showdown/test/cases/ellipsis.html b/node_modules/showdown/test/cases/ellipsis.html new file mode 100644 index 0000000..fd77939 --- /dev/null +++ b/node_modules/showdown/test/cases/ellipsis.html @@ -0,0 +1,19 @@ +

    ellipsis in text…

    +

    +
      +
    1. foo…
    2. +
    3. bar
    4. +
    +
    +

    ellipsis in blockquote…

    +
    +
    ellipsis in code...
    +
    +
    ellipsis in code...
    +
    +

    ellipsis in header…

    +

    1…

    +
      +
    1. ..
    2. +
    +

    1…

    diff --git a/node_modules/showdown/test/cases/ellipsis.md b/node_modules/showdown/test/cases/ellipsis.md new file mode 100644 index 0000000..e790fb5 --- /dev/null +++ b/node_modules/showdown/test/cases/ellipsis.md @@ -0,0 +1,22 @@ +ellipsis in text... + +... + +1. foo... +2. bar + +> ellipsis in blockquote... + +``` +ellipsis in code... +``` + + ellipsis in code... + +# ellipsis in header... + +1... + +1. .. + +1... \ No newline at end of file diff --git a/node_modules/showdown/test/cases/emphasis-inside-inline-code.html b/node_modules/showdown/test/cases/emphasis-inside-inline-code.html new file mode 100644 index 0000000..0a70937 --- /dev/null +++ b/node_modules/showdown/test/cases/emphasis-inside-inline-code.html @@ -0,0 +1 @@ +

    some text **foo**

    diff --git a/node_modules/showdown/test/cases/emphasis-inside-inline-code.md b/node_modules/showdown/test/cases/emphasis-inside-inline-code.md new file mode 100644 index 0000000..df8b95d --- /dev/null +++ b/node_modules/showdown/test/cases/emphasis-inside-inline-code.md @@ -0,0 +1 @@ +some text `**foo**` diff --git a/node_modules/showdown/test/cases/emphasis.html b/node_modules/showdown/test/cases/emphasis.html new file mode 100644 index 0000000..805daf8 --- /dev/null +++ b/node_modules/showdown/test/cases/emphasis.html @@ -0,0 +1,45 @@ +

    single asterisks

    +

    single underscores

    +

    double asterisks

    +

    double underscores

    +

    text with italic sentence in middle

    +

    text with bold sentence in middle

    +

    text with bold text that + spans across multiple lines

    +

    underscored_word

    +

    doubleunderscore__word

    +

    asterix*word

    +

    doubleasterix**word

    +

    line with_underscored word

    +

    line with__doubleunderscored word

    +

    line with*asterixed word

    +

    line with**doubleasterixed word

    +

    some linewithinner underscores

    +

    some linewithinner double underscores

    +

    some linewithinner asterixs

    +

    some linewithinner double asterixs

    +

    another line with just _one underscore

    +

    another line with just __one double underscore

    +

    another line with just *one asterix

    +

    another line with just **one double asterix

    +

    a sentence withunderscore and anotherunderscore

    +

    a sentence withdoubleunderscore and anotherdoubleunderscore

    +

    a sentence withasterix and anotherasterix

    +

    a sentence withdoubleasterix and anotherdoubleasterix

    +

    escaped word_with_underscores

    +

    escaped word__with__double underscores

    +

    escaped word_with_single italic underscore

    +

    escaped word*with*asterixs

    +

    escaped word**with**asterixs

    +

    escaped word*with*bold asterixs

    +

    foobarbaz

    +

    foobarbaz

    +

    this is imbued link with strong

    +

    this is imbued link with strong

    +

    this link has underscore some_link

    +

    multiple italics and bolds with underscores in a paragraph

    +

    multiple italics and bolds with asterisks in a paragraph

    +

    multiple bolds with underscores in a paragraph

    +

    multiple bolds with asterisks in a paragraph

    +

    multiple italics with underscores in a paragraph

    +

    multiple italics with asterisks in a paragraph

    diff --git a/node_modules/showdown/test/cases/emphasis.md b/node_modules/showdown/test/cases/emphasis.md new file mode 100644 index 0000000..cea2160 --- /dev/null +++ b/node_modules/showdown/test/cases/emphasis.md @@ -0,0 +1,89 @@ +*single asterisks* + +_single underscores_ + +**double asterisks** + +__double underscores__ + +text *with italic sentence* in middle + +text __with bold sentence__ in middle + +text with __bold text that +spans across multiple__ lines + +underscored_word + +doubleunderscore__word + +asterix*word + +doubleasterix**word + +line with_underscored word + +line with__doubleunderscored word + +line with*asterixed word + +line with**doubleasterixed word + +some line_with_inner underscores + +some line__with__inner double underscores + +some line*with*inner asterixs + +some line**with**inner double asterixs + +another line with just _one underscore + +another line with just __one double underscore + +another line with just *one asterix + +another line with just **one double asterix + +a sentence with_underscore and another_underscore + +a sentence with__doubleunderscore and another__doubleunderscore + +a sentence with*asterix and another*asterix + +a sentence with**doubleasterix and another**doubleasterix + +escaped word\_with\_underscores + +escaped word\_\_with\_\_double underscores + +escaped word_\_with\__single italic underscore + +escaped word\*with*asterixs + +escaped word\*\*with\*\*asterixs + +escaped word**\*with\***bold asterixs + +foo**bar**baz + +foo__bar__baz + +this is **imbued link with strong** + +this is __imbued link with strong__ + +this link has underscore [some_link](http://www.google.com/some_link) + +___multiple___ italics and bolds with underscores in a ___paragraph___ + +***multiple*** italics and bolds with asterisks in a ***paragraph*** + +__multiple__ bolds with underscores in a __paragraph__ + +**multiple** bolds with asterisks in a **paragraph** + +_multiple_ italics with underscores in a _paragraph_ + +_multiple_ italics with asterisks in a _paragraph_ + diff --git a/node_modules/showdown/test/cases/encodeHTMLCodeTags.html b/node_modules/showdown/test/cases/encodeHTMLCodeTags.html new file mode 100644 index 0000000..870bf1e --- /dev/null +++ b/node_modules/showdown/test/cases/encodeHTMLCodeTags.html @@ -0,0 +1,4 @@ +

    this is code some <span>text</span> yeah!

    +
    
    +<div>foo</div>
    +
    diff --git a/node_modules/showdown/test/cases/encodeHTMLCodeTags.md b/node_modules/showdown/test/cases/encodeHTMLCodeTags.md new file mode 100644 index 0000000..f61677a --- /dev/null +++ b/node_modules/showdown/test/cases/encodeHTMLCodeTags.md @@ -0,0 +1,5 @@ +this is code some text yeah! + +
    
    +
    foo
    +
    diff --git a/node_modules/showdown/test/cases/escaped-number-period.html b/node_modules/showdown/test/cases/escaped-number-period.html new file mode 100644 index 0000000..42f286d --- /dev/null +++ b/node_modules/showdown/test/cases/escaped-number-period.html @@ -0,0 +1 @@ +

    It happened in 1986. What a great season.

    diff --git a/node_modules/showdown/test/cases/escaped-number-period.md b/node_modules/showdown/test/cases/escaped-number-period.md new file mode 100644 index 0000000..654761b --- /dev/null +++ b/node_modules/showdown/test/cases/escaped-number-period.md @@ -0,0 +1 @@ +It happened in 1986\. What a great season. diff --git a/node_modules/showdown/test/cases/escaping.html b/node_modules/showdown/test/cases/escaping.html new file mode 100644 index 0000000..80a0ddb --- /dev/null +++ b/node_modules/showdown/test/cases/escaping.html @@ -0,0 +1,16 @@ +

    These should all be escaped:

    +

    \

    +

    `

    +

    *

    +

    _

    +

    {

    +

    }

    +

    [

    +

    ]

    +

    (

    +

    )

    +

    #

    +

    +

    +

    -

    +

    .

    +

    !

    diff --git a/node_modules/showdown/test/cases/escaping.md b/node_modules/showdown/test/cases/escaping.md new file mode 100644 index 0000000..cfcb70c --- /dev/null +++ b/node_modules/showdown/test/cases/escaping.md @@ -0,0 +1,32 @@ + +These should all be escaped: + +\\ + +\` + +\* + +\_ + +\{ + +\} + +\[ + +\] + +\( + +\) + +\# + +\+ + +\- + +\. + +\! diff --git a/node_modules/showdown/test/cases/github-style-at-start.html b/node_modules/showdown/test/cases/github-style-at-start.html new file mode 100644 index 0000000..79c0044 --- /dev/null +++ b/node_modules/showdown/test/cases/github-style-at-start.html @@ -0,0 +1,5 @@ +
    function MyFunc(a) {
    +  // ...
    +  }
    +
    +

    That is some code!

    diff --git a/node_modules/showdown/test/cases/github-style-at-start.md b/node_modules/showdown/test/cases/github-style-at-start.md new file mode 100644 index 0000000..557d63c --- /dev/null +++ b/node_modules/showdown/test/cases/github-style-at-start.md @@ -0,0 +1,7 @@ +``` +function MyFunc(a) { + // ... +} +``` + +That is some code! diff --git a/node_modules/showdown/test/cases/github-style-codeblock-inside-quote.html b/node_modules/showdown/test/cases/github-style-codeblock-inside-quote.html new file mode 100644 index 0000000..2800050 --- /dev/null +++ b/node_modules/showdown/test/cases/github-style-codeblock-inside-quote.html @@ -0,0 +1,12 @@ +
    +

    Define a function in javascript:

    +
    function MyFunc(a) {
    +  var s = '`';
    +  }
    +
    +
    +

    And some nested quote

    +
    <div>HTML!</div>
    +
    +
    +
    diff --git a/node_modules/showdown/test/cases/github-style-codeblock-inside-quote.md b/node_modules/showdown/test/cases/github-style-codeblock-inside-quote.md new file mode 100644 index 0000000..23c4714 --- /dev/null +++ b/node_modules/showdown/test/cases/github-style-codeblock-inside-quote.md @@ -0,0 +1,13 @@ +> Define a function in javascript: +> +> ``` +> function MyFunc(a) { +> var s = '`'; +> } +> ``` +> +>> And some nested quote +>> +>> ```html +>>
    HTML!
    +>> ``` diff --git a/node_modules/showdown/test/cases/github-style-codeblock.html b/node_modules/showdown/test/cases/github-style-codeblock.html new file mode 100644 index 0000000..f1f5856 --- /dev/null +++ b/node_modules/showdown/test/cases/github-style-codeblock.html @@ -0,0 +1,19 @@ +

    Define a function in javascript:

    +
    function MyFunc(a) {
    +  var s = '`';
    +  }
    +
    +

    And some HTML

    +
    <div>HTML!</div>
    +
    +

    And some CSS with spaces before the language declaration

    +
    body {
    +font-size: 1.5em;
    +}
    +
    +

    Use more than 3 backticks

    +
    some code
    +
    +

    Use tilde as delimiter

    +
    another piece of code
    +
    diff --git a/node_modules/showdown/test/cases/github-style-codeblock.md b/node_modules/showdown/test/cases/github-style-codeblock.md new file mode 100644 index 0000000..d84cf6d --- /dev/null +++ b/node_modules/showdown/test/cases/github-style-codeblock.md @@ -0,0 +1,34 @@ + +Define a function in javascript: + +``` +function MyFunc(a) { + var s = '`'; +} +``` + +And some HTML + +```html +
    HTML!
    +``` + +And some CSS with spaces before the language declaration + +``` css +body { + font-size: 1.5em; +} +``` + +Use more than 3 backticks + +````` +some code +````` + +Use tilde as delimiter + +~~~ +another piece of code +~~~ diff --git a/node_modules/showdown/test/cases/github-style-linebreaks.html b/node_modules/showdown/test/cases/github-style-linebreaks.html new file mode 100644 index 0000000..e92a482 --- /dev/null +++ b/node_modules/showdown/test/cases/github-style-linebreaks.html @@ -0,0 +1,3 @@ +
    code can go here
    +  this is rendered on a second line
    +
    diff --git a/node_modules/showdown/test/cases/github-style-linebreaks.md b/node_modules/showdown/test/cases/github-style-linebreaks.md new file mode 100644 index 0000000..1b55536 --- /dev/null +++ b/node_modules/showdown/test/cases/github-style-linebreaks.md @@ -0,0 +1,4 @@ +``` +code can go here +this is rendered on a second line +``` diff --git a/node_modules/showdown/test/cases/h1-with-double-hash.html b/node_modules/showdown/test/cases/h1-with-double-hash.html new file mode 100644 index 0000000..ab5b555 --- /dev/null +++ b/node_modules/showdown/test/cases/h1-with-double-hash.html @@ -0,0 +1 @@ +

    This is an H1

    diff --git a/node_modules/showdown/test/cases/h1-with-double-hash.md b/node_modules/showdown/test/cases/h1-with-double-hash.md new file mode 100644 index 0000000..d25887a --- /dev/null +++ b/node_modules/showdown/test/cases/h1-with-double-hash.md @@ -0,0 +1 @@ +# This is an H1 # diff --git a/node_modules/showdown/test/cases/h1-with-equals.html b/node_modules/showdown/test/cases/h1-with-equals.html new file mode 100644 index 0000000..ab5b555 --- /dev/null +++ b/node_modules/showdown/test/cases/h1-with-equals.html @@ -0,0 +1 @@ +

    This is an H1

    diff --git a/node_modules/showdown/test/cases/h1-with-equals.md b/node_modules/showdown/test/cases/h1-with-equals.md new file mode 100644 index 0000000..313c1dc --- /dev/null +++ b/node_modules/showdown/test/cases/h1-with-equals.md @@ -0,0 +1,2 @@ +This is an H1 +============= diff --git a/node_modules/showdown/test/cases/h1-with-single-hash.html b/node_modules/showdown/test/cases/h1-with-single-hash.html new file mode 100644 index 0000000..ab5b555 --- /dev/null +++ b/node_modules/showdown/test/cases/h1-with-single-hash.html @@ -0,0 +1 @@ +

    This is an H1

    diff --git a/node_modules/showdown/test/cases/h1-with-single-hash.md b/node_modules/showdown/test/cases/h1-with-single-hash.md new file mode 100644 index 0000000..90944c9 --- /dev/null +++ b/node_modules/showdown/test/cases/h1-with-single-hash.md @@ -0,0 +1 @@ +# This is an H1 diff --git a/node_modules/showdown/test/cases/h2-with-dashes.html b/node_modules/showdown/test/cases/h2-with-dashes.html new file mode 100644 index 0000000..375a0d0 --- /dev/null +++ b/node_modules/showdown/test/cases/h2-with-dashes.html @@ -0,0 +1 @@ +

    This is an H2

    diff --git a/node_modules/showdown/test/cases/h2-with-dashes.md b/node_modules/showdown/test/cases/h2-with-dashes.md new file mode 100644 index 0000000..a912f0e --- /dev/null +++ b/node_modules/showdown/test/cases/h2-with-dashes.md @@ -0,0 +1,2 @@ +This is an H2 +------------- diff --git a/node_modules/showdown/test/cases/h2-with-double-hash.html b/node_modules/showdown/test/cases/h2-with-double-hash.html new file mode 100644 index 0000000..375a0d0 --- /dev/null +++ b/node_modules/showdown/test/cases/h2-with-double-hash.html @@ -0,0 +1 @@ +

    This is an H2

    diff --git a/node_modules/showdown/test/cases/h2-with-double-hash.md b/node_modules/showdown/test/cases/h2-with-double-hash.md new file mode 100644 index 0000000..9539252 --- /dev/null +++ b/node_modules/showdown/test/cases/h2-with-double-hash.md @@ -0,0 +1 @@ +## This is an H2 ## diff --git a/node_modules/showdown/test/cases/h2-with-single-hash.html b/node_modules/showdown/test/cases/h2-with-single-hash.html new file mode 100644 index 0000000..375a0d0 --- /dev/null +++ b/node_modules/showdown/test/cases/h2-with-single-hash.html @@ -0,0 +1 @@ +

    This is an H2

    diff --git a/node_modules/showdown/test/cases/h2-with-single-hash.md b/node_modules/showdown/test/cases/h2-with-single-hash.md new file mode 100644 index 0000000..bf1c56f --- /dev/null +++ b/node_modules/showdown/test/cases/h2-with-single-hash.md @@ -0,0 +1 @@ +## This is an H2 diff --git a/node_modules/showdown/test/cases/h3-with-double-hash.html b/node_modules/showdown/test/cases/h3-with-double-hash.html new file mode 100644 index 0000000..13f8c9e --- /dev/null +++ b/node_modules/showdown/test/cases/h3-with-double-hash.html @@ -0,0 +1 @@ +

    This is an H3

    diff --git a/node_modules/showdown/test/cases/h3-with-double-hash.md b/node_modules/showdown/test/cases/h3-with-double-hash.md new file mode 100644 index 0000000..f875665 --- /dev/null +++ b/node_modules/showdown/test/cases/h3-with-double-hash.md @@ -0,0 +1 @@ +### This is an H3 ### diff --git a/node_modules/showdown/test/cases/h3-with-single-hash.html b/node_modules/showdown/test/cases/h3-with-single-hash.html new file mode 100644 index 0000000..13f8c9e --- /dev/null +++ b/node_modules/showdown/test/cases/h3-with-single-hash.html @@ -0,0 +1 @@ +

    This is an H3

    diff --git a/node_modules/showdown/test/cases/h3-with-single-hash.md b/node_modules/showdown/test/cases/h3-with-single-hash.md new file mode 100644 index 0000000..247ce34 --- /dev/null +++ b/node_modules/showdown/test/cases/h3-with-single-hash.md @@ -0,0 +1 @@ +### This is an H3 diff --git a/node_modules/showdown/test/cases/h4-with-single-hash.html b/node_modules/showdown/test/cases/h4-with-single-hash.html new file mode 100644 index 0000000..165b4ef --- /dev/null +++ b/node_modules/showdown/test/cases/h4-with-single-hash.html @@ -0,0 +1 @@ +

    This is an H4

    diff --git a/node_modules/showdown/test/cases/h4-with-single-hash.md b/node_modules/showdown/test/cases/h4-with-single-hash.md new file mode 100644 index 0000000..36f0db0 --- /dev/null +++ b/node_modules/showdown/test/cases/h4-with-single-hash.md @@ -0,0 +1 @@ +#### This is an H4 diff --git a/node_modules/showdown/test/cases/h5-with-single-hash.html b/node_modules/showdown/test/cases/h5-with-single-hash.html new file mode 100644 index 0000000..28eac14 --- /dev/null +++ b/node_modules/showdown/test/cases/h5-with-single-hash.html @@ -0,0 +1 @@ +
    This is an H5
    diff --git a/node_modules/showdown/test/cases/h5-with-single-hash.md b/node_modules/showdown/test/cases/h5-with-single-hash.md new file mode 100644 index 0000000..a66d50b --- /dev/null +++ b/node_modules/showdown/test/cases/h5-with-single-hash.md @@ -0,0 +1 @@ +##### This is an H5 diff --git a/node_modules/showdown/test/cases/h6-with-single-hash.html b/node_modules/showdown/test/cases/h6-with-single-hash.html new file mode 100644 index 0000000..47574cc --- /dev/null +++ b/node_modules/showdown/test/cases/h6-with-single-hash.html @@ -0,0 +1 @@ +
    This is an H6
    diff --git a/node_modules/showdown/test/cases/h6-with-single-hash.md b/node_modules/showdown/test/cases/h6-with-single-hash.md new file mode 100644 index 0000000..c85f1a7 --- /dev/null +++ b/node_modules/showdown/test/cases/h6-with-single-hash.md @@ -0,0 +1 @@ +###### This is an H6 diff --git a/node_modules/showdown/test/cases/horizontal-rules.html b/node_modules/showdown/test/cases/horizontal-rules.html new file mode 100644 index 0000000..52f2479 --- /dev/null +++ b/node_modules/showdown/test/cases/horizontal-rules.html @@ -0,0 +1,5 @@ +
    +
    +
    +
    +
    diff --git a/node_modules/showdown/test/cases/horizontal-rules.md b/node_modules/showdown/test/cases/horizontal-rules.md new file mode 100644 index 0000000..6a45ca1 --- /dev/null +++ b/node_modules/showdown/test/cases/horizontal-rules.md @@ -0,0 +1,10 @@ + +* * * + +*** + +***** + +- - - + +--------------------------------------- diff --git a/node_modules/showdown/test/cases/html-comments.html b/node_modules/showdown/test/cases/html-comments.html new file mode 100644 index 0000000..767353e --- /dev/null +++ b/node_modules/showdown/test/cases/html-comments.html @@ -0,0 +1,10 @@ + + +

    words words

    + +

    words

    + +
    <!-- comment -->
    +
    +

    <!----------------------------------------------------------------------------------------------------------------------------------------------------

    + diff --git a/node_modules/showdown/test/cases/html-comments.md b/node_modules/showdown/test/cases/html-comments.md new file mode 100644 index 0000000..a9fcf5f --- /dev/null +++ b/node_modules/showdown/test/cases/html-comments.md @@ -0,0 +1,15 @@ + + + + +words words + + words + + + + + + diff --git a/node_modules/showdown/test/cases/html-inside-listed-code.html b/node_modules/showdown/test/cases/html-inside-listed-code.html new file mode 100644 index 0000000..31001d9 --- /dev/null +++ b/node_modules/showdown/test/cases/html-inside-listed-code.html @@ -0,0 +1,8 @@ +
      +
    • list item 1

      +
      <a href="www.google.com">google</a>
      +<div>
      +<div>some div</div>
      +</div>
      +
    • +
    \ No newline at end of file diff --git a/node_modules/showdown/test/cases/html-inside-listed-code.md b/node_modules/showdown/test/cases/html-inside-listed-code.md new file mode 100644 index 0000000..5034d5e --- /dev/null +++ b/node_modules/showdown/test/cases/html-inside-listed-code.md @@ -0,0 +1,8 @@ + - list item 1 + + ```html + google +
    +
    some div
    +
    + ``` diff --git a/node_modules/showdown/test/cases/html5-strutural-tags.html b/node_modules/showdown/test/cases/html5-strutural-tags.html new file mode 100644 index 0000000..f054d42 --- /dev/null +++ b/node_modules/showdown/test/cases/html5-strutural-tags.html @@ -0,0 +1,57 @@ +

    These HTML5 tags should pass through just fine.

    +
    hello
    +
    head
    +
    footsies
    + +
    read me
    + +
    read + me
    + +

    the end

    + + + + + + + +
    Foo
    Bar
    + + + + + + + + + + + + + + +
    Foo
    Bar
    Bar
    + + +
    My street
    + + Sorry, your browser doesn't support the <canvas> element. + +
    + An awesome picture +
    Caption for the awesome picture
    +
    +
    +

    Main title

    +

    Secondary title

    +
    + diff --git a/node_modules/showdown/test/cases/html5-strutural-tags.md b/node_modules/showdown/test/cases/html5-strutural-tags.md new file mode 100644 index 0000000..1775aca --- /dev/null +++ b/node_modules/showdown/test/cases/html5-strutural-tags.md @@ -0,0 +1,69 @@ + +These HTML5 tags should pass through just fine. + +
    hello
    +
    head
    +
    footsies
    + +
    read me
    + +
    read +me
    + + +the end + + + + + + + + +
    Foo
    Bar
    + + + + + + + + + + + + + + + +
    Foo
    Bar
    Bar
    + + + + + +
    My street
    + + + Sorry, your browser doesn't support the <canvas> element. + + +
    + An awesome picture +
    Caption for the awesome picture
    +
    + +
    +

    Main title

    +

    Secondary title

    +
    + + diff --git a/node_modules/showdown/test/cases/images-followed-by-brackets.html b/node_modules/showdown/test/cases/images-followed-by-brackets.html new file mode 100644 index 0000000..20e2292 --- /dev/null +++ b/node_modules/showdown/test/cases/images-followed-by-brackets.html @@ -0,0 +1,2 @@ +

    image link(some text between brackets)

    +

    image link(some text between brackets)

    \ No newline at end of file diff --git a/node_modules/showdown/test/cases/images-followed-by-brackets.md b/node_modules/showdown/test/cases/images-followed-by-brackets.md new file mode 100644 index 0000000..1481067 --- /dev/null +++ b/node_modules/showdown/test/cases/images-followed-by-brackets.md @@ -0,0 +1,3 @@ +![image link](<./image/cat1.png>)(some text between brackets) + +![image link](<./image/cat(1).png>)(some text between brackets) diff --git a/node_modules/showdown/test/cases/images.html b/node_modules/showdown/test/cases/images.html new file mode 100644 index 0000000..f28e0b9 --- /dev/null +++ b/node_modules/showdown/test/cases/images.html @@ -0,0 +1,6 @@ +

    Alt text

    +

    Alt text

    +

    Alt text

    +

    My Image

    +

    ![leave me alone]

    +

    ![leave me alone][]

    diff --git a/node_modules/showdown/test/cases/images.md b/node_modules/showdown/test/cases/images.md new file mode 100644 index 0000000..9a85ffa --- /dev/null +++ b/node_modules/showdown/test/cases/images.md @@ -0,0 +1,15 @@ + +![Alt text](/path/to/img.jpg) + +![Alt text](/path/to/img.jpg "Optional title") + +![Alt text][id] + +![My Image] + +![leave me alone] + +![leave me alone][] + + [id]: url/to/image.jpg "Optional title attribute" + [My Image]: url/to/image2.jpg "Optional title attribute" diff --git a/node_modules/showdown/test/cases/implicit-anchors.html b/node_modules/showdown/test/cases/implicit-anchors.html new file mode 100644 index 0000000..170f0c7 --- /dev/null +++ b/node_modules/showdown/test/cases/implicit-anchors.html @@ -0,0 +1,2 @@ +

    Search the web at Google or Daring Fireball.

    +

    Search the web at Google or Daring Fireball.

    diff --git a/node_modules/showdown/test/cases/implicit-anchors.md b/node_modules/showdown/test/cases/implicit-anchors.md new file mode 100644 index 0000000..d52d66a --- /dev/null +++ b/node_modules/showdown/test/cases/implicit-anchors.md @@ -0,0 +1,8 @@ + +Search the web at [Google][] or [Daring Fireball][]. + +Search the web at [Google] or [Daring Fireball]. + + + [Google]: http://google.com/ + [Daring Fireball]: http://daringfireball.net/ diff --git a/node_modules/showdown/test/cases/inline-anchors.html b/node_modules/showdown/test/cases/inline-anchors.html new file mode 100644 index 0000000..69a8a2e --- /dev/null +++ b/node_modules/showdown/test/cases/inline-anchors.html @@ -0,0 +1,2 @@ +

    This is an example inline link.

    +

    This link has no title attribute.

    diff --git a/node_modules/showdown/test/cases/inline-anchors.md b/node_modules/showdown/test/cases/inline-anchors.md new file mode 100644 index 0000000..cb6c15c --- /dev/null +++ b/node_modules/showdown/test/cases/inline-anchors.md @@ -0,0 +1,4 @@ + +This is [an example](http://example.com/ "Title") inline link. + +[This link](http://example.net/) has no title attribute. diff --git a/node_modules/showdown/test/cases/inline-code.html b/node_modules/showdown/test/cases/inline-code.html new file mode 100644 index 0000000..9f316ca --- /dev/null +++ b/node_modules/showdown/test/cases/inline-code.html @@ -0,0 +1,7 @@ +

    Create a new function.

    +

    Use the backtick in MySQL syntax SELECT `column` FROM whatever.

    +

    A single backtick in a code span: `

    +

    A backtick-delimited string in a code span: `foo`

    +

    Please don't use any <blink> tags.

    +

    &#8212; is the decimal-encoded equivalent of &mdash;.

    +

    this inline **code** has ___magic___ chars

    diff --git a/node_modules/showdown/test/cases/inline-code.md b/node_modules/showdown/test/cases/inline-code.md new file mode 100644 index 0000000..4817a6f --- /dev/null +++ b/node_modules/showdown/test/cases/inline-code.md @@ -0,0 +1,14 @@ + +Create a new `function`. + +Use the backtick in MySQL syntax ``SELECT `column` FROM whatever``. + +A single backtick in a code span: `` ` `` + +A backtick-delimited string in a code span: `` `foo` `` + +Please don't use any `` tags. + +`—` is the decimal-encoded equivalent of `—`. + +this `inline **code** has ___magic___` chars diff --git a/node_modules/showdown/test/cases/inline-escaped-chars.html b/node_modules/showdown/test/cases/inline-escaped-chars.html new file mode 100644 index 0000000..5ee58e6 --- /dev/null +++ b/node_modules/showdown/test/cases/inline-escaped-chars.html @@ -0,0 +1,2 @@ +

    Hello.this_is_a_variable + and.this.is.another_one

    diff --git a/node_modules/showdown/test/cases/inline-escaped-chars.md b/node_modules/showdown/test/cases/inline-escaped-chars.md new file mode 100644 index 0000000..7fb7fd3 --- /dev/null +++ b/node_modules/showdown/test/cases/inline-escaped-chars.md @@ -0,0 +1,3 @@ + +Hello.this\_is\_a\_variable +and.this.is.another_one diff --git a/node_modules/showdown/test/cases/inline-style-tag.html b/node_modules/showdown/test/cases/inline-style-tag.html new file mode 100644 index 0000000..3941994 --- /dev/null +++ b/node_modules/showdown/test/cases/inline-style-tag.html @@ -0,0 +1,4 @@ + +

    An exciting sentence.

    diff --git a/node_modules/showdown/test/cases/inline-style-tag.md b/node_modules/showdown/test/cases/inline-style-tag.md new file mode 100644 index 0000000..c8d9cf3 --- /dev/null +++ b/node_modules/showdown/test/cases/inline-style-tag.md @@ -0,0 +1,6 @@ + + + +An exciting sentence. diff --git a/node_modules/showdown/test/cases/lazy-blockquote.html b/node_modules/showdown/test/cases/lazy-blockquote.html new file mode 100644 index 0000000..0b47c63 --- /dev/null +++ b/node_modules/showdown/test/cases/lazy-blockquote.html @@ -0,0 +1,4 @@ +
    +

    This is a multi line blockquote test

    +

    With more than one line.

    +
    diff --git a/node_modules/showdown/test/cases/lazy-blockquote.md b/node_modules/showdown/test/cases/lazy-blockquote.md new file mode 100644 index 0000000..696e177 --- /dev/null +++ b/node_modules/showdown/test/cases/lazy-blockquote.md @@ -0,0 +1,4 @@ + + > This is a multi line blockquote test + + > With more than one line. diff --git a/node_modules/showdown/test/cases/line-starts-with-html.html b/node_modules/showdown/test/cases/line-starts-with-html.html new file mode 100644 index 0000000..29bf9b4 --- /dev/null +++ b/node_modules/showdown/test/cases/line-starts-with-html.html @@ -0,0 +1,2 @@ +

    some text words

    +


    words

    diff --git a/node_modules/showdown/test/cases/line-starts-with-html.md b/node_modules/showdown/test/cases/line-starts-with-html.md new file mode 100644 index 0000000..71f11fd --- /dev/null +++ b/node_modules/showdown/test/cases/line-starts-with-html.md @@ -0,0 +1,3 @@ +some text words + +
    words diff --git a/node_modules/showdown/test/cases/list-followed-by-blockquote.html b/node_modules/showdown/test/cases/list-followed-by-blockquote.html new file mode 100644 index 0000000..7257454 --- /dev/null +++ b/node_modules/showdown/test/cases/list-followed-by-blockquote.html @@ -0,0 +1,12 @@ +

    some title

    +
      +
    1. list item 1
    2. +
    3. list item 2
    4. +
    +
    +

    some text in a blockquote

    +
    +
      +
    • another list item 1
    • +
    • another list item 2
    • +
    diff --git a/node_modules/showdown/test/cases/list-followed-by-blockquote.md b/node_modules/showdown/test/cases/list-followed-by-blockquote.md new file mode 100644 index 0000000..dfce7bd --- /dev/null +++ b/node_modules/showdown/test/cases/list-followed-by-blockquote.md @@ -0,0 +1,9 @@ +# some title + +1. list item 1 +2. list item 2 + +> some text in a blockquote + +* another list item 1 +* another list item 2 diff --git a/node_modules/showdown/test/cases/list-followed-by-ghcode.html b/node_modules/showdown/test/cases/list-followed-by-ghcode.html new file mode 100644 index 0000000..b218fb7 --- /dev/null +++ b/node_modules/showdown/test/cases/list-followed-by-ghcode.html @@ -0,0 +1,13 @@ +

    some title

    +
      +
    1. list item 1
    2. +
    3. list item 2
    4. +
    +
    some code
    +
    +    and some other line of code
    +
    +
      +
    • another list item 1
    • +
    • another list item 2
    • +
    diff --git a/node_modules/showdown/test/cases/list-followed-by-ghcode.md b/node_modules/showdown/test/cases/list-followed-by-ghcode.md new file mode 100644 index 0000000..7bd70ba --- /dev/null +++ b/node_modules/showdown/test/cases/list-followed-by-ghcode.md @@ -0,0 +1,13 @@ +# some title + +1. list item 1 +2. list item 2 + +``` +some code + +and some other line of code +``` + +* another list item 1 +* another list item 2 diff --git a/node_modules/showdown/test/cases/list-with-blockquote.html b/node_modules/showdown/test/cases/list-with-blockquote.html new file mode 100644 index 0000000..20ca2e1 --- /dev/null +++ b/node_modules/showdown/test/cases/list-with-blockquote.html @@ -0,0 +1,7 @@ +
      +
    • A list item with a blockquote:

      +
      +

      This is a blockquote + inside a list item.

      +
    • +
    diff --git a/node_modules/showdown/test/cases/list-with-blockquote.md b/node_modules/showdown/test/cases/list-with-blockquote.md new file mode 100644 index 0000000..68c79a9 --- /dev/null +++ b/node_modules/showdown/test/cases/list-with-blockquote.md @@ -0,0 +1,4 @@ +* A list item with a blockquote: + + > This is a blockquote + > inside a list item. diff --git a/node_modules/showdown/test/cases/list-with-code.html b/node_modules/showdown/test/cases/list-with-code.html new file mode 100644 index 0000000..5096858 --- /dev/null +++ b/node_modules/showdown/test/cases/list-with-code.html @@ -0,0 +1,5 @@ +
      +
    • A list item with code:

      +
      alert('Hello world!');
      +    
    • +
    diff --git a/node_modules/showdown/test/cases/list-with-code.md b/node_modules/showdown/test/cases/list-with-code.md new file mode 100644 index 0000000..276ee59 --- /dev/null +++ b/node_modules/showdown/test/cases/list-with-code.md @@ -0,0 +1,3 @@ +* A list item with code: + + alert('Hello world!'); diff --git a/node_modules/showdown/test/cases/literal-html-tags.html b/node_modules/showdown/test/cases/literal-html-tags.html new file mode 100644 index 0000000..c3ed5a7 --- /dev/null +++ b/node_modules/showdown/test/cases/literal-html-tags.html @@ -0,0 +1,5 @@ +

    some **code** yeah

    +

    some inline **code** block

    +

    some inline **code** block

    +

    yo dawg some <code start="false">code</code> inception

    +
    some **div** yeah
    \ No newline at end of file diff --git a/node_modules/showdown/test/cases/literal-html-tags.md b/node_modules/showdown/test/cases/literal-html-tags.md new file mode 100644 index 0000000..4a596a9 --- /dev/null +++ b/node_modules/showdown/test/cases/literal-html-tags.md @@ -0,0 +1,9 @@ +some **code** yeah + +some inline **code** block + +some inline **code** block + +yo dawg some code inception + +
    some **div** yeah
    diff --git a/node_modules/showdown/test/cases/multi-paragraph-list.html b/node_modules/showdown/test/cases/multi-paragraph-list.html new file mode 100644 index 0000000..b226540 --- /dev/null +++ b/node_modules/showdown/test/cases/multi-paragraph-list.html @@ -0,0 +1,5 @@ +
      +
    1. This is a major bullet point.

      +

      That contains multiple paragraphs.

    2. +
    3. And another line

    4. +
    diff --git a/node_modules/showdown/test/cases/multi-paragraph-list.md b/node_modules/showdown/test/cases/multi-paragraph-list.md new file mode 100644 index 0000000..78ccdd0 --- /dev/null +++ b/node_modules/showdown/test/cases/multi-paragraph-list.md @@ -0,0 +1,6 @@ + + 1. This is a major bullet point. + + That contains multiple paragraphs. + + 2. And another line diff --git a/node_modules/showdown/test/cases/multiline-unordered-list.html b/node_modules/showdown/test/cases/multiline-unordered-list.html new file mode 100644 index 0000000..6af8aac --- /dev/null +++ b/node_modules/showdown/test/cases/multiline-unordered-list.html @@ -0,0 +1,5 @@ +
      +
    • This line spans + more than one line and is lazy
    • +
    • Similar to this line
    • +
    diff --git a/node_modules/showdown/test/cases/multiline-unordered-list.md b/node_modules/showdown/test/cases/multiline-unordered-list.md new file mode 100644 index 0000000..a4470ab --- /dev/null +++ b/node_modules/showdown/test/cases/multiline-unordered-list.md @@ -0,0 +1,4 @@ + + - This line spans + more than one line and is lazy + - Similar to this line diff --git a/node_modules/showdown/test/cases/nested-blockquote.html b/node_modules/showdown/test/cases/nested-blockquote.html new file mode 100644 index 0000000..6063347 --- /dev/null +++ b/node_modules/showdown/test/cases/nested-blockquote.html @@ -0,0 +1,7 @@ +
    +

    This is a multi line blockquote test

    +
    +

    And nesting!

    +
    +

    With more than one line.

    +
    diff --git a/node_modules/showdown/test/cases/nested-blockquote.md b/node_modules/showdown/test/cases/nested-blockquote.md new file mode 100644 index 0000000..08247db --- /dev/null +++ b/node_modules/showdown/test/cases/nested-blockquote.md @@ -0,0 +1,6 @@ + + > This is a multi line blockquote test + > + > > And nesting! + > + > With more than one line. diff --git a/node_modules/showdown/test/cases/nested-gh-codeblocks.html b/node_modules/showdown/test/cases/nested-gh-codeblocks.html new file mode 100644 index 0000000..8eea4b3 --- /dev/null +++ b/node_modules/showdown/test/cases/nested-gh-codeblocks.html @@ -0,0 +1,8 @@ +
    1. some code idented 4 spaces
    +
    +    ```
    +    var foobar = 'foo';
    +    ```
    +
    +2. another line
    +
    diff --git a/node_modules/showdown/test/cases/nested-gh-codeblocks.md b/node_modules/showdown/test/cases/nested-gh-codeblocks.md new file mode 100644 index 0000000..515d8c7 --- /dev/null +++ b/node_modules/showdown/test/cases/nested-gh-codeblocks.md @@ -0,0 +1,9 @@ +``` +1. some code idented 4 spaces + + ``` + var foobar = 'foo'; + ``` + +2. another line +``` diff --git a/node_modules/showdown/test/cases/obfuscated-emails.html b/node_modules/showdown/test/cases/obfuscated-emails.html new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/showdown/test/cases/obfuscated-emails.md b/node_modules/showdown/test/cases/obfuscated-emails.md new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/showdown/test/cases/ordered-list-same-number.html b/node_modules/showdown/test/cases/ordered-list-same-number.html new file mode 100644 index 0000000..a48b0b7 --- /dev/null +++ b/node_modules/showdown/test/cases/ordered-list-same-number.html @@ -0,0 +1,5 @@ +
      +
    1. Red
    2. +
    3. Green
    4. +
    5. Blue
    6. +
    diff --git a/node_modules/showdown/test/cases/ordered-list-same-number.md b/node_modules/showdown/test/cases/ordered-list-same-number.md new file mode 100644 index 0000000..2fd21c6 --- /dev/null +++ b/node_modules/showdown/test/cases/ordered-list-same-number.md @@ -0,0 +1,4 @@ + + 1. Red + 1. Green + 1. Blue diff --git a/node_modules/showdown/test/cases/ordered-list-starting-number.html b/node_modules/showdown/test/cases/ordered-list-starting-number.html new file mode 100644 index 0000000..45666bb --- /dev/null +++ b/node_modules/showdown/test/cases/ordered-list-starting-number.html @@ -0,0 +1,12 @@ +
      +
    1. foo
    2. +
    3. bar
    4. +
    5. baz
    6. +
    +
    +
      +
    1. a
    2. +
    3. b
    4. +
    5. c
    6. +
    7. d
    8. +
    diff --git a/node_modules/showdown/test/cases/ordered-list-starting-number.md b/node_modules/showdown/test/cases/ordered-list-starting-number.md new file mode 100644 index 0000000..b5e9fde --- /dev/null +++ b/node_modules/showdown/test/cases/ordered-list-starting-number.md @@ -0,0 +1,10 @@ +5. foo +6. bar +7. baz + +--- + +3. a +2. b +7. c +23. d diff --git a/node_modules/showdown/test/cases/ordered-list-wrong-numbers.html b/node_modules/showdown/test/cases/ordered-list-wrong-numbers.html new file mode 100644 index 0000000..a48b0b7 --- /dev/null +++ b/node_modules/showdown/test/cases/ordered-list-wrong-numbers.html @@ -0,0 +1,5 @@ +
      +
    1. Red
    2. +
    3. Green
    4. +
    5. Blue
    6. +
    diff --git a/node_modules/showdown/test/cases/ordered-list-wrong-numbers.md b/node_modules/showdown/test/cases/ordered-list-wrong-numbers.md new file mode 100644 index 0000000..2fd21c6 --- /dev/null +++ b/node_modules/showdown/test/cases/ordered-list-wrong-numbers.md @@ -0,0 +1,4 @@ + + 1. Red + 1. Green + 1. Blue diff --git a/node_modules/showdown/test/cases/ordered-list.html b/node_modules/showdown/test/cases/ordered-list.html new file mode 100644 index 0000000..a48b0b7 --- /dev/null +++ b/node_modules/showdown/test/cases/ordered-list.html @@ -0,0 +1,5 @@ +
      +
    1. Red
    2. +
    3. Green
    4. +
    5. Blue
    6. +
    diff --git a/node_modules/showdown/test/cases/ordered-list.md b/node_modules/showdown/test/cases/ordered-list.md new file mode 100644 index 0000000..8d668d2 --- /dev/null +++ b/node_modules/showdown/test/cases/ordered-list.md @@ -0,0 +1,4 @@ + + 1. Red + 2. Green + 3. Blue diff --git a/node_modules/showdown/test/cases/paragraphed-list-with-sublists.html b/node_modules/showdown/test/cases/paragraphed-list-with-sublists.html new file mode 100644 index 0000000..0367bb2 --- /dev/null +++ b/node_modules/showdown/test/cases/paragraphed-list-with-sublists.html @@ -0,0 +1,11 @@ +
      +
    • foo

      +
        +
      • bazinga

      • +
      • yeah

    • +
    • bar

      +
        +
      1. damn

      2. +
      3. so many paragraphs

    • +
    • baz

    • +
    diff --git a/node_modules/showdown/test/cases/paragraphed-list-with-sublists.md b/node_modules/showdown/test/cases/paragraphed-list-with-sublists.md new file mode 100644 index 0000000..4aade2a --- /dev/null +++ b/node_modules/showdown/test/cases/paragraphed-list-with-sublists.md @@ -0,0 +1,13 @@ + - foo + + - bazinga + + - yeah + + - bar + + 1. damn + + 2. so many paragraphs + + - baz diff --git a/node_modules/showdown/test/cases/pre-code-tags-inside-code-block.html b/node_modules/showdown/test/cases/pre-code-tags-inside-code-block.html new file mode 100644 index 0000000..88501bd --- /dev/null +++ b/node_modules/showdown/test/cases/pre-code-tags-inside-code-block.html @@ -0,0 +1,5 @@ +

    code inception

    +
    <pre><code>
    +<div>some html code inside code html tags inside a fenced code block</div>
    +</code></pre>
    +
    diff --git a/node_modules/showdown/test/cases/pre-code-tags-inside-code-block.md b/node_modules/showdown/test/cases/pre-code-tags-inside-code-block.md new file mode 100644 index 0000000..dad08e9 --- /dev/null +++ b/node_modules/showdown/test/cases/pre-code-tags-inside-code-block.md @@ -0,0 +1,7 @@ +code inception + +``` +
    
    +
    some html code inside code html tags inside a fenced code block
    +
    +``` diff --git a/node_modules/showdown/test/cases/pre-code-tags.html b/node_modules/showdown/test/cases/pre-code-tags.html new file mode 100644 index 0000000..aa18009 --- /dev/null +++ b/node_modules/showdown/test/cases/pre-code-tags.html @@ -0,0 +1,13 @@ +
    +
    +foobar
    +
    +
    +

    blabla

    +
    
    +foobar
    +
    +
    +
    
    +<div>some html code</div>
    +
    diff --git a/node_modules/showdown/test/cases/pre-code-tags.md b/node_modules/showdown/test/cases/pre-code-tags.md new file mode 100644 index 0000000..4cab343 --- /dev/null +++ b/node_modules/showdown/test/cases/pre-code-tags.md @@ -0,0 +1,16 @@ +
    +
    +foobar
    +
    +
    + +blabla + +
    
    +foobar
    +
    +
    + +
    
    +
    some html code
    +
    diff --git a/node_modules/showdown/test/cases/relative-anchors.html b/node_modules/showdown/test/cases/relative-anchors.html new file mode 100644 index 0000000..6db73dc --- /dev/null +++ b/node_modules/showdown/test/cases/relative-anchors.html @@ -0,0 +1 @@ +

    See my About page for details.

    diff --git a/node_modules/showdown/test/cases/relative-anchors.md b/node_modules/showdown/test/cases/relative-anchors.md new file mode 100644 index 0000000..4358b0e --- /dev/null +++ b/node_modules/showdown/test/cases/relative-anchors.md @@ -0,0 +1,2 @@ + +See my [About](/about/) page for details. diff --git a/node_modules/showdown/test/cases/repeated-headers.html b/node_modules/showdown/test/cases/repeated-headers.html new file mode 100644 index 0000000..2cb8916 --- /dev/null +++ b/node_modules/showdown/test/cases/repeated-headers.html @@ -0,0 +1,3 @@ +

    Same Title

    +

    some text

    +

    Same Title

    diff --git a/node_modules/showdown/test/cases/repeated-headers.md b/node_modules/showdown/test/cases/repeated-headers.md new file mode 100644 index 0000000..4369318 --- /dev/null +++ b/node_modules/showdown/test/cases/repeated-headers.md @@ -0,0 +1,5 @@ +# Same Title + +some text + +# Same Title diff --git a/node_modules/showdown/test/cases/simple-paragraph.html b/node_modules/showdown/test/cases/simple-paragraph.html new file mode 100644 index 0000000..7ce5354 --- /dev/null +++ b/node_modules/showdown/test/cases/simple-paragraph.html @@ -0,0 +1 @@ +

    Hello, world!

    diff --git a/node_modules/showdown/test/cases/simple-paragraph.md b/node_modules/showdown/test/cases/simple-paragraph.md new file mode 100644 index 0000000..cb39a1f --- /dev/null +++ b/node_modules/showdown/test/cases/simple-paragraph.md @@ -0,0 +1,2 @@ + +Hello, world! diff --git a/node_modules/showdown/test/cases/strip-references.html b/node_modules/showdown/test/cases/strip-references.html new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/showdown/test/cases/strip-references.md b/node_modules/showdown/test/cases/strip-references.md new file mode 100644 index 0000000..3fec643 --- /dev/null +++ b/node_modules/showdown/test/cases/strip-references.md @@ -0,0 +1,13 @@ +[1]: http://www.google.co.uk + +[http://www.google.co.uk]: http://www.google.co.uk + + + + + +[1]: http://dsurl.stuff/something.jpg + +[1]:http://www.google.co.uk + + [1]:http://www.google.co.uk diff --git a/node_modules/showdown/test/cases/strong.html b/node_modules/showdown/test/cases/strong.html new file mode 100644 index 0000000..8b185b7 --- /dev/null +++ b/node_modules/showdown/test/cases/strong.html @@ -0,0 +1,3 @@ +

    important

    +

    important

    +

    really freakingstrong

    diff --git a/node_modules/showdown/test/cases/strong.md b/node_modules/showdown/test/cases/strong.md new file mode 100644 index 0000000..fc56e0c --- /dev/null +++ b/node_modules/showdown/test/cases/strong.md @@ -0,0 +1,6 @@ + +**important** + +__important__ + +really **freaking**strong diff --git a/node_modules/showdown/test/cases/unordered-list-asterisk.html b/node_modules/showdown/test/cases/unordered-list-asterisk.html new file mode 100644 index 0000000..62dba34 --- /dev/null +++ b/node_modules/showdown/test/cases/unordered-list-asterisk.html @@ -0,0 +1,5 @@ +
      +
    • Red
    • +
    • Green
    • +
    • Blue
    • +
    diff --git a/node_modules/showdown/test/cases/unordered-list-asterisk.md b/node_modules/showdown/test/cases/unordered-list-asterisk.md new file mode 100644 index 0000000..155d2fb --- /dev/null +++ b/node_modules/showdown/test/cases/unordered-list-asterisk.md @@ -0,0 +1,4 @@ + + * Red + * Green + * Blue diff --git a/node_modules/showdown/test/cases/unordered-list-minus.html b/node_modules/showdown/test/cases/unordered-list-minus.html new file mode 100644 index 0000000..62dba34 --- /dev/null +++ b/node_modules/showdown/test/cases/unordered-list-minus.html @@ -0,0 +1,5 @@ +
      +
    • Red
    • +
    • Green
    • +
    • Blue
    • +
    diff --git a/node_modules/showdown/test/cases/unordered-list-minus.md b/node_modules/showdown/test/cases/unordered-list-minus.md new file mode 100644 index 0000000..1167d21 --- /dev/null +++ b/node_modules/showdown/test/cases/unordered-list-minus.md @@ -0,0 +1,4 @@ + + - Red + - Green + - Blue diff --git a/node_modules/showdown/test/cases/unordered-list-plus.html b/node_modules/showdown/test/cases/unordered-list-plus.html new file mode 100644 index 0000000..62dba34 --- /dev/null +++ b/node_modules/showdown/test/cases/unordered-list-plus.html @@ -0,0 +1,5 @@ +
      +
    • Red
    • +
    • Green
    • +
    • Blue
    • +
    diff --git a/node_modules/showdown/test/cases/unordered-list-plus.md b/node_modules/showdown/test/cases/unordered-list-plus.md new file mode 100644 index 0000000..0b352a7 --- /dev/null +++ b/node_modules/showdown/test/cases/unordered-list-plus.md @@ -0,0 +1,4 @@ + + + Red + + Green + + Blue diff --git a/node_modules/showdown/test/cases/url-with-parenthesis.html b/node_modules/showdown/test/cases/url-with-parenthesis.html new file mode 100644 index 0000000..9e1e7cc --- /dev/null +++ b/node_modules/showdown/test/cases/url-with-parenthesis.html @@ -0,0 +1 @@ +

    There's an episode of Star Trek: The Next Generation

    diff --git a/node_modules/showdown/test/cases/url-with-parenthesis.md b/node_modules/showdown/test/cases/url-with-parenthesis.md new file mode 100644 index 0000000..d1777ab --- /dev/null +++ b/node_modules/showdown/test/cases/url-with-parenthesis.md @@ -0,0 +1 @@ +There's an [episode](http://en.memory-alpha.org/wiki/Darmok_(episode)) of Star Trek: The Next Generation diff --git a/node_modules/showdown/test/cli/basic.html b/node_modules/showdown/test/cli/basic.html new file mode 100644 index 0000000..a014504 --- /dev/null +++ b/node_modules/showdown/test/cli/basic.html @@ -0,0 +1,3 @@ +

    some title

    + +

    Test bold and italic

    diff --git a/node_modules/showdown/test/cli/basic.md b/node_modules/showdown/test/cli/basic.md new file mode 100644 index 0000000..a5256ad --- /dev/null +++ b/node_modules/showdown/test/cli/basic.md @@ -0,0 +1,3 @@ +# some title + +Test **bold** and _italic_ diff --git a/node_modules/showdown/test/features/#143.support-image-dimensions.html b/node_modules/showdown/test/features/#143.support-image-dimensions.html new file mode 100644 index 0000000..b116d65 --- /dev/null +++ b/node_modules/showdown/test/features/#143.support-image-dimensions.html @@ -0,0 +1,2 @@ +

    my image

    +

    my image2

    diff --git a/node_modules/showdown/test/features/#143.support-image-dimensions.md b/node_modules/showdown/test/features/#143.support-image-dimensions.md new file mode 100644 index 0000000..ecbd02f --- /dev/null +++ b/node_modules/showdown/test/features/#143.support-image-dimensions.md @@ -0,0 +1,5 @@ +![my image](./pic/pic1_50.png =100pxx20px) + +![my image2][1] + +[1]: ./pic/pic1_50.png =100pxx20px diff --git a/node_modules/showdown/test/features/#164.1.simple-autolink.html b/node_modules/showdown/test/features/#164.1.simple-autolink.html new file mode 100644 index 0000000..17aa55e --- /dev/null +++ b/node_modules/showdown/test/features/#164.1.simple-autolink.html @@ -0,0 +1,6 @@ +

    foo.bar

    +

    www.foobar

    +

    www.foobar.com

    +

    http://foobar.com

    +

    https://www.foobar.com/baz?bazinga=nhecos;

    +

    http://www.google.com

    diff --git a/node_modules/showdown/test/features/#164.1.simple-autolink.md b/node_modules/showdown/test/features/#164.1.simple-autolink.md new file mode 100644 index 0000000..25b9f86 --- /dev/null +++ b/node_modules/showdown/test/features/#164.1.simple-autolink.md @@ -0,0 +1,11 @@ +foo.bar + +www.foobar + +www.foobar.com + +http://foobar.com + +https://www.foobar.com/baz?bazinga=nhecos; + +http://www.google.com diff --git a/node_modules/showdown/test/features/#164.2.disallow-underscore-emphasis-mid-word.html b/node_modules/showdown/test/features/#164.2.disallow-underscore-emphasis-mid-word.html new file mode 100644 index 0000000..3882640 --- /dev/null +++ b/node_modules/showdown/test/features/#164.2.disallow-underscore-emphasis-mid-word.html @@ -0,0 +1,10 @@ +

    this is a sentence_with_mid underscores

    +

    this is a sentence with just_one underscore

    +

    this should be parsed as emphasis

    +

    this is double__underscore__mid word

    +

    this has just__one double underscore

    +

    this should be parsed as bold

    +

    emphasis at end of sentence

    +

    emphasis at line start

    +

    multi line emphasis +yeah it is yeah

    diff --git a/node_modules/showdown/test/features/#164.2.disallow-underscore-emphasis-mid-word.md b/node_modules/showdown/test/features/#164.2.disallow-underscore-emphasis-mid-word.md new file mode 100644 index 0000000..1e2cd9c --- /dev/null +++ b/node_modules/showdown/test/features/#164.2.disallow-underscore-emphasis-mid-word.md @@ -0,0 +1,18 @@ +this is a sentence_with_mid underscores + +this is a sentence with just_one underscore + +this _should be parsed_ as emphasis + +this is double__underscore__mid word + +this has just__one double underscore + +this __should be parsed__ as bold + +emphasis at _end of sentence_ + +_emphasis at_ line start + +multi _line emphasis +yeah it is_ yeah diff --git a/node_modules/showdown/test/features/#164.3.strikethrough.html b/node_modules/showdown/test/features/#164.3.strikethrough.html new file mode 100644 index 0000000..c0cd541 --- /dev/null +++ b/node_modules/showdown/test/features/#164.3.strikethrough.html @@ -0,0 +1,6 @@ +

    a strikethrough word

    +

    this should~~not be parsed

    +

    strike-through text

    +

    ~~strikethough inside code span~~

    +

    escaped ~~strikethrough~~

    +

    escaped ~~strikethrough~~

    diff --git a/node_modules/showdown/test/features/#164.3.strikethrough.md b/node_modules/showdown/test/features/#164.3.strikethrough.md new file mode 100644 index 0000000..0356b6b --- /dev/null +++ b/node_modules/showdown/test/features/#164.3.strikethrough.md @@ -0,0 +1,11 @@ +a ~~strikethrough~~ word + +this should~~not be parsed + +~~strike-through text~~ + +`~~strikethough inside code span~~` + +escaped \~~strikethrough~~ + +escaped \~~strikethrough\~~ diff --git a/node_modules/showdown/test/features/#164.4.tasklists.html b/node_modules/showdown/test/features/#164.4.tasklists.html new file mode 100644 index 0000000..cf6ccdf --- /dev/null +++ b/node_modules/showdown/test/features/#164.4.tasklists.html @@ -0,0 +1,8 @@ +

    my things

    +
      +
    • foo
    • +
    • bar
    • +
    • baz
    • +
    • bazinga
    • +
    +

    otherthings

    diff --git a/node_modules/showdown/test/features/#164.4.tasklists.md b/node_modules/showdown/test/features/#164.4.tasklists.md new file mode 100644 index 0000000..0054490 --- /dev/null +++ b/node_modules/showdown/test/features/#164.4.tasklists.md @@ -0,0 +1,8 @@ +# my things + + - foo + - [] bar + - [ ] baz + - [x] bazinga + +otherthings diff --git a/node_modules/showdown/test/features/#178.markdown-inside-html-does-not-parse.html b/node_modules/showdown/test/features/#178.markdown-inside-html-does-not-parse.html new file mode 100644 index 0000000..edecf98 --- /dev/null +++ b/node_modules/showdown/test/features/#178.markdown-inside-html-does-not-parse.html @@ -0,0 +1,5 @@ +

    some markdown

    +

    blabla

    +
    This is **not parsed**
    +

    This is parsed

    +
    This is **not parsed**
    diff --git a/node_modules/showdown/test/features/#178.markdown-inside-html-does-not-parse.md b/node_modules/showdown/test/features/#178.markdown-inside-html-does-not-parse.md new file mode 100644 index 0000000..8698642 --- /dev/null +++ b/node_modules/showdown/test/features/#178.markdown-inside-html-does-not-parse.md @@ -0,0 +1,6 @@ +# some markdown + +blabla +
    This is **not parsed**
    +
    This is **parsed**
    +
    This is **not parsed**
    diff --git a/node_modules/showdown/test/features/#198.literalMidWordUnderscores-changes-behavior-of-asterisk.html b/node_modules/showdown/test/features/#198.literalMidWordUnderscores-changes-behavior-of-asterisk.html new file mode 100644 index 0000000..442d9fc --- /dev/null +++ b/node_modules/showdown/test/features/#198.literalMidWordUnderscores-changes-behavior-of-asterisk.html @@ -0,0 +1,4 @@ +

    foo *bar *baz

    +

    foo **bar **baz

    +

    foo _bar _baz

    +

    foo __bar __baz

    diff --git a/node_modules/showdown/test/features/#198.literalMidWordUnderscores-changes-behavior-of-asterisk.md b/node_modules/showdown/test/features/#198.literalMidWordUnderscores-changes-behavior-of-asterisk.md new file mode 100644 index 0000000..1c23c02 --- /dev/null +++ b/node_modules/showdown/test/features/#198.literalMidWordUnderscores-changes-behavior-of-asterisk.md @@ -0,0 +1,7 @@ +foo *bar *baz + +foo **bar **baz + +foo _bar _baz + +foo __bar __baz diff --git a/node_modules/showdown/test/features/#204.certain-links-with-at-and-dot-break-url.html b/node_modules/showdown/test/features/#204.certain-links-with-at-and-dot-break-url.html new file mode 100644 index 0000000..fe65f36 --- /dev/null +++ b/node_modules/showdown/test/features/#204.certain-links-with-at-and-dot-break-url.html @@ -0,0 +1,4 @@ +

    http://website.com/img@x2.jpg

    +

    http://website.com/img-x2.jpg

    +

    http://website.com/img@x2

    +

    http://website.com/img@.jpg

    diff --git a/node_modules/showdown/test/features/#204.certain-links-with-at-and-dot-break-url.md b/node_modules/showdown/test/features/#204.certain-links-with-at-and-dot-break-url.md new file mode 100644 index 0000000..468b8d5 --- /dev/null +++ b/node_modules/showdown/test/features/#204.certain-links-with-at-and-dot-break-url.md @@ -0,0 +1,7 @@ +http://website.com/img@x2.jpg + +http://website.com/img-x2.jpg + +http://website.com/img@x2 + +http://website.com/img@.jpg diff --git a/node_modules/showdown/test/features/#206.treat-single-line-breaks-as-br.html b/node_modules/showdown/test/features/#206.treat-single-line-breaks-as-br.html new file mode 100644 index 0000000..74e95e3 --- /dev/null +++ b/node_modules/showdown/test/features/#206.treat-single-line-breaks-as-br.html @@ -0,0 +1,2 @@ +

    a simple
    +wrapped line

    diff --git a/node_modules/showdown/test/features/#206.treat-single-line-breaks-as-br.md b/node_modules/showdown/test/features/#206.treat-single-line-breaks-as-br.md new file mode 100644 index 0000000..4f20d40 --- /dev/null +++ b/node_modules/showdown/test/features/#206.treat-single-line-breaks-as-br.md @@ -0,0 +1,2 @@ +a simple +wrapped line diff --git a/node_modules/showdown/test/features/#214.escaped-markdown-chars-break-strikethrough.html b/node_modules/showdown/test/features/#214.escaped-markdown-chars-break-strikethrough.html new file mode 100644 index 0000000..368d306 --- /dev/null +++ b/node_modules/showdown/test/features/#214.escaped-markdown-chars-break-strikethrough.html @@ -0,0 +1 @@ +

    Your friend test* (@test) updated his/her description

    diff --git a/node_modules/showdown/test/features/#214.escaped-markdown-chars-break-strikethrough.md b/node_modules/showdown/test/features/#214.escaped-markdown-chars-break-strikethrough.md new file mode 100644 index 0000000..d672c1d --- /dev/null +++ b/node_modules/showdown/test/features/#214.escaped-markdown-chars-break-strikethrough.md @@ -0,0 +1 @@ +Your friend ~~[**test\***](www.google.com)~~ (~~[*@test*](www.google.com)~~) updated his/her description diff --git a/node_modules/showdown/test/features/#259.es6-template-strings-indentation-issues.html b/node_modules/showdown/test/features/#259.es6-template-strings-indentation-issues.html new file mode 100644 index 0000000..affecdf --- /dev/null +++ b/node_modules/showdown/test/features/#259.es6-template-strings-indentation-issues.html @@ -0,0 +1,6 @@ +

    markdown doc

    +

    you can use markdown for card documentation

    +
      +
    • foo
    • +
    • bar
    • +
    diff --git a/node_modules/showdown/test/features/#259.es6-template-strings-indentation-issues.md b/node_modules/showdown/test/features/#259.es6-template-strings-indentation-issues.md new file mode 100644 index 0000000..c8f77b6 --- /dev/null +++ b/node_modules/showdown/test/features/#259.es6-template-strings-indentation-issues.md @@ -0,0 +1,5 @@ + ## markdown doc + + you can use markdown for card documentation + - foo + - bar diff --git a/node_modules/showdown/test/features/#284.simplifiedAutoLink-does-not-match-GFM-style.html b/node_modules/showdown/test/features/#284.simplifiedAutoLink-does-not-match-GFM-style.html new file mode 100644 index 0000000..575b9c7 --- /dev/null +++ b/node_modules/showdown/test/features/#284.simplifiedAutoLink-does-not-match-GFM-style.html @@ -0,0 +1,2 @@ +

    this is a link to www.github.com

    +

    this is a link to www.google.com

    diff --git a/node_modules/showdown/test/features/#284.simplifiedAutoLink-does-not-match-GFM-style.md b/node_modules/showdown/test/features/#284.simplifiedAutoLink-does-not-match-GFM-style.md new file mode 100644 index 0000000..ead003c --- /dev/null +++ b/node_modules/showdown/test/features/#284.simplifiedAutoLink-does-not-match-GFM-style.md @@ -0,0 +1,3 @@ +this is a link to www.github.com + +this is a link to diff --git a/node_modules/showdown/test/features/#316.new-simpleLineBreaks-option-breaks-lists.html b/node_modules/showdown/test/features/#316.new-simpleLineBreaks-option-breaks-lists.html new file mode 100644 index 0000000..943c7b2 --- /dev/null +++ b/node_modules/showdown/test/features/#316.new-simpleLineBreaks-option-breaks-lists.html @@ -0,0 +1,48 @@ +
      +
    1. One
    2. +
    3. Two
        +
      • A
      • +
      • B
    4. +
    5. Three
    6. +
    +
    +

    this has
    + simple linebreaks

    +
    +
    testing
    +some
    +code
    +
    +
      +
    1. paragraphed list

      +

      this belongs
      + to the first list item

    2. +
    3. This text
      + also

    4. +
    +

    simple
    + text

    +
      +
    • a list
      + item
    • +
    • another
      + list item
    • +
    +

    simple
    + text

    +
      +
    • some item

      +

      another
      + paragraph

      +
        +
      • And
        + now

        +

        paragraph
        + sublist

        +
          +
        • and
          + even

          +

          another
          + one

    • +
    • foo

    • +
    \ No newline at end of file diff --git a/node_modules/showdown/test/features/#316.new-simpleLineBreaks-option-breaks-lists.md b/node_modules/showdown/test/features/#316.new-simpleLineBreaks-option-breaks-lists.md new file mode 100644 index 0000000..6a83c8b --- /dev/null +++ b/node_modules/showdown/test/features/#316.new-simpleLineBreaks-option-breaks-lists.md @@ -0,0 +1,51 @@ +1. One +2. Two + - A + - B +3. Three + +> this has +> simple linebreaks + + testing + some + code + + 1. paragraphed list + + this belongs + to the first list item + + 2. This text + also + +simple +text + + - a list + item + - another + list item + +simple +text + + - some item + + another + paragraph + + - And + now + + paragraph + sublist + + - and + even + + another + one + + - foo + diff --git a/node_modules/showdown/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.html b/node_modules/showdown/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.html new file mode 100644 index 0000000..0776072 --- /dev/null +++ b/node_modules/showdown/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.html @@ -0,0 +1,4 @@ +

    foo烫
    +bar

    +

    foo
    +bar

    diff --git a/node_modules/showdown/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.md b/node_modules/showdown/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.md new file mode 100644 index 0000000..7000970 --- /dev/null +++ b/node_modules/showdown/test/features/#318.simpleLineBreaks-does-not-work-with-chinese-characters.md @@ -0,0 +1,5 @@ +foo烫 +bar + +foo +bar diff --git a/node_modules/showdown/test/features/#320.github-compatible-generated-header-id.html b/node_modules/showdown/test/features/#320.github-compatible-generated-header-id.html new file mode 100644 index 0000000..ed34b7b --- /dev/null +++ b/node_modules/showdown/test/features/#320.github-compatible-generated-header-id.html @@ -0,0 +1,3 @@ +

    some header

    +

    some header with &+$,/:;=?@\"#{}|^~[]`\*()%.!' chars

    +

    another header > with < chars

    diff --git a/node_modules/showdown/test/features/#320.github-compatible-generated-header-id.md b/node_modules/showdown/test/features/#320.github-compatible-generated-header-id.md new file mode 100644 index 0000000..d547f42 --- /dev/null +++ b/node_modules/showdown/test/features/#320.github-compatible-generated-header-id.md @@ -0,0 +1,5 @@ +# some header + +# some header with &+$,/:;=?@\"#{}|^~[]`\\*()%.!' chars + +# another header > with < chars diff --git a/node_modules/showdown/test/features/#323.simpleLineBreaks-breaks-with-strong.html b/node_modules/showdown/test/features/#323.simpleLineBreaks-breaks-with-strong.html new file mode 100644 index 0000000..12b9dda --- /dev/null +++ b/node_modules/showdown/test/features/#323.simpleLineBreaks-breaks-with-strong.html @@ -0,0 +1,2 @@ +

    Nom : aaaa
    +Nom : aaa

    diff --git a/node_modules/showdown/test/features/#323.simpleLineBreaks-breaks-with-strong.md b/node_modules/showdown/test/features/#323.simpleLineBreaks-breaks-with-strong.md new file mode 100644 index 0000000..4635771 --- /dev/null +++ b/node_modules/showdown/test/features/#323.simpleLineBreaks-breaks-with-strong.md @@ -0,0 +1,2 @@ +**Nom :** aaaa +**Nom :** aaa diff --git a/node_modules/showdown/test/features/#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail.html b/node_modules/showdown/test/features/#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail.html new file mode 100644 index 0000000..e82b0ba --- /dev/null +++ b/node_modules/showdown/test/features/#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail.html @@ -0,0 +1 @@ +

    Just an example info@example.com ok?​

    diff --git a/node_modules/showdown/test/features/#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail.md b/node_modules/showdown/test/features/#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail.md new file mode 100644 index 0000000..cf22307 --- /dev/null +++ b/node_modules/showdown/test/features/#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail.md @@ -0,0 +1 @@ +Just an example info@example.com ok?​ diff --git a/node_modules/showdown/test/features/#331.allow-escaping-of-tilde.html b/node_modules/showdown/test/features/#331.allow-escaping-of-tilde.html new file mode 100644 index 0000000..766dd91 --- /dev/null +++ b/node_modules/showdown/test/features/#331.allow-escaping-of-tilde.html @@ -0,0 +1,2 @@ +

    ~~test~~

    +

    test

    diff --git a/node_modules/showdown/test/features/#331.allow-escaping-of-tilde.md b/node_modules/showdown/test/features/#331.allow-escaping-of-tilde.md new file mode 100644 index 0000000..43d3fed --- /dev/null +++ b/node_modules/showdown/test/features/#331.allow-escaping-of-tilde.md @@ -0,0 +1,3 @@ +\~~test~~ + +~~test~~ diff --git a/node_modules/showdown/test/features/#374.escape-html-tags.html b/node_modules/showdown/test/features/#374.escape-html-tags.html new file mode 100644 index 0000000..25126a6 --- /dev/null +++ b/node_modules/showdown/test/features/#374.escape-html-tags.html @@ -0,0 +1 @@ +

    <div>foo</div>

    \ No newline at end of file diff --git a/node_modules/showdown/test/features/#374.escape-html-tags.md b/node_modules/showdown/test/features/#374.escape-html-tags.md new file mode 100644 index 0000000..07d5f92 --- /dev/null +++ b/node_modules/showdown/test/features/#374.escape-html-tags.md @@ -0,0 +1 @@ +\
    foo\
    diff --git a/node_modules/showdown/test/features/#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs.html b/node_modules/showdown/test/features/#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs.html new file mode 100644 index 0000000..aea3a06 --- /dev/null +++ b/node_modules/showdown/test/features/#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs.html @@ -0,0 +1 @@ +

    Example http://example.com

    diff --git a/node_modules/showdown/test/features/#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs.md b/node_modules/showdown/test/features/#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs.md new file mode 100644 index 0000000..e023f03 --- /dev/null +++ b/node_modules/showdown/test/features/#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs.md @@ -0,0 +1 @@ +Example diff --git a/node_modules/showdown/test/features/#379.openLinksInNewWindow-breaks-em-markdup.html b/node_modules/showdown/test/features/#379.openLinksInNewWindow-breaks-em-markdup.html new file mode 100644 index 0000000..ab837e3 --- /dev/null +++ b/node_modules/showdown/test/features/#379.openLinksInNewWindow-breaks-em-markdup.html @@ -0,0 +1,2 @@ +

    My link is important

    +

    My link is important

    diff --git a/node_modules/showdown/test/features/#379.openLinksInNewWindow-breaks-em-markdup.md b/node_modules/showdown/test/features/#379.openLinksInNewWindow-breaks-em-markdup.md new file mode 100644 index 0000000..4337290 --- /dev/null +++ b/node_modules/showdown/test/features/#379.openLinksInNewWindow-breaks-em-markdup.md @@ -0,0 +1,3 @@ +My [link](http://example.com) is _important_ + +My [link](http://example.com) is __important__ diff --git a/node_modules/showdown/test/features/#398.literalMidWordAsterisks-treats-non-word-characters-as-characters.html b/node_modules/showdown/test/features/#398.literalMidWordAsterisks-treats-non-word-characters-as-characters.html new file mode 100644 index 0000000..1978f82 --- /dev/null +++ b/node_modules/showdown/test/features/#398.literalMidWordAsterisks-treats-non-word-characters-as-characters.html @@ -0,0 +1 @@ +

    strippers, hitler, and stalin

    \ No newline at end of file diff --git a/node_modules/showdown/test/features/#398.literalMidWordAsterisks-treats-non-word-characters-as-characters.md b/node_modules/showdown/test/features/#398.literalMidWordAsterisks-treats-non-word-characters-as-characters.md new file mode 100644 index 0000000..af9ca58 --- /dev/null +++ b/node_modules/showdown/test/features/#398.literalMidWordAsterisks-treats-non-word-characters-as-characters.md @@ -0,0 +1 @@ +strippers, **hitler**, and stalin \ No newline at end of file diff --git a/node_modules/showdown/test/features/#69.header-level-start.html b/node_modules/showdown/test/features/#69.header-level-start.html new file mode 100644 index 0000000..dc95a1d --- /dev/null +++ b/node_modules/showdown/test/features/#69.header-level-start.html @@ -0,0 +1,5 @@ +

    Given

    +

    When

    +

    Then

    +

    foo

    +

    bar

    diff --git a/node_modules/showdown/test/features/#69.header-level-start.md b/node_modules/showdown/test/features/#69.header-level-start.md new file mode 100644 index 0000000..e7d12c6 --- /dev/null +++ b/node_modules/showdown/test/features/#69.header-level-start.md @@ -0,0 +1,11 @@ +#Given + +#When + +#Then + +foo +=== + +bar +--- diff --git a/node_modules/showdown/test/features/completeHTMLOutput/simple.html b/node_modules/showdown/test/features/completeHTMLOutput/simple.html new file mode 100644 index 0000000..a3661c8 --- /dev/null +++ b/node_modules/showdown/test/features/completeHTMLOutput/simple.html @@ -0,0 +1,15 @@ + + + + + + +

    This is a markdown file

    +

    Converted into a full HTML document

    +
      +
    • this
    • +
    • is
    • +
    • awesome
    • +
    + + diff --git a/node_modules/showdown/test/features/completeHTMLOutput/simple.md b/node_modules/showdown/test/features/completeHTMLOutput/simple.md new file mode 100644 index 0000000..e35ed26 --- /dev/null +++ b/node_modules/showdown/test/features/completeHTMLOutput/simple.md @@ -0,0 +1,7 @@ +This is a **markdown** file + +Converted into a full HTML document + + - this + - is + - awesome diff --git a/node_modules/showdown/test/features/customizedHeaderId-simple.html b/node_modules/showdown/test/features/customizedHeaderId-simple.html new file mode 100644 index 0000000..5e05d66 --- /dev/null +++ b/node_modules/showdown/test/features/customizedHeaderId-simple.html @@ -0,0 +1,4 @@ +

    Просто заголовок

    +

    Header without curly braces

    +

    Headers with multiple braces {braces} {are}

    +

    Header

    diff --git a/node_modules/showdown/test/features/customizedHeaderId-simple.md b/node_modules/showdown/test/features/customizedHeaderId-simple.md new file mode 100644 index 0000000..66e531b --- /dev/null +++ b/node_modules/showdown/test/features/customizedHeaderId-simple.md @@ -0,0 +1,4 @@ +# Просто заголовок {simple} +# Header without curly braces +# Headers with multiple braces {braces} {are} {cool} +# Header{withoutspace} diff --git a/node_modules/showdown/test/features/disable-email-encoding.html b/node_modules/showdown/test/features/disable-email-encoding.html new file mode 100644 index 0000000..21e2731 --- /dev/null +++ b/node_modules/showdown/test/features/disable-email-encoding.html @@ -0,0 +1 @@ +

    this email foobar@example.com should not be encoded

    diff --git a/node_modules/showdown/test/features/disable-email-encoding.md b/node_modules/showdown/test/features/disable-email-encoding.md new file mode 100644 index 0000000..80fb6e8 --- /dev/null +++ b/node_modules/showdown/test/features/disable-email-encoding.md @@ -0,0 +1 @@ +this email should not be encoded diff --git a/node_modules/showdown/test/features/disable-gh-codeblocks.html b/node_modules/showdown/test/features/disable-gh-codeblocks.html new file mode 100644 index 0000000..3d739ef --- /dev/null +++ b/node_modules/showdown/test/features/disable-gh-codeblocks.html @@ -0,0 +1,7 @@ +

    this is some text

    +

    php +function thisThing() { +echo "some weird formatted code!"; +} +

    +

    some other text

    diff --git a/node_modules/showdown/test/features/disable-gh-codeblocks.md b/node_modules/showdown/test/features/disable-gh-codeblocks.md new file mode 100644 index 0000000..9aad374 --- /dev/null +++ b/node_modules/showdown/test/features/disable-gh-codeblocks.md @@ -0,0 +1,9 @@ +this is some text + +```php +function thisThing() { + echo "some weird formatted code!"; +} +``` + +some other text diff --git a/node_modules/showdown/test/features/disableForced4SpacesIndentedSublists.html b/node_modules/showdown/test/features/disableForced4SpacesIndentedSublists.html new file mode 100644 index 0000000..7dc8311 --- /dev/null +++ b/node_modules/showdown/test/features/disableForced4SpacesIndentedSublists.html @@ -0,0 +1,9 @@ +
      +
    • foo
        +
      • bar
    • +
    +
    +
      +
    • baz
        +
      1. bazinga
    • +
    diff --git a/node_modules/showdown/test/features/disableForced4SpacesIndentedSublists.md b/node_modules/showdown/test/features/disableForced4SpacesIndentedSublists.md new file mode 100644 index 0000000..a1e25d7 --- /dev/null +++ b/node_modules/showdown/test/features/disableForced4SpacesIndentedSublists.md @@ -0,0 +1,7 @@ +* foo + * bar + +--- + +* baz + 1. bazinga diff --git a/node_modules/showdown/test/features/disableForced4SpacesIndentedSublists/.gitkeep b/node_modules/showdown/test/features/disableForced4SpacesIndentedSublists/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/showdown/test/features/emojis/complex.html b/node_modules/showdown/test/features/emojis/complex.html new file mode 100644 index 0000000..fac9dbf --- /dev/null +++ b/node_modules/showdown/test/features/emojis/complex.html @@ -0,0 +1,3 @@ +

    foo🍎bar

    +

    foo: apple :bar

    +

    :foo 🍎 bar:

    diff --git a/node_modules/showdown/test/features/emojis/complex.md b/node_modules/showdown/test/features/emojis/complex.md new file mode 100644 index 0000000..f50b05e --- /dev/null +++ b/node_modules/showdown/test/features/emojis/complex.md @@ -0,0 +1,5 @@ +foo:apple:bar + +foo: apple :bar + +:foo :apple: bar: diff --git a/node_modules/showdown/test/features/emojis/links.html b/node_modules/showdown/test/features/emojis/links.html new file mode 100644 index 0000000..1692659 --- /dev/null +++ b/node_modules/showdown/test/features/emojis/links.html @@ -0,0 +1,4 @@ +

    this link somelink

    +

    emoji 🍎

    +

    🍎

    +

    🍎

    diff --git a/node_modules/showdown/test/features/emojis/links.md b/node_modules/showdown/test/features/emojis/links.md new file mode 100644 index 0000000..958a826 --- /dev/null +++ b/node_modules/showdown/test/features/emojis/links.md @@ -0,0 +1,11 @@ +this link [somelink](http://www.example.com/some:apple:url) + +emoji [:apple:](http://www.example.com/some:apple:url) + +[:apple:][apple] + +[:apple:][] + + +[apple]: http://www.example.com/some:apple:url +[:apple:]: http://www.example.com/some:apple:url \ No newline at end of file diff --git a/node_modules/showdown/test/features/emojis/simple.html b/node_modules/showdown/test/features/emojis/simple.html new file mode 100644 index 0000000..5ad8c00 --- /dev/null +++ b/node_modules/showdown/test/features/emojis/simple.html @@ -0,0 +1,2 @@ +

    🍎 and 💋

    +

    💋my🍎

    diff --git a/node_modules/showdown/test/features/emojis/simple.md b/node_modules/showdown/test/features/emojis/simple.md new file mode 100644 index 0000000..76a6c4b --- /dev/null +++ b/node_modules/showdown/test/features/emojis/simple.md @@ -0,0 +1,3 @@ +:apple: and :kiss: + +:kiss:my:apple: diff --git a/node_modules/showdown/test/features/emojis/simplifiedautolinks.html b/node_modules/showdown/test/features/emojis/simplifiedautolinks.html new file mode 100644 index 0000000..e12b3cb --- /dev/null +++ b/node_modules/showdown/test/features/emojis/simplifiedautolinks.html @@ -0,0 +1 @@ +

    http://www.example.com/some:apple:url

    diff --git a/node_modules/showdown/test/features/emojis/simplifiedautolinks.md b/node_modules/showdown/test/features/emojis/simplifiedautolinks.md new file mode 100644 index 0000000..760058f --- /dev/null +++ b/node_modules/showdown/test/features/emojis/simplifiedautolinks.md @@ -0,0 +1 @@ +http://www.example.com/some:apple:url diff --git a/node_modules/showdown/test/features/emojis/special.html b/node_modules/showdown/test/features/emojis/special.html new file mode 100644 index 0000000..64fa636 --- /dev/null +++ b/node_modules/showdown/test/features/emojis/special.html @@ -0,0 +1,2 @@ +

    this is showdown's emoji S

    +

    and this is github's emoji :octocat:

    diff --git a/node_modules/showdown/test/features/emojis/special.md b/node_modules/showdown/test/features/emojis/special.md new file mode 100644 index 0000000..fba1c9f --- /dev/null +++ b/node_modules/showdown/test/features/emojis/special.md @@ -0,0 +1,3 @@ +this is showdown's emoji :showdown: + +and this is github's emoji :octocat: \ No newline at end of file diff --git a/node_modules/showdown/test/features/excludeTrailingPunctuationFromURLs-option.html b/node_modules/showdown/test/features/excludeTrailingPunctuationFromURLs-option.html new file mode 100644 index 0000000..80a4264 --- /dev/null +++ b/node_modules/showdown/test/features/excludeTrailingPunctuationFromURLs-option.html @@ -0,0 +1,6 @@ +

    url http://www.google.com.

    +

    url http://www.google.com!

    +

    url http://www.google.com? foo

    +

    url (http://www.google.com) bazinga

    +

    url [http://www.google.com] bazinga

    +

    url http://www.google.com, bar

    diff --git a/node_modules/showdown/test/features/excludeTrailingPunctuationFromURLs-option.md b/node_modules/showdown/test/features/excludeTrailingPunctuationFromURLs-option.md new file mode 100644 index 0000000..3ea0eb5 --- /dev/null +++ b/node_modules/showdown/test/features/excludeTrailingPunctuationFromURLs-option.md @@ -0,0 +1,11 @@ +url http://www.google.com. + +url http://www.google.com! + +url http://www.google.com? foo + +url (http://www.google.com) bazinga + +url [http://www.google.com] bazinga + +url http://www.google.com, bar diff --git a/node_modules/showdown/test/features/ghMentions.html b/node_modules/showdown/test/features/ghMentions.html new file mode 100644 index 0000000..92d09f1 --- /dev/null +++ b/node_modules/showdown/test/features/ghMentions.html @@ -0,0 +1,10 @@ +

    hello @tivie how are you?

    +

    this email foo@gmail.com is not parsed

    +

    this @mentions is not parsed

    +

    @john.doe

    +

    @john-doe

    +

    @.johndoe

    +

    @_johndoe

    +

    @-johndoe

    +

    @johndoe.

    +

    @johndoe-

    diff --git a/node_modules/showdown/test/features/ghMentions.md b/node_modules/showdown/test/features/ghMentions.md new file mode 100644 index 0000000..8b70873 --- /dev/null +++ b/node_modules/showdown/test/features/ghMentions.md @@ -0,0 +1,19 @@ +hello @tivie how are you? + +this email foo@gmail.com is not parsed + +this \@mentions is not parsed + +@john.doe + +@john-doe + +@.johndoe + +@_johndoe + +@-johndoe + +@johndoe. + +@johndoe- diff --git a/node_modules/showdown/test/features/literalMidWordAsterisks/#478.single-character-bolding.html b/node_modules/showdown/test/features/literalMidWordAsterisks/#478.single-character-bolding.html new file mode 100644 index 0000000..98d818c --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordAsterisks/#478.single-character-bolding.html @@ -0,0 +1,2 @@ +

    Click the X

    +

    Click the X button and then the OK button

    diff --git a/node_modules/showdown/test/features/literalMidWordAsterisks/#478.single-character-bolding.md b/node_modules/showdown/test/features/literalMidWordAsterisks/#478.single-character-bolding.md new file mode 100644 index 0000000..5b7f294 --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordAsterisks/#478.single-character-bolding.md @@ -0,0 +1,3 @@ +Click the **X** + +Click the **X** button and then the **OK** button diff --git a/node_modules/showdown/test/features/literalMidWordAsterisks/basic.html b/node_modules/showdown/test/features/literalMidWordAsterisks/basic.html new file mode 100644 index 0000000..e170ded --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordAsterisks/basic.html @@ -0,0 +1,29 @@ +

    this is a sentence*with*mid asterisks

    +

    this is a sentence**with**two mid asterisks

    +

    this is a sentence***with***three mid asterisks

    +

    this is double*asterisk*mid word with another**asterisk**word

    +

    this is double**asterisk**mid word with another**asterisk**word

    +

    this is double***asterisk***mid word with another***asterisk***word

    +

    this is double*asterisk**mid word with another***asterisk*word

    +

    this is double**asterisk*mid word with another***asterisk**word

    +

    this is a sentence with just*one asterisk

    +

    this is a sentence with just**one asterisk

    +

    this is a sentence with just***one asterisk

    +

    this is double**asterisk**mid word

    +

    this has just**one double asterisk

    +

    this has just***one triple asterisk

    +

    this should be parsed as emphasis

    +

    this should be parsed as bold

    +

    this should be parsed as bold and emphasis

    +

    emphasis at end of sentence

    +

    bold at end of sentence

    +

    bold and emphasis at end of sentence

    +

    emphasis at line start

    +

    bold at line start

    +

    bold and emphasis at line start

    +

    multi line emphasis +yeah it is yeah

    +

    multi line emphasis +yeah it is yeah

    +

    multi line emphasis +yeah it is yeah

    diff --git a/node_modules/showdown/test/features/literalMidWordAsterisks/basic.md b/node_modules/showdown/test/features/literalMidWordAsterisks/basic.md new file mode 100644 index 0000000..eb708f8 --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordAsterisks/basic.md @@ -0,0 +1,56 @@ +this is a sentence*with*mid asterisks + +this is a sentence**with**two mid asterisks + +this is a sentence***with***three mid asterisks + +this is double*asterisk*mid word with another**asterisk**word + +this is double**asterisk**mid word with another**asterisk**word + +this is double***asterisk***mid word with another***asterisk***word + +this is double*asterisk**mid word with another***asterisk*word + +this is double**asterisk*mid word with another***asterisk**word + +this is a sentence with just*one asterisk + +this is a sentence with just**one asterisk + +this is a sentence with just***one asterisk + +this is double**asterisk**mid word + +this has just**one double asterisk + +this has just***one triple asterisk + +this *should be parsed* as emphasis + +this **should be parsed** as bold + +this ***should be parsed*** as bold and emphasis + +emphasis at *end of sentence* + +bold at **end of sentence** + +bold and emphasis at ***end of sentence*** + +*emphasis at* line start + +**bold at** line start + +***bold and emphasis at*** line start + +multi *line emphasis +yeah it is* yeah + + +multi **line emphasis +yeah it is** yeah + + +multi ***line emphasis +yeah it is*** yeah diff --git a/node_modules/showdown/test/features/literalMidWordAsterisks/punctation-test.html b/node_modules/showdown/test/features/literalMidWordAsterisks/punctation-test.html new file mode 100644 index 0000000..0fb247a --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordAsterisks/punctation-test.html @@ -0,0 +1,7 @@ +

    Bold:

    +

    Bold

    +

    Bold:

    +
      +
    • Bold
        +
      • Tier 2
    • +
    diff --git a/node_modules/showdown/test/features/literalMidWordAsterisks/punctation-test.md b/node_modules/showdown/test/features/literalMidWordAsterisks/punctation-test.md new file mode 100644 index 0000000..b0701a9 --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordAsterisks/punctation-test.md @@ -0,0 +1,8 @@ +**Bold:** + +**Bold** + +**Bold**: + +- **Bold** + - Tier 2 diff --git a/node_modules/showdown/test/features/literalMidWordUnderscores/basic.html b/node_modules/showdown/test/features/literalMidWordUnderscores/basic.html new file mode 100644 index 0000000..7d7d9e9 --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordUnderscores/basic.html @@ -0,0 +1,12 @@ +

    some foo yeah

    +

    some foo yeah

    +

    some foo yeah

    +

    some word_foo_yeah

    +

    some word__foo__yeah

    +

    some word___foo___yeah

    +

    strippers, hitler, and stalin

    +

    strippers, hitler, and stalin

    +

    strippers, hitler, and stalin

    +

    multiple italics and bolds in a paragraph

    +

    multiple bolds in a paragraph

    +

    multiple italics in a paragraph

    \ No newline at end of file diff --git a/node_modules/showdown/test/features/literalMidWordUnderscores/basic.md b/node_modules/showdown/test/features/literalMidWordUnderscores/basic.md new file mode 100644 index 0000000..54a820e --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordUnderscores/basic.md @@ -0,0 +1,23 @@ +some _foo_ yeah + +some __foo__ yeah + +some ___foo___ yeah + +some word_foo_yeah + +some word__foo__yeah + +some word___foo___yeah + +strippers, _hitler_, and stalin + +strippers, __hitler__, and stalin + +strippers, ___hitler___, and stalin + +___multiple___ italics and bolds in a ___paragraph___ + +__multiple__ bolds in a __paragraph__ + +_multiple_ italics in a _paragraph_ \ No newline at end of file diff --git a/node_modules/showdown/test/features/literalMidWordUnderscores/punctation-test.html b/node_modules/showdown/test/features/literalMidWordUnderscores/punctation-test.html new file mode 100644 index 0000000..0fb247a --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordUnderscores/punctation-test.html @@ -0,0 +1,7 @@ +

    Bold:

    +

    Bold

    +

    Bold:

    +
      +
    • Bold
        +
      • Tier 2
    • +
    diff --git a/node_modules/showdown/test/features/literalMidWordUnderscores/punctation-test.md b/node_modules/showdown/test/features/literalMidWordUnderscores/punctation-test.md new file mode 100644 index 0000000..2e524d4 --- /dev/null +++ b/node_modules/showdown/test/features/literalMidWordUnderscores/punctation-test.md @@ -0,0 +1,8 @@ +__Bold:__ + +__Bold__ + +__Bold__: + +- __Bold__ + - Tier 2 diff --git a/node_modules/showdown/test/features/metadata/dashes-conflict.html b/node_modules/showdown/test/features/metadata/dashes-conflict.html new file mode 100644 index 0000000..4475fc7 --- /dev/null +++ b/node_modules/showdown/test/features/metadata/dashes-conflict.html @@ -0,0 +1,8 @@ +

    some markdown text

    +
      +
    • a list
    • +
    • another list ---
    • +
    • and stuff
    • +
    +

    a paragraph --- with dashes

    +
    diff --git a/node_modules/showdown/test/features/metadata/dashes-conflict.md b/node_modules/showdown/test/features/metadata/dashes-conflict.md new file mode 100644 index 0000000..41acf00 --- /dev/null +++ b/node_modules/showdown/test/features/metadata/dashes-conflict.md @@ -0,0 +1,16 @@ +--- + +title: This is the document title +language: en +author: Tivie + +--- +**some** markdown text + + - a list + - another list --- + - and stuff + +a paragraph --- with dashes + +--- diff --git a/node_modules/showdown/test/features/metadata/embeded-in-output.html b/node_modules/showdown/test/features/metadata/embeded-in-output.html new file mode 100644 index 0000000..eaa55fc --- /dev/null +++ b/node_modules/showdown/test/features/metadata/embeded-in-output.html @@ -0,0 +1,16 @@ + + + + This is the document title + + + + + + + + + +

    some markdown text

    + + diff --git a/node_modules/showdown/test/features/metadata/embeded-in-output.md b/node_modules/showdown/test/features/metadata/embeded-in-output.md new file mode 100644 index 0000000..c1749be --- /dev/null +++ b/node_modules/showdown/test/features/metadata/embeded-in-output.md @@ -0,0 +1,16 @@ +««« +title: This is the document title +language: en +author: Tivie +contributors: John, Mary, Steve +description: This is a long text and so it + spans on multiple lines. + It must be indented, + for showdown to parse it correctly. + Markdown **such as bold** is not parsed + and it will be rendered as plain text. +date: 01-01-2010 +keywords: foo, bar, baz +»»» + +**some** markdown text diff --git a/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks-different-symbols.html b/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks-different-symbols.html new file mode 100644 index 0000000..98d85ee --- /dev/null +++ b/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks-different-symbols.html @@ -0,0 +1,22 @@ + + + + This is the document title + + + + + + + +
    +

    description: This is a long text and so it + spans on multiple lines. + It must be indented, + for showdown to parse it correctly. + Markdown such as bold is not parsed + and it will be rendered as plain text.

    +

    date: 01-01-2010

    +

    some markdown text

    + + diff --git a/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks-different-symbols.md b/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks-different-symbols.md new file mode 100644 index 0000000..9fbe808 --- /dev/null +++ b/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks-different-symbols.md @@ -0,0 +1,18 @@ +««« +title: This is the document title +language: en +author: Tivie +contributors: John, Mary, Steve +keywords: foo, bar, baz +»»» +--- +description: This is a long text and so it + spans on multiple lines. + It must be indented, + for showdown to parse it correctly. + Markdown **such as bold** is not parsed + and it will be rendered as plain text. +date: 01-01-2010 +--- + +**some** markdown text diff --git a/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks.html b/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks.html new file mode 100644 index 0000000..98d85ee --- /dev/null +++ b/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks.html @@ -0,0 +1,22 @@ + + + + This is the document title + + + + + + + +
    +

    description: This is a long text and so it + spans on multiple lines. + It must be indented, + for showdown to parse it correctly. + Markdown such as bold is not parsed + and it will be rendered as plain text.

    +

    date: 01-01-2010

    +

    some markdown text

    + + diff --git a/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks.md b/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks.md new file mode 100644 index 0000000..da970ca --- /dev/null +++ b/node_modules/showdown/test/features/metadata/embeded-two-consecutive-metadata-blocks.md @@ -0,0 +1,18 @@ +--- +title: This is the document title +language: en +author: Tivie +contributors: John, Mary, Steve +keywords: foo, bar, baz +--- +--- +description: This is a long text and so it + spans on multiple lines. + It must be indented, + for showdown to parse it correctly. + Markdown **such as bold** is not parsed + and it will be rendered as plain text. +date: 01-01-2010 +--- + +**some** markdown text diff --git a/node_modules/showdown/test/features/metadata/ignore-metadata.html b/node_modules/showdown/test/features/metadata/ignore-metadata.html new file mode 100644 index 0000000..934e94f --- /dev/null +++ b/node_modules/showdown/test/features/metadata/ignore-metadata.html @@ -0,0 +1,15 @@ +
    +

    title: This is the document title +language: en +author: Tivie +contributors: John, Mary, Steve +description: This is a long text and so it +spans on multiple lines. +It must be indented, +for showdown to parse it correctly. +Markdown such as bold is not parsed +and it will be rendered as plain text. +date: 01-01-2010 +keywords: foo, bar, baz

    +
    +

    some markdown text

    diff --git a/node_modules/showdown/test/features/metadata/ignore-metadata.md b/node_modules/showdown/test/features/metadata/ignore-metadata.md new file mode 100644 index 0000000..d7aae89 --- /dev/null +++ b/node_modules/showdown/test/features/metadata/ignore-metadata.md @@ -0,0 +1,18 @@ +--- + +title: This is the document title +language: en +author: Tivie +contributors: John, Mary, Steve +description: This is a long text and so it + spans on multiple lines. + It must be indented, + for showdown to parse it correctly. + Markdown **such as bold** is not parsed + and it will be rendered as plain text. +date: 01-01-2010 +keywords: foo, bar, baz + +--- + +**some** markdown text diff --git a/node_modules/showdown/test/features/metadata/simple-angled-for-method.html b/node_modules/showdown/test/features/metadata/simple-angled-for-method.html new file mode 100644 index 0000000..e0ded5f --- /dev/null +++ b/node_modules/showdown/test/features/metadata/simple-angled-for-method.html @@ -0,0 +1 @@ +

    some text

    diff --git a/node_modules/showdown/test/features/metadata/simple-angled-for-method.md b/node_modules/showdown/test/features/metadata/simple-angled-for-method.md new file mode 100644 index 0000000..57e9d79 --- /dev/null +++ b/node_modules/showdown/test/features/metadata/simple-angled-for-method.md @@ -0,0 +1,6 @@ +««« +foo: bar +baz: bazinga +»»» + +some **text** diff --git a/node_modules/showdown/test/features/metadata/simple-angled-quotes.html b/node_modules/showdown/test/features/metadata/simple-angled-quotes.html new file mode 100644 index 0000000..435b817 --- /dev/null +++ b/node_modules/showdown/test/features/metadata/simple-angled-quotes.html @@ -0,0 +1 @@ +

    some markdown text

    diff --git a/node_modules/showdown/test/features/metadata/simple-angled-quotes.md b/node_modules/showdown/test/features/metadata/simple-angled-quotes.md new file mode 100644 index 0000000..c1749be --- /dev/null +++ b/node_modules/showdown/test/features/metadata/simple-angled-quotes.md @@ -0,0 +1,16 @@ +««« +title: This is the document title +language: en +author: Tivie +contributors: John, Mary, Steve +description: This is a long text and so it + spans on multiple lines. + It must be indented, + for showdown to parse it correctly. + Markdown **such as bold** is not parsed + and it will be rendered as plain text. +date: 01-01-2010 +keywords: foo, bar, baz +»»» + +**some** markdown text diff --git a/node_modules/showdown/test/features/metadata/simple-three-dashes.html b/node_modules/showdown/test/features/metadata/simple-three-dashes.html new file mode 100644 index 0000000..435b817 --- /dev/null +++ b/node_modules/showdown/test/features/metadata/simple-three-dashes.html @@ -0,0 +1 @@ +

    some markdown text

    diff --git a/node_modules/showdown/test/features/metadata/simple-three-dashes.md b/node_modules/showdown/test/features/metadata/simple-three-dashes.md new file mode 100644 index 0000000..d7790fa --- /dev/null +++ b/node_modules/showdown/test/features/metadata/simple-three-dashes.md @@ -0,0 +1,16 @@ +--- +title: This is the document title +language: en +author: Tivie +contributors: John, Mary, Steve +description: This is a long text and so it + spans on multiple lines. + It must be indented, + for showdown to parse it correctly. + Markdown **such as bold** is not parsed + and it will be rendered as plain text. +date: 01-01-2010 +keywords: foo, bar, baz +--- + +**some** markdown text diff --git a/node_modules/showdown/test/features/metadata/simple-with-format.html b/node_modules/showdown/test/features/metadata/simple-with-format.html new file mode 100644 index 0000000..435b817 --- /dev/null +++ b/node_modules/showdown/test/features/metadata/simple-with-format.html @@ -0,0 +1 @@ +

    some markdown text

    diff --git a/node_modules/showdown/test/features/metadata/simple-with-format.md b/node_modules/showdown/test/features/metadata/simple-with-format.md new file mode 100644 index 0000000..15d59bb --- /dev/null +++ b/node_modules/showdown/test/features/metadata/simple-with-format.md @@ -0,0 +1,9 @@ +---YAML +foo: bar +baz: + - bazinga + - bling + - blang +--- + +**some** markdown text diff --git a/node_modules/showdown/test/features/openLinksInNewWindow/hash-links-open-in-same-page.html b/node_modules/showdown/test/features/openLinksInNewWindow/hash-links-open-in-same-page.html new file mode 100644 index 0000000..b12ece1 --- /dev/null +++ b/node_modules/showdown/test/features/openLinksInNewWindow/hash-links-open-in-same-page.html @@ -0,0 +1 @@ +

    this link is in the same page

    diff --git a/node_modules/showdown/test/features/openLinksInNewWindow/hash-links-open-in-same-page.md b/node_modules/showdown/test/features/openLinksInNewWindow/hash-links-open-in-same-page.md new file mode 100644 index 0000000..48da53c --- /dev/null +++ b/node_modules/showdown/test/features/openLinksInNewWindow/hash-links-open-in-same-page.md @@ -0,0 +1 @@ +this link is in the [same page](#same-page) diff --git a/node_modules/showdown/test/features/openLinksInNewWindow/simple-cases.html b/node_modules/showdown/test/features/openLinksInNewWindow/simple-cases.html new file mode 100644 index 0000000..c62a155 --- /dev/null +++ b/node_modules/showdown/test/features/openLinksInNewWindow/simple-cases.html @@ -0,0 +1,2 @@ +

    foo

    +

    a link http://www.google.com

    diff --git a/node_modules/showdown/test/features/openLinksInNewWindow/simple-cases.md b/node_modules/showdown/test/features/openLinksInNewWindow/simple-cases.md new file mode 100644 index 0000000..28e9e69 --- /dev/null +++ b/node_modules/showdown/test/features/openLinksInNewWindow/simple-cases.md @@ -0,0 +1,3 @@ +[foo](www.google.com) + +a link diff --git a/node_modules/showdown/test/features/openLinksInNewWindow/simple.html b/node_modules/showdown/test/features/openLinksInNewWindow/simple.html new file mode 100644 index 0000000..c62a155 --- /dev/null +++ b/node_modules/showdown/test/features/openLinksInNewWindow/simple.html @@ -0,0 +1,2 @@ +

    foo

    +

    a link http://www.google.com

    diff --git a/node_modules/showdown/test/features/openLinksInNewWindow/simple.md b/node_modules/showdown/test/features/openLinksInNewWindow/simple.md new file mode 100644 index 0000000..28e9e69 --- /dev/null +++ b/node_modules/showdown/test/features/openLinksInNewWindow/simple.md @@ -0,0 +1,3 @@ +[foo](www.google.com) + +a link diff --git a/node_modules/showdown/test/features/openLinksInNewWindow/simplifiedAutoLink.html b/node_modules/showdown/test/features/openLinksInNewWindow/simplifiedAutoLink.html new file mode 100644 index 0000000..c23bf68 --- /dev/null +++ b/node_modules/showdown/test/features/openLinksInNewWindow/simplifiedAutoLink.html @@ -0,0 +1 @@ +

    this is http://www.google.com autolink

    diff --git a/node_modules/showdown/test/features/openLinksInNewWindow/simplifiedAutoLink.md b/node_modules/showdown/test/features/openLinksInNewWindow/simplifiedAutoLink.md new file mode 100644 index 0000000..d23d672 --- /dev/null +++ b/node_modules/showdown/test/features/openLinksInNewWindow/simplifiedAutoLink.md @@ -0,0 +1 @@ +this is http://www.google.com autolink diff --git a/node_modules/showdown/test/features/prefixHeaderId-simple.html b/node_modules/showdown/test/features/prefixHeaderId-simple.html new file mode 100644 index 0000000..002d428 --- /dev/null +++ b/node_modules/showdown/test/features/prefixHeaderId-simple.html @@ -0,0 +1 @@ +

    foo header

    diff --git a/node_modules/showdown/test/features/prefixHeaderId-simple.md b/node_modules/showdown/test/features/prefixHeaderId-simple.md new file mode 100644 index 0000000..7dcfc7d --- /dev/null +++ b/node_modules/showdown/test/features/prefixHeaderId-simple.md @@ -0,0 +1 @@ +# foo header diff --git a/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId.html b/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId.html new file mode 100644 index 0000000..953d73d --- /dev/null +++ b/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId.html @@ -0,0 +1 @@ +

    foo header

    diff --git a/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId.md b/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId.md new file mode 100644 index 0000000..7dcfc7d --- /dev/null +++ b/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId.md @@ -0,0 +1 @@ +# foo header diff --git a/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId2.html b/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId2.html new file mode 100644 index 0000000..953d73d --- /dev/null +++ b/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId2.html @@ -0,0 +1 @@ +

    foo header

    diff --git a/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId2.md b/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId2.md new file mode 100644 index 0000000..7dcfc7d --- /dev/null +++ b/node_modules/showdown/test/features/prefixHeaderId-string-and-ghCompatibleHeaderId2.md @@ -0,0 +1 @@ +# foo header diff --git a/node_modules/showdown/test/features/prefixHeaderId-string.html b/node_modules/showdown/test/features/prefixHeaderId-string.html new file mode 100644 index 0000000..6207eba --- /dev/null +++ b/node_modules/showdown/test/features/prefixHeaderId-string.html @@ -0,0 +1 @@ +

    foo header

    diff --git a/node_modules/showdown/test/features/prefixHeaderId-string.md b/node_modules/showdown/test/features/prefixHeaderId-string.md new file mode 100644 index 0000000..7dcfc7d --- /dev/null +++ b/node_modules/showdown/test/features/prefixHeaderId-string.md @@ -0,0 +1 @@ +# foo header diff --git a/node_modules/showdown/test/features/rawHeaderId/simple.html b/node_modules/showdown/test/features/rawHeaderId/simple.html new file mode 100644 index 0000000..c6022c2 --- /dev/null +++ b/node_modules/showdown/test/features/rawHeaderId/simple.html @@ -0,0 +1 @@ +

    123 My#very/ strange \header*`^ªº-_., yeah

    diff --git a/node_modules/showdown/test/features/rawHeaderId/simple.md b/node_modules/showdown/test/features/rawHeaderId/simple.md new file mode 100644 index 0000000..60c4f03 --- /dev/null +++ b/node_modules/showdown/test/features/rawHeaderId/simple.md @@ -0,0 +1 @@ +# 123 My#very/ strange \header*`^ªº-_., yeah diff --git a/node_modules/showdown/test/features/rawHeaderId/with-prefixHeaderId.html b/node_modules/showdown/test/features/rawHeaderId/with-prefixHeaderId.html new file mode 100644 index 0000000..21ed9be --- /dev/null +++ b/node_modules/showdown/test/features/rawHeaderId/with-prefixHeaderId.html @@ -0,0 +1,2 @@ +

    some header

    +

    another !"#$%&/()=?»@£§{[]}«' header

    diff --git a/node_modules/showdown/test/features/rawHeaderId/with-prefixHeaderId.md b/node_modules/showdown/test/features/rawHeaderId/with-prefixHeaderId.md new file mode 100644 index 0000000..8e087d7 --- /dev/null +++ b/node_modules/showdown/test/features/rawHeaderId/with-prefixHeaderId.md @@ -0,0 +1,3 @@ +# some header + +# another !"#$%&/()=?»@£§{[]}«' header diff --git a/node_modules/showdown/test/features/rawPrefixHeaderId/simple-with-prefixHeaderId.html b/node_modules/showdown/test/features/rawPrefixHeaderId/simple-with-prefixHeaderId.html new file mode 100644 index 0000000..d04a026 --- /dev/null +++ b/node_modules/showdown/test/features/rawPrefixHeaderId/simple-with-prefixHeaderId.html @@ -0,0 +1 @@ +

    some header &/) foo

    diff --git a/node_modules/showdown/test/features/rawPrefixHeaderId/simple-with-prefixHeaderId.md b/node_modules/showdown/test/features/rawPrefixHeaderId/simple-with-prefixHeaderId.md new file mode 100644 index 0000000..93b3ff3 --- /dev/null +++ b/node_modules/showdown/test/features/rawPrefixHeaderId/simple-with-prefixHeaderId.md @@ -0,0 +1 @@ +# some header &/) foo diff --git a/node_modules/showdown/test/features/requireSpaceBeforeHeadingText.html b/node_modules/showdown/test/features/requireSpaceBeforeHeadingText.html new file mode 100644 index 0000000..2610924 --- /dev/null +++ b/node_modules/showdown/test/features/requireSpaceBeforeHeadingText.html @@ -0,0 +1,2 @@ +

    header

    +

    #header

    diff --git a/node_modules/showdown/test/features/requireSpaceBeforeHeadingText.md b/node_modules/showdown/test/features/requireSpaceBeforeHeadingText.md new file mode 100644 index 0000000..c7eb76e --- /dev/null +++ b/node_modules/showdown/test/features/requireSpaceBeforeHeadingText.md @@ -0,0 +1,3 @@ +# header + +#header diff --git a/node_modules/showdown/test/features/simpleLineBreaks-handle-html-pre.html b/node_modules/showdown/test/features/simpleLineBreaks-handle-html-pre.html new file mode 100644 index 0000000..1b53992 --- /dev/null +++ b/node_modules/showdown/test/features/simpleLineBreaks-handle-html-pre.html @@ -0,0 +1,4 @@ +

    hmm

    +
    +this is `a\_test` and this\_too and finally_this_is
    +
    diff --git a/node_modules/showdown/test/features/simpleLineBreaks-handle-html-pre.md b/node_modules/showdown/test/features/simpleLineBreaks-handle-html-pre.md new file mode 100644 index 0000000..e2a6333 --- /dev/null +++ b/node_modules/showdown/test/features/simpleLineBreaks-handle-html-pre.md @@ -0,0 +1,4 @@ +hmm +
    +this is `a\_test` and this\_too and finally_this_is
    +
    diff --git a/node_modules/showdown/test/features/simpleLineBreaks2.html b/node_modules/showdown/test/features/simpleLineBreaks2.html new file mode 100644 index 0000000..54235c0 --- /dev/null +++ b/node_modules/showdown/test/features/simpleLineBreaks2.html @@ -0,0 +1,13 @@ +
      +
    1. One

    2. +
    3. Two
      + foo

      +

      bar
      + bazinga

      +

      nhecos

    4. +
    5. Three

      +
        +
      • foo

      • +
      • bar

    6. +
    + \ No newline at end of file diff --git a/node_modules/showdown/test/features/simpleLineBreaks2.md b/node_modules/showdown/test/features/simpleLineBreaks2.md new file mode 100644 index 0000000..40bbcad --- /dev/null +++ b/node_modules/showdown/test/features/simpleLineBreaks2.md @@ -0,0 +1,18 @@ + 1. One + 2. Two + foo + + bar + bazinga + + + + + nhecos + + 3. Three + + - foo + + - bar + \ No newline at end of file diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/autolinks-with-magic-chars.html b/node_modules/showdown/test/features/simplifiedAutoLink/autolinks-with-magic-chars.html new file mode 100644 index 0000000..ce67599 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/autolinks-with-magic-chars.html @@ -0,0 +1 @@ +

    http://www.foobar.com/blegh#**foobar**bazinga

    diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/autolinks-with-magic-chars.md b/node_modules/showdown/test/features/simplifiedAutoLink/autolinks-with-magic-chars.md new file mode 100644 index 0000000..0aefceb --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/autolinks-with-magic-chars.md @@ -0,0 +1 @@ +http://www.foobar.com/blegh#**foobar**bazinga \ No newline at end of file diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/blockquote.html b/node_modules/showdown/test/features/simplifiedAutoLink/blockquote.html new file mode 100644 index 0000000..f2e95e1 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/blockquote.html @@ -0,0 +1,3 @@ +
    +

    http://www.google.com

    +
    diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/blockquote.md b/node_modules/showdown/test/features/simplifiedAutoLink/blockquote.md new file mode 100644 index 0000000..cde3848 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/blockquote.md @@ -0,0 +1 @@ +> http://www.google.com diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/disallow-underscores.html b/node_modules/showdown/test/features/simplifiedAutoLink/disallow-underscores.html new file mode 100644 index 0000000..69efe76 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/disallow-underscores.html @@ -0,0 +1 @@ +

    http://en.wikipedia.org/wiki/Tourism_in_Germany

    \ No newline at end of file diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/disallow-underscores.md b/node_modules/showdown/test/features/simplifiedAutoLink/disallow-underscores.md new file mode 100644 index 0000000..5d1491a --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/disallow-underscores.md @@ -0,0 +1 @@ +http://en.wikipedia.org/wiki/Tourism_in_Germany diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-a-tags.html b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-a-tags.html new file mode 100644 index 0000000..044e97b --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-a-tags.html @@ -0,0 +1 @@ +

    www.google.com

    diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-a-tags.md b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-a-tags.md new file mode 100644 index 0000000..51a9890 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-a-tags.md @@ -0,0 +1 @@ +www.google.com diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-code.html b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-code.html new file mode 100644 index 0000000..5a99028 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-code.html @@ -0,0 +1,6 @@ +
    some code with
    +a link
    +www.google.com
    +
    +and another link http://www.google.com
    +
    diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-code.md b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-code.md new file mode 100644 index 0000000..c4c8694 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-inside-code.md @@ -0,0 +1,5 @@ + some code with + a link + www.google.com + + and another link http://www.google.com diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-reference-links.html b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-reference-links.html new file mode 100644 index 0000000..0efe971 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-reference-links.html @@ -0,0 +1 @@ +

    Showdown

    diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-reference-links.md b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-reference-links.md new file mode 100644 index 0000000..73c4bf4 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/does-not-parse-reference-links.md @@ -0,0 +1,3 @@ +![Showdown][sd-logo] + +[sd-logo]: https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/emphasis-and-strikethrough.html b/node_modules/showdown/test/features/simplifiedAutoLink/emphasis-and-strikethrough.html new file mode 100644 index 0000000..c3da7fd --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/emphasis-and-strikethrough.html @@ -0,0 +1,7 @@ +

    http://www.google.com/foobar

    +

    http://www.google.com/foobar

    +

    http://www.google.com/foobar

    +

    http://www.google.com/foobar

    +

    http://www.google.com/foobar

    +

    http://www.google.com/foobar

    +

    http://www.google.com/foobar

    diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/emphasis-and-strikethrough.md b/node_modules/showdown/test/features/simplifiedAutoLink/emphasis-and-strikethrough.md new file mode 100644 index 0000000..25814b4 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/emphasis-and-strikethrough.md @@ -0,0 +1,13 @@ +*http://www.google.com/foobar* + +**http://www.google.com/foobar** + +***http://www.google.com/foobar*** + +~~http://www.google.com/foobar~~ + +_http://www.google.com/foobar_ + +__http://www.google.com/foobar__ + +___http://www.google.com/foobar___ \ No newline at end of file diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/ordered-lists.html b/node_modules/showdown/test/features/simplifiedAutoLink/ordered-lists.html new file mode 100644 index 0000000..cbb2217 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/ordered-lists.html @@ -0,0 +1,11 @@ +
      +
    1. http://www.google.com/listitem1
    2. +
    3. http://www.google.com/listitem2
    4. +
    5. http://www.google.com/listitem3
    6. +
    +

    foo

    +
      +
    1. http://www.google.com/listitem1

    2. +
    3. http://www.google.com/listitem2

    4. +
    5. http://www.google.com/listitem3

    6. +
    diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/ordered-lists.md b/node_modules/showdown/test/features/simplifiedAutoLink/ordered-lists.md new file mode 100644 index 0000000..df50da9 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/ordered-lists.md @@ -0,0 +1,11 @@ +1. http://www.google.com/listitem1 +2. http://www.google.com/listitem2 +3. http://www.google.com/listitem3 + +foo + +1. http://www.google.com/listitem1 + +2. http://www.google.com/listitem2 + +3. http://www.google.com/listitem3 \ No newline at end of file diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/text.html b/node_modules/showdown/test/features/simplifiedAutoLink/text.html new file mode 100644 index 0000000..5f7d35c --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/text.html @@ -0,0 +1,6 @@ +

    http://www.google.com/foobar

    +

    www.google.com/foobar

    +

    ftp://user:password@host.com:port/path

    +

    this has some http://www.google.com/foobar in text

    +

    this has some www.google.com/foobar in text

    +

    this has some ftp://user:password@host.com:port/path in text

    diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/text.md b/node_modules/showdown/test/features/simplifiedAutoLink/text.md new file mode 100644 index 0000000..9c65067 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/text.md @@ -0,0 +1,13 @@ +http://www.google.com/foobar + +www.google.com/foobar + +ftp://user:password@host.com:port/path + +this has some http://www.google.com/foobar in text + +this has some www.google.com/foobar in text + +this has some ftp://user:password@host.com:port/path in text + + diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/unordered-lists.html b/node_modules/showdown/test/features/simplifiedAutoLink/unordered-lists.html new file mode 100644 index 0000000..bc728f6 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/unordered-lists.html @@ -0,0 +1,11 @@ + +

    a

    + diff --git a/node_modules/showdown/test/features/simplifiedAutoLink/unordered-lists.md b/node_modules/showdown/test/features/simplifiedAutoLink/unordered-lists.md new file mode 100644 index 0000000..0d7e6f4 --- /dev/null +++ b/node_modules/showdown/test/features/simplifiedAutoLink/unordered-lists.md @@ -0,0 +1,11 @@ + - http://www.google.com/foo + - http://www.google.com/bar + - http://www.google.com/baz + +a + + - http://www.google.com/foo + + - http://www.google.com/bar + + - http://www.google.com/baz diff --git a/node_modules/showdown/test/features/splitAdjacentBlockquotes/basic.html b/node_modules/showdown/test/features/splitAdjacentBlockquotes/basic.html new file mode 100644 index 0000000..a58d974 --- /dev/null +++ b/node_modules/showdown/test/features/splitAdjacentBlockquotes/basic.html @@ -0,0 +1,8 @@ +
    +

    Block quote 1

    +

    This is my first block quote.

    +
    +
    +

    Block quote 2

    +

    This is my second block quote.

    +
    diff --git a/node_modules/showdown/test/features/splitAdjacentBlockquotes/basic.md b/node_modules/showdown/test/features/splitAdjacentBlockquotes/basic.md new file mode 100644 index 0000000..d47e82b --- /dev/null +++ b/node_modules/showdown/test/features/splitAdjacentBlockquotes/basic.md @@ -0,0 +1,7 @@ +> # Block quote 1 +> +> This is my first block quote. + +> # Block quote 2 +> +> This is my second block quote. diff --git a/node_modules/showdown/test/features/splitAdjacentBlockquotes/multiline-paragraph.html b/node_modules/showdown/test/features/splitAdjacentBlockquotes/multiline-paragraph.html new file mode 100644 index 0000000..ce8b0ee --- /dev/null +++ b/node_modules/showdown/test/features/splitAdjacentBlockquotes/multiline-paragraph.html @@ -0,0 +1,6 @@ +
    +

    This is my second block quote +yeah +everythong is ok.

    +
    +

    This is not a blockquote

    diff --git a/node_modules/showdown/test/features/splitAdjacentBlockquotes/multiline-paragraph.md b/node_modules/showdown/test/features/splitAdjacentBlockquotes/multiline-paragraph.md new file mode 100644 index 0000000..427556b --- /dev/null +++ b/node_modules/showdown/test/features/splitAdjacentBlockquotes/multiline-paragraph.md @@ -0,0 +1,5 @@ +> This is my second block quote +yeah +everythong is ok. + +This is not a blockquote diff --git a/node_modules/showdown/test/features/tables/#179.parse-md-in-table-ths.html b/node_modules/showdown/test/features/tables/#179.parse-md-in-table-ths.html new file mode 100644 index 0000000..e641c3a --- /dev/null +++ b/node_modules/showdown/test/features/tables/#179.parse-md-in-table-ths.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +
    foobarbaz
    100blablaaaa
    diff --git a/node_modules/showdown/test/features/tables/#179.parse-md-in-table-ths.md b/node_modules/showdown/test/features/tables/#179.parse-md-in-table-ths.md new file mode 100644 index 0000000..42f88d8 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#179.parse-md-in-table-ths.md @@ -0,0 +1,3 @@ +| *foo* | **bar** | ~~baz~~ | +|-------|---------|---------| +| 100 | blabla | aaa | diff --git a/node_modules/showdown/test/features/tables/#256.table-header-separators-should-not-require-3-dashes.html b/node_modules/showdown/test/features/tables/#256.table-header-separators-should-not-require-3-dashes.html new file mode 100644 index 0000000..e56d867 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#256.table-header-separators-should-not-require-3-dashes.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +
    keyvalue
    My KeyMy Value
    diff --git a/node_modules/showdown/test/features/tables/#256.table-header-separators-should-not-require-3-dashes.md b/node_modules/showdown/test/features/tables/#256.table-header-separators-should-not-require-3-dashes.md new file mode 100644 index 0000000..9f93742 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#256.table-header-separators-should-not-require-3-dashes.md @@ -0,0 +1,3 @@ +|key|value| +|--|--| +|My Key|My Value| diff --git a/node_modules/showdown/test/features/tables/#345.escape-pipe-character.html b/node_modules/showdown/test/features/tables/#345.escape-pipe-character.html new file mode 100644 index 0000000..059ef88 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#345.escape-pipe-character.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OperatorDescription
    &Logical AND
    &&Shortcut AND
    |Logical OR
    ||Shortcut OR
    ^Logical XOR
    diff --git a/node_modules/showdown/test/features/tables/#345.escape-pipe-character.md b/node_modules/showdown/test/features/tables/#345.escape-pipe-character.md new file mode 100644 index 0000000..690b649 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#345.escape-pipe-character.md @@ -0,0 +1,7 @@ +| Operator | Description | +|----------|-------------| +| & | Logical AND | +| && | Shortcut AND | +| \| | Logical OR | +| \|\| | Shortcut OR | +| ^ | Logical XOR | diff --git a/node_modules/showdown/test/features/tables/#406.does-not-render-one-column-tables.html b/node_modules/showdown/test/features/tables/#406.does-not-render-one-column-tables.html new file mode 100644 index 0000000..841e371 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#406.does-not-render-one-column-tables.html @@ -0,0 +1,81 @@ + + + + + + + + + + + +
    some header
    some content
    + + + + + + + + +
    some header
    + + + + + + + + + + + + + + + + + + + + + + + +
    some header
    some content
    some content
    some content
    some content
    some content
    + + + + + + + + + + + +
    some header
    some content
    + + + + + + + + + + + +
    some header
    some content
    + + + + + + + + + + + +
    some header
    some content
    diff --git a/node_modules/showdown/test/features/tables/#406.does-not-render-one-column-tables.md b/node_modules/showdown/test/features/tables/#406.does-not-render-one-column-tables.md new file mode 100644 index 0000000..3a5aee1 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#406.does-not-render-one-column-tables.md @@ -0,0 +1,26 @@ +|some header | +|------------| +|some content| + +|some header | +|------------| + +|some header | +|------------| +|some content| +|some content| +|some content| +|some content| +|some content| + +|some header | +|:-----------| +|some content| + +|some header | +|-----------:| +|some content| + +|some header | +|:----------:| +|some content| \ No newline at end of file diff --git a/node_modules/showdown/test/features/tables/#442.trailing-spaces-break-one-column-tables.html b/node_modules/showdown/test/features/tables/#442.trailing-spaces-break-one-column-tables.html new file mode 100644 index 0000000..1d3fc89 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#442.trailing-spaces-break-one-column-tables.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +
    Single column
    Row one
    Row two
    diff --git a/node_modules/showdown/test/features/tables/#442.trailing-spaces-break-one-column-tables.md b/node_modules/showdown/test/features/tables/#442.trailing-spaces-break-one-column-tables.md new file mode 100644 index 0000000..b3d0ae9 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#442.trailing-spaces-break-one-column-tables.md @@ -0,0 +1,4 @@ +| Single column | +|:--------------| +| Row one | +| Row two | diff --git a/node_modules/showdown/test/features/tables/#443.2.table-followed-by-list-does-not-parse-correctly.html b/node_modules/showdown/test/features/tables/#443.2.table-followed-by-list-does-not-parse-correctly.html new file mode 100644 index 0000000..09915f0 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#443.2.table-followed-by-list-does-not-parse-correctly.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + +
    Tables
    col 3 is
    col 2 is
    zebra stripes
    +
      +
    1. test
    2. +
    diff --git a/node_modules/showdown/test/features/tables/#443.2.table-followed-by-list-does-not-parse-correctly.md b/node_modules/showdown/test/features/tables/#443.2.table-followed-by-list-does-not-parse-correctly.md new file mode 100644 index 0000000..2393809 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#443.2.table-followed-by-list-does-not-parse-correctly.md @@ -0,0 +1,7 @@ +| Tables | +| ------------- | +| **col 3 is** | +| col 2 is | +| zebra stripes | + +1. test \ No newline at end of file diff --git a/node_modules/showdown/test/features/tables/#443.table-followed-by-list-does-not-parse-correctly.html b/node_modules/showdown/test/features/tables/#443.table-followed-by-list-does-not-parse-correctly.html new file mode 100644 index 0000000..4c46b80 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#443.table-followed-by-list-does-not-parse-correctly.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
    TablesAreCool
    col 3 isright-aligned$1600
    col 2 iscentered$12
    zebra stripesare neat$1
    +
      +
    1. test
    2. +
    diff --git a/node_modules/showdown/test/features/tables/#443.table-followed-by-list-does-not-parse-correctly.md b/node_modules/showdown/test/features/tables/#443.table-followed-by-list-does-not-parse-correctly.md new file mode 100644 index 0000000..8cdfb69 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#443.table-followed-by-list-does-not-parse-correctly.md @@ -0,0 +1,7 @@ +| Tables | Are | Cool | +| ------------- |:-------------:| -----:| +| **col 3 is** | right-aligned | $1600 | +| col 2 is | *centered* | $12 | +| zebra stripes | are neat | $1 | + +1. test diff --git a/node_modules/showdown/test/features/tables/#465.code-spans-with-pipes-break-table.html b/node_modules/showdown/test/features/tables/#465.code-spans-with-pipes-break-table.html new file mode 100644 index 0000000..9be5dc1 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#465.code-spans-with-pipes-break-table.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +
    PowerShell commandExample
    Get-ServiceGet-Service | Stop-Service -WhatIf
    diff --git a/node_modules/showdown/test/features/tables/#465.code-spans-with-pipes-break-table.md b/node_modules/showdown/test/features/tables/#465.code-spans-with-pipes-break-table.md new file mode 100644 index 0000000..f605e12 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#465.code-spans-with-pipes-break-table.md @@ -0,0 +1,3 @@ +|PowerShell command|Example| +|--|--| +|Get-Service|`Get-Service | Stop-Service -WhatIf`| diff --git a/node_modules/showdown/test/features/tables/#471.ol-is-not-rendered-correctly-inside-table.html b/node_modules/showdown/test/features/tables/#471.ol-is-not-rendered-correctly-inside-table.html new file mode 100644 index 0000000..4d236d2 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#471.ol-is-not-rendered-correctly-inside-table.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +
    h1h2
    asdfone two <ol> three
    \ No newline at end of file diff --git a/node_modules/showdown/test/features/tables/#471.ol-is-not-rendered-correctly-inside-table.md b/node_modules/showdown/test/features/tables/#471.ol-is-not-rendered-correctly-inside-table.md new file mode 100644 index 0000000..23be2f1 --- /dev/null +++ b/node_modules/showdown/test/features/tables/#471.ol-is-not-rendered-correctly-inside-table.md @@ -0,0 +1,3 @@ +| h1 | h2 | +|--------:|:---------------------| +| asdf | one `two
      three` | diff --git a/node_modules/showdown/test/features/tables/basic-alignment.html b/node_modules/showdown/test/features/tables/basic-alignment.html new file mode 100644 index 0000000..0895c7e --- /dev/null +++ b/node_modules/showdown/test/features/tables/basic-alignment.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +
      First HeaderSecond Header
      Row 1 Cell 1Row 1 Cell 2
      Row 2 Cell 1Row 2 Cell 2
      diff --git a/node_modules/showdown/test/features/tables/basic-alignment.md b/node_modules/showdown/test/features/tables/basic-alignment.md new file mode 100644 index 0000000..5aa9082 --- /dev/null +++ b/node_modules/showdown/test/features/tables/basic-alignment.md @@ -0,0 +1,4 @@ +| First Header | Second Header | +| :------------ | :------------ | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | diff --git a/node_modules/showdown/test/features/tables/basic-with-header-ids.html b/node_modules/showdown/test/features/tables/basic-with-header-ids.html new file mode 100644 index 0000000..3843ed3 --- /dev/null +++ b/node_modules/showdown/test/features/tables/basic-with-header-ids.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +
      First HeaderSecond Header
      Row 1 Cell 1Row 1 Cell 2
      Row 2 Cell 1Row 2 Cell 2
      diff --git a/node_modules/showdown/test/features/tables/basic-with-header-ids.md b/node_modules/showdown/test/features/tables/basic-with-header-ids.md new file mode 100644 index 0000000..d67f8fd --- /dev/null +++ b/node_modules/showdown/test/features/tables/basic-with-header-ids.md @@ -0,0 +1,4 @@ +| First Header | Second Header | +| ------------- | ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | diff --git a/node_modules/showdown/test/features/tables/basic.html b/node_modules/showdown/test/features/tables/basic.html new file mode 100644 index 0000000..1851da8 --- /dev/null +++ b/node_modules/showdown/test/features/tables/basic.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +
      First HeaderSecond Header
      Row 1 Cell 1Row 1 Cell 2
      Row 2 Cell 1Row 2 Cell 2
      diff --git a/node_modules/showdown/test/features/tables/basic.md b/node_modules/showdown/test/features/tables/basic.md new file mode 100644 index 0000000..d67f8fd --- /dev/null +++ b/node_modules/showdown/test/features/tables/basic.md @@ -0,0 +1,4 @@ +| First Header | Second Header | +| ------------- | ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | diff --git a/node_modules/showdown/test/features/tables/gh-style-tables.html b/node_modules/showdown/test/features/tables/gh-style-tables.html new file mode 100644 index 0000000..2f3fb92 --- /dev/null +++ b/node_modules/showdown/test/features/tables/gh-style-tables.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + +
      First HeaderSecond HeaderThird Header
      Content CellContent CellC
      Content CellContent CellC
      diff --git a/node_modules/showdown/test/features/tables/gh-style-tables.md b/node_modules/showdown/test/features/tables/gh-style-tables.md new file mode 100644 index 0000000..3cfe4b5 --- /dev/null +++ b/node_modules/showdown/test/features/tables/gh-style-tables.md @@ -0,0 +1,4 @@ +First Header | Second Header|Third Header +------------- | -------------|--- +Content Cell | Content Cell|C +Content Cell | Content Cell|C diff --git a/node_modules/showdown/test/features/tables/large-table-with-allignments.html b/node_modules/showdown/test/features/tables/large-table-with-allignments.html new file mode 100644 index 0000000..da5198d --- /dev/null +++ b/node_modules/showdown/test/features/tables/large-table-with-allignments.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      First HeaderSecond HeaderThird HeaderFourth Header
      Row 1 Cell 1Row 1 Cell 2Row 1 Cell 3Row 1 Cell 4
      Row 2 Cell 1Row 2 Cell 2Row 2 Cell 3Row 2 Cell 4
      Row 3 Cell 1Row 3 Cell 2Row 3 Cell 3Row 3 Cell 4
      Row 4 Cell 1Row 4 Cell 2Row 4 Cell 3Row 4 Cell 4
      Row 5 Cell 1Row 5 Cell 2Row 5 Cell 3Row 5 Cell 4
      diff --git a/node_modules/showdown/test/features/tables/large-table-with-allignments.md b/node_modules/showdown/test/features/tables/large-table-with-allignments.md new file mode 100644 index 0000000..b3fe137 --- /dev/null +++ b/node_modules/showdown/test/features/tables/large-table-with-allignments.md @@ -0,0 +1,7 @@ +| First Header | Second Header | Third Header | Fourth Header | +| :------------ |: ----------- :| ------------ :| ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 | Row 1 Cell 4 | +| Row 2 Cell 1 | Row 2 Cell 2 | Row 2 Cell 3 | Row 2 Cell 4 | +| Row 3 Cell 1 | Row 3 Cell 2 | Row 3 Cell 3 | Row 3 Cell 4 | +| Row 4 Cell 1 | Row 4 Cell 2 | Row 4 Cell 3 | Row 4 Cell 4 | +| Row 5 Cell 1 | Row 5 Cell 2 | Row 5 Cell 3 | Row 5 Cell 4 | diff --git a/node_modules/showdown/test/features/tables/large.html b/node_modules/showdown/test/features/tables/large.html new file mode 100644 index 0000000..4c6f36e --- /dev/null +++ b/node_modules/showdown/test/features/tables/large.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      First HeaderSecond HeaderThird HeaderFourth Header
      Row 1 Cell 1Row 1 Cell 2Row 1 Cell 3Row 1 Cell 4
      Row 2 Cell 1Row 2 Cell 2Row 2 Cell 3Row 2 Cell 4
      Row 3 Cell 1Row 3 Cell 2Row 3 Cell 3Row 3 Cell 4
      Row 4 Cell 1Row 4 Cell 2Row 4 Cell 3Row 4 Cell 4
      Row 5 Cell 1Row 5 Cell 2Row 5 Cell 3Row 5 Cell 4
      diff --git a/node_modules/showdown/test/features/tables/large.md b/node_modules/showdown/test/features/tables/large.md new file mode 100644 index 0000000..e18e478 --- /dev/null +++ b/node_modules/showdown/test/features/tables/large.md @@ -0,0 +1,7 @@ +| First Header | Second Header | Third Header | Fourth Header | +| ------------- | ------------- | ------------ | ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 | Row 1 Cell 4 | +| Row 2 Cell 1 | Row 2 Cell 2 | Row 2 Cell 3 | Row 2 Cell 4 | +| Row 3 Cell 1 | Row 3 Cell 2 | Row 3 Cell 3 | Row 3 Cell 4 | +| Row 4 Cell 1 | Row 4 Cell 2 | Row 4 Cell 3 | Row 4 Cell 4 | +| Row 5 Cell 1 | Row 5 Cell 2 | Row 5 Cell 3 | Row 5 Cell 4 | diff --git a/node_modules/showdown/test/features/tables/mixed-alignment.html b/node_modules/showdown/test/features/tables/mixed-alignment.html new file mode 100644 index 0000000..1ac7e57 --- /dev/null +++ b/node_modules/showdown/test/features/tables/mixed-alignment.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
      Left-AlignedCenter-AlignedRight-Aligned
      col 3 issome wordy paragraph$1600
      col 2 iscentered$12
      zebra stripesare neat$1
      diff --git a/node_modules/showdown/test/features/tables/mixed-alignment.md b/node_modules/showdown/test/features/tables/mixed-alignment.md new file mode 100644 index 0000000..93f7c61 --- /dev/null +++ b/node_modules/showdown/test/features/tables/mixed-alignment.md @@ -0,0 +1,5 @@ +| Left-Aligned | Center-Aligned | Right-Aligned | +| :------------ |:--------------------:| -------------:| +| col 3 is | some wordy paragraph | $1600 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | diff --git a/node_modules/showdown/test/features/tables/multiple-tables.html b/node_modules/showdown/test/features/tables/multiple-tables.html new file mode 100644 index 0000000..0b18220 --- /dev/null +++ b/node_modules/showdown/test/features/tables/multiple-tables.html @@ -0,0 +1,35 @@ +

      Table Test

      +

      section 1

      + + + + + + + + + + + + + + + +
      header1header2header3
      Value1Value2Value3
      +

      section 2

      + + + + + + + + + + + + + + + +
      headerAheaderBheaderC
      ValueAValueBValueC
      \ No newline at end of file diff --git a/node_modules/showdown/test/features/tables/multiple-tables.md b/node_modules/showdown/test/features/tables/multiple-tables.md new file mode 100644 index 0000000..25bc09e --- /dev/null +++ b/node_modules/showdown/test/features/tables/multiple-tables.md @@ -0,0 +1,17 @@ +Table Test +============ + +section 1 +------------ + +|header1 |header2 |header3| +|-----------|-----------|---------| +|Value1 |Value2 |Value3 | + + +section 2 +----------- + +|headerA |headerB |headerC| +|-----------|-----------|---------| +|ValueA |ValueB |ValueC | diff --git a/node_modules/showdown/test/features/tables/table-inside-codeblock.html b/node_modules/showdown/test/features/tables/table-inside-codeblock.html new file mode 100644 index 0000000..32d2467 --- /dev/null +++ b/node_modules/showdown/test/features/tables/table-inside-codeblock.html @@ -0,0 +1,7 @@ +

      some text

      +
      | Tables        | Are           | Cool  |
      +| ------------- |:-------------:| -----:|
      +| **col 3 is**  | right-aligned | $1600 |
      +| col 2 is      | *centered*    |   $12 |
      +| zebra stripes | ~~are neat~~  |    $1 |
      +
      diff --git a/node_modules/showdown/test/features/tables/table-inside-codeblock.md b/node_modules/showdown/test/features/tables/table-inside-codeblock.md new file mode 100644 index 0000000..6b82cdc --- /dev/null +++ b/node_modules/showdown/test/features/tables/table-inside-codeblock.md @@ -0,0 +1,8 @@ +some text + + + | Tables | Are | Cool | + | ------------- |:-------------:| -----:| + | **col 3 is** | right-aligned | $1600 | + | col 2 is | *centered* | $12 | + | zebra stripes | ~~are neat~~ | $1 | diff --git a/node_modules/showdown/test/features/tables/table-without-leading-pipe.html b/node_modules/showdown/test/features/tables/table-without-leading-pipe.html new file mode 100644 index 0000000..9d2f170 --- /dev/null +++ b/node_modules/showdown/test/features/tables/table-without-leading-pipe.html @@ -0,0 +1,47 @@ + +

      Stats

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      StatusAGENT1AGENT2AGENT3AGENT4AGENT5AGENT6AGENT7AGENT8AGENT9TOTAL
      AGENT ERROR000000000
      APPROVED000000000
      diff --git a/node_modules/showdown/test/features/tables/table-without-leading-pipe.md b/node_modules/showdown/test/features/tables/table-without-leading-pipe.md new file mode 100644 index 0000000..c642428 --- /dev/null +++ b/node_modules/showdown/test/features/tables/table-without-leading-pipe.md @@ -0,0 +1,8 @@ + +### Stats + + +Status | AGENT1 | AGENT2 | AGENT3 | AGENT4 | AGENT5 | AGENT6 | AGENT7 | AGENT8 | AGENT9 | TOTAL | +--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +AGENT ERROR | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +APPROVED | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | diff --git a/node_modules/showdown/test/features/tables/with-equals.html b/node_modules/showdown/test/features/tables/with-equals.html new file mode 100644 index 0000000..1851da8 --- /dev/null +++ b/node_modules/showdown/test/features/tables/with-equals.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +
      First HeaderSecond Header
      Row 1 Cell 1Row 1 Cell 2
      Row 2 Cell 1Row 2 Cell 2
      diff --git a/node_modules/showdown/test/features/tables/with-equals.md b/node_modules/showdown/test/features/tables/with-equals.md new file mode 100644 index 0000000..744a6db --- /dev/null +++ b/node_modules/showdown/test/features/tables/with-equals.md @@ -0,0 +1,4 @@ +| First Header | Second Header | +| ============= | ============= | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | diff --git a/node_modules/showdown/test/features/tables/with-span-elements.html b/node_modules/showdown/test/features/tables/with-span-elements.html new file mode 100644 index 0000000..3f7236e --- /dev/null +++ b/node_modules/showdown/test/features/tables/with-span-elements.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
      First HeaderSecond Header
      boldimg
      italiclink
      some codegoogle
      www.foo.comnormal
      \ No newline at end of file diff --git a/node_modules/showdown/test/features/tables/with-span-elements.md b/node_modules/showdown/test/features/tables/with-span-elements.md new file mode 100644 index 0000000..6a918e6 --- /dev/null +++ b/node_modules/showdown/test/features/tables/with-span-elements.md @@ -0,0 +1,9 @@ +| First Header | Second Header | +| ------------- | ----------------- | +| **bold** | ![img](foo.jpg) | +| _italic_ | [link](bla.html) | +| `some code` | [google][1] | +| | normal | + + + [1]: www.google.com diff --git a/node_modules/showdown/test/features/tables/with-surroundings.html b/node_modules/showdown/test/features/tables/with-surroundings.html new file mode 100644 index 0000000..cf811a8 --- /dev/null +++ b/node_modules/showdown/test/features/tables/with-surroundings.html @@ -0,0 +1,28 @@ +

      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisi est, +ullamcorper euismod iaculis sed, tristique at neque. Nullam metus risus, +malesuada vitae imperdiet ac, tincidunt eget lacus. Proin ullamcorper +vulputate dictum. Vestibulum consequat ultricies nibh, sed tempus nisl mattis a.

      + + + + + + + + + + + + + + + + + +
      First HeaderSecond Header
      Row 1 Cell 1Row 1 Cell 2
      Row 2 Cell 1Row 2 Cell 2
      +

      Phasellus ac porttitor quam. Integer cursus accumsan mauris nec interdum. +Etiam iaculis urna vitae risus facilisis faucibus eu quis risus. Sed aliquet +rutrum dictum. Vivamus pulvinar malesuada ultricies. Pellentesque in commodo +nibh. Maecenas justo erat, sodales vel bibendum a, dignissim in orci. Duis +blandit ornare mi non facilisis. Aliquam rutrum fringilla lacus in semper. +Sed vel pretium lorem.

      diff --git a/node_modules/showdown/test/features/tables/with-surroundings.md b/node_modules/showdown/test/features/tables/with-surroundings.md new file mode 100644 index 0000000..b55baa3 --- /dev/null +++ b/node_modules/showdown/test/features/tables/with-surroundings.md @@ -0,0 +1,16 @@ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisi est, +ullamcorper euismod iaculis sed, tristique at neque. Nullam metus risus, +malesuada vitae imperdiet ac, tincidunt eget lacus. Proin ullamcorper +vulputate dictum. Vestibulum consequat ultricies nibh, sed tempus nisl mattis a. + +| First Header | Second Header | +| ------------- | ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | + +Phasellus ac porttitor quam. Integer cursus accumsan mauris nec interdum. +Etiam iaculis urna vitae risus facilisis faucibus eu quis risus. Sed aliquet +rutrum dictum. Vivamus pulvinar malesuada ultricies. Pellentesque in commodo +nibh. Maecenas justo erat, sodales vel bibendum a, dignissim in orci. Duis +blandit ornare mi non facilisis. Aliquam rutrum fringilla lacus in semper. +Sed vel pretium lorem. diff --git a/node_modules/showdown/test/features/tables/without-body.html b/node_modules/showdown/test/features/tables/without-body.html new file mode 100644 index 0000000..4c525e5 --- /dev/null +++ b/node_modules/showdown/test/features/tables/without-body.html @@ -0,0 +1,10 @@ + + + + + + + + + +
      First HeaderSecond Header
      diff --git a/node_modules/showdown/test/features/tables/without-body.md b/node_modules/showdown/test/features/tables/without-body.md new file mode 100644 index 0000000..78c06f0 --- /dev/null +++ b/node_modules/showdown/test/features/tables/without-body.md @@ -0,0 +1,2 @@ +| First Header | Second Header | +| ------------- | ------------- | diff --git a/node_modules/showdown/test/features/tables/without-header-delimiter.html b/node_modules/showdown/test/features/tables/without-header-delimiter.html new file mode 100644 index 0000000..5d1af0f --- /dev/null +++ b/node_modules/showdown/test/features/tables/without-header-delimiter.html @@ -0,0 +1 @@ +

      | First Header | Second Header |

      diff --git a/node_modules/showdown/test/features/tables/without-header-delimiter.md b/node_modules/showdown/test/features/tables/without-header-delimiter.md new file mode 100644 index 0000000..a86f2da --- /dev/null +++ b/node_modules/showdown/test/features/tables/without-header-delimiter.md @@ -0,0 +1 @@ +| First Header | Second Header | diff --git a/node_modules/showdown/test/features/underline/fulltext.html b/node_modules/showdown/test/features/underline/fulltext.html new file mode 100644 index 0000000..695b562 --- /dev/null +++ b/node_modules/showdown/test/features/underline/fulltext.html @@ -0,0 +1,368 @@ +

      Markdown test adapted from BitBucket

      +

      Markdown for readmes is pretty popular. So, I've given you a demo + here of all the markup we support. In some cases, I copied the doc/examples entirely from the Fireball Markdown site.

      +

      I didn't duplicate all the Markdown doc everything tho. For the entire docs and a deeper explanation of Markdown, you still need to go to the Markdown site.

      +

      You can also use Markdown mark up in comments, issues, and commit messages.

      +

      On this page:

      + +
      +

      Span Elements

      +

      These elements occur within a line of text. So, for example font changes or links.

      +

      Emphasis

      +

      Markdown treats * (asterisk) as emphasis markers.

      +

      single asterisks + double asterisks

      +

      All are created from this:

      +
      *single asterisks*
      +
      +**double asterisks**
      +
      +

      Underline [experimental]

      +

      double underscores

      +

      triple underscores

      +

      All are created from this:

      +
      __double underscores__
      +
      +___triple underscores___
      +
      +

      You must use the same character must be used to open and close an emphasis span. Emphasis can be used in the middle of a word.

      +
      Emphasis can be used in the mi*dd*le of a word.
      +
      +

      But if you surround an * or _ with spaces, it will be treated as a literal asterisk or underscore.

      +

      To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:

      +
      \*this text is surrounded by literal asterisks\*
      +
      +

      Strikethrough

      +

      Markdown's Markdown parser supports strikethrough by wrapping text in ~~:

      +

      ~~text that has been struckthrough~~

      +

      is created from:

      +
      ~~text that has been struckthrough~~
      +
      +

      Preformatted code

      +

      To indicate a span of code, wrap it with ` (backtick). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

      +

      Use the printf() function.

      +

      is produced from:

      +
      Use the `printf()` function.
      +
      +

      To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:

      +

      There is a literal backtick (`) here.

      + +

      Markdown supports inline and reference links. In both styles, the link text is delimited by [square brackets]. To create an inline link, use this syntax:

      +
      [ Text for the link ](URL)
      +
      +

      So an inline link to Yahoo looks like this:

      +
      So an inline link to [Yahoo](http://www.yahoo.com) looks like this:
      +
      +

      Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

      +
      This is [an example][id] reference-style link.
      +
      +

      Which gives you a link like this:

      +

      This is an example reference-style link.

      +

      Elsewhere in the document, usually at the bottom of the file, you define your link label on a line by itself:

      +
      [id]: http://example.com/  "Optional Title Here"
      +
      +

      Links can get pretty fancy, so if you want the long form version, visit the + official Markdown docs.

      +

      Images

      +

      Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference. Images appear like this:

      +

      Alt text

      +
      ![Alt text](http://www.addictedtoibiza.com/wp-content/uploads/2012/12/example.png)
      +
      +![Alt text](http://www.addictedtoibiza.com/wp-content/uploads/2012/12/example.png "Optional title")
      +
      +
      +

      Block Elements

      +

      These are elements that are a single or multiple lines in length

      +

      Headings

      +

      You can create Atx-style headings by prefixing with a # (hash mark)

      +

      Heading 1 markup # Heading 1

      +

      +

      Heading 2 markup ## Heading 2

      +

      +

      Heading 3 markup ### Heading 3

      +

      +

      Heading 4 markup #### Heading 4

      +

      +
      Heading 5 markup ##### Heading 5
      +
      +
      Heading 6 markup ###### Heading 6
      +
      +

      You can also create Setext-style headings which have two levels.

      +

      Level 1 markup use an equal sign = (equal sign)

      +
       Level 1 markup use an equal sign = (equal sign)        
      + ==============================
      +
      +

      Level 2 markup uses - (dashes)

      +
      Level 2 markup uses - (dashes) 
      +-------------
      +
      +

      PARAGRAPHS and BLOCKQUOTES

      +

      A paragraph is one or more consecutive lines of text separated by one or more + blank lines. A blank line contains nothing but spaces or tabs. Do not indent + normal paragraphs with spaces or tabs. New lines/carriage returns within paragraphs require two spaces at the end of the preceding line.

      +

      This is one paragraph.

      +

      This is a second.

      +
      This is one paragraph.
      +
      +This is a second.
      +
      +

      Markdown uses email-style > (greater than) characters for blockquoting. If you’re familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a > before every line:

      +
      +

      This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.

      +

      Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse + id sem consectetuer libero luctus adipiscing.

      +
      +
      > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
      +> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
      +> 
      +> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
      +> id sem consectetuer libero luctus adipiscing.
      +
      +

      Blockquotes can be nested (i.e. a blockquote-in-a-blockquote):

      +
      +

      This is the first level of quoting.

      +
      +

      This is nested blockquote.

      +
      +

      Back to the first level.

      +
      +
      > This is the first level of quoting.
      +>
      +> > This is nested blockquote.
      +>
      +> Back to the first level.
      +
      +

      Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:

      +
      +

      This is a header.

      +
        +
      1. This is the first list item.
      2. +
      3. This is the second list item.
      4. +
      +

      Here's some example code:

      +
      return shell_exec("echo $input | $markdown_script");
      +
      +
      +
      > ## This is a header.
      +> 
      +> 1.   This is the first list item.
      +> 2.   This is the second list item.
      +> 
      +> Here's some example code:
      +> 
      +>     return shell_exec("echo $input | $markdown_script");
      +
      +

      Lists

      +

      Markdown supports ordered (numbered) and unordered (bulleted) lists. List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab.

      +

      Form bulleted lists with any of * (asterisk), + (plus), or - (dash). You can one or any or mix of these to form a list:

      +
        +
      • Red

      • +
      • Green

      • +
      • Blue

        +
        * Red
        ++ Green
        +- Blue
        +
      • +
      +

      Ordered lists require a numeric character followed by a . (period).

      +
        +
      1. Item one

      2. +
      3. Item two

      4. +
      5. Item three

        +
        1. Item one
        +1. Item two 
        +1. Item three
        +
      6. +
      +

      Notice the actual value of the number doesn't matter in the list result. However, for readability better to use this markup:

      +
          1. Item one
      +    2. Item two 
      +    3. Item three
      +
      +

      Lists can be embedded in lists. List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

      +
        +
      • Red

      • +
      • Green

        +
          +
        • dark green
        • +
        • lime
      • +
      • Blue

        +
          +
        1. Item one

          +
            +
          1. subitem 1
          2. +
          3. subitem 2
        2. +
        3. Item two

          +

          This is is a first paragraph.

          +
            +
          • Green
          • +
          • Blue
          +

          This is a second paragraph.

        4. +
        5. Item three

      • +
      +

      The code for these embedded lists or paragraphs is:

      +
              * Red 
      +        + Green 
      +            * dark  green 
      +            * lime    
      +        - Blue        
      +            1. Item one
      +                1. subitem 1
      +                1. subitem 2
      +            1. Item two 
      +
      +                This is is a first paragraph. 
      +
      +                * Green 
      +                * Blue
      +
      +                This is a second paragraph.
      +
      +            1. Item three
      +
      +

      You can also embed blockquotes in a list.

      +
        +
      • Green
      • +
      +
      +

      What is this? It is embedded blockquote. Mix 'em and match 'em.

      +
        +
      • Blue
      • +
      • Red
      • +
      +
      +
          * Green
      +    > What is this?  It is embedded blockquote.  Mix 'em and match 'em.
      +    * Blue
      +    * Red
      +
      +

      You can also embed code blocks in a list.

      +
        +
      • Green

        +

        Try this code:

        +
        This is an embedded code block.
        +
        +

        Then this:

        +
        More code!
        +
      • +
      • Blue

      • +
      • Red

        +
        * Green
        Try this code:
        +
        +    This is an embedded code block.
        +
        +Then this:
        +
        +    More code!
        +
        * Blue +* Red +
      • +
      +

      Tables

      +

      Markdown does not support <html> so you need to use the - (dash) and the | (pipe) symbols to construct a table. The first line contains column headers. Separate columns with the pipe symbol.

      +

      The second line must be a mandatory separator line between the headers and the content. Subsequent lines are table rows. Columns are always separated by the pipe (|) character. For example this table:

      +

      First Header | Second Header + ------------- | ------------- + Content Cell | Content Cell + Content Cell | Content Cell

      +

      Comes from this code:

      +
      First Header  | Second Header
      +------------- | -------------
      +Content Cell  | Content Cell
      +Content Cell  | Content Cell
      +
      +

      You can only put simple lines in a table.

      +

      You can specify alignment for each column by adding colons to separator lines. A colon at the left of the separator line, left-aligns the column. A colon on the right, right-aligns the column. Add colons to both sides to center the column is center-aligned.

      +

      Right | Left | Center + ---------:| :----- |:-----: + Computer | $1600 | one + Phone | $12 | three + Pipe | $1 | eleven

      +
      Right     | Left   | Center 
      +---------:| :----- |:-----:
      +Computer  |  $1600 | one
      +Phone     |    $12 | three
      +Pipe      |     $1 | eleven
      +
      +

      You can apply inline formatting (span-level changes such as fonts or links) to the content of each cell using regular Markdown syntax:

      +

      | Function name | Description | + | ------------- | ------------------------------ | + | help() | Display the help window. | + | destroy() | Destroy your computer! |

      +
      | Function name | Description                    |
      +| ------------- | ------------------------------ |
      +| `help()`      | Display the __help__ window.   |
      +| `destroy()`   | **Destroy your computer!**     |
      +
      +
        +
      • - -
      • +
      +

      Code and Syntax highlighting

      +

      Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the code block linesare interpreted literally. Markdown wraps a code block in both <pre> and <code> tags.

      +

      To produce a code block in Markdown, indent every line of the block by at least 4 spaces or 1 tab. For :

      +

      This is a normal paragraph:

      +
      This is a code block.
      +
      +

      The code reveals the indentation.

      +
          This is a normal paragraph:
      +
      +        This is a code block.
      +
      +

      A code block continues until it reaches a line that is not indented (or the end of the page).

      +

      Within a code block, & (ampersands) and < > (angle brackets) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown — just paste it and indent it. Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this:

      +

      Here is an example of AppleScript:

      +
      <p>Here is an example of AppleScript:</p>
      +
      +

      To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:

      +

      You can also highlight snippets of text (Markdown uses the excellent Pygments library) to allow you to use code highlighting Here's an example of some Python code:

      +
      #!python
      +#
      +def wiki_rocks(text): formatter = lambda t: "funky"+t return formatter(text)         
      +
      +

      To do this, do not indent the block. Start the block with ``` three ticks. Then, provide the comment with the type of syntax you are using. There is a the vast library of Pygment lexers. Markdown accepts the 'short name' or the 'mimetype' of anything in there.

      +

      You can also use a fence style for code.

      +
      This is a code block, fenced-style
      +
      +

      Which you create with this code:

      +
      ```
      +This is a code block, fenced-style
      +```
      +
      +

      See Michel Fortin's blog to try out more examples of this coding style. Not everything he demos is guaranteed to work though.

      +
      +

      Horizontal Rules

      +

      You can produce a horizontal line with any of the following codes:

      +
      * * *
      +
      +***
      +
      +*****
      +
      +- - - -
      +
      +-----------------------
      +
      +

      The output looks like this:

      +
      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/features/underline/fulltext.md b/node_modules/showdown/test/features/underline/fulltext.md new file mode 100644 index 0000000..aae1ea0 --- /dev/null +++ b/node_modules/showdown/test/features/underline/fulltext.md @@ -0,0 +1,520 @@ +Markdown test adapted from BitBucket +==================== + +[Markdown][fireball] for readmes is pretty popular. So, I've given you a demo +here of all the markup we support. In some cases, I copied the doc/examples entirely from the Fireball Markdown site. + +I didn't duplicate all the Markdown doc everything tho. For the entire docs and a deeper explanation of Markdown, you still need to go to the [Markdown][fireball] site. + +You can also use [Markdown mark up][BBmarkup] in comments, issues, and commit messages. + +On this page: + + +* [Span Elements](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-span-elements) + * [Emphasis](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-emphasis) + + * [Strikethrough](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-strikethrough) + + * [Preformatted code](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-preformatted-code) + + * [Links](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-links) + + * [Images](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-images) + +* [Block Elements](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-block-elements) + * [Headings](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-headings) + + * [Paragraphs and blockquotes](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-paragraphs-and-blockquotes) + + * [Lists](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-lists) + + * [Tables](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-tables) + + * [Code and Syntax highlighting](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-code-and-syntax-highlighting) + + * [Horizontal rules](https://Markdown.org/tutorials/markdowndemo/overview#markdown-header-horizontal-rules) + +- - - + +# Span Elements + +These elements occur within a line of text. So, for example font changes or links. + + +## Emphasis + +Markdown treats * (asterisk) as emphasis markers. + +*single asterisks* +**double asterisks** + +All are created from this: + + *single asterisks* + + **double asterisks** + + +## Underline [experimental] + + +__double underscores__ + +___triple underscores___ + + +All are created from this: + + + __double underscores__ + + ___triple underscores___ + + +You must use the same character must be used to open and close an emphasis span. Emphasis can be used in the mi*dd*le of a word. + + Emphasis can be used in the mi*dd*le of a word. + +But if you surround an * or _ with spaces, it will be treated as a literal asterisk or underscore. + +To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it: + + \*this text is surrounded by literal asterisks\* + +## Strikethrough + +Markdown's Markdown parser supports strikethrough by wrapping text in `~~`: + +~~text that has been struckthrough~~ + +is created from: + + ~~text that has been struckthrough~~ + +## Preformatted code + +To indicate a span of code, wrap it with `` ` `` (backtick). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example: + +Use the `printf()` function. + +is produced from: + + Use the `printf()` function. + +To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters: + +``There is a literal backtick (`) here.`` + + +## Links + +Markdown supports inline and reference links. In both styles, the link text is delimited by [square brackets]. To create an inline link, use this syntax: + + [ Text for the link ](URL) + +So an inline link to [Yahoo](http://www.yahoo.com) looks like this: + + So an inline link to [Yahoo](http://www.yahoo.com) looks like this: + +Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link: + + This is [an example][id] reference-style link. + +Which gives you a link like this: + +This is [an example][id] reference-style link. + +Elsewhere in the document, usually at the bottom of the file, you define your link label on a line by itself: + + [id]: http://example.com/ "Optional Title Here" + +Links can get pretty fancy, so if you want the long form version, visit the + official [Markdown][fireball] docs. + + +## Images + +Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference. Images appear like this: + +![Alt text](http://www.addictedtoibiza.com/wp-content/uploads/2012/12/example.png) + + + + ![Alt text](http://www.addictedtoibiza.com/wp-content/uploads/2012/12/example.png) + + ![Alt text](http://www.addictedtoibiza.com/wp-content/uploads/2012/12/example.png "Optional title") + +- - - +# Block Elements + +These are elements that are a single or multiple lines in length + + + +## Headings +You can create Atx-style headings by prefixing with a # (hash mark) + +# Heading 1 markup `# Heading 1` +# +## Heading 2 markup `## Heading 2` +## +### Heading 3 markup `### Heading 3` +### +#### Heading 4 markup `#### Heading 4` +#### +##### Heading 5 markup `##### Heading 5` +##### +###### Heading 6 markup `###### Heading 6` +###### +You can also create Setext-style headings which have two levels. + +Level 1 markup use an equal sign = (equal sign) +============================== + + + Level 1 markup use an equal sign = (equal sign) + ============================== + +Level 2 markup uses - (dashes) +------------- + + + Level 2 markup uses - (dashes) + ------------- + + + + +## PARAGRAPHS and BLOCKQUOTES + + +A paragraph is one or more consecutive lines of text separated by one or more +blank lines. A blank line contains nothing but spaces or tabs. Do not indent +normal paragraphs with spaces or tabs. New lines/carriage returns within paragraphs require two spaces at the end of the preceding line. + +This is one paragraph. + +This is a second. + + This is one paragraph. + + This is a second. + +Markdown uses email-style > (greater than) characters for blockquoting. If you’re familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a > before every line: + +> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, +> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. +> +> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse +> id sem consectetuer libero luctus adipiscing. + + + > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, + > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. + > + > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse + > id sem consectetuer libero luctus adipiscing. + +Blockquotes can be nested (i.e. a blockquote-in-a-blockquote): + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + + > This is the first level of quoting. + > + > > This is nested blockquote. + > + > Back to the first level. + +Blockquotes can contain other Markdown elements, including headers, lists, and code blocks: + +> ## This is a header. +> +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> return shell_exec("echo $input | $markdown_script"); + + + > ## This is a header. + > + > 1. This is the first list item. + > 2. This is the second list item. + > + > Here's some example code: + > + > return shell_exec("echo $input | $markdown_script"); + + + + +## Lists + +Markdown supports ordered (numbered) and unordered (bulleted) lists. List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab. + +Form bulleted lists with any of * (asterisk), + (plus), or - (dash). You can one or any or mix of these to form a list: + +* Red ++ Green +- Blue + + + * Red + + Green + - Blue + +Ordered lists require a numeric character followed by a . (period). + +1. Item one +1. Item two +1. Item three + + 1. Item one + 1. Item two + 1. Item three + +Notice the actual value of the number doesn't matter in the list result. However, for readability better to use this markup: + + 1. Item one + 2. Item two + 3. Item three + +Lists can be embedded in lists. List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab: + +* Red ++ Green + * dark green + * lime +- Blue + 1. Item one + 1. subitem 1 + 1. subitem 2 + 1. Item two + + This is is a first paragraph. + + * Green + * Blue + + This is a second paragraph. + + 1. Item three + +The code for these embedded lists or paragraphs is: + + * Red + + Green + * dark green + * lime + - Blue + 1. Item one + 1. subitem 1 + 1. subitem 2 + 1. Item two + + This is is a first paragraph. + + * Green + * Blue + + This is a second paragraph. + + 1. Item three + +You can also embed blockquotes in a list. + +* Green +> What is this? It is embedded blockquote. Mix 'em and match 'em. +* Blue +* Red + + * Green + > What is this? It is embedded blockquote. Mix 'em and match 'em. + * Blue + * Red + + + +You can also embed code blocks in a list. + +* Green + + Try this code: + + This is an embedded code block. + + Then this: + + More code! + +* Blue +* Red + + * Green + + Try this code: + + This is an embedded code block. + + Then this: + + More code! + + * Blue + * Red + + +## Tables + + + +Markdown does not support `` so you need to use the - (dash) and the | (pipe) symbols to construct a table. The first line contains column headers. Separate columns with the pipe symbol. + +The second line must be a mandatory separator line between the headers and the content. Subsequent lines are table rows. Columns are always separated by the pipe (|) character. For example this table: + +First Header | Second Header +------------- | ------------- +Content Cell | Content Cell +Content Cell | Content Cell + +Comes from this code: + + First Header | Second Header + ------------- | ------------- + Content Cell | Content Cell + Content Cell | Content Cell + + +You can only put simple lines in a table. + +You can specify alignment for each column by adding colons to separator lines. A colon at the left of the separator line, left-aligns the column. A colon on the right, right-aligns the column. Add colons to both sides to center the column is center-aligned. + +Right | Left | Center +---------:| :----- |:-----: +Computer | $1600 | one +Phone | $12 | three +Pipe | $1 | eleven + + Right | Left | Center + ---------:| :----- |:-----: + Computer | $1600 | one + Phone | $12 | three + Pipe | $1 | eleven + + +You can apply inline formatting (span-level changes such as fonts or links) to the content of each cell using regular Markdown syntax: + + +| Function name | Description | +| ------------- | ------------------------------ | +| `help()` | Display the __help__ window. | +| `destroy()` | **Destroy your computer!** | + + | Function name | Description | + | ------------- | ------------------------------ | + | `help()` | Display the __help__ window. | + | `destroy()` | **Destroy your computer!** | + + + + +- - - + + +## Code and Syntax highlighting + + +Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the code block linesare interpreted literally. Markdown wraps a code block in both `
      ` and `` tags.
      +
      +To produce a code block in Markdown, indent every line of the block by at least 4 spaces or 1 tab. For :
      +
      +This is a normal paragraph:
      +
      +    This is a code block.
      +
      +The code reveals the indentation.
      +
      +        This is a normal paragraph:
      +
      +            This is a code block.
      +
      +A code block continues until it reaches a line that is not indented (or the end of the page).
      +
      +Within a code block, & (ampersands) and < > (angle brackets) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown — just paste it and indent it. Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this:
      +
      +

      Here is an example of AppleScript:

      + +

      Here is an example of AppleScript:

      + +To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input: + + +You can also highlight snippets of text (Markdown uses the excellent [Pygments][] library) to allow you to use code highlighting Here's an example of some Python code: + +``` +#!python +# +def wiki_rocks(text): formatter = lambda t: "funky"+t return formatter(text) +``` + +To do this, do not indent the block. Start the block with ` ``` ` three ticks. Then, provide the comment with the type of syntax you are using. There is a [the vast library of Pygment lexers][lexers]. Markdown accepts the 'short name' or the 'mimetype' of anything in there. + +You can also use a fence style for code. + +``` +This is a code block, fenced-style +``` + +Which you create with this code: + + ``` + This is a code block, fenced-style + ``` + +See [Michel Fortin's blog][extra] to try out more examples of this coding style. Not everything he demos is guaranteed to work though. + + +- - - + +# Horizontal Rules + +You can produce a horizontal line with any of the following codes: + + * * * + + *** + + ***** + + - - - - + + ----------------------- + +The output looks like this: + +* * * + +*** + +***** + +- - - + +----------------------- + +- - - + + + +[lexers]: http://pygments.org/docs/lexers/ +[fireball]: http://daringfireball.net/projects/markdown/ +[Pygments]: http://pygments.org/ +[Extra]: http://michelf.ca/projects/php-markdown/extra/ +[id]: http://example.com/ "Optional Title Here" +[BBmarkup]: https://confluence.atlassian.com/x/xTAvEw \ No newline at end of file diff --git a/node_modules/showdown/test/features/underline/simple.html b/node_modules/showdown/test/features/underline/simple.html new file mode 100644 index 0000000..1f8e5ae --- /dev/null +++ b/node_modules/showdown/test/features/underline/simple.html @@ -0,0 +1,5 @@ +

      this is underlined word

      +

      an underlined sentence

      +

      three underscores are fine

      +

      _single_ underscores are left alone

      +

      multiple underlines in a paragraph

      \ No newline at end of file diff --git a/node_modules/showdown/test/features/underline/simple.md b/node_modules/showdown/test/features/underline/simple.md new file mode 100644 index 0000000..510be1f --- /dev/null +++ b/node_modules/showdown/test/features/underline/simple.md @@ -0,0 +1,9 @@ +this is __underlined__ word + +__an underlined sentence__ + +___three underscores are fine___ + +_single_ underscores are left alone + +__multiple__ underlines in a __paragraph__ \ No newline at end of file diff --git a/node_modules/showdown/test/ghost/markdown-magic.html b/node_modules/showdown/test/ghost/markdown-magic.html new file mode 100644 index 0000000..a80453a --- /dev/null +++ b/node_modules/showdown/test/ghost/markdown-magic.html @@ -0,0 +1,31 @@ + +
      https://ghost.org
      +
      +

      https://ghost.org

      +

      Markdown Footnotes

      +
      The quick brown fox[^1] jumped over the lazy dog[^2].
      +
      +    [^1]: Foxes are red
      +    [^2]: Dogs are usually not red
      +
      +

      The quick brown fox[^1] jumped over the lazy dog[^2].

      +

      Syntax Highlighting

      +
      ```language-javascript
      +    [...]
      +    ```
      +
      +

      Combined with Prism.js in the Ghost theme:

      +
      // # Notifications API
      +// RESTful API for creating notifications
      +var Promise            = require('bluebird'),
      +_                  = require('lodash'),
      +canThis            = require('../permissions').canThis,
      +errors             = require('../errors'),
      +utils              = require('./utils'),
      +
      +// Holds the persistent notifications
      +notificationsStore = [],
      +// Holds the last used id
      +notificationCounter = 0,
      +notifications;
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/ghost/markdown-magic.md b/node_modules/showdown/test/ghost/markdown-magic.md new file mode 100644 index 0000000..3f7676b --- /dev/null +++ b/node_modules/showdown/test/ghost/markdown-magic.md @@ -0,0 +1,43 @@ +### Automatic Links + +``` +https://ghost.org +``` + +https://ghost.org + +### Markdown Footnotes + +``` +The quick brown fox[^1] jumped over the lazy dog[^2]. + +[^1]: Foxes are red +[^2]: Dogs are usually not red +``` + +The quick brown fox[^1] jumped over the lazy dog[^2]. + + +### Syntax Highlighting + + ```language-javascript + [...] + ``` + +Combined with [Prism.js](http://prismjs.com/) in the Ghost theme: + +```language-javascript +// # Notifications API +// RESTful API for creating notifications +var Promise = require('bluebird'), + _ = require('lodash'), + canThis = require('../permissions').canThis, + errors = require('../errors'), + utils = require('./utils'), + + // Holds the persistent notifications + notificationsStore = [], + // Holds the last used id + notificationCounter = 0, + notifications; +``` diff --git a/node_modules/showdown/test/ghost/underscore.html b/node_modules/showdown/test/ghost/underscore.html new file mode 100644 index 0000000..5033d29 --- /dev/null +++ b/node_modules/showdown/test/ghost/underscore.html @@ -0,0 +1,46 @@ +

      foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

      +

      baz_bar_foo

      +

      baz_bar_foo

      +

      baz_bar_foo

      +

      baz bar foo baz_bar_foo foo bar baz and foo

      +

      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

      +

      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

      +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      +
      +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      +
      +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      + +

      foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

      +

      foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

      +

      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

      +

      foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

      +

      foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

      +
        +
      1. foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
      2. +
      3. foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
      4. +
      +
      +

      blockquote foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

      +
      +
        +
      • foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
      • +
      • foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
      • +
      +
      +

      http://en.wikipedia.org/wiki/Tourism_in_Germany

      +

      an example

      +

      Another example of a link

      +

      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

      + +

      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

      +

      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

      +

      http://myurl.com/foo_bar_baz_bar_foo

      +

      http://myurl.com/foo_bar_baz_bar_foo

      +

      italics.

      +

      italics .

      diff --git a/node_modules/showdown/test/ghost/underscore.md b/node_modules/showdown/test/ghost/underscore.md new file mode 100644 index 0000000..fae7be0 --- /dev/null +++ b/node_modules/showdown/test/ghost/underscore.md @@ -0,0 +1,77 @@ +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +_baz_bar_foo_ + +__baz_bar_foo__ + +___baz_bar_foo___ + +baz bar foo _baz_bar_foo foo bar baz_ and foo + +foo\_bar\_baz foo\_bar\_baz\_bar\_foo \_foo\_bar baz\_bar\_ baz\_foo + +`foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo` + + + foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + + +```html +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo +``` + +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      + +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      + +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      + + + +[foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo](http://myurl.com/foo_bar_baz_bar_foo) + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo +----- + +### foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +1. foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo +2. foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +> blockquote foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +* foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo +* foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +------- + +http://en.wikipedia.org/wiki/Tourism_in_Germany + +[an example] [wiki] + +Another [example][wiki] of a link + +[wiki]: http://en.wikipedia.org/wiki/Tourism_in_Germany + +

      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

      + + + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +![foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo](http://myurl.com/foo_bar_baz_bar_foo) + +http://myurl.com/foo_bar_baz_bar_foo + + + +_italics_. + +_italics_ . diff --git a/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.html b/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.html new file mode 100644 index 0000000..aee6435 --- /dev/null +++ b/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.html @@ -0,0 +1,6 @@ +

      escaped word_with_underscores

      +

      escaped word__with__double underscores

      +

      escaped word_with_single italic underscore

      +

      escaped word*with*asterixs

      +

      escaped word**with**asterixs

      +

      escaped word*with*bold asterixs

      diff --git a/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.md b/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.md new file mode 100644 index 0000000..8d22521 --- /dev/null +++ b/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.md @@ -0,0 +1,11 @@ +escaped word\_with\_underscores + +escaped word\_\_with\_\_double underscores + +escaped word_\_with\__single italic underscore + +escaped word\*with*asterixs + +escaped word\*\*with\*\*asterixs + +escaped word**\*with\***bold asterixs diff --git a/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.html b/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.html new file mode 100644 index 0000000..49c9ca4 --- /dev/null +++ b/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.html @@ -0,0 +1,12 @@ +
        +
      • Item 1
      • +
      • Item 2
      • +
      +
        +
      1. Item 1
      2. +
      3. Item 2
      4. +
      +
        +
      • Item 1
      • +
      • Item 2
      • +
      diff --git a/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.md b/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.md new file mode 100644 index 0000000..4621a36 --- /dev/null +++ b/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.md @@ -0,0 +1,8 @@ +* Item 1 +* Item 2 + +1. Item 1 +2. Item 2 + +- Item 1 +- Item 2 diff --git a/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.html b/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.html new file mode 100644 index 0000000..8f9d2e5 --- /dev/null +++ b/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.html @@ -0,0 +1 @@ +

      2015-10-04

      \ No newline at end of file diff --git a/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.md b/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.md new file mode 100644 index 0000000..d0d6dda --- /dev/null +++ b/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.md @@ -0,0 +1 @@ +2015-10-04 diff --git a/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.html b/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.html new file mode 100644 index 0000000..cbf97c7 --- /dev/null +++ b/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.html @@ -0,0 +1,12 @@ +
        +
      1. Hi, I am a thing

        +
        $ git clone thing.git
        +
        +dfgdfg
        +
      2. +
      3. I am another thing!

        +
        $ git clone other-thing.git
        +
        +foobar
        +
      4. +
      diff --git a/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.md b/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.md new file mode 100644 index 0000000..fd5634d --- /dev/null +++ b/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.md @@ -0,0 +1,17 @@ +1. Hi, I am a thing + + ```sh + + $ git clone thing.git + + dfgdfg + ``` + +1. I am another thing! + + ```sh + + $ git clone other-thing.git + + foobar + ``` diff --git a/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.html b/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.html new file mode 100644 index 0000000..b594288 --- /dev/null +++ b/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.html @@ -0,0 +1,4 @@ +
      +

      a blockquote

      +

      followed by an heading

      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.md b/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.md new file mode 100644 index 0000000..f60ccb8 --- /dev/null +++ b/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.md @@ -0,0 +1,2 @@ +> a blockquote +# followed by an heading diff --git a/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.html b/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.html new file mode 100644 index 0000000..8de7bb3 --- /dev/null +++ b/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.html @@ -0,0 +1,11 @@ +

      Test pre in a list

      +
        +
      • & <
      • +
      • & <
          +
        • & <
        • +
        • & <
            +
          • & <
          • +
          • & <
              +
            • & <
            • +
            • & <
      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.md b/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.md new file mode 100644 index 0000000..cec2670 --- /dev/null +++ b/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.md @@ -0,0 +1,10 @@ +Test pre in a list + +- & < +- `& <` + - & < + - `& <` + - & < + - `& <` + - & < + - `& <` diff --git a/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.html b/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.html new file mode 100644 index 0000000..66439cb --- /dev/null +++ b/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.html @@ -0,0 +1,5 @@ +

      Title 1

      +
      +

      Title 2

      +
      +
      diff --git a/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.md b/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.md new file mode 100644 index 0000000..4cf6aa8 --- /dev/null +++ b/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.md @@ -0,0 +1,11 @@ +Title 1 +------- + +
      + + +# Title 2 + + +
      +
      diff --git a/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.html b/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.html new file mode 100644 index 0000000..53c8243 --- /dev/null +++ b/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.html @@ -0,0 +1,22 @@ +
      
      +foo
      +
      +```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +bar
      +
      +

      this is a long paragraph

      +

      this is another long paragraph

      +
      ```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +```python
      +s = "Python syntax highlighting"
      +print s
      +```
      +
      diff --git a/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.md b/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.md new file mode 100644 index 0000000..d234cf0 --- /dev/null +++ b/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.md @@ -0,0 +1,25 @@ +
      
      +foo
      +
      +```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +bar
      +
      + +this is a long paragraph + +this is another long paragraph + +
      ```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +```python
      +s = "Python syntax highlighting"
      +print s
      +```
      +
      diff --git a/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.html b/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.html new file mode 100644 index 0000000..deba3d4 --- /dev/null +++ b/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.html @@ -0,0 +1,16 @@ +
      
      +```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +```python
      +s = "Python syntax highlighting"
      +print s
      +```
      +
      +```
      +No language indicated, so no syntax highlighting.
      +But let's throw in a <b>tag</b>.
      +```
      +
      diff --git a/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.md b/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.md new file mode 100644 index 0000000..5a148ce --- /dev/null +++ b/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.md @@ -0,0 +1,16 @@ +
      
      +```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +```python
      +s = "Python syntax highlighting"
      +print s
      +```
      +
      +```
      +No language indicated, so no syntax highlighting.
      +But let's throw in a tag.
      +```
      +
      diff --git a/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.html b/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.html new file mode 100644 index 0000000..9ce90ea --- /dev/null +++ b/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.html @@ -0,0 +1,10 @@ +
      ```python
      +var s;
      +```
      +
      +

      this is a long paragraph

      +
      
      +```javascript
      +var s;
      +```
      +
      diff --git a/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.md b/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.md new file mode 100644 index 0000000..9362a18 --- /dev/null +++ b/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.md @@ -0,0 +1,12 @@ +
      ```python
      +var s;
      +```
      +
      + +this is a long paragraph + +
      
      +```javascript
      +var s;
      +```
      +
      diff --git a/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.html b/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.html new file mode 100644 index 0000000..53ed8b7 --- /dev/null +++ b/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.html @@ -0,0 +1,5 @@ +

      this should be

      +

      this should be

      +

      this should be

      +

      this should> appear

      +

      this text <should appear

      diff --git a/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.md b/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.md new file mode 100644 index 0000000..a73cfbf --- /dev/null +++ b/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.md @@ -0,0 +1,9 @@ +this should be + +this should be + +this should be + +this should> appear + +this text sd-inline sd-ref

      +

      foo

      +

      sd-inline sd-ref

      +

      foo

      +

      sd-ref sd-inline

      +

      foo

      +

      sd-ref sd-inline

      +

      foo

      +

      sd-ref

      diff --git a/node_modules/showdown/test/issues/#261.mix-images-with-links.md b/node_modules/showdown/test/issues/#261.mix-images-with-links.md new file mode 100644 index 0000000..f9583e0 --- /dev/null +++ b/node_modules/showdown/test/issues/#261.mix-images-with-links.md @@ -0,0 +1,19 @@ +![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo] + +foo + +[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo] + +foo + +![sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) + +foo + +[sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) + +foo + +[![sd-ref][sd-logo]](http://www.google.com/) + +[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png diff --git a/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.html b/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.html new file mode 100644 index 0000000..117f37d --- /dev/null +++ b/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.html @@ -0,0 +1,3 @@ +

      sd-inline sd-ref

      +

      foo

      +

      sd-ref sd-inline

      diff --git a/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.md b/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.md new file mode 100644 index 0000000..0e76cbb --- /dev/null +++ b/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.md @@ -0,0 +1,7 @@ +![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo] + +foo + +![sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) + +[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png diff --git a/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.html b/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.html new file mode 100644 index 0000000..13bb32f --- /dev/null +++ b/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.html @@ -0,0 +1,3 @@ +

      sd-inline sd-ref

      +

      foo

      +

      sd-ref sd-inline

      diff --git a/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.md b/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.md new file mode 100644 index 0000000..40b7f8f --- /dev/null +++ b/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.md @@ -0,0 +1,7 @@ +[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo] + +foo + +[sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) + +[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png diff --git a/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.html b/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.html new file mode 100644 index 0000000..d18a6a5 --- /dev/null +++ b/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.html @@ -0,0 +1,18 @@ +
        +
      • list item 1

        +
        <parent>
        +<child>child1</child>
        +<!-- This is a comment -->
        +<child>child2</child>
        +<child>some text <!-- a comment --></child>
        +</parent>
        +
      • +
      • list item 2

      • +
      +
      <parent>
      +<child>child1</child>
      +<!-- This is a comment -->
      +<child>child2</child>
      +<child>some text <!-- a comment --></child>
      +</parent>
      +
      diff --git a/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.md b/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.md new file mode 100644 index 0000000..8f918a5 --- /dev/null +++ b/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.md @@ -0,0 +1,21 @@ +* list item 1 + + ``` + + child1 + + child2 + some text + + ``` + +* list item 2 + +``` + +child1 + +child2 +some text + +``` diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.html b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.html new file mode 100644 index 0000000..a5680ae --- /dev/null +++ b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.html @@ -0,0 +1,50 @@ +
        +
      • one
      • +
      +
        +
      1. two
      2. +
      +

      foo

      +
        +
      • one
      • +
      +
        +
      1. two
      2. +
      +

      foo

      +
        +
      • one
      • +
      +
        +
      1. two
      2. +
      +

      foo

      +
        +
      • one
          +
        1. two
      • +
      +

      foo

      +
        +
      • one
      • +
      • two
      • +
      +

      foo

      +
        +
      • one
      • +
      • two
      • +
      +

      foo

      +
        +
      • one
      • +
      • two
      • +
      +

      foo

      +
        +
      • one
      • +
      • two
      • +
      +

      foo

      +
        +
      • one
          +
        • two
      • +
      diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.md b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.md new file mode 100644 index 0000000..138dc8e --- /dev/null +++ b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.md @@ -0,0 +1,42 @@ + * one + 1. two + +foo + + * one + 1. two + +foo + + * one + 1. two + +foo + + * one + 1. two + +foo + + * one + * two + +foo + + * one + * two + +foo + + * one + * two + +foo + + * one +* two + +foo + + * one + * two diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.html b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.html new file mode 100644 index 0000000..c67bf4b --- /dev/null +++ b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.html @@ -0,0 +1,15 @@ +
        +
      • one long paragraph of +text
      • +
      +
        +
      1. two
      2. +
      +

      foo

      +
        +
      • one long paragraph of +text
      • +
      +
        +
      1. two
      2. +
      diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.md b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.md new file mode 100644 index 0000000..fc1abd8 --- /dev/null +++ b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.md @@ -0,0 +1,9 @@ + * one long paragraph of +text + 1. two + +foo + + * one long paragraph of +text + 1. two diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.html b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.html new file mode 100644 index 0000000..33ac02b --- /dev/null +++ b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.html @@ -0,0 +1,47 @@ +
        +
      • one
      • +
      +
        +
      1. two
      2. +
      +

      foo

      +
        +
      • one
      • +
      +
        +
      1. two
      2. +
      +

      foo

      +
        +
      • one
      • +
      +
        +
      1. two
      2. +
      +

      foo

      +
        +
      • one
      • +
      +
        +
      1. two
      2. +
      +

      foo

      +
        +
      • uli one
      • +
      • uli two
      • +
      +

      foo

      +
        +
      • uli one
      • +
      • uli two
      • +
      +

      foo

      +
        +
      • uli one
      • +
      • uli two
      • +
      +

      foo

      +
        +
      • uli one
      • +
      • uli two
      • +
      diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.md b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.md new file mode 100644 index 0000000..ca0c0a6 --- /dev/null +++ b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.md @@ -0,0 +1,37 @@ +* one +1. two + +foo + +* one + 1. two + +foo + +* one + 1. two + +foo + +* one + 1. two + +foo + +* uli one +* uli two + +foo + +* uli one + * uli two + +foo + +* uli one + * uli two + +foo + +* uli one + * uli two diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.html b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.html new file mode 100644 index 0000000..c36379b --- /dev/null +++ b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.html @@ -0,0 +1,15 @@ +
        +
      • - - a
      • +
      +

      a

      +
        +
      • - * - - + a
      • +
      +

      a

      +
        +
      1. 2. 3. 4. 5.
      2. +
      +

      a

      +
        +
      1. 2. 3. 4. 5. a
      2. +
      diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.md b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.md new file mode 100644 index 0000000..5aa1033 --- /dev/null +++ b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.md @@ -0,0 +1,13 @@ +- - - a + +a + ++ - * - - + a + +a + +1. 2. 3. 4. 5. + +a + +1. 2. 3. 4. 5. a diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.html b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.html new file mode 100644 index 0000000..43b3b06 --- /dev/null +++ b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.html @@ -0,0 +1,8 @@ +
        +
      • - - a

      • +
      • - * - - + a

      • +
      +
        +
      1. 2. 3. 4. 5.

      2. +
      3. 2. 3. 4. 5. a

      4. +
      diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.md b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.md new file mode 100644 index 0000000..d40889f --- /dev/null +++ b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.md @@ -0,0 +1,7 @@ +- - - a + ++ - * - - + a + +1. 2. 3. 4. 5. + +1. 2. 3. 4. 5. a diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.html b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.html new file mode 100644 index 0000000..717d2f3 --- /dev/null +++ b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.html @@ -0,0 +1,10 @@ +
        +
      • - +a
      • +
      +

      fooo

      +
        +
      • - - aaaaa

        +

        bbbbb

      • +
      + diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.md b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.md new file mode 100644 index 0000000..b40ff47 --- /dev/null +++ b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.md @@ -0,0 +1,10 @@ +- - +a + + +fooo + + +- - - aaaaa + + bbbbb diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.html b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.html new file mode 100644 index 0000000..e60553a --- /dev/null +++ b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.html @@ -0,0 +1,3 @@ +
        +
      • - - - -- - - - - - - -- - - - - - - - - - - - - - - - - - - - abcd
      • +
      diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.md b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.md new file mode 100644 index 0000000..e8d2acc --- /dev/null +++ b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.md @@ -0,0 +1 @@ +- - - - -- - - - - - - -- - - - - - - - - - - - - - - - - - - - abcd diff --git a/node_modules/showdown/test/issues/#317.spaces-before-hr.html b/node_modules/showdown/test/issues/#317.spaces-before-hr.html new file mode 100644 index 0000000..42714bd --- /dev/null +++ b/node_modules/showdown/test/issues/#317.spaces-before-hr.html @@ -0,0 +1,2 @@ +
      +
      diff --git a/node_modules/showdown/test/issues/#317.spaces-before-hr.md b/node_modules/showdown/test/issues/#317.spaces-before-hr.md new file mode 100644 index 0000000..36c0595 --- /dev/null +++ b/node_modules/showdown/test/issues/#317.spaces-before-hr.md @@ -0,0 +1,3 @@ + --- + + - - - diff --git a/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.html b/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.html new file mode 100644 index 0000000..7dbf76f --- /dev/null +++ b/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.html @@ -0,0 +1,21 @@ +

      foo *bar *baz

      +

      foo **bar **baz

      +

      foo ***bar ***baz

      +

      foo _bar _baz

      +

      foo __bar __baz

      +

      foo ___bar ___baz

      +

      foo *bar *baz *bazinga

      +

      foo **bar **baz **bazinga

      +

      foo ***bar ***baz ***bazinga

      +

      foo _bar _baz __bazinga

      +

      foo __bar __baz __bazinga

      +

      foo ___bar ___baz ___bazinga

      +

      f

      +

      f

      +

      f

      +

      f

      +

      foo **bar **baz bazinga bla

      +

      foo bar **baz **bazinga bla

      +

      foo **bar **baz **bazinga bla

      +

      this is imbued link with strong

      +

      this is imbued link with strong

      diff --git a/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.md b/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.md new file mode 100644 index 0000000..e453872 --- /dev/null +++ b/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.md @@ -0,0 +1,41 @@ +foo *bar *baz + +foo **bar **baz + +foo ***bar ***baz + +foo _bar _baz + +foo __bar __baz + +foo ___bar ___baz + +foo *bar *baz *bazinga + +foo **bar **baz **bazinga + +foo ***bar ***baz ***bazinga + +foo _bar _baz __bazinga + +foo __bar __baz __bazinga + +foo ___bar ___baz ___bazinga + +*f* + +**f** + +_f_ + +__f__ + +foo **bar **baz **bazinga bla** + +foo __bar **baz **bazinga bla__ + +foo __**bar **baz **bazinga bla__ + +this is **imbued link with strong** + +this is __imbued link with strong__ diff --git a/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.html b/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.html new file mode 100644 index 0000000..9c79cde --- /dev/null +++ b/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.html @@ -0,0 +1 @@ +

      this |

      diff --git a/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.md b/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.md new file mode 100644 index 0000000..26055b3 --- /dev/null +++ b/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.md @@ -0,0 +1 @@ +this \| diff --git a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.html b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.html new file mode 100644 index 0000000..d5290b4 --- /dev/null +++ b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.html @@ -0,0 +1,4 @@ +

      This is an image

      +

      This is another image

      +

      image link

      +

      image link

      diff --git a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.md b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.md new file mode 100644 index 0000000..6340f75 --- /dev/null +++ b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.md @@ -0,0 +1,9 @@ +This is an ![image][] + +[image]: ./image/cat(1).png + +This is another ![image](./image/cat(1).png) + +[![image link](./image/cat(1).png)](http://example.com) + +[![image link](<./image/cat1).png>)](http://example.com) diff --git a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.html b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.html new file mode 100644 index 0000000..acff8f9 --- /dev/null +++ b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.html @@ -0,0 +1,3 @@ +

      This is a link.

      +

      This is another link.

      +

      link

      diff --git a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.md b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.md new file mode 100644 index 0000000..338fcdd --- /dev/null +++ b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.md @@ -0,0 +1,7 @@ +This is a [link][]. + +[link]: https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile" + +This is another [link](https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile"). + +[link](<./image/cat1).png> "title") diff --git a/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.html b/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.html new file mode 100644 index 0000000..643007e --- /dev/null +++ b/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.html @@ -0,0 +1 @@ +

      malformed

      diff --git a/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.md b/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.md new file mode 100644 index 0000000..3cdae76 --- /dev/null +++ b/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.md @@ -0,0 +1 @@ +

      malformed

      diff --git a/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.html b/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.html new file mode 100644 index 0000000..bab378d --- /dev/null +++ b/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.html @@ -0,0 +1,14 @@ +

        +
      • Customer – Opens the Customer List. Refer to the document “Customer Management”.

        +
          +
        • Customer List
        • +
        • New Customer
        • +
        • Customer Prices
        • +
        • Appointments
      • +
      • Designer - Opens the Designer List. Refer to the document “Designer Commissions”.

        +
          +
        • Designer List
        • +
        • New Designer
        • +
        • Designer Payment List
        • +
        • New Designer Payment
      • +
      diff --git a/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.md b/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.md new file mode 100644 index 0000000..59bc46b --- /dev/null +++ b/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.md @@ -0,0 +1,11 @@ +- **Customer** – Opens the Customer List. Refer to the document “Customer Management”. + - Customer List + - New Customer + - Customer Prices + - Appointments + +- **Designer** - Opens the Designer List. Refer to the document “Designer Commissions”. + - Designer List + - New Designer + - Designer Payment List + - New Designer Payment \ No newline at end of file diff --git a/node_modules/showdown/test/issues/#429.multiline-base64-image-support.html b/node_modules/showdown/test/issues/#429.multiline-base64-image-support.html new file mode 100644 index 0000000..8a26284 --- /dev/null +++ b/node_modules/showdown/test/issues/#429.multiline-base64-image-support.html @@ -0,0 +1,3 @@ +

      foo

      +

      bar

      + diff --git a/node_modules/showdown/test/issues/#429.multiline-base64-image-support.md b/node_modules/showdown/test/issues/#429.multiline-base64-image-support.md new file mode 100644 index 0000000..61e2f56 --- /dev/null +++ b/node_modules/showdown/test/issues/#429.multiline-base64-image-support.md @@ -0,0 +1,9 @@ +![foo](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7ljmRAAAAAXNSR0IArs4c6QAAAARnQU1BAA +Cxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYSURBVBhXYwCC/2AAZYEoOAMs8Z+BgQEAXdcR7/Q1gssAAAAASUVORK5CYII=) + +![bar][] + + +[bar]: +data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7ljmRAAAAAXNSR0IArs4c6QAAAARnQU1BAA +Cxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYSURBVBhXYwCC/2AAZYEoOAMs8Z+BgQEAXdcR7/Q1gssAAAAASUVORK5CYII= diff --git a/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.html b/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.html new file mode 100644 index 0000000..9ff791b --- /dev/null +++ b/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.html @@ -0,0 +1,5 @@ +

      header id in h2

      +

      header id in h3

      +

      header id in h4

      +
      header id in h5
      +
      header id in h6
      diff --git a/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.md b/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.md new file mode 100644 index 0000000..cb52eff --- /dev/null +++ b/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.md @@ -0,0 +1,9 @@ +## header id in h2 + +### header id in h3 + +#### header id in h4 + +##### header id in h5 + +###### header id in h6 diff --git a/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.html b/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.html new file mode 100644 index 0000000..ab9ddaa --- /dev/null +++ b/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.html @@ -0,0 +1,15 @@ +
      var test = test;
      +function foo() {
      +  return 'bar';
      +}
      +
      +
      var test = test;
      +function foo() {
      +  return 'bar';
      +}
      +
      +
      var test = test;
      +function foo() {
      +  return 'bar';
      +}
      +
      diff --git a/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.md b/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.md new file mode 100644 index 0000000..9289cd0 --- /dev/null +++ b/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.md @@ -0,0 +1,20 @@ + ```javascript +var test = test; +function foo() { + return 'bar'; +} + ``` + + ```javascript +var test = test; +function foo() { + return 'bar'; +} + ``` + + ```javascript +var test = test; +function foo() { + return 'bar'; +} + ``` diff --git a/node_modules/showdown/test/issues/#585.error-when-using-image-references.html b/node_modules/showdown/test/issues/#585.error-when-using-image-references.html new file mode 100644 index 0000000..880d804 --- /dev/null +++ b/node_modules/showdown/test/issues/#585.error-when-using-image-references.html @@ -0,0 +1 @@ +

      [the-image]

      diff --git a/node_modules/showdown/test/issues/#585.error-when-using-image-references.md b/node_modules/showdown/test/issues/#585.error-when-using-image-references.md new file mode 100644 index 0000000..8855cb3 --- /dev/null +++ b/node_modules/showdown/test/issues/#585.error-when-using-image-references.md @@ -0,0 +1,3 @@ +[![the-image]] + +[the-image]: http://example.com/foo.png diff --git a/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.html b/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.html new file mode 100644 index 0000000..8d6f94b --- /dev/null +++ b/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.html @@ -0,0 +1,3 @@ +

      plain text link http://test.com/this_has/one.html with underscores

      +

      legit·word_with·1·underscore

      +

      a wordwith2underscores (gets em)

      diff --git a/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.md b/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.md new file mode 100644 index 0000000..e2118ed --- /dev/null +++ b/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.md @@ -0,0 +1,5 @@ +plain text link http://test.com/this_has/one.html with underscores + +legit·word_with·1·underscore + +a word_with_2underscores (gets em) diff --git a/node_modules/showdown/test/issues/#96.underscores-in-links.html b/node_modules/showdown/test/issues/#96.underscores-in-links.html new file mode 100644 index 0000000..975c4f5 --- /dev/null +++ b/node_modules/showdown/test/issues/#96.underscores-in-links.html @@ -0,0 +1,2 @@ +

      this is a underscore_test my cat

      +

      another my cat underscore_test bla

      diff --git a/node_modules/showdown/test/issues/#96.underscores-in-links.md b/node_modules/showdown/test/issues/#96.underscores-in-links.md new file mode 100644 index 0000000..9b4ba0d --- /dev/null +++ b/node_modules/showdown/test/issues/#96.underscores-in-links.md @@ -0,0 +1,3 @@ +this is a underscore_test ![my cat](http://myserver.com/my_kitty.jpg) + +another ![my cat](http://myserver.com/my_kitty.jpg) underscore_test bla diff --git a/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.html b/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.html new file mode 100644 index 0000000..166a9d3 --- /dev/null +++ b/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.html @@ -0,0 +1,5 @@ +

      link

      +

      link

      +

      image

      +

      image

      +

      image

      diff --git a/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.md b/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.md new file mode 100644 index 0000000..5d32457 --- /dev/null +++ b/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.md @@ -0,0 +1,9 @@ +[link](<./images(1)/cat(1).png>) + +[link](<./images(1)/cat(1).png> "title") + +![image](<./images(1)/cat(1).png>) + +![image](<./images(1)/cat(1).png> "title") + +![image](<./images(1)/cat(1).png> =800x600 "title") diff --git a/node_modules/showdown/test/issues/crazy-urls.html b/node_modules/showdown/test/issues/crazy-urls.html new file mode 100644 index 0000000..d5a1f3a --- /dev/null +++ b/node_modules/showdown/test/issues/crazy-urls.html @@ -0,0 +1,14 @@ +

      my cat

      +

      my cat

      +

      foo

      +

      foo

      +

      foo

      +

      foo

      +

      empty

      +

      empty

      +

      empty

      +

      empty

      +

      empty

      +

      empty

      +

      empty

      +

      empty

      diff --git a/node_modules/showdown/test/issues/crazy-urls.md b/node_modules/showdown/test/issues/crazy-urls.md new file mode 100644 index 0000000..3299d5b --- /dev/null +++ b/node_modules/showdown/test/issues/crazy-urls.md @@ -0,0 +1,27 @@ +![my cat]() + +[my cat]() + +![foo]() + +![foo]( "title") + +[foo]() + +[foo]( "title") + +![empty](<>) + +[empty](<>) + +![empty](<> "title") + +[empty](<> "title") + +![empty](< >) + +[empty](< >) + +![empty](< > "title") + +[empty](< > "title") diff --git a/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.html b/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.html new file mode 100644 index 0000000..433c466 --- /dev/null +++ b/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.html @@ -0,0 +1,12 @@ +
      +
      +
      +
      + text +
      +
      + text +
      +
      +
      +
      diff --git a/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.md b/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.md new file mode 100644 index 0000000..59047cf --- /dev/null +++ b/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.md @@ -0,0 +1,12 @@ +
      +
      +
      +
      + text +
      +
      + text +
      +
      +
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/issues/handle-html-pre.html b/node_modules/showdown/test/issues/handle-html-pre.html new file mode 100644 index 0000000..1b53992 --- /dev/null +++ b/node_modules/showdown/test/issues/handle-html-pre.html @@ -0,0 +1,4 @@ +

      hmm

      +
      +this is `a\_test` and this\_too and finally_this_is
      +
      diff --git a/node_modules/showdown/test/issues/handle-html-pre.md b/node_modules/showdown/test/issues/handle-html-pre.md new file mode 100644 index 0000000..e2a6333 --- /dev/null +++ b/node_modules/showdown/test/issues/handle-html-pre.md @@ -0,0 +1,4 @@ +hmm +
      +this is `a\_test` and this\_too and finally_this_is
      +
      diff --git a/node_modules/showdown/test/issues/one-line-HTML-input.html b/node_modules/showdown/test/issues/one-line-HTML-input.html new file mode 100644 index 0000000..b009ba2 --- /dev/null +++ b/node_modules/showdown/test/issues/one-line-HTML-input.html @@ -0,0 +1,3 @@ +
      a
      b
      +
      <div>**foobar**</div>
      +
      diff --git a/node_modules/showdown/test/issues/one-line-HTML-input.md b/node_modules/showdown/test/issues/one-line-HTML-input.md new file mode 100644 index 0000000..9fc4eef --- /dev/null +++ b/node_modules/showdown/test/issues/one-line-HTML-input.md @@ -0,0 +1,3 @@ +
      a
      b
      + +
      **foobar**
      diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.html b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.html new file mode 100644 index 0000000..7c095bb --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.html @@ -0,0 +1,4 @@ +

      This is a first paragraph, +on multiple lines.

      +

      This is a second paragraph. +There are spaces in between the two.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.md b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.md new file mode 100644 index 0000000..460d600 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.md @@ -0,0 +1,5 @@ +This is a first paragraph, +on multiple lines. + +This is a second paragraph. +There are spaces in between the two. diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.html b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.html new file mode 100644 index 0000000..a2d0808 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.html @@ -0,0 +1,4 @@ +

      This is a first paragraph, +on multiple lines.

      +

      This is a second paragraph +which has multiple lines too.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.md b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.md new file mode 100644 index 0000000..a3ac9df --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.md @@ -0,0 +1,5 @@ +This is a first paragraph, +on multiple lines. + +This is a second paragraph +which has multiple lines too. diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.html b/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.html new file mode 100644 index 0000000..87f33f6 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.html @@ -0,0 +1,2 @@ +

      A first paragraph.

      +

      A second paragraph after 3 CR (carriage return).

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.md b/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.md new file mode 100644 index 0000000..9ff9b42 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.md @@ -0,0 +1,5 @@ +A first paragraph. + + + +A second paragraph after 3 CR (carriage return). diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.html b/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.html new file mode 100644 index 0000000..601651d --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.html @@ -0,0 +1,2 @@ +

      This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.

      +

      A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.md b/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.md new file mode 100644 index 0000000..2c18220 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.md @@ -0,0 +1,3 @@ +This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. + +A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line. diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.html b/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.html new file mode 100644 index 0000000..1f53564 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.html @@ -0,0 +1,2 @@ +

      This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.

      +

      1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.md b/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.md new file mode 100644 index 0000000..335e420 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.md @@ -0,0 +1,3 @@ +This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. + +1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line. diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line.html b/node_modules/showdown/test/karlcow/2-paragraphs-line.html new file mode 100644 index 0000000..07aba47 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-line.html @@ -0,0 +1,2 @@ +

      This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.

      +

      A new long long long long long long long long long long long long long long long long paragraph on 1 line.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line.md b/node_modules/showdown/test/karlcow/2-paragraphs-line.md new file mode 100644 index 0000000..2501292 --- /dev/null +++ b/node_modules/showdown/test/karlcow/2-paragraphs-line.md @@ -0,0 +1,3 @@ +This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. + +A new long long long long long long long long long long long long long long long long paragraph on 1 line. diff --git a/node_modules/showdown/test/karlcow/EOL-CR+LF.html b/node_modules/showdown/test/karlcow/EOL-CR+LF.html new file mode 100644 index 0000000..49afea4 --- /dev/null +++ b/node_modules/showdown/test/karlcow/EOL-CR+LF.html @@ -0,0 +1,3 @@ +

      These lines all end with end of line (EOL) sequences.

      +

      Seriously, they really do.

      +

      If you don't believe me: HEX EDIT!

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/EOL-CR+LF.md b/node_modules/showdown/test/karlcow/EOL-CR+LF.md new file mode 100644 index 0000000..15cb86e --- /dev/null +++ b/node_modules/showdown/test/karlcow/EOL-CR+LF.md @@ -0,0 +1,6 @@ +These lines all end with end of line (EOL) sequences. + +Seriously, they really do. + +If you don't believe me: HEX EDIT! + diff --git a/node_modules/showdown/test/karlcow/EOL-CR.html b/node_modules/showdown/test/karlcow/EOL-CR.html new file mode 100644 index 0000000..0c04b14 --- /dev/null +++ b/node_modules/showdown/test/karlcow/EOL-CR.html @@ -0,0 +1 @@ +

      These lines all end with end of line (EOL) sequences.

      Seriously, they really do.

      If you don't believe me: HEX EDIT!

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/EOL-CR.md b/node_modules/showdown/test/karlcow/EOL-CR.md new file mode 100644 index 0000000..f0a17c8 --- /dev/null +++ b/node_modules/showdown/test/karlcow/EOL-CR.md @@ -0,0 +1 @@ +These lines all end with end of line (EOL) sequences. Seriously, they really do. If you don't believe me: HEX EDIT! \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/EOL-LF.html b/node_modules/showdown/test/karlcow/EOL-LF.html new file mode 100644 index 0000000..49afea4 --- /dev/null +++ b/node_modules/showdown/test/karlcow/EOL-LF.html @@ -0,0 +1,3 @@ +

      These lines all end with end of line (EOL) sequences.

      +

      Seriously, they really do.

      +

      If you don't believe me: HEX EDIT!

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/EOL-LF.md b/node_modules/showdown/test/karlcow/EOL-LF.md new file mode 100644 index 0000000..15cb86e --- /dev/null +++ b/node_modules/showdown/test/karlcow/EOL-LF.md @@ -0,0 +1,6 @@ +These lines all end with end of line (EOL) sequences. + +Seriously, they really do. + +If you don't believe me: HEX EDIT! + diff --git a/node_modules/showdown/test/karlcow/ampersand-text-flow.html b/node_modules/showdown/test/karlcow/ampersand-text-flow.html new file mode 100644 index 0000000..0f2eaf3 --- /dev/null +++ b/node_modules/showdown/test/karlcow/ampersand-text-flow.html @@ -0,0 +1 @@ +

      An ampersand & in the text flow is escaped as an html entity.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ampersand-text-flow.md b/node_modules/showdown/test/karlcow/ampersand-text-flow.md new file mode 100644 index 0000000..11ab4db --- /dev/null +++ b/node_modules/showdown/test/karlcow/ampersand-text-flow.md @@ -0,0 +1 @@ +An ampersand & in the text flow is escaped as an html entity. diff --git a/node_modules/showdown/test/karlcow/ampersand-uri.html b/node_modules/showdown/test/karlcow/ampersand-uri.html new file mode 100644 index 0000000..12b3054 --- /dev/null +++ b/node_modules/showdown/test/karlcow/ampersand-uri.html @@ -0,0 +1 @@ +

      There is an ampersand in the URI.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ampersand-uri.md b/node_modules/showdown/test/karlcow/ampersand-uri.md new file mode 100644 index 0000000..68a9b72 --- /dev/null +++ b/node_modules/showdown/test/karlcow/ampersand-uri.md @@ -0,0 +1 @@ +There is an [ampersand](http://validator.w3.org/check?uri=http://www.w3.org/&verbose=1) in the URI. diff --git a/node_modules/showdown/test/karlcow/asterisk-near-text.html b/node_modules/showdown/test/karlcow/asterisk-near-text.html new file mode 100644 index 0000000..aa442c3 --- /dev/null +++ b/node_modules/showdown/test/karlcow/asterisk-near-text.html @@ -0,0 +1 @@ +

      This is *an asterisk which should stay as is.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/asterisk-near-text.md b/node_modules/showdown/test/karlcow/asterisk-near-text.md new file mode 100644 index 0000000..d24ce2e --- /dev/null +++ b/node_modules/showdown/test/karlcow/asterisk-near-text.md @@ -0,0 +1 @@ +This is \*an asterisk which should stay as is. diff --git a/node_modules/showdown/test/karlcow/asterisk.html b/node_modules/showdown/test/karlcow/asterisk.html new file mode 100644 index 0000000..b6c93a8 --- /dev/null +++ b/node_modules/showdown/test/karlcow/asterisk.html @@ -0,0 +1 @@ +

      This is * an asterisk which should stay as is.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/asterisk.md b/node_modules/showdown/test/karlcow/asterisk.md new file mode 100644 index 0000000..787ea41 --- /dev/null +++ b/node_modules/showdown/test/karlcow/asterisk.md @@ -0,0 +1 @@ +This is * an asterisk which should stay as is. diff --git a/node_modules/showdown/test/karlcow/backslash-escape.html b/node_modules/showdown/test/karlcow/backslash-escape.html new file mode 100644 index 0000000..d69d385 --- /dev/null +++ b/node_modules/showdown/test/karlcow/backslash-escape.html @@ -0,0 +1,12 @@ +

      \ backslash +` backtick +* asterisk +_ underscore +{} curly braces +[] square brackets +() parentheses +# hash mark ++ plus sign +- minus sign (hyphen) +. dot +! exclamation mark

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/backslash-escape.md b/node_modules/showdown/test/karlcow/backslash-escape.md new file mode 100644 index 0000000..24a818e --- /dev/null +++ b/node_modules/showdown/test/karlcow/backslash-escape.md @@ -0,0 +1,12 @@ +\\ backslash +\` backtick +\* asterisk +\_ underscore +\{\} curly braces +\[\] square brackets +\(\) parentheses +\# hash mark +\+ plus sign +\- minus sign (hyphen) +\. dot +\! exclamation mark diff --git a/node_modules/showdown/test/karlcow/blockquote-added-markup.html b/node_modules/showdown/test/karlcow/blockquote-added-markup.html new file mode 100644 index 0000000..d0b50bf --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-added-markup.html @@ -0,0 +1,4 @@ +
      +

      heading level 1

      +

      paragraph

      +
      diff --git a/node_modules/showdown/test/karlcow/blockquote-added-markup.md b/node_modules/showdown/test/karlcow/blockquote-added-markup.md new file mode 100644 index 0000000..ca77951 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-added-markup.md @@ -0,0 +1,3 @@ +> # heading level 1 +> +> paragraph diff --git a/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.html b/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.html new file mode 100644 index 0000000..081b88b --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.html @@ -0,0 +1,4 @@ +
      +

      A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.

      +

      and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.

      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.md b/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.md new file mode 100644 index 0000000..9ff79cc --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.md @@ -0,0 +1,3 @@ +>A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line. + +>and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line. diff --git a/node_modules/showdown/test/karlcow/blockquote-line.html b/node_modules/showdown/test/karlcow/blockquote-line.html new file mode 100644 index 0000000..41451af --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-line.html @@ -0,0 +1,3 @@ +
      +

      This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a blockquote.

      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-line.md b/node_modules/showdown/test/karlcow/blockquote-line.md new file mode 100644 index 0000000..0acf5fe --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-line.md @@ -0,0 +1 @@ +>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a blockquote. diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.html b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.html new file mode 100644 index 0000000..6282d21 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.html @@ -0,0 +1,5 @@ +
      +

      A blockquote +on multiple lines +like this.

      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.md b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.md new file mode 100644 index 0000000..e845844 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.md @@ -0,0 +1,3 @@ +> A blockquote +> on multiple lines +> like this. diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.html b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.html new file mode 100644 index 0000000..82907e2 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.html @@ -0,0 +1,5 @@ +
      +

      A blockquote +on multiple lines +like this.

      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.md b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.md new file mode 100644 index 0000000..b38bc71 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.md @@ -0,0 +1,3 @@ +>A blockquote +>on multiple lines +>like this. diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.html b/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.html new file mode 100644 index 0000000..a0f1f2b --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.html @@ -0,0 +1,7 @@ +
      +

      A blockquote +on multiple lines +like this.

      +

      But it has +two paragraphs.

      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.md b/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.md new file mode 100644 index 0000000..46c8d6b --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.md @@ -0,0 +1,6 @@ +>A blockquote +>on multiple lines +>like this. +> +>But it has +>two paragraphs. diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline.html b/node_modules/showdown/test/karlcow/blockquote-multiline.html new file mode 100644 index 0000000..18126d4 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-multiline.html @@ -0,0 +1,5 @@ +
      +

      A blockquote +on multiple lines +like this

      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline.md b/node_modules/showdown/test/karlcow/blockquote-multiline.md new file mode 100644 index 0000000..bcbd4d1 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-multiline.md @@ -0,0 +1,3 @@ +>A blockquote +>on multiple lines +>like this diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.html b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.html new file mode 100644 index 0000000..ff0a7e6 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.html @@ -0,0 +1,7 @@ +
      +

      This is the first level of quoting.

      +
      +

      This is nested blockquote.

      +
      +

      Back to the first level.

      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.md b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.md new file mode 100644 index 0000000..8b2530f --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.md @@ -0,0 +1,5 @@ +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.html b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.html new file mode 100644 index 0000000..f3f11f9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.html @@ -0,0 +1,6 @@ +
      +

      This is the first level of quoting.

      +
      +

      This is nested blockquote.

      +
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.md b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.md new file mode 100644 index 0000000..2894815 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.md @@ -0,0 +1,3 @@ +> This is the first level of quoting. +> +> > This is nested blockquote. diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.html b/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.html new file mode 100644 index 0000000..42b8ab4 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.html @@ -0,0 +1,7 @@ +
      +

      This is the first level of quoting.

      +
      +

      This is nested blockquote. +Back to the first level.

      +
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.md b/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.md new file mode 100644 index 0000000..e01158b --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.md @@ -0,0 +1,3 @@ +> This is the first level of quoting. +> > This is nested blockquote. +> Back to the first level. diff --git a/node_modules/showdown/test/karlcow/blockquote-nested.html b/node_modules/showdown/test/karlcow/blockquote-nested.html new file mode 100644 index 0000000..f3f11f9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-nested.html @@ -0,0 +1,6 @@ +
      +

      This is the first level of quoting.

      +
      +

      This is nested blockquote.

      +
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-nested.md b/node_modules/showdown/test/karlcow/blockquote-nested.md new file mode 100644 index 0000000..739ac21 --- /dev/null +++ b/node_modules/showdown/test/karlcow/blockquote-nested.md @@ -0,0 +1,2 @@ +> This is the first level of quoting. +> > This is nested blockquote. diff --git a/node_modules/showdown/test/karlcow/code-1-tab.html b/node_modules/showdown/test/karlcow/code-1-tab.html new file mode 100644 index 0000000..9b8bb7a --- /dev/null +++ b/node_modules/showdown/test/karlcow/code-1-tab.html @@ -0,0 +1,3 @@ +
      10 PRINT HELLO INFINITE
      +20 GOTO 10
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/code-1-tab.md b/node_modules/showdown/test/karlcow/code-1-tab.md new file mode 100644 index 0000000..ff1e25d --- /dev/null +++ b/node_modules/showdown/test/karlcow/code-1-tab.md @@ -0,0 +1,2 @@ + 10 PRINT HELLO INFINITE + 20 GOTO 10 diff --git a/node_modules/showdown/test/karlcow/code-4-spaces-escaping.html b/node_modules/showdown/test/karlcow/code-4-spaces-escaping.html new file mode 100644 index 0000000..6d9fa87 --- /dev/null +++ b/node_modules/showdown/test/karlcow/code-4-spaces-escaping.html @@ -0,0 +1,3 @@ +
      10 PRINT < > &
      +20 GOTO 10
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/code-4-spaces-escaping.md b/node_modules/showdown/test/karlcow/code-4-spaces-escaping.md new file mode 100644 index 0000000..379cbbd --- /dev/null +++ b/node_modules/showdown/test/karlcow/code-4-spaces-escaping.md @@ -0,0 +1,2 @@ + 10 PRINT < > & + 20 GOTO 10 diff --git a/node_modules/showdown/test/karlcow/code-4-spaces.html b/node_modules/showdown/test/karlcow/code-4-spaces.html new file mode 100644 index 0000000..9b8bb7a --- /dev/null +++ b/node_modules/showdown/test/karlcow/code-4-spaces.html @@ -0,0 +1,3 @@ +
      10 PRINT HELLO INFINITE
      +20 GOTO 10
      +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/code-4-spaces.md b/node_modules/showdown/test/karlcow/code-4-spaces.md new file mode 100644 index 0000000..e3bc4ba --- /dev/null +++ b/node_modules/showdown/test/karlcow/code-4-spaces.md @@ -0,0 +1,2 @@ + 10 PRINT HELLO INFINITE + 20 GOTO 10 diff --git a/node_modules/showdown/test/karlcow/em-middle-word.html b/node_modules/showdown/test/karlcow/em-middle-word.html new file mode 100644 index 0000000..74f7f90 --- /dev/null +++ b/node_modules/showdown/test/karlcow/em-middle-word.html @@ -0,0 +1 @@ +

      asterisks

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/em-middle-word.md b/node_modules/showdown/test/karlcow/em-middle-word.md new file mode 100644 index 0000000..b49e7ba --- /dev/null +++ b/node_modules/showdown/test/karlcow/em-middle-word.md @@ -0,0 +1 @@ +as*te*risks diff --git a/node_modules/showdown/test/karlcow/em-star.html b/node_modules/showdown/test/karlcow/em-star.html new file mode 100644 index 0000000..d35dd53 --- /dev/null +++ b/node_modules/showdown/test/karlcow/em-star.html @@ -0,0 +1 @@ +

      single asterisks

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/em-star.md b/node_modules/showdown/test/karlcow/em-star.md new file mode 100644 index 0000000..1e7c8de --- /dev/null +++ b/node_modules/showdown/test/karlcow/em-star.md @@ -0,0 +1 @@ +*single asterisks* diff --git a/node_modules/showdown/test/karlcow/em-underscore.html b/node_modules/showdown/test/karlcow/em-underscore.html new file mode 100644 index 0000000..2627bde --- /dev/null +++ b/node_modules/showdown/test/karlcow/em-underscore.html @@ -0,0 +1 @@ +

      single underscores

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/em-underscore.md b/node_modules/showdown/test/karlcow/em-underscore.md new file mode 100644 index 0000000..b6eac78 --- /dev/null +++ b/node_modules/showdown/test/karlcow/em-underscore.md @@ -0,0 +1 @@ +_single underscores_ diff --git a/node_modules/showdown/test/karlcow/entities-text-flow.html b/node_modules/showdown/test/karlcow/entities-text-flow.html new file mode 100644 index 0000000..6924fea --- /dev/null +++ b/node_modules/showdown/test/karlcow/entities-text-flow.html @@ -0,0 +1 @@ +

      HTML entities are written using ampersand notation: ©

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/entities-text-flow.md b/node_modules/showdown/test/karlcow/entities-text-flow.md new file mode 100644 index 0000000..336eae1 --- /dev/null +++ b/node_modules/showdown/test/karlcow/entities-text-flow.md @@ -0,0 +1 @@ +HTML entities are written using ampersand notation: © diff --git a/node_modules/showdown/test/karlcow/header-level1-equal-underlined.html b/node_modules/showdown/test/karlcow/header-level1-equal-underlined.html new file mode 100644 index 0000000..af0c276 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-equal-underlined.html @@ -0,0 +1 @@ +

      This is an H1

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-equal-underlined.md b/node_modules/showdown/test/karlcow/header-level1-equal-underlined.md new file mode 100644 index 0000000..313c1dc --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-equal-underlined.md @@ -0,0 +1,2 @@ +This is an H1 +============= diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.html new file mode 100644 index 0000000..af0c276 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.html @@ -0,0 +1 @@ +

      This is an H1

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.md new file mode 100644 index 0000000..d25887a --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.md @@ -0,0 +1 @@ +# This is an H1 # diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.html b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.html new file mode 100644 index 0000000..1b48fc2 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.html @@ -0,0 +1 @@ +

      # This is an H1

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.md b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.md new file mode 100644 index 0000000..49d1ae3 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.md @@ -0,0 +1,2 @@ + # This is an H1 + \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.html b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.html new file mode 100644 index 0000000..013acb3 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.html @@ -0,0 +1,2 @@ +

      this is an h1 with two trailing spaces

      +

      A new paragraph.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.md b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.md new file mode 100644 index 0000000..a390af0 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.md @@ -0,0 +1,2 @@ +# this is an h1 with two trailing spaces +A new paragraph. diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign.html b/node_modules/showdown/test/karlcow/header-level1-hash-sign.html new file mode 100644 index 0000000..af0c276 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-hash-sign.html @@ -0,0 +1 @@ +

      This is an H1

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign.md b/node_modules/showdown/test/karlcow/header-level1-hash-sign.md new file mode 100644 index 0000000..90944c9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level1-hash-sign.md @@ -0,0 +1 @@ +# This is an H1 diff --git a/node_modules/showdown/test/karlcow/header-level2-dash-underlined.html b/node_modules/showdown/test/karlcow/header-level2-dash-underlined.html new file mode 100644 index 0000000..2f4138b --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level2-dash-underlined.html @@ -0,0 +1 @@ +

      This is an H2

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level2-dash-underlined.md b/node_modules/showdown/test/karlcow/header-level2-dash-underlined.md new file mode 100644 index 0000000..a912f0e --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level2-dash-underlined.md @@ -0,0 +1,2 @@ +This is an H2 +------------- diff --git a/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.html new file mode 100644 index 0000000..2f4138b --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.html @@ -0,0 +1 @@ +

      This is an H2

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.md new file mode 100644 index 0000000..9539252 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.md @@ -0,0 +1 @@ +## This is an H2 ## diff --git a/node_modules/showdown/test/karlcow/header-level2-hash-sign.html b/node_modules/showdown/test/karlcow/header-level2-hash-sign.html new file mode 100644 index 0000000..2f4138b --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level2-hash-sign.html @@ -0,0 +1 @@ +

      This is an H2

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level2-hash-sign.md b/node_modules/showdown/test/karlcow/header-level2-hash-sign.md new file mode 100644 index 0000000..bf1c56f --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level2-hash-sign.md @@ -0,0 +1 @@ +## This is an H2 diff --git a/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.html new file mode 100644 index 0000000..a9d3ba9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.html @@ -0,0 +1 @@ +

      This is an H3

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.md new file mode 100644 index 0000000..f875665 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.md @@ -0,0 +1 @@ +### This is an H3 ### diff --git a/node_modules/showdown/test/karlcow/header-level3-hash-sign.html b/node_modules/showdown/test/karlcow/header-level3-hash-sign.html new file mode 100644 index 0000000..a9d3ba9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level3-hash-sign.html @@ -0,0 +1 @@ +

      This is an H3

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level3-hash-sign.md b/node_modules/showdown/test/karlcow/header-level3-hash-sign.md new file mode 100644 index 0000000..247ce34 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level3-hash-sign.md @@ -0,0 +1 @@ +### This is an H3 diff --git a/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.html new file mode 100644 index 0000000..1c0f3d6 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.html @@ -0,0 +1 @@ +

      This is an H4

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.md new file mode 100644 index 0000000..24a9eb3 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.md @@ -0,0 +1 @@ +#### This is an H4 #### diff --git a/node_modules/showdown/test/karlcow/header-level4-hash-sign.html b/node_modules/showdown/test/karlcow/header-level4-hash-sign.html new file mode 100644 index 0000000..1c0f3d6 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level4-hash-sign.html @@ -0,0 +1 @@ +

      This is an H4

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level4-hash-sign.md b/node_modules/showdown/test/karlcow/header-level4-hash-sign.md new file mode 100644 index 0000000..36f0db0 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level4-hash-sign.md @@ -0,0 +1 @@ +#### This is an H4 diff --git a/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.html new file mode 100644 index 0000000..aa43910 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.html @@ -0,0 +1 @@ +
      This is an H5
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.md new file mode 100644 index 0000000..889f789 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.md @@ -0,0 +1 @@ +##### This is an H5 ##### diff --git a/node_modules/showdown/test/karlcow/header-level5-hash-sign.html b/node_modules/showdown/test/karlcow/header-level5-hash-sign.html new file mode 100644 index 0000000..aa43910 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level5-hash-sign.html @@ -0,0 +1 @@ +
      This is an H5
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level5-hash-sign.md b/node_modules/showdown/test/karlcow/header-level5-hash-sign.md new file mode 100644 index 0000000..a66d50b --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level5-hash-sign.md @@ -0,0 +1 @@ +##### This is an H5 diff --git a/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.html new file mode 100644 index 0000000..2cbc7b1 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.html @@ -0,0 +1 @@ +
      This is an H6
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.md new file mode 100644 index 0000000..92dc1df --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.md @@ -0,0 +1 @@ +###### This is an H6 ###### diff --git a/node_modules/showdown/test/karlcow/header-level6-hash-sign.html b/node_modules/showdown/test/karlcow/header-level6-hash-sign.html new file mode 100644 index 0000000..2cbc7b1 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level6-hash-sign.html @@ -0,0 +1 @@ +
      This is an H6
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level6-hash-sign.md b/node_modules/showdown/test/karlcow/header-level6-hash-sign.md new file mode 100644 index 0000000..c85f1a7 --- /dev/null +++ b/node_modules/showdown/test/karlcow/header-level6-hash-sign.md @@ -0,0 +1 @@ +###### This is an H6 diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.html b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.html new file mode 100644 index 0000000..1d6667d --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.html @@ -0,0 +1 @@ +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.md b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.md new file mode 100644 index 0000000..75fb4cd --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.md @@ -0,0 +1 @@ +- - - diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.html b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.html new file mode 100644 index 0000000..1d6667d --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.html @@ -0,0 +1 @@ +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.md b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.md new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.md @@ -0,0 +1 @@ +--- diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.html b/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.html new file mode 100644 index 0000000..1d6667d --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.html @@ -0,0 +1 @@ +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.md b/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.md new file mode 100644 index 0000000..6a7e452 --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.md @@ -0,0 +1 @@ +*** diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.html b/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.html new file mode 100644 index 0000000..1d6667d --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.html @@ -0,0 +1 @@ +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.md b/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.md new file mode 100644 index 0000000..88f351d --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.md @@ -0,0 +1 @@ +___ diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.html b/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.html new file mode 100644 index 0000000..1d6667d --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.html @@ -0,0 +1 @@ +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.md b/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.md new file mode 100644 index 0000000..3e21f7e --- /dev/null +++ b/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.md @@ -0,0 +1 @@ +------- diff --git a/node_modules/showdown/test/karlcow/img-idref-title.html b/node_modules/showdown/test/karlcow/img-idref-title.html new file mode 100644 index 0000000..f9b1715 --- /dev/null +++ b/node_modules/showdown/test/karlcow/img-idref-title.html @@ -0,0 +1 @@ +

      HTML5

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/img-idref-title.md b/node_modules/showdown/test/karlcow/img-idref-title.md new file mode 100644 index 0000000..c4dfe52 --- /dev/null +++ b/node_modules/showdown/test/karlcow/img-idref-title.md @@ -0,0 +1,3 @@ +![HTML5][h5] + +[h5]: http://www.w3.org/html/logo/img/mark-word-icon.png "HTML5 for everyone" diff --git a/node_modules/showdown/test/karlcow/img-idref.html b/node_modules/showdown/test/karlcow/img-idref.html new file mode 100644 index 0000000..79103a8 --- /dev/null +++ b/node_modules/showdown/test/karlcow/img-idref.html @@ -0,0 +1 @@ +

      HTML5

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/img-idref.md b/node_modules/showdown/test/karlcow/img-idref.md new file mode 100644 index 0000000..71387b4 --- /dev/null +++ b/node_modules/showdown/test/karlcow/img-idref.md @@ -0,0 +1,3 @@ +![HTML5][h5] + +[h5]: http://www.w3.org/html/logo/img/mark-word-icon.png diff --git a/node_modules/showdown/test/karlcow/img-title.html b/node_modules/showdown/test/karlcow/img-title.html new file mode 100644 index 0000000..cc0e195 --- /dev/null +++ b/node_modules/showdown/test/karlcow/img-title.html @@ -0,0 +1 @@ +

      HTML5

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/img-title.md b/node_modules/showdown/test/karlcow/img-title.md new file mode 100644 index 0000000..a1dc1aa --- /dev/null +++ b/node_modules/showdown/test/karlcow/img-title.md @@ -0,0 +1 @@ +![HTML5](http://www.w3.org/html/logo/img/mark-word-icon.png "HTML5 logo for everyone") diff --git a/node_modules/showdown/test/karlcow/img.html b/node_modules/showdown/test/karlcow/img.html new file mode 100644 index 0000000..79103a8 --- /dev/null +++ b/node_modules/showdown/test/karlcow/img.html @@ -0,0 +1 @@ +

      HTML5

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/img.md b/node_modules/showdown/test/karlcow/img.md new file mode 100644 index 0000000..bffc42a --- /dev/null +++ b/node_modules/showdown/test/karlcow/img.md @@ -0,0 +1 @@ +![HTML5](http://www.w3.org/html/logo/img/mark-word-icon.png) diff --git a/node_modules/showdown/test/karlcow/inline-code-escaping-entities.html b/node_modules/showdown/test/karlcow/inline-code-escaping-entities.html new file mode 100644 index 0000000..726e8a8 --- /dev/null +++ b/node_modules/showdown/test/karlcow/inline-code-escaping-entities.html @@ -0,0 +1 @@ +

      We love <code> and & for everything

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/inline-code-escaping-entities.md b/node_modules/showdown/test/karlcow/inline-code-escaping-entities.md new file mode 100644 index 0000000..641ae90 --- /dev/null +++ b/node_modules/showdown/test/karlcow/inline-code-escaping-entities.md @@ -0,0 +1 @@ +We love ` and &` for everything diff --git a/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.html b/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.html new file mode 100644 index 0000000..bc92165 --- /dev/null +++ b/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.html @@ -0,0 +1 @@ +

      We love `code` for everything

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.md b/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.md new file mode 100644 index 0000000..9e2325d --- /dev/null +++ b/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.md @@ -0,0 +1 @@ +``We love `code` for everything`` diff --git a/node_modules/showdown/test/karlcow/inline-code.html b/node_modules/showdown/test/karlcow/inline-code.html new file mode 100644 index 0000000..bc92165 --- /dev/null +++ b/node_modules/showdown/test/karlcow/inline-code.html @@ -0,0 +1 @@ +

      We love `code` for everything

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/inline-code.md b/node_modules/showdown/test/karlcow/inline-code.md new file mode 100644 index 0000000..9e2325d --- /dev/null +++ b/node_modules/showdown/test/karlcow/inline-code.md @@ -0,0 +1 @@ +``We love `code` for everything`` diff --git a/node_modules/showdown/test/karlcow/line-break-2-spaces.html b/node_modules/showdown/test/karlcow/line-break-2-spaces.html new file mode 100644 index 0000000..f4f61ed --- /dev/null +++ b/node_modules/showdown/test/karlcow/line-break-2-spaces.html @@ -0,0 +1,2 @@ +

      A first sentence
      +and a line break.

      diff --git a/node_modules/showdown/test/karlcow/line-break-2-spaces.md b/node_modules/showdown/test/karlcow/line-break-2-spaces.md new file mode 100644 index 0000000..9150278 --- /dev/null +++ b/node_modules/showdown/test/karlcow/line-break-2-spaces.md @@ -0,0 +1,2 @@ +A first sentence +and a line break. diff --git a/node_modules/showdown/test/karlcow/line-break-5-spaces.html b/node_modules/showdown/test/karlcow/line-break-5-spaces.html new file mode 100644 index 0000000..f4f61ed --- /dev/null +++ b/node_modules/showdown/test/karlcow/line-break-5-spaces.html @@ -0,0 +1,2 @@ +

      A first sentence
      +and a line break.

      diff --git a/node_modules/showdown/test/karlcow/line-break-5-spaces.md b/node_modules/showdown/test/karlcow/line-break-5-spaces.md new file mode 100644 index 0000000..07c1dbb --- /dev/null +++ b/node_modules/showdown/test/karlcow/line-break-5-spaces.md @@ -0,0 +1,2 @@ +A first sentence +and a line break. diff --git a/node_modules/showdown/test/karlcow/link-automatic.html b/node_modules/showdown/test/karlcow/link-automatic.html new file mode 100644 index 0000000..604cbdc --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-automatic.html @@ -0,0 +1 @@ +

      This is an automatic link http://www.w3.org/

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-automatic.md b/node_modules/showdown/test/karlcow/link-automatic.md new file mode 100644 index 0000000..a01ea4b --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-automatic.md @@ -0,0 +1 @@ +This is an automatic link diff --git a/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.html b/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.html new file mode 100644 index 0000000..5e568ba --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.html @@ -0,0 +1 @@ +

      W3C

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.md b/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.md new file mode 100644 index 0000000..ac8dc5a --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.md @@ -0,0 +1 @@ +[W3C](http://www.w3.org/ "Discover w3c") diff --git a/node_modules/showdown/test/karlcow/link-bracket-paranthesis.html b/node_modules/showdown/test/karlcow/link-bracket-paranthesis.html new file mode 100644 index 0000000..ba65be8 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-bracket-paranthesis.html @@ -0,0 +1 @@ +

      W3C

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-bracket-paranthesis.md b/node_modules/showdown/test/karlcow/link-bracket-paranthesis.md new file mode 100644 index 0000000..1ac993b --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-bracket-paranthesis.md @@ -0,0 +1 @@ +[W3C](http://www.w3.org/) diff --git a/node_modules/showdown/test/karlcow/link-idref-angle-bracket.html b/node_modules/showdown/test/karlcow/link-idref-angle-bracket.html new file mode 100644 index 0000000..dbee9a9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-angle-bracket.html @@ -0,0 +1 @@ +

      World Wide Web Consortium

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-angle-bracket.md b/node_modules/showdown/test/karlcow/link-idref-angle-bracket.md new file mode 100644 index 0000000..a963597 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-angle-bracket.md @@ -0,0 +1,3 @@ +[World Wide Web Consortium][w3c] + +[w3c]: diff --git a/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.html b/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.html new file mode 100644 index 0000000..dbee9a9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.html @@ -0,0 +1 @@ +

      World Wide Web Consortium

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.md b/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.md new file mode 100644 index 0000000..24447d1 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.md @@ -0,0 +1,3 @@ +[World Wide Web Consortium][] + +[World Wide Web Consortium]: http://www.w3.org/ diff --git a/node_modules/showdown/test/karlcow/link-idref-implicit.html b/node_modules/showdown/test/karlcow/link-idref-implicit.html new file mode 100644 index 0000000..9ba2da6 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-implicit.html @@ -0,0 +1 @@ +

      w3c

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-implicit.md b/node_modules/showdown/test/karlcow/link-idref-implicit.md new file mode 100644 index 0000000..91aa48d --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-implicit.md @@ -0,0 +1,3 @@ +[w3c][] + +[w3c]: http://www.w3.org/ diff --git a/node_modules/showdown/test/karlcow/link-idref-space.html b/node_modules/showdown/test/karlcow/link-idref-space.html new file mode 100644 index 0000000..dbee9a9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-space.html @@ -0,0 +1 @@ +

      World Wide Web Consortium

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-space.md b/node_modules/showdown/test/karlcow/link-idref-space.md new file mode 100644 index 0000000..dda6a3e --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-space.md @@ -0,0 +1,3 @@ +[World Wide Web Consortium] [w3c] + +[w3c]: http://www.w3.org/ diff --git a/node_modules/showdown/test/karlcow/link-idref-title-next-line.html b/node_modules/showdown/test/karlcow/link-idref-title-next-line.html new file mode 100644 index 0000000..9c2dda6 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-title-next-line.html @@ -0,0 +1 @@ +

      World Wide Web Consortium

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-title-next-line.md b/node_modules/showdown/test/karlcow/link-idref-title-next-line.md new file mode 100644 index 0000000..1e55a1d --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-title-next-line.md @@ -0,0 +1,4 @@ +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ + "Discover W3C" diff --git a/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.html b/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.html new file mode 100644 index 0000000..f80f8ce --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.html @@ -0,0 +1 @@ +

      World Wide Web Consortium

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.md b/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.md new file mode 100644 index 0000000..3ebc083 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.md @@ -0,0 +1,3 @@ +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ (Discover w3c) diff --git a/node_modules/showdown/test/karlcow/link-idref-title-single-quote.html b/node_modules/showdown/test/karlcow/link-idref-title-single-quote.html new file mode 100644 index 0000000..f80f8ce --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-title-single-quote.html @@ -0,0 +1 @@ +

      World Wide Web Consortium

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-title-single-quote.md b/node_modules/showdown/test/karlcow/link-idref-title-single-quote.md new file mode 100644 index 0000000..71fd319 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-title-single-quote.md @@ -0,0 +1,3 @@ +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ 'Discover w3c' diff --git a/node_modules/showdown/test/karlcow/link-idref-title.html b/node_modules/showdown/test/karlcow/link-idref-title.html new file mode 100644 index 0000000..f80f8ce --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-title.html @@ -0,0 +1 @@ +

      World Wide Web Consortium

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-title.md b/node_modules/showdown/test/karlcow/link-idref-title.md new file mode 100644 index 0000000..637940d --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref-title.md @@ -0,0 +1,3 @@ +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ "Discover w3c" diff --git a/node_modules/showdown/test/karlcow/link-idref.html b/node_modules/showdown/test/karlcow/link-idref.html new file mode 100644 index 0000000..dbee9a9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref.html @@ -0,0 +1 @@ +

      World Wide Web Consortium

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref.md b/node_modules/showdown/test/karlcow/link-idref.md new file mode 100644 index 0000000..83f741e --- /dev/null +++ b/node_modules/showdown/test/karlcow/link-idref.md @@ -0,0 +1,3 @@ +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ diff --git a/node_modules/showdown/test/karlcow/list-blockquote.html b/node_modules/showdown/test/karlcow/list-blockquote.html new file mode 100644 index 0000000..60b1770 --- /dev/null +++ b/node_modules/showdown/test/karlcow/list-blockquote.html @@ -0,0 +1,6 @@ +
        +
      • a list containing a blockquote

        +
        +

        this the blockquote in the list

        +
      • +
      diff --git a/node_modules/showdown/test/karlcow/list-blockquote.md b/node_modules/showdown/test/karlcow/list-blockquote.md new file mode 100644 index 0000000..763ae3e --- /dev/null +++ b/node_modules/showdown/test/karlcow/list-blockquote.md @@ -0,0 +1,3 @@ +* a list containing a blockquote + + > this the blockquote in the list diff --git a/node_modules/showdown/test/karlcow/list-code.html b/node_modules/showdown/test/karlcow/list-code.html new file mode 100644 index 0000000..664a61c --- /dev/null +++ b/node_modules/showdown/test/karlcow/list-code.html @@ -0,0 +1,6 @@ +
        +
      • a list containing a block of code

        +
        10 PRINT HELLO INFINITE
        +20 GOTO 10
        +
      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/list-code.md b/node_modules/showdown/test/karlcow/list-code.md new file mode 100644 index 0000000..71d2bc8 --- /dev/null +++ b/node_modules/showdown/test/karlcow/list-code.md @@ -0,0 +1,4 @@ +* a list containing a block of code + + 10 PRINT HELLO INFINITE + 20 GOTO 10 diff --git a/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.html b/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.html new file mode 100644 index 0000000..3f499b0 --- /dev/null +++ b/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.html @@ -0,0 +1,9 @@ +
        +
      • This is a list item with two paragraphs. Lorem ipsum dolor +sit amet, consectetuer adipiscing elit. Aliquam hendrerit +mi posuere lectus.

        +

        Vestibulum enim wisi, viverra nec, fringilla in, laoreet +vitae, risus. Donec sit amet nisl. Aliquam semper ipsum +sit amet velit.

      • +
      • Suspendisse id sem consectetuer libero luctus adipiscing.

      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.md b/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.md new file mode 100644 index 0000000..0decb6f --- /dev/null +++ b/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.md @@ -0,0 +1,9 @@ +* This is a list item with two paragraphs. Lorem ipsum dolor + sit amet, consectetuer adipiscing elit. Aliquam hendrerit + mi posuere lectus. + + Vestibulum enim wisi, viverra nec, fringilla in, laoreet + vitae, risus. Donec sit amet nisl. Aliquam semper ipsum + sit amet velit. + +* Suspendisse id sem consectetuer libero luctus adipiscing. diff --git a/node_modules/showdown/test/karlcow/list-multiparagraphs.html b/node_modules/showdown/test/karlcow/list-multiparagraphs.html new file mode 100644 index 0000000..3f499b0 --- /dev/null +++ b/node_modules/showdown/test/karlcow/list-multiparagraphs.html @@ -0,0 +1,9 @@ +
        +
      • This is a list item with two paragraphs. Lorem ipsum dolor +sit amet, consectetuer adipiscing elit. Aliquam hendrerit +mi posuere lectus.

        +

        Vestibulum enim wisi, viverra nec, fringilla in, laoreet +vitae, risus. Donec sit amet nisl. Aliquam semper ipsum +sit amet velit.

      • +
      • Suspendisse id sem consectetuer libero luctus adipiscing.

      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/list-multiparagraphs.md b/node_modules/showdown/test/karlcow/list-multiparagraphs.md new file mode 100644 index 0000000..d8b1b67 --- /dev/null +++ b/node_modules/showdown/test/karlcow/list-multiparagraphs.md @@ -0,0 +1,9 @@ +* This is a list item with two paragraphs. Lorem ipsum dolor + sit amet, consectetuer adipiscing elit. Aliquam hendrerit + mi posuere lectus. + + Vestibulum enim wisi, viverra nec, fringilla in, laoreet + vitae, risus. Donec sit amet nisl. Aliquam semper ipsum + sit amet velit. + +* Suspendisse id sem consectetuer libero luctus adipiscing. diff --git a/node_modules/showdown/test/karlcow/ordered-list-escaped.html b/node_modules/showdown/test/karlcow/ordered-list-escaped.html new file mode 100644 index 0000000..f6c477d --- /dev/null +++ b/node_modules/showdown/test/karlcow/ordered-list-escaped.html @@ -0,0 +1 @@ +

      1. ordered list escape

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ordered-list-escaped.md b/node_modules/showdown/test/karlcow/ordered-list-escaped.md new file mode 100644 index 0000000..ecd4a74 --- /dev/null +++ b/node_modules/showdown/test/karlcow/ordered-list-escaped.md @@ -0,0 +1 @@ +1\. ordered list escape diff --git a/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.html b/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.html new file mode 100644 index 0000000..dbe72cf --- /dev/null +++ b/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.html @@ -0,0 +1,6 @@ +
        +
      1. 1

        +
          +
        • inner par list
      2. +
      3. 2

      4. +
      diff --git a/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.md b/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.md new file mode 100644 index 0000000..05c6490 --- /dev/null +++ b/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.md @@ -0,0 +1,5 @@ +1. 1 + + - inner par list + +2. 2 diff --git a/node_modules/showdown/test/karlcow/ordered-list-items-random-number.html b/node_modules/showdown/test/karlcow/ordered-list-items-random-number.html new file mode 100644 index 0000000..c34d859 --- /dev/null +++ b/node_modules/showdown/test/karlcow/ordered-list-items-random-number.html @@ -0,0 +1,5 @@ +
        +
      1. list item 1
      2. +
      3. list item 2
      4. +
      5. list item 3
      6. +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ordered-list-items-random-number.md b/node_modules/showdown/test/karlcow/ordered-list-items-random-number.md new file mode 100644 index 0000000..53c3066 --- /dev/null +++ b/node_modules/showdown/test/karlcow/ordered-list-items-random-number.md @@ -0,0 +1,3 @@ +1. list item 1 +8. list item 2 +1. list item 3 diff --git a/node_modules/showdown/test/karlcow/ordered-list-items.html b/node_modules/showdown/test/karlcow/ordered-list-items.html new file mode 100644 index 0000000..c34d859 --- /dev/null +++ b/node_modules/showdown/test/karlcow/ordered-list-items.html @@ -0,0 +1,5 @@ +
        +
      1. list item 1
      2. +
      3. list item 2
      4. +
      5. list item 3
      6. +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ordered-list-items.md b/node_modules/showdown/test/karlcow/ordered-list-items.md new file mode 100644 index 0000000..9ab0ada --- /dev/null +++ b/node_modules/showdown/test/karlcow/ordered-list-items.md @@ -0,0 +1,3 @@ +1. list item 1 +2. list item 2 +3. list item 3 diff --git a/node_modules/showdown/test/karlcow/paragraph-hard-return.html b/node_modules/showdown/test/karlcow/paragraph-hard-return.html new file mode 100644 index 0000000..7915e29 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraph-hard-return.html @@ -0,0 +1,3 @@ +

      This is a paragraph +on multiple lines +with hard return.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraph-hard-return.md b/node_modules/showdown/test/karlcow/paragraph-hard-return.md new file mode 100644 index 0000000..42b1fa5 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraph-hard-return.md @@ -0,0 +1,3 @@ +This is a paragraph +on multiple lines +with hard return. diff --git a/node_modules/showdown/test/karlcow/paragraph-line.html b/node_modules/showdown/test/karlcow/paragraph-line.html new file mode 100644 index 0000000..5fc0e44 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraph-line.html @@ -0,0 +1 @@ +

      This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraph-line.md b/node_modules/showdown/test/karlcow/paragraph-line.md new file mode 100644 index 0000000..ca72f4b --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraph-line.md @@ -0,0 +1 @@ +This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. diff --git a/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.html b/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.html new file mode 100644 index 0000000..d99afcd --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.html @@ -0,0 +1 @@ +

      This is a paragraph with a trailing and leading space.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.md b/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.md new file mode 100644 index 0000000..b83c0db --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.md @@ -0,0 +1 @@ + This is a paragraph with a trailing and leading space. diff --git a/node_modules/showdown/test/karlcow/paragraph-trailing-tab.html b/node_modules/showdown/test/karlcow/paragraph-trailing-tab.html new file mode 100644 index 0000000..f4bcd7c --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraph-trailing-tab.html @@ -0,0 +1 @@ +

      This is a paragraph with 1 trailing tab.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraph-trailing-tab.md b/node_modules/showdown/test/karlcow/paragraph-trailing-tab.md new file mode 100644 index 0000000..a3617e0 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraph-trailing-tab.md @@ -0,0 +1 @@ +This is a paragraph with 1 trailing tab. diff --git a/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.html b/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.html new file mode 100644 index 0000000..bd08e95 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.html @@ -0,0 +1 @@ +

      This is a paragraph with 2 leading spaces.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.md b/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.md new file mode 100644 index 0000000..81f814e --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.md @@ -0,0 +1 @@ + This is a paragraph with 2 leading spaces. diff --git a/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.html b/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.html new file mode 100644 index 0000000..9c91f46 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.html @@ -0,0 +1 @@ +

      This is a paragraph with 3 leading spaces.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.md b/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.md new file mode 100644 index 0000000..652f19a --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.md @@ -0,0 +1 @@ + This is a paragraph with 3 leading spaces. diff --git a/node_modules/showdown/test/karlcow/paragraphs-leading-space.html b/node_modules/showdown/test/karlcow/paragraphs-leading-space.html new file mode 100644 index 0000000..917426d --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraphs-leading-space.html @@ -0,0 +1 @@ +

      This is a paragraph with 1 leading space.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraphs-leading-space.md b/node_modules/showdown/test/karlcow/paragraphs-leading-space.md new file mode 100644 index 0000000..d462e28 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraphs-leading-space.md @@ -0,0 +1 @@ + This is a paragraph with 1 leading space. diff --git a/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.html b/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.html new file mode 100644 index 0000000..7636c46 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.html @@ -0,0 +1 @@ +

      This is a paragraph with a trailing space.

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.md b/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.md new file mode 100644 index 0000000..6809b73 --- /dev/null +++ b/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.md @@ -0,0 +1 @@ +This is a paragraph with a trailing space. \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/strong-middle-word.html b/node_modules/showdown/test/karlcow/strong-middle-word.html new file mode 100644 index 0000000..4550f32 --- /dev/null +++ b/node_modules/showdown/test/karlcow/strong-middle-word.html @@ -0,0 +1 @@ +

      asterisks

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/strong-middle-word.md b/node_modules/showdown/test/karlcow/strong-middle-word.md new file mode 100644 index 0000000..b13d5e9 --- /dev/null +++ b/node_modules/showdown/test/karlcow/strong-middle-word.md @@ -0,0 +1 @@ +as**te**risks diff --git a/node_modules/showdown/test/karlcow/strong-star.html b/node_modules/showdown/test/karlcow/strong-star.html new file mode 100644 index 0000000..3181aea --- /dev/null +++ b/node_modules/showdown/test/karlcow/strong-star.html @@ -0,0 +1 @@ +

      double asterisks

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/strong-star.md b/node_modules/showdown/test/karlcow/strong-star.md new file mode 100644 index 0000000..3af6887 --- /dev/null +++ b/node_modules/showdown/test/karlcow/strong-star.md @@ -0,0 +1 @@ +**double asterisks** diff --git a/node_modules/showdown/test/karlcow/strong-underscore.html b/node_modules/showdown/test/karlcow/strong-underscore.html new file mode 100644 index 0000000..ef613bb --- /dev/null +++ b/node_modules/showdown/test/karlcow/strong-underscore.html @@ -0,0 +1 @@ +

      double underscores

      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/strong-underscore.md b/node_modules/showdown/test/karlcow/strong-underscore.md new file mode 100644 index 0000000..2ed3020 --- /dev/null +++ b/node_modules/showdown/test/karlcow/strong-underscore.md @@ -0,0 +1 @@ +__double underscores__ diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.html b/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.html new file mode 100644 index 0000000..f2ca34f --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.html @@ -0,0 +1,5 @@ +
        +
      • list item 1
      • +
      • list item 2
      • +
      • list item 3
      • +
      diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.md b/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.md new file mode 100644 index 0000000..01e3e61 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.md @@ -0,0 +1,3 @@ +* list item 1 +* list item 2 +* list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.html b/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.html new file mode 100644 index 0000000..10428d5 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.html @@ -0,0 +1,5 @@ +
        +
      • list item 1
      • +
      • list item 2
      • +
      • list item 3
      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.md b/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.md new file mode 100644 index 0000000..068ef97 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.md @@ -0,0 +1,3 @@ +- list item 1 +- list item 2 +- list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.html b/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.html new file mode 100644 index 0000000..f2ca34f --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.html @@ -0,0 +1,5 @@ +
        +
      • list item 1
      • +
      • list item 2
      • +
      • list item 3
      • +
      diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.md b/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.md new file mode 100644 index 0000000..2fa48c3 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.md @@ -0,0 +1,3 @@ + * list item 1 + * list item 2 + * list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.html b/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.html new file mode 100644 index 0000000..10428d5 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.html @@ -0,0 +1,5 @@ +
        +
      • list item 1
      • +
      • list item 2
      • +
      • list item 3
      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.md b/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.md new file mode 100644 index 0000000..f86969c --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.md @@ -0,0 +1,3 @@ + * list item 1 + * list item 2 + * list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.html b/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.html new file mode 100644 index 0000000..10428d5 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.html @@ -0,0 +1,5 @@ +
        +
      • list item 1
      • +
      • list item 2
      • +
      • list item 3
      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.md b/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.md new file mode 100644 index 0000000..ee8ba46 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.md @@ -0,0 +1,3 @@ + * list item 1 + * list item 2 + * list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-plussign.html b/node_modules/showdown/test/karlcow/unordered-list-items-plussign.html new file mode 100644 index 0000000..10428d5 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-plussign.html @@ -0,0 +1,5 @@ +
        +
      • list item 1
      • +
      • list item 2
      • +
      • list item 3
      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-plussign.md b/node_modules/showdown/test/karlcow/unordered-list-items-plussign.md new file mode 100644 index 0000000..afa0018 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-items-plussign.md @@ -0,0 +1,3 @@ ++ list item 1 ++ list item 2 ++ list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-paragraphs.html b/node_modules/showdown/test/karlcow/unordered-list-paragraphs.html new file mode 100644 index 0000000..e78215e --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-paragraphs.html @@ -0,0 +1,4 @@ +
        +
      • list item in paragraph

      • +
      • another list item in paragraph

      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-paragraphs.md b/node_modules/showdown/test/karlcow/unordered-list-paragraphs.md new file mode 100644 index 0000000..4d9c3d7 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-paragraphs.md @@ -0,0 +1,3 @@ +* list item in paragraph + +* another list item in paragraph diff --git a/node_modules/showdown/test/karlcow/unordered-list-unindented-content.html b/node_modules/showdown/test/karlcow/unordered-list-unindented-content.html new file mode 100644 index 0000000..44d07b8 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-unindented-content.html @@ -0,0 +1,4 @@ +
        +
      • This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a list.
      • +
      • and yet another long long long long long long long long long long long long long long long long long long long long long long line.
      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-unindented-content.md b/node_modules/showdown/test/karlcow/unordered-list-unindented-content.md new file mode 100644 index 0000000..483b979 --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-unindented-content.md @@ -0,0 +1,2 @@ +* This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a list. +* and yet another long long long long long long long long long long long long long long long long long long long long long long line. diff --git a/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.html b/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.html new file mode 100644 index 0000000..003d8ce --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.html @@ -0,0 +1,7 @@ +
        +
      • This is a list item +with the content on +multiline and indented.
      • +
      • And this another list item +with the same principle.
      • +
      \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.md b/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.md new file mode 100644 index 0000000..96ad00a --- /dev/null +++ b/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.md @@ -0,0 +1,5 @@ +* This is a list item + with the content on + multiline and indented. +* And this another list item + with the same principle. diff --git a/node_modules/showdown/test/makeMd/blockquote.html b/node_modules/showdown/test/makeMd/blockquote.html new file mode 100644 index 0000000..be52feb --- /dev/null +++ b/node_modules/showdown/test/makeMd/blockquote.html @@ -0,0 +1,4 @@ +
      some +multiline +blockquote +
      diff --git a/node_modules/showdown/test/makeMd/blockquote.md b/node_modules/showdown/test/makeMd/blockquote.md new file mode 100644 index 0000000..e9f4c8a --- /dev/null +++ b/node_modules/showdown/test/makeMd/blockquote.md @@ -0,0 +1 @@ +> some multiline blockquote diff --git a/node_modules/showdown/test/makeMd/codeblock.html b/node_modules/showdown/test/makeMd/codeblock.html new file mode 100644 index 0000000..9ee4fc4 --- /dev/null +++ b/node_modules/showdown/test/makeMd/codeblock.html @@ -0,0 +1,8 @@ +
      some code
      +
      + +
      
      +function foo() {
      +  return 'bar';
      +}
      +
      diff --git a/node_modules/showdown/test/makeMd/codeblock.md b/node_modules/showdown/test/makeMd/codeblock.md new file mode 100644 index 0000000..eea0ee3 --- /dev/null +++ b/node_modules/showdown/test/makeMd/codeblock.md @@ -0,0 +1,9 @@ +``` +some code +``` + +```javascript +function foo() { + return 'bar'; +} +``` diff --git a/node_modules/showdown/test/makeMd/codespan.html b/node_modules/showdown/test/makeMd/codespan.html new file mode 100644 index 0000000..dfc0622 --- /dev/null +++ b/node_modules/showdown/test/makeMd/codespan.html @@ -0,0 +1 @@ +some code span diff --git a/node_modules/showdown/test/makeMd/codespan.md b/node_modules/showdown/test/makeMd/codespan.md new file mode 100644 index 0000000..54e9150 --- /dev/null +++ b/node_modules/showdown/test/makeMd/codespan.md @@ -0,0 +1 @@ +some `code` span diff --git a/node_modules/showdown/test/makeMd/emphasis.html b/node_modules/showdown/test/makeMd/emphasis.html new file mode 100644 index 0000000..ad219c8 --- /dev/null +++ b/node_modules/showdown/test/makeMd/emphasis.html @@ -0,0 +1 @@ +foobar diff --git a/node_modules/showdown/test/makeMd/emphasis.md b/node_modules/showdown/test/makeMd/emphasis.md new file mode 100644 index 0000000..0f09938 --- /dev/null +++ b/node_modules/showdown/test/makeMd/emphasis.md @@ -0,0 +1 @@ +*foobar* diff --git a/node_modules/showdown/test/makeMd/heading.html b/node_modules/showdown/test/makeMd/heading.html new file mode 100644 index 0000000..e478111 --- /dev/null +++ b/node_modules/showdown/test/makeMd/heading.html @@ -0,0 +1,6 @@ +

      foo h1

      +

      foo h2

      +

      foo h3

      +

      foo h4

      +
      foo h5
      +
      foo h6
      diff --git a/node_modules/showdown/test/makeMd/heading.md b/node_modules/showdown/test/makeMd/heading.md new file mode 100644 index 0000000..9c9efec --- /dev/null +++ b/node_modules/showdown/test/makeMd/heading.md @@ -0,0 +1,11 @@ +# foo h1 + +## foo h2 + +### foo h3 + +#### foo h4 + +##### foo h5 + +###### foo h6 diff --git a/node_modules/showdown/test/makeMd/hr.html b/node_modules/showdown/test/makeMd/hr.html new file mode 100644 index 0000000..798dde8 --- /dev/null +++ b/node_modules/showdown/test/makeMd/hr.html @@ -0,0 +1,3 @@ +
      + +
      diff --git a/node_modules/showdown/test/makeMd/hr.md b/node_modules/showdown/test/makeMd/hr.md new file mode 100644 index 0000000..853d812 --- /dev/null +++ b/node_modules/showdown/test/makeMd/hr.md @@ -0,0 +1,3 @@ +--- + +--- diff --git a/node_modules/showdown/test/makeMd/image.html b/node_modules/showdown/test/makeMd/image.html new file mode 100644 index 0000000..a6301c7 --- /dev/null +++ b/node_modules/showdown/test/makeMd/image.html @@ -0,0 +1 @@ +an image diff --git a/node_modules/showdown/test/makeMd/image.md b/node_modules/showdown/test/makeMd/image.md new file mode 100644 index 0000000..41e89a9 --- /dev/null +++ b/node_modules/showdown/test/makeMd/image.md @@ -0,0 +1 @@ +![an image]( =200pxx300px "a title") diff --git a/node_modules/showdown/test/makeMd/link.html b/node_modules/showdown/test/makeMd/link.html new file mode 100644 index 0000000..a64f7b2 --- /dev/null +++ b/node_modules/showdown/test/makeMd/link.html @@ -0,0 +1 @@ +some link diff --git a/node_modules/showdown/test/makeMd/link.md b/node_modules/showdown/test/makeMd/link.md new file mode 100644 index 0000000..414701d --- /dev/null +++ b/node_modules/showdown/test/makeMd/link.md @@ -0,0 +1 @@ +[some link]( "a title") diff --git a/node_modules/showdown/test/makeMd/list.html b/node_modules/showdown/test/makeMd/list.html new file mode 100644 index 0000000..a36096d --- /dev/null +++ b/node_modules/showdown/test/makeMd/list.html @@ -0,0 +1,15 @@ +
        +
      • foo
      • +
      • bar
      • +
      • baz
      • +
      +
        +
      • foo

      • +
      • bar

      • +
      • baz
      • +
      +
        +
      1. one
      2. +
      3. 2
      4. +
      5. three
      6. +
      diff --git a/node_modules/showdown/test/makeMd/list.md b/node_modules/showdown/test/makeMd/list.md new file mode 100644 index 0000000..aa1f484 --- /dev/null +++ b/node_modules/showdown/test/makeMd/list.md @@ -0,0 +1,19 @@ +- foo +- bar +- baz + + + +- foo + +- bar + +- baz + + + +1. one +2. 2 +3. three + + diff --git a/node_modules/showdown/test/makeMd/other-html.html b/node_modules/showdown/test/makeMd/other-html.html new file mode 100644 index 0000000..42df3a4 --- /dev/null +++ b/node_modules/showdown/test/makeMd/other-html.html @@ -0,0 +1,5 @@ +
      this is a div
      + + + + diff --git a/node_modules/showdown/test/makeMd/other-html.md b/node_modules/showdown/test/makeMd/other-html.md new file mode 100644 index 0000000..4383c8e --- /dev/null +++ b/node_modules/showdown/test/makeMd/other-html.md @@ -0,0 +1,9 @@ +
      this is a div
      + + + + + + + + diff --git a/node_modules/showdown/test/makeMd/paragraph.html b/node_modules/showdown/test/makeMd/paragraph.html new file mode 100644 index 0000000..9838f73 --- /dev/null +++ b/node_modules/showdown/test/makeMd/paragraph.html @@ -0,0 +1,3 @@ +

      a paragraph + of multi-line + text

      diff --git a/node_modules/showdown/test/makeMd/paragraph.md b/node_modules/showdown/test/makeMd/paragraph.md new file mode 100644 index 0000000..73ab64a --- /dev/null +++ b/node_modules/showdown/test/makeMd/paragraph.md @@ -0,0 +1 @@ +a paragraph of multi-line text diff --git a/node_modules/showdown/test/makeMd/strikethrough.html b/node_modules/showdown/test/makeMd/strikethrough.html new file mode 100644 index 0000000..859f38e --- /dev/null +++ b/node_modules/showdown/test/makeMd/strikethrough.html @@ -0,0 +1 @@ +deleted text diff --git a/node_modules/showdown/test/makeMd/strikethrough.md b/node_modules/showdown/test/makeMd/strikethrough.md new file mode 100644 index 0000000..b9f9a78 --- /dev/null +++ b/node_modules/showdown/test/makeMd/strikethrough.md @@ -0,0 +1 @@ +~~deleted text~~ diff --git a/node_modules/showdown/test/makeMd/strong.html b/node_modules/showdown/test/makeMd/strong.html new file mode 100644 index 0000000..773ea1f --- /dev/null +++ b/node_modules/showdown/test/makeMd/strong.html @@ -0,0 +1 @@ +strong text diff --git a/node_modules/showdown/test/makeMd/strong.md b/node_modules/showdown/test/makeMd/strong.md new file mode 100644 index 0000000..34fbefa --- /dev/null +++ b/node_modules/showdown/test/makeMd/strong.md @@ -0,0 +1 @@ +**strong text** diff --git a/node_modules/showdown/test/makeMd/table.html b/node_modules/showdown/test/makeMd/table.html new file mode 100644 index 0000000..38b4009 --- /dev/null +++ b/node_modules/showdown/test/makeMd/table.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + +
      head 1head 2head 3
      foobarbaz
      abcccc
      diff --git a/node_modules/showdown/test/makeMd/table.md b/node_modules/showdown/test/makeMd/table.md new file mode 100644 index 0000000..8d87846 --- /dev/null +++ b/node_modules/showdown/test/makeMd/table.md @@ -0,0 +1,4 @@ +| head 1 | head 2 | head 3 | +| ------ | ------ | ------ | +| foo | *bar* | baz | +| ~~a~~ | **b** | `cccc` | diff --git a/node_modules/showdown/test/node/cli.js b/node_modules/showdown/test/node/cli.js new file mode 100644 index 0000000..7dba282 --- /dev/null +++ b/node_modules/showdown/test/node/cli.js @@ -0,0 +1,18 @@ +/* +var semver = require('semver'), + cmd = 'node bin/showdown.js'; + +describe('showdown cli', function () { + 'use strict'; + if (semver.gt(process.versions.node, '0.12.0')) { + var execSync = require('child_process').execSync; + it('basic stdin stdout', function () { + var otp = execSync(cmd + ' makehtml -q', { + encoding: 'utf8', + input: '**foo**' + }); + otp.trim().should.equal('

      foo

      '); + }); + } +}); +*/ diff --git a/node_modules/showdown/test/node/performance.js b/node_modules/showdown/test/node/performance.js new file mode 100644 index 0000000..2285c65 --- /dev/null +++ b/node_modules/showdown/test/node/performance.js @@ -0,0 +1,146 @@ +/** + * Created by Tivie on 21/12/2016. + */ +'use strict'; +var fs = require('fs'), + showdown = require('../bootstrap').showdown, + converter = new showdown.Converter(), + pkg = require('../../package.json'), + performance = require('../performance/performance.js'); + +performance.setLibraryName(pkg.name); +performance.setVersion(pkg.version); +performance.setGithubLink('https://github.com/showdownjs/showdown/tree/'); + +var globals = { + gHtmlBlocks: [], + gHtmlMdBlocks: [], + gHtmlSpans: [], + gUrls: {}, + gTitles: {}, + gDimensions: {}, + gListLevel: 0, + hashLinkCounts: {}, + langExtensions: [], + outputModifiers: [], + converter: converter, + ghCodeBlocks: [] + }, + options = showdown.getOptions(); + +function runTests () { + var testMDFile = fs.readFileSync('test/performance.testfile.md', 'utf8'); + new performance.Suite('Basic') + .setOption('cycles', 50) + .add('Simple "Hello World"', function () { + converter.makeHtml('*Hello* **World**!'); + }) + .add('performance.testfile.md', { + prepare: function () { + return testMDFile; + }, + test: function (mdText) { + converter.makeHtml(mdText); + } + }); + new performance.Suite('subParsers') + .setOption('cycles', 20) + .add('hashHTMLBlocks', function () { + showdown.subParser('hashHTMLBlocks')(testMDFile, options, globals); + }) + .add('anchors', function () { + showdown.subParser('anchors')(testMDFile, options, globals); + }) + .add('autoLinks', function () { + showdown.subParser('autoLinks')(testMDFile, options, globals); + }) + /* + .add('blockGamut', function () { + showdown.subParser('blockGamut')(testMDFile, options, globals); + }) + */ + .add('blockQuotes', function () { + showdown.subParser('blockQuotes')(testMDFile, options, globals); + }) + .add('codeBlocks', function () { + showdown.subParser('codeBlocks')(testMDFile, options, globals); + }) + .add('codeSpans', function () { + showdown.subParser('codeSpans')(testMDFile, options, globals); + }) + .add('detab', function () { + showdown.subParser('detab')(testMDFile, options, globals); + }) + .add('encodeAmpsAndAngles', function () { + showdown.subParser('encodeAmpsAndAngles')(testMDFile, options, globals); + }) + .add('encodeBackslashEscapes', function () { + showdown.subParser('encodeBackslashEscapes')(testMDFile, options, globals); + }) + .add('encodeCode', function () { + showdown.subParser('encodeCode')(testMDFile, options, globals); + }) + .add('escapeSpecialCharsWithinTagAttributes', function () { + showdown.subParser('escapeSpecialCharsWithinTagAttributes')(testMDFile, options, globals); + }) + .add('githubCodeBlocks', function () { + showdown.subParser('githubCodeBlocks')(testMDFile, options, globals); + }) + .add('hashBlock', function () { + showdown.subParser('hashBlock')(testMDFile, options, globals); + }) + .add('hashElement', function () { + showdown.subParser('hashElement')(testMDFile, options, globals); + }) + .add('hashHTMLSpans', function () { + showdown.subParser('hashHTMLSpans')(testMDFile, options, globals); + }) + .add('hashPreCodeTags', function () { + showdown.subParser('hashPreCodeTags')(testMDFile, options, globals); + }) + .add('headers', function () { + showdown.subParser('headers')(testMDFile, options, globals); + }) + .add('horizontalRule', function () { + showdown.subParser('horizontalRule')(testMDFile, options, globals); + }) + .add('images', function () { + showdown.subParser('images')(testMDFile, options, globals); + }) + .add('italicsAndBold', function () { + showdown.subParser('italicsAndBold')(testMDFile, options, globals); + }) + .add('lists', function () { + showdown.subParser('lists')(testMDFile, options, globals); + }) + .add('outdent', function () { + showdown.subParser('outdent')(testMDFile, options, globals); + }) + .add('paragraphs', function () { + showdown.subParser('paragraphs')(testMDFile, options, globals); + }) + .add('spanGamut', function () { + showdown.subParser('spanGamut')(testMDFile, options, globals); + }) + .add('strikethrough', function () { + showdown.subParser('strikethrough')(testMDFile, options, globals); + }) + .add('stripLinkDefinitions', function () { + showdown.subParser('stripLinkDefinitions')(testMDFile, options, globals); + }) + .add('tables', function () { + showdown.subParser('tables')(testMDFile, options, globals); + }) + .add('unescapeSpecialChars', function () { + showdown.subParser('unescapeSpecialChars')(testMDFile, options, globals); + }); +} + +function generateLogs () { + performance.generateLog(null, null, true); +} + +module.exports = { + runTests: runTests, + generateLogs: generateLogs +}; diff --git a/node_modules/showdown/test/node/showdown.Converter.js b/node_modules/showdown/test/node/showdown.Converter.js new file mode 100644 index 0000000..a4cf692 --- /dev/null +++ b/node_modules/showdown/test/node/showdown.Converter.js @@ -0,0 +1,184 @@ +/** + * Created by Estevao on 31-05-2015. + */ +require('source-map-support').install(); +require('chai').should(); +require('sinon'); +var showdown = require('../bootstrap').showdown; + +describe('showdown.Converter', function () { + 'use strict'; + + describe('option methods', function () { + var converter = new showdown.Converter(); + + it('setOption() should set option foo=baz', function () { + converter.setOption('foo', 'baz'); + }); + + it('getOption() should get option foo to equal baz', function () { + converter.getOption('foo').should.equal('baz'); + }); + + it('getOptions() should contain foo=baz', function () { + var options = converter.getOptions(); + options.should.have.ownProperty('foo'); + options.foo.should.equal('baz'); + }); + }); + + describe('Converter.options extensions', function () { + var runCount; + showdown.extension('testext', function () { + return [{ + type: 'output', + filter: function (text) { + runCount = runCount + 1; + return text; + } + }]; + }); + + var converter = new showdown.Converter({extensions: ['testext']}); + + it('output extensions should run once', function () { + runCount = 0; + converter.makeHtml('# testext'); + runCount.should.equal(1); + }); + }); + + describe('metadata methods', function () { + var converter = new showdown.Converter(); + + it('_setMetadataPair() should set foo to bar', function () { + converter._setMetadataPair('foo', 'bar'); + converter.getMetadata().should.eql({foo: 'bar'}); + }); + + it('_setMetadata should set metadata to {baz: bazinga}', function () { + converter._setMetadataRaw('{baz: bazinga}'); + converter.getMetadata(true).should.eql('{baz: bazinga}'); + }); + }); + + describe('converter.setFlavor()', function () { + + /** + * Test setFlavor('github') + */ + describe('github', function () { + var converter = new showdown.Converter(), + ghOpts = showdown.getFlavorOptions('github'); + + converter.setFlavor('github'); + + for (var opt in ghOpts) { + if (ghOpts.hasOwnProperty(opt)) { + check(opt, ghOpts[opt]); + } + } + function check (key, val) { + it('should set ' + opt + ' to ' + val, function () { + converter.getOption(key).should.equal(val); + }); + } + }); + }); + + describe('getFlavor method', function () { + + // reset showdown + showdown.setFlavor('vanilla'); + + describe('flavor', function () { + it('should be vanilla by default', function () { + var converter = new showdown.Converter(); + converter.getFlavor().should.equal('vanilla'); + }); + + it('should be changed if global option is changed', function () { + showdown.setFlavor('github'); + var converter = new showdown.Converter(); + converter.getFlavor().should.equal('github'); + showdown.setFlavor('vanilla'); + }); + + it('should not be changed if converter is initialized before global change', function () { + var converter = new showdown.Converter(); + showdown.setFlavor('github'); + converter.getFlavor().should.equal('vanilla'); + showdown.setFlavor('vanilla'); + }); + }); + }); + + describe('extension methods', function () { + var extObjMock = { + type: 'lang', + filter: function () {} + }, + extObjFunc = function () { + return extObjMock; + }; + + it('addExtension() should add an extension Object', function () { + var converter = new showdown.Converter(); + converter.addExtension(extObjMock); + converter.getAllExtensions().language.should.contain(extObjMock); + }); + + it('addExtension() should unwrap an extension wrapped in a function', function () { + var converter = new showdown.Converter(); + + converter.addExtension(extObjFunc); + converter.getAllExtensions().language.should.contain(extObjMock); + }); + + it('useExtension() should use a previous registered extension in showdown', function () { + showdown.extension('foo', extObjMock); + var converter = new showdown.Converter(); + + converter.useExtension('foo'); + converter.getAllExtensions().language.should.contain(extObjMock); + showdown.resetExtensions(); + }); + }); + + describe('events', function () { + var events = [ + 'anchors', + 'autoLinks', + 'blockGamut', + 'blockQuotes', + 'codeBlocks', + 'codeSpans', + 'githubCodeBlocks', + 'headers', + 'images', + 'italicsAndBold', + 'lists', + 'paragraph', + 'spanGamut' + //'strikeThrough', + //'tables' + ]; + + for (var i = 0; i < events.length; ++i) { + runListener(events[i] + '.before'); + runListener(events[i] + '.after'); + } + + function runListener (name) { + it('should listen to ' + name, function () { + var converter = new showdown.Converter(); + converter.listen(name, function (evtName, text) { + evtName.should.equal(name); + text.should.match(/^[\s\S]*foo[\s\S]*$/); + return text; + }) + .makeHtml('foo'); + }); + } + }); +}); diff --git a/node_modules/showdown/test/node/showdown.Converter.makeHtml.js b/node_modules/showdown/test/node/showdown.Converter.makeHtml.js new file mode 100644 index 0000000..3a8b272 --- /dev/null +++ b/node_modules/showdown/test/node/showdown.Converter.makeHtml.js @@ -0,0 +1,78 @@ +/** + * Created by Estevao on 15-01-2015. + */ + +describe('showdown.Converter', function () { + 'use strict'; + + require('source-map-support').install(); + require('chai').should(); + + var showdown = require('../bootstrap').showdown; + + describe('makeHtml() with option omitExtraWLInCodeBlocks', function () { + var converter = new showdown.Converter({omitExtraWLInCodeBlocks: true}), + text = 'var foo = bar;', + html = converter.makeHtml(' ' + text); + it('should omit extra line after code tag', function () { + var expectedHtml = '
      ' + text + '
      '; + html.should.equal(expectedHtml); + }); + }); + + describe('makeHtml() with option prefixHeaderId', function () { + var converter = new showdown.Converter(), + text = 'foo header'; + + it('should prefix header id with "section"', function () { + converter.setOption('prefixHeaderId', true); + var html = converter.makeHtml('# ' + text), + expectedHtml = '

      ' + text + '

      '; + html.should.equal(expectedHtml); + }); + + it('should prefix header id with custom string', function () { + converter.setOption('prefixHeaderId', 'blabla'); + var html = converter.makeHtml('# ' + text), + expectedHtml = '

      ' + text + '

      '; + html.should.equal(expectedHtml); + }); + }); + + describe('makeHtml() with option metadata', function () { + var converter = new showdown.Converter(), + text1 = + '---SIMPLE\n' + + 'foo: bar\n' + + 'baz: bazinga\n' + + '---\n', + text2 = + '---TIVIE\n' + + 'a: b\n' + + 'c: 123\n' + + '---\n'; + + it('should correctly set metadata', function () { + converter.setOption('metadata', true); + + var expectedHtml = '', + expectedObj = {foo: 'bar', baz: 'bazinga'}, + expectedRaw = 'foo: bar\nbaz: bazinga', + expectedFormat = 'SIMPLE'; + converter.makeHtml(text1).should.equal(expectedHtml); + converter.getMetadata().should.eql(expectedObj); + converter.getMetadata(true).should.equal(expectedRaw); + converter.getMetadataFormat().should.equal(expectedFormat); + }); + + it('consecutive calls should reset metadata', function () { + converter.makeHtml(text2); + var expectedObj = {a: 'b', c: '123'}, + expectedRaw = 'a: b\nc: 123', + expectedFormat = 'TIVIE'; + converter.getMetadata().should.eql(expectedObj); + converter.getMetadata(true).should.equal(expectedRaw); + converter.getMetadataFormat().should.equal(expectedFormat); + }); + }); +}); diff --git a/node_modules/showdown/test/node/showdown.Converter.makeMarkdown.js b/node_modules/showdown/test/node/showdown.Converter.makeMarkdown.js new file mode 100644 index 0000000..a6d8956 --- /dev/null +++ b/node_modules/showdown/test/node/showdown.Converter.makeMarkdown.js @@ -0,0 +1,25 @@ +/** + * Created by Estevao on 15-01-2015. + */ + +describe('showdown.Converter', function () { + 'use strict'; + + require('source-map-support').install(); + require('chai').should(); + var jsdom = require('jsdom'); + var document = new jsdom.JSDOM('', {}).window.document; // jshint ignore:line + var showdown = require('../bootstrap').showdown; + + describe('makeMarkdown()', function () { + var converter = new showdown.Converter(); + + it('should parse a simple html string', function () { + var html = 'a link\n'; + var md = '[a link]()'; + + converter.makeMd(html, document).should.equal(md); + }); + + }); +}); diff --git a/node_modules/showdown/test/node/showdown.helpers.js b/node_modules/showdown/test/node/showdown.helpers.js new file mode 100644 index 0000000..e7678e7 --- /dev/null +++ b/node_modules/showdown/test/node/showdown.helpers.js @@ -0,0 +1,248 @@ +/** + * Created by Estevao on 27/01/2017. + */ +/*jshint expr: true*/ +/*jshint -W053 */ +/*jshint -W010 */ +/*jshint -W009 */ +var bootstrap = require('../bootstrap.js'), + showdown = bootstrap.showdown; + +describe('encodeEmailAddress()', function () { + 'use strict'; + var encoder = showdown.helper.encodeEmailAddress, + email = 'foobar@example.com', + encodedEmail = encoder(email); + + it('should encode email', function () { + encodedEmail.should.not.equal(email); + }); + + it('should decode to original email', function () { + var decodedEmail = encodedEmail.replace(/&#(.+?);/g, function (wm, cc) { + if (cc.charAt(0) === 'x') { + //hex + return String.fromCharCode('0' + cc); + } else { + //dec + return String.fromCharCode(cc); + } + }); + decodedEmail.should.equal(email); + }); +}); + +describe('isString()', function () { + 'use strict'; + var isString = showdown.helper.isString; + + it('should return true for new String Object', function () { + isString(new String('some string')).should.be.true; + }); + + it('should return true for String Object', function () { + isString(String('some string')).should.be.true; + }); + + it('should return true for string literal', function () { + isString('some string').should.be.true; + }); + + it('should return false for integers', function () { + isString(5).should.be.false; + }); + + it('should return false for random objects', function () { + isString({foo: 'bar'}).should.be.false; + }); + + it('should return false for arrays', function () { + isString(['bar']).should.be.false; + }); +}); + +describe('isFunction()', function () { + 'use strict'; + var isFunction = showdown.helper.isFunction; + + it('should return true for closures', function () { + isFunction(function () {}).should.be.true; + }); + + it('should return true for defined functions', function () { + function foo () {} + isFunction(foo).should.be.true; + }); + + it('should return true for function variables', function () { + var bar = function () {}; + isFunction(bar).should.be.true; + }); + + it('should return false for hash objects', function () { + isFunction({}).should.be.false; + }); + + it('should return false for objects', function () { + isFunction(new Object ()).should.be.false; + }); + + it('should return false for string primitives', function () { + isFunction('foo').should.be.false; + }); +}); + +describe('isArray()', function () { + 'use strict'; + var isArray = showdown.helper.isArray; + + it('should return true for short syntax arrays', function () { + isArray([]).should.be.true; + }); + + it('should return true for array objects', function () { + var myArr = new Array(); + isArray(myArr).should.be.true; + }); + + it('should return false for functions', function () { + isArray(function () {}).should.be.false; + function baz () {} + isArray(baz).should.be.false; + }); + + it('should return false for objects', function () { + isArray({}).should.be.false; + isArray(new Object ()).should.be.false; + }); + + it('should return false for strings', function () { + isArray('foo').should.be.false; + isArray(new String('foo')).should.be.false; + }); +}); + +describe('isUndefined()', function () { + 'use strict'; + var isUndefined = showdown.helper.isUndefined; + + it('should return true if nothing is passed', function () { + isUndefined().should.be.true; + }); + + it('should return true if a variable is initialized but not defined', function () { + var myVar; + isUndefined(myVar).should.be.true; + }); + + it('should return false for null', function () { + isUndefined(null).should.be.false; + }); + + it('should return false for 0', function () { + isUndefined(0).should.be.false; + }); + + it('should return false for empty string', function () { + isUndefined('').should.be.false; + }); + + it('should return false for empty booleans false or true', function () { + isUndefined(false).should.be.false; + isUndefined(true).should.be.false; + }); + + it('should return false for anything not undefined', function () { + isUndefined('foo').should.be.false; + isUndefined(2).should.be.false; + isUndefined({}).should.be.false; + }); +}); + +describe('stdExtName()', function () { + 'use strict'; + var stdExtName = showdown.helper.stdExtName; + + it('should remove certain chars', function () { + var str = 'bla_- \nbla'; + //[_?*+\/\\.^-] + stdExtName(str).should.not.match(/[_?*+\/\\.^-]/g); + }); + it('should make everything lowercase', function () { + var str = 'BLABLA'; + //[_?*+\/\\.^-] + stdExtName(str).should.equal('blabla'); + }); +}); + +describe('forEach()', function () { + 'use strict'; + var forEach = showdown.helper.forEach; + + it('should throw an error if first parameter is undefined', function () { + (function () {forEach();}).should.throw('obj param is required'); + }); + + it('should throw an error if second parameter is undefined', function () { + (function () {forEach([]);}).should.throw('callback param is required'); + }); + + it('should throw an error if second parameter is not a function', function () { + (function () {forEach([], 'foo');}).should.throw('callback param must be a function/closure'); + }); + + it('should throw an error if first parameter is not an object or an array', function () { + (function () {forEach('foo', function () {});}).should.throw('obj does not seem to be an array or an iterable object'); + }); + + it('should not throw even if object is empty', function () { + (function () {forEach({}, function () {});}).should.not.throw(); + }); + + it('should iterate array items', function () { + var myArray = ['banana', 'orange', 'grape']; + forEach(myArray, function (val, key, obj) { + key.should.be.a('number'); + (key % 1).should.equal(0); + val.should.equal(myArray[key]); + obj.should.equal(myArray); + }); + }); + + it('should iterate over object properties', function () { + var myObj = {foo: 'banana', bar: 'orange', baz: 'grape'}; + forEach(myObj, function (val, key, obj) { + myObj.should.have.ownProperty(key); + val.should.equal(myObj[key]); + obj.should.equal(myObj); + }); + }); + + it('should iterate only over object own properties', function () { + var Obj1 = {foo: 'banana'}, + myObj = Object.create(Obj1); + myObj.bar = 'orange'; + myObj.baz = 'grape'; + + myObj.should.have.ownProperty('bar'); + myObj.should.have.ownProperty('baz'); + myObj.should.not.have.ownProperty('foo'); + + forEach(myObj, function (val, key) { + key.should.not.equal('foo'); + }); + }); +}); + +describe('matchRecursiveRegExp()', function () { + 'use strict'; + + var rRegExp = showdown.helper.matchRecursiveRegExp; + + it('should match nested elements', function () { + var result = rRegExp('
      a
      ', ']*>', '', 'gim'); + result.should.deep.equal([['
      a
      ', '
      a
      ', '
      ', '
      ']]); + }); + +}); + diff --git a/node_modules/showdown/test/node/showdown.js b/node_modules/showdown/test/node/showdown.js new file mode 100644 index 0000000..c6e7002 --- /dev/null +++ b/node_modules/showdown/test/node/showdown.js @@ -0,0 +1,158 @@ +require('source-map-support').install(); +require('chai').should(); +var expect = require('chai').expect, + showdown = require('../bootstrap').showdown; + +describe('showdown.options', function () { + 'use strict'; + + describe('setOption() and getOption()', function () { + it('should set option foo=bar', function () { + showdown.setOption('foo', 'bar'); + showdown.getOption('foo').should.equal('bar'); + showdown.resetOptions(); + (typeof showdown.getOption('foo')).should.equal('undefined'); + }); + }); + + describe('getDefaultOptions()', function () { + it('should get default options', function () { + var opts = require('../optionswp').getDefaultOpts(true); + expect(showdown.getDefaultOptions()).to.be.eql(opts); + }); + }); +}); + +describe('showdown.extension()', function () { + 'use strict'; + + var extObjMock = { + type: 'lang', + filter: function () {} + }, + extObjFunc = function () { + return extObjMock; + }; + + describe('should register', function () { + it('an extension object', function () { + showdown.extension('foo', extObjMock); + showdown.extension('foo').should.eql([extObjMock]); + showdown.resetExtensions(); + }); + + it('an extension function', function () { + showdown.extension('foo', extObjFunc); + showdown.extension('foo').should.eql([extObjMock]); + showdown.resetExtensions(); + }); + + it('a listener extension', function () { + showdown.extension('foo', { + type: 'listener', + listeners: { + foo: function (name, txt) { + return txt; + } + } + }); + showdown.resetExtensions(); + }); + }); + + describe('should refuse to register', function () { + it('a generic object', function () { + var fn = function () { + showdown.extension('foo', {}); + }; + expect(fn).to.throw(); + }); + + it('an extension with invalid type', function () { + var fn = function () { + showdown.extension('foo', { + type: 'foo' + }); + }; + expect(fn).to.throw(/type .+? is not recognized\. Valid values: "lang\/language", "output\/html" or "listener"/); + }); + + it('an extension without regex or filter', function () { + var fn = function () { + showdown.extension('foo', { + type: 'lang' + }); + }; + expect(fn).to.throw(/extensions must define either a "regex" property or a "filter" method/); + }); + + it('a listener extension without a listeners property', function () { + var fn = function () { + showdown.extension('foo', { + type: 'listener' + }); + }; + expect(fn).to.throw(/Extensions of type "listener" must have a property called "listeners"/); + }); + }); +}); + +describe('showdown.getAllExtensions()', function () { + 'use strict'; + var extObjMock = { + type: 'lang', + filter: function () {} + }; + + it('should return all extensions', function () { + showdown.extension('bar', extObjMock); + showdown.getAllExtensions().should.eql({bar: [extObjMock]}); + }); +}); + +describe('showdown.setFlavor()', function () { + 'use strict'; + it('should set flavor to github', function () { + showdown.setFlavor('github'); + showdown.getFlavor().should.equal('github'); + showdown.setFlavor('vanilla'); + }); + + it('should set options correctly', function () { + showdown.setFlavor('github'); + var ghOpts = showdown.getFlavorOptions('github'), + shOpts = showdown.getOptions(); + for (var opt in ghOpts) { + if (ghOpts.hasOwnProperty(opt)) { + shOpts.should.have.property(opt); + shOpts[opt].should.equal(ghOpts[opt]); + } + } + showdown.setFlavor('vanilla'); + }); + + it('should switch between flavors correctly', function () { + showdown.setFlavor('github'); + var ghOpts = showdown.getFlavorOptions('github'), + shOpts = showdown.getOptions(), + dfOpts = showdown.getDefaultOptions(); + for (var opt in dfOpts) { + if (ghOpts.hasOwnProperty(opt)) { + shOpts[opt].should.equal(ghOpts[opt]); + } else { + shOpts[opt].should.equal(dfOpts[opt]); + } + } + showdown.setFlavor('original'); + var orOpts = showdown.getFlavorOptions('original'); + shOpts = showdown.getOptions(); + for (opt in dfOpts) { + if (orOpts.hasOwnProperty(opt)) { + shOpts[opt].should.equal(orOpts[opt]); + } else { + shOpts[opt].should.equal(dfOpts[opt]); + } + } + showdown.setFlavor('vanilla'); + }); +}); diff --git a/node_modules/showdown/test/node/testsuite.features.js b/node_modules/showdown/test/node/testsuite.features.js new file mode 100644 index 0000000..f96515f --- /dev/null +++ b/node_modules/showdown/test/node/testsuite.features.js @@ -0,0 +1,279 @@ +/** + * Created by Estevao on 08-06-2015. + */ +var bootstrap = require('../bootstrap.js'), + showdown = bootstrap.showdown, + assertion = bootstrap.assertion, + testsuite = bootstrap.getTestSuite('test/features/'), + tableSuite = bootstrap.getTestSuite('test/features/tables/'), + simplifiedAutoLinkSuite = bootstrap.getTestSuite('test/features/simplifiedAutoLink/'), + openLinksInNewWindowSuite = bootstrap.getTestSuite('test/features/openLinksInNewWindow/'), + disableForced4SpacesIndentedSublistsSuite = bootstrap.getTestSuite('test/features/disableForced4SpacesIndentedSublists/'), + rawHeaderIdSuite = bootstrap.getTestSuite('test/features/rawHeaderId/'), + rawPrefixHeaderIdSuite = bootstrap.getTestSuite('test/features/rawPrefixHeaderId/'), + emojisSuite = bootstrap.getTestSuite('test/features/emojis/'), + underlineSuite = bootstrap.getTestSuite('test/features/underline/'), + literalMidWordUnderscoresSuite = bootstrap.getTestSuite('test/features/literalMidWordUnderscores/'), + literalMidWordAsterisksSuite = bootstrap.getTestSuite('test/features/literalMidWordAsterisks/'), + completeHTMLOutputSuite = bootstrap.getTestSuite('test/features/completeHTMLOutput/'), + metadataSuite = bootstrap.getTestSuite('test/features/metadata/'), + splitAdjacentBlockquotesSuite = bootstrap.getTestSuite('test/features/splitAdjacentBlockquotes/'); + +describe('makeHtml() features testsuite', function () { + 'use strict'; + + describe('issues', function () { + for (var i = 0; i < testsuite.length; ++i) { + var converter; + if (testsuite[i].name === '#143.support-image-dimensions') { + converter = new showdown.Converter({parseImgDimensions: true}); + } else if (testsuite[i].name === '#69.header-level-start') { + converter = new showdown.Converter({headerLevelStart: 3}); + } else if (testsuite[i].name === '#164.1.simple-autolink' || testsuite[i].name === '#204.certain-links-with-at-and-dot-break-url') { + converter = new showdown.Converter({simplifiedAutoLink: true}); + } else if (testsuite[i].name === 'literalMidWordUnderscores') { + converter = new showdown.Converter({literalMidWordUnderscores: true}); + } else if (testsuite[i].name === '#164.2.disallow-underscore-emphasis-mid-word') { + converter = new showdown.Converter({literalMidWordUnderscores: true}); + } else if (testsuite[i].name === '#164.3.strikethrough' || testsuite[i].name === '#214.escaped-markdown-chars-break-strikethrough') { + converter = new showdown.Converter({strikethrough: true}); + } else if (testsuite[i].name === 'disable-gh-codeblocks') { + converter = new showdown.Converter({ghCodeBlocks: false}); + } else if (testsuite[i].name === '#164.4.tasklists') { + converter = new showdown.Converter({tasklists: true}); + } else if (testsuite[i].name === '#198.literalMidWordUnderscores-changes-behavior-of-asterisk') { + converter = new showdown.Converter({literalMidWordUnderscores: true}); + } else if (testsuite[i].name === '#259.es6-template-strings-indentation-issues') { + converter = new showdown.Converter({smartIndentationFix: true}); + } else if (testsuite[i].name === '#284.simplifiedAutoLink-does-not-match-GFM-style') { + converter = new showdown.Converter({simplifiedAutoLink: true}); + } else if (testsuite[i].name === 'disableForced4SpacesIndentedSublists') { + converter = new showdown.Converter({disableForced4SpacesIndentedSublists: true}); + } else if (testsuite[i].name === '#206.treat-single-line-breaks-as-br') { + converter = new showdown.Converter({simpleLineBreaks: true}); + } else if (testsuite[i].name === 'simpleLineBreaks2') { + converter = new showdown.Converter({simpleLineBreaks: true}); + } else if (testsuite[i].name === '#316.new-simpleLineBreaks-option-breaks-lists') { + converter = new showdown.Converter({simpleLineBreaks: true}); + } else if (testsuite[i].name === '#323.simpleLineBreaks-breaks-with-strong') { + converter = new showdown.Converter({simpleLineBreaks: true}); + } else if (testsuite[i].name === '#318.simpleLineBreaks-does-not-work-with-chinese-characters') { + converter = new showdown.Converter({simpleLineBreaks: true}); + } else if (testsuite[i].name === 'simpleLineBreaks-handle-html-pre') { + converter = new showdown.Converter({simpleLineBreaks: true}); + } else if (testsuite[i].name === 'excludeTrailingPunctuationFromURLs-option') { + converter = new showdown.Converter({simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true}); + } else if (testsuite[i].name === 'requireSpaceBeforeHeadingText') { + converter = new showdown.Converter({requireSpaceBeforeHeadingText: true}); + } else if (testsuite[i].name === '#320.github-compatible-generated-header-id') { + converter = new showdown.Converter({ghCompatibleHeaderId: true}); + } else if (testsuite[i].name === 'ghMentions') { + converter = new showdown.Converter({ghMentions: true}); + } else if (testsuite[i].name === 'disable-email-encoding') { + converter = new showdown.Converter({encodeEmails: false}); + } else if (testsuite[i].name === '#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail') { + converter = new showdown.Converter({encodeEmails: false, simplifiedAutoLink: true}); + } else if (testsuite[i].name === '#331.allow-escaping-of-tilde') { + converter = new showdown.Converter({strikethrough: true}); + } else if (testsuite[i].name === 'enable-literalMidWordAsterisks') { + converter = new showdown.Converter({literalMidWordAsterisks: true}); + } else if (testsuite[i].name === 'prefixHeaderId-simple') { + converter = new showdown.Converter({prefixHeaderId: true}); + } else if (testsuite[i].name === 'prefixHeaderId-string') { + converter = new showdown.Converter({prefixHeaderId: 'my-prefix-'}); + } else if (testsuite[i].name === 'prefixHeaderId-string-and-ghCompatibleHeaderId') { + converter = new showdown.Converter({prefixHeaderId: 'my-prefix-', ghCompatibleHeaderId: true}); + } else if (testsuite[i].name === 'prefixHeaderId-string-and-ghCompatibleHeaderId2') { + converter = new showdown.Converter({prefixHeaderId: 'my prefix ', ghCompatibleHeaderId: true}); + } else if (testsuite[i].name === 'simplifiedAutoLink') { + converter = new showdown.Converter({simplifiedAutoLink: true, strikethrough: true}); + } else if (testsuite[i].name === 'customizedHeaderId-simple') { + converter = new showdown.Converter({customizedHeaderId: true}); + } else if (testsuite[i].name === '#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs') { + converter = new showdown.Converter({simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true}); + } else if (testsuite[i].name === '#374.escape-html-tags') { + converter = new showdown.Converter({backslashEscapesHTMLTags: true}); + } else if (testsuite[i].name === '#379.openLinksInNewWindow-breaks-em-markdup') { + converter = new showdown.Converter({openLinksInNewWindow: true}); + } else if (testsuite[i].name === '#398.literalMidWordAsterisks-treats-non-word-characters-as-characters') { + converter = new showdown.Converter({literalMidWordAsterisks: true}); + } else { + converter = new showdown.Converter(); + } + it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); + } + }); + + /** test Table Syntax Support **/ + describe('table support', function () { + var converter, + suite = tableSuite; + for (var i = 0; i < suite.length; ++i) { + if (suite[i].name === 'basic-with-header-ids') { + converter = new showdown.Converter({tables: true, tablesHeaderId: true}); + } else if (suite[i].name === '#179.parse-md-in-table-ths') { + converter = new showdown.Converter({tables: true, strikethrough: true}); + } else { + converter = new showdown.Converter({tables: true}); + } + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test simplifiedAutoLink Support **/ + describe('simplifiedAutoLink support in', function () { + var converter, + suite = simplifiedAutoLinkSuite; + for (var i = 0; i < suite.length; ++i) { + if (suite[i].name === 'emphasis-and-strikethrough') { + converter = new showdown.Converter({simplifiedAutoLink: true, strikethrough: true}); + } else if (suite[i].name === 'disallow-underscores') { + converter = new showdown.Converter({literalMidWordUnderscores: true, simplifiedAutoLink: true}); + } else if (suite[i].name === 'disallow-asterisks') { + converter = new showdown.Converter({literalMidWordAsterisks: true, simplifiedAutoLink: true}); + } else { + converter = new showdown.Converter({simplifiedAutoLink: true}); + } + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test openLinksInNewWindow support **/ + describe('openLinksInNewWindow support in', function () { + var converter, + suite = openLinksInNewWindowSuite; + for (var i = 0; i < suite.length; ++i) { + if (suite[i].name === 'simplifiedAutoLink') { + converter = new showdown.Converter({openLinksInNewWindow: true, simplifiedAutoLink: true}); + } else { + converter = new showdown.Converter({openLinksInNewWindow: true}); + } + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test disableForced4SpacesIndentedSublists support **/ + describe('disableForced4SpacesIndentedSublists support in', function () { + var converter, + suite = disableForced4SpacesIndentedSublistsSuite; + for (var i = 0; i < suite.length; ++i) { + converter = new showdown.Converter({disableForced4SpacesIndentedSublists: true}); + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test rawHeaderId support **/ + describe('rawHeaderId support', function () { + var converter, + suite = rawHeaderIdSuite; + for (var i = 0; i < suite.length; ++i) { + if (suite[i].name === 'with-prefixHeaderId') { + converter = new showdown.Converter({rawHeaderId: true, prefixHeaderId: '/prefix/'}); + } else { + converter = new showdown.Converter({rawHeaderId: true}); + } + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test rawPrefixHeaderId support **/ + describe('rawPrefixHeaderId support', function () { + var converter, + suite = rawPrefixHeaderIdSuite; + for (var i = 0; i < suite.length; ++i) { + converter = new showdown.Converter({rawPrefixHeaderId: true, prefixHeaderId: '/prefix/'}); + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test emojis support **/ + describe('emojis support', function () { + var converter, + suite = emojisSuite; + for (var i = 0; i < suite.length; ++i) { + if (suite[i].name === 'simplifiedautolinks') { + converter = new showdown.Converter({emoji: true, simplifiedAutoLink: true}); + } else { + converter = new showdown.Converter({emoji: true}); + } + + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test underline support **/ + describe('underline support', function () { + var converter, + suite = underlineSuite; + for (var i = 0; i < suite.length; ++i) { + if (suite[i].name === 'simplifiedautolinks') { + converter = new showdown.Converter({underline: true, simplifiedAutoLink: true}); + } else { + converter = new showdown.Converter({underline: true}); + } + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test literalMidWordUnderscores option **/ + describe('literalMidWordUnderscores option', function () { + var converter, + suite = literalMidWordUnderscoresSuite; + for (var i = 0; i < suite.length; ++i) { + converter = new showdown.Converter({literalMidWordUnderscores: true}); + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test literalMidWordAsterisks option **/ + describe('literalMidWordAsterisks option', function () { + var converter, + suite = literalMidWordAsterisksSuite; + for (var i = 0; i < suite.length; ++i) { + converter = new showdown.Converter({literalMidWordAsterisks: true}); + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + + /** test completeHTMLDocument option **/ + describe('completeHTMLDocument option', function () { + var converter, + suite = completeHTMLOutputSuite; + for (var i = 0; i < suite.length; ++i) { + converter = new showdown.Converter({completeHTMLDocument: true}); + + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test metadata option **/ + describe('metadata option', function () { + var converter, + suite = metadataSuite; + + for (var i = 0; i < suite.length; ++i) { + if (suite[i].name === 'embeded-in-output' || + suite[i].name === 'embeded-two-consecutive-metadata-blocks' || + suite[i].name === 'embeded-two-consecutive-metadata-blocks-different-symbols') { + converter = new showdown.Converter({metadata: true, completeHTMLDocument: true}); + } else if (suite[i].name === 'ignore-metadata') { + converter = new showdown.Converter({metadata: false}); + } else { + converter = new showdown.Converter({metadata: true}); + } + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); + + /** test metadata option **/ + describe('splitAdjacentBlockquotes option', function () { + var converter, + suite = splitAdjacentBlockquotesSuite; + + for (var i = 0; i < suite.length; ++i) { + converter = new showdown.Converter({splitAdjacentBlockquotes: true}); + it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); + } + }); +}); diff --git a/node_modules/showdown/test/node/testsuite.ghost.js b/node_modules/showdown/test/node/testsuite.ghost.js new file mode 100644 index 0000000..8c782ea --- /dev/null +++ b/node_modules/showdown/test/node/testsuite.ghost.js @@ -0,0 +1,22 @@ +/** + * Created by Estevao on 14-07-2015. + */ +var bootstrap = require('../bootstrap.js'), + converter = new bootstrap.showdown.Converter({ + strikethrough: true, + literalMidWordUnderscores: true, + simplifiedAutoLink: true, + tables: true, + parseImgDimensions: true, //extra + tasklists: true //extra + }), + assertion = bootstrap.assertion, + testsuite = bootstrap.getTestSuite('test/ghost/'); + +//MD-Testsuite (borrowed from karlcow/markdown-testsuite) +describe('makeHtml() ghost testsuite', function () { + 'use strict'; + for (var i = 0; i < testsuite.length; ++i) { + it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); + } +}); diff --git a/node_modules/showdown/test/node/testsuite.issues.js b/node_modules/showdown/test/node/testsuite.issues.js new file mode 100644 index 0000000..8580a3e --- /dev/null +++ b/node_modules/showdown/test/node/testsuite.issues.js @@ -0,0 +1,14 @@ +/** + * Created by Estevao on 08-06-2015. + */ +var bootstrap = require('../bootstrap.js'), + converter = new bootstrap.showdown.Converter(), + assertion = bootstrap.assertion, + testsuite = bootstrap.getTestSuite('test/issues/'); + +describe('makeHtml() issues testsuite', function () { + 'use strict'; + for (var i = 0; i < testsuite.length; ++i) { + it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); + } +}); diff --git a/node_modules/showdown/test/node/testsuite.karlcow.js b/node_modules/showdown/test/node/testsuite.karlcow.js new file mode 100644 index 0000000..072c41f --- /dev/null +++ b/node_modules/showdown/test/node/testsuite.karlcow.js @@ -0,0 +1,12 @@ +var bootstrap = require('../bootstrap.js'), + converter = new bootstrap.showdown.Converter({noHeaderId: true}), + assertion = bootstrap.assertion, + testsuite = bootstrap.getTestSuite('test/karlcow/'); + +//MD-Testsuite (borrowed from karlcow/markdown-testsuite) +describe('makeHtml() karlcow testsuite', function () { + 'use strict'; + for (var i = 0; i < testsuite.length; ++i) { + it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); + } +}); diff --git a/node_modules/showdown/test/node/testsuite.makemd.js b/node_modules/showdown/test/node/testsuite.makemd.js new file mode 100644 index 0000000..f7b2e32 --- /dev/null +++ b/node_modules/showdown/test/node/testsuite.makemd.js @@ -0,0 +1,12 @@ +var bootstrap = require('../bootstrap.js'), + converter = new bootstrap.showdown.Converter(), + testsuite = bootstrap.getHtmlToMdTestSuite('test/makeMd/'), + assertion = bootstrap.assertion; + +describe('makeMd() standard testsuite', function () { + 'use strict'; + for (var i = 0; i < testsuite.length; ++i) { + it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter, 'makeMd')); + } +}); + diff --git a/node_modules/showdown/test/node/testsuite.standard.js b/node_modules/showdown/test/node/testsuite.standard.js new file mode 100644 index 0000000..1746998 --- /dev/null +++ b/node_modules/showdown/test/node/testsuite.standard.js @@ -0,0 +1,11 @@ +var bootstrap = require('../bootstrap.js'), + converter = new bootstrap.showdown.Converter(), + assertion = bootstrap.assertion, + testsuite = bootstrap.getTestSuite('test/cases/'); + +describe('makeHtml() standard testsuite', function () { + 'use strict'; + for (var i = 0; i < testsuite.length; ++i) { + it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); + } +}); diff --git a/node_modules/showdown/test/optionswp.js b/node_modules/showdown/test/optionswp.js new file mode 100644 index 0000000..dd20264 --- /dev/null +++ b/node_modules/showdown/test/optionswp.js @@ -0,0 +1,9 @@ +/* jshint ignore:start */ +var fs = require('fs'), + filedata; +filedata = fs.readFileSync('src/options.js', 'utf8'); +eval(filedata); +module.exports = { + getDefaultOpts: getDefaultOpts +}; +/* jshint ignore:end */ diff --git a/node_modules/showdown/test/performance.testfile.md b/node_modules/showdown/test/performance.testfile.md new file mode 100644 index 0000000..895e466 --- /dev/null +++ b/node_modules/showdown/test/performance.testfile.md @@ -0,0 +1,1912 @@ + +This is [an example][id] reference-style link. +This is [another] [foo] reference-style link. +This is [a third][bar] reference-style link. +This is [a fourth][4] reference-style link. + + [id]: http://example.com/ "Optional Title Here" + [foo]: http://example.com/ (Optional Title Here) + [bar]: http://example.com/ (Optional Title Here) + [4]: + "Optional Title Here" + + + + + + +> a blockquote + with a 4 space indented line (not code) + +sep + +> a blockquote + + with some code after + + + > this is a pseudo blockquote + > inside a code block + +foo + + > this is another bq + inside code + + +> ## This is a header. +> +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> return shell_exec("echo $input | $markdown_script"); + + + + > This is a multi line blockquote test + > + > With more than one line. + + + +This is some HTML: + +

      Heading

      + + + +This is a normal paragraph: + + This is a code block. + + + + * Bird + + * Magic + + +*single asterisks* + +_single underscores_ + +**double asterisks** + +__double underscores__ + +text *with italic sentence* in middle + +text __with bold sentence__ in middle + +text with __bold text that +spans across multiple__ lines + +underscored_word + +doubleunderscore__word + +asterix*word + +doubleasterix**word + +line with_underscored word + +line with__doubleunderscored word + +line with*asterixed word + +line with**doubleasterixed word + +some line_with_inner underscores + +some line__with__inner double underscores + +some line*with*inner asterixs + +some line**with**inner double asterixs + +another line with just _one underscore + +another line with just __one double underscore + +another line with just *one asterix + +another line with just **one double asterix + +a sentence with_underscore and another_underscore + +a sentence with__doubleunderscore and another__doubleunderscore + +a sentence with*asterix and another*asterix + +a sentence with**doubleasterix and another**doubleasterix + +escaped word\_with\_underscores + +escaped word\_\_with\_\_double underscores + +escaped word_\_with\__single italic underscore + +escaped word\*with*asterixs + +escaped word\*\*with\*\*asterixs + +escaped word**\*with\***bold asterixs + + +It happened in 1986\. What a great season. + + + +These should all be escaped: + +\\ + +\` + +\* + +\_ + +\{ + +\} + +\[ + +\] + +\( + +\) + +\# + +\+ + +\- + +\. + +\! + + +``` +function MyFunc(a) { + // ... +} +``` + +That is some code! + + +> Define a function in javascript: +> +> ``` +> function MyFunc(a) { +> var s = '`'; +> } +> ``` +> +>> And some nested quote +>> +>> ```html +>>
      HTML!
      +>> ``` + + + +Define a function in javascript: + +``` +function MyFunc(a) { + var s = '`'; +} +``` + +And some HTML + +```html +
      HTML!
      +``` + + +``` +code can go here +this is rendered on a second line +``` + + +# This is an H1 # + + +This is an H1 +============= + + +# This is an H1 + + +This is an H2 +------------- + + +## This is an H2 ## + + +## This is an H2 + + +### This is an H3 ### + + +### This is an H3 + + +#### This is an H4 + + +##### This is an H5 + + +###### This is an H6 + + + +* * * + +*** + +***** + +- - - + +--------------------------------------- + + + + + + +words words + + words + + + + + + + - list item 1 + + ```html + google +
      +
      some div
      +
      + ``` + + + +These HTML5 tags should pass through just fine. + +
      hello
      +
      head
      +
      footsies
      + +
      read me
      + +
      read +me
      + + +the end + + + + + + + + +
      Foo
      Bar
      + + + + + + + + + + + + + + + +
      Foo
      Bar
      Bar
      + + + + + +
      My street
      + + + Sorry, your browser doesn't support the <canvas> element. + + +
      + An awesome picture +
      Caption for the awesome picture
      +
      + +
      +

      Main title

      +

      Secondary title

      +
      + + + + + +![Alt text](/path/to/img.jpg) + +![Alt text](/path/to/img.jpg "Optional title") + +![Alt text][id] + + [id]: url/to/image "Optional title attribute" + + + +Search the web at [Google][] or [Daring Fireball][]. + + [Google]: http://google.com/ + [Daring Fireball]: http://daringfireball.net/ + + + +This is [an example](http://example.com/ "Title") inline link. + +[This link](http://example.net/) has no title attribute. + + + +Create a new `function`. + +Use the backtick in MySQL syntax ``SELECT `column` FROM whatever``. + +A single backtick in a code span: `` ` `` + +A backtick-delimited string in a code span: `` `foo` `` + +Please don't use any `` tags. + +`—` is the decimal-encoded equivalent of `—`. + + + +Hello.this\_is\_a\_variable +and.this.is.another_one + + + + + +An exciting sentence. + + + + > This is a multi line blockquote test + + > With more than one line. + + +some text words + +
      words + + +# some title + +1. list item 1 +2. list item 2 + +> some text in a blockquote + +* another list item 1 +* another list item 2 + + +# some title + +1. list item 1 +2. list item 2 + +``` +some code + +and some other line of code +``` + +* another list item 1 +* another list item 2 + + +* A list item with a blockquote: + + > This is a blockquote + > inside a list item. + + +* A list item with code: + + alert('Hello world!'); + + +some **code** yeah + +some inline **code** block + +some inline **code** block + +yo dawg some code inception + +
      some **div** yeah
      + + + + 1. This is a major bullet point. + + That contains multiple paragraphs. + + 2. And another line + + + + - This line spans + more than one line and is lazy + - Similar to this line + + + + > This is a multi line blockquote test + > + > > And nesting! + > + > With more than one line. + + + + 1. Red + 1. Green + 1. Blue + + + + 8. Red + 1. Green + 3. Blue + + + + 1. Red + 2. Green + 3. Blue + + + - foo + + - bazinga + + - yeah + + - bar + + 1. damn + + 2. so many paragraphs + + - baz + + +code inception + +``` +
      
      +
      some html code inside code html tags inside a fenced code block
      +
      +``` + + +
      +
      +foobar
      +
      +
      + +blabla + +
      
      +foobar
      +
      +
      + +
      
      +
      some html code
      +
      + + + +See my [About](/about/) page for details. + + +# Same Title + +some text + +# Same Title + + + +Hello, world! + + + +**important** + +__important__ + +really **freaking**strong + + + + * Red + * Green + * Blue + + + + - Red + - Green + - Blue + + + + + Red + + Green + + Blue + + +There's an [episode](http://en.memory-alpha.org/wiki/Darmok_(episode)) of Star Trek: The Next Generation + + +# some title + +Test **bold** and _italic_ + + +![my image](./pic/pic1_50.png =100pxx20px) + +![my image2][1] + +[1]: ./pic/pic1_50.png =100pxx20px + + +foo.bar + +www.foobar + +www.foobar.com + +http://foobar.com + +https://www.foobar.com/baz?bazinga=nhecos; + +http://www.google.com + + +this is a sentence_with_mid underscores + +this is a sentence with just_one underscore + +this _should be parsed_ as emphasis + +this is double__underscore__mid word + +this has just__one double underscore + +this __should be parsed__ as bold + +emphasis at _end of sentence_ + +_emphasis at_ line start + +multi _line emphasis +yeah it is_ yeah + + +a ~~strikethrough~~ word + +this should~~not be parsed + +~~strike-through text~~ + + +# my things + + - foo + - [] bar + - [ ] baz + - [x] bazinga + +otherthings + + +# some markdown + +blabla +
      This is **not parsed**
      +
      This is **parsed**
      +
      This is **not parsed**
      + + +​pointer *ptr *thing + +something _else _bla + +something __else __bla + + +http://website.com/img@x2.jpg + +http://website.com/img-x2.jpg + +http://website.com/img@x2 + +http://website.com/img@.jpg + + +a simple +wrapped line + + +Your friend ~~[**test\***](www.google.com)~~ (~~[*@test*](www.google.com)~~) updated his/her description + + + ## markdown doc + + you can use markdown for card documentation + - foo + - bar + + +this is a link to www.github.com + +this is a link to + + +1. One +2. Two + - A + - B +3. Three + +> this has +> simple linebreaks + + testing + some + code + + 1. paragraphed list + + this belongs + to the first list item + + 2. This text + also + +simple +text + + - a list + item + - another + list item + +simple +text + + - some item + + another + paragraph + + - And + now + + paragraph + sublist + + - and + even + + another + one + + - foo + + + +foo烫 +bar + +foo +bar + + +# some header + +# some header with &+$,/:;=?@\"#{}|^~[]`\\*()%.!' chars + +# another header > with < chars + + +**Nom :** aaaa +**Nom :** aaa + + +Just an example info@example.com ok?​ + + +#Given + +#When + +#Then + +foo +=== + +bar +--- + + +http://en.wikipedia.org/wiki/Tourism_in_Germany + + +this email should not be encoded + + +this is some text + +```php +function thisThing() { + echo "some weird formatted code!"; +} +``` + +some other text + + +* foo + * bar + +... + +* baz + 1. bazinga + + +url http://www.google.com. + +url http://www.google.com! + +url http://www.google.com? foo + +url (http://www.google.com) bazinga + + +hello @tivie how are you? + +this email foo@gmail.com is not parsed + +this \@mentions is not parsed also + + +# header + +#header + + + 1. One + 2. Two + foo + + bar + bazinga + + + + + nhecos + + 3. Three + + - foo + + - bar + + +| *foo* | **bar** | ~~baz~~ | +|-------|---------|---------| +| 100 | blabla | aaa | + + +|key|value| +|--|--| +|My Key|My Value| + + +| First Header | Second Header | +| :------------ | :------------ | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | + + +| First Header | Second Header | +| ------------- | ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | + + +| First Header | Second Header | +| ------------- | ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | + + +First Header | Second Header|Third Header +------------- | -------------|--- +Content Cell | Content Cell|C +Content Cell | Content Cell|C + + +| First Header | Second Header | Third Header | Fourth Header | +| :------------ |: ----------- :| ------------ :| ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 | Row 1 Cell 4 | +| Row 2 Cell 1 | Row 2 Cell 2 | Row 2 Cell 3 | Row 2 Cell 4 | +| Row 3 Cell 1 | Row 3 Cell 2 | Row 3 Cell 3 | Row 3 Cell 4 | +| Row 4 Cell 1 | Row 4 Cell 2 | Row 4 Cell 3 | Row 4 Cell 4 | +| Row 5 Cell 1 | Row 5 Cell 2 | Row 5 Cell 3 | Row 5 Cell 4 | + + +| First Header | Second Header | Third Header | Fourth Header | +| ------------- | ------------- | ------------ | ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 | Row 1 Cell 4 | +| Row 2 Cell 1 | Row 2 Cell 2 | Row 2 Cell 3 | Row 2 Cell 4 | +| Row 3 Cell 1 | Row 3 Cell 2 | Row 3 Cell 3 | Row 3 Cell 4 | +| Row 4 Cell 1 | Row 4 Cell 2 | Row 4 Cell 3 | Row 4 Cell 4 | +| Row 5 Cell 1 | Row 5 Cell 2 | Row 5 Cell 3 | Row 5 Cell 4 | + + +| Left-Aligned | Center-Aligned | Right-Aligned | +| :------------ |:--------------------:| -------------:| +| col 3 is | some wordy paragraph | $1600 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | + + +Table Test +============ + +section 1 +------------ + +|header1 |header2 |header3| +|-----------|-----------|---------| +|Value1 |Value2 |Value3 | + + +section 2 +----------- + +|headerA |headerB |headerC| +|-----------|-----------|---------| +|ValueA |ValueB |ValueC | + + +some text + + + | Tables | Are | Cool | + | ------------- |:-------------:| -----:| + | **col 3 is** | right-aligned | $1600 | + | col 2 is | *centered* | $12 | + | zebra stripes | ~~are neat~~ | $1 | + + + +### Stats + + +Status | AGENT1 | AGENT2 | AGENT3 | AGENT4 | AGENT5 | AGENT6 | AGENT7 | AGENT8 | AGENT9 | TOTAL | +--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +AGENT ERROR | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +APPROVED | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + + +| First Header | Second Header | +| ============= | ============= | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | + + +| First Header | Second Header | +| ------------- | ----------------- | +| **bold** | ![img](foo.jpg) | +| _italic_ | [link](bla.html) | +| `some code` | [google][1] | +| | normal | + + + [1]: www.google.com + + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisi est, +ullamcorper euismod iaculis sed, tristique at neque. Nullam metus risus, +malesuada vitae imperdiet ac, tincidunt eget lacus. Proin ullamcorper +vulputate dictum. Vestibulum consequat ultricies nibh, sed tempus nisl mattis a. + +| First Header | Second Header | +| ------------- | ------------- | +| Row 1 Cell 1 | Row 1 Cell 2 | +| Row 2 Cell 1 | Row 2 Cell 2 | + +Phasellus ac porttitor quam. Integer cursus accumsan mauris nec interdum. +Etiam iaculis urna vitae risus facilisis faucibus eu quis risus. Sed aliquet +rutrum dictum. Vivamus pulvinar malesuada ultricies. Pellentesque in commodo +nibh. Maecenas justo erat, sodales vel bibendum a, dignissim in orci. Duis +blandit ornare mi non facilisis. Aliquam rutrum fringilla lacus in semper. +Sed vel pretium lorem. + + +| First Header | Second Header | +| ------------- | ------------- | + + +| First Header | Second Header | + + +### Automatic Links + +``` +https://ghost.org +``` + +https://ghost.org + +### Markdown Footnotes + +``` +The quick brown fox[^1] jumped over the lazy dog[^2]. + +[^1]: Foxes are red +[^2]: Dogs are usually not red +``` + +The quick brown fox[^1] jumped over the lazy dog[^2]. + + +### Syntax Highlighting + + ```language-javascript + [...] + ``` + +Combined with [Prism.js](http://prismjs.com/) in the Ghost theme: + +```language-javascript +// # Notifications API +// RESTful API for creating notifications +var Promise = require('bluebird'), + _ = require('lodash'), + canThis = require('../permissions').canThis, + errors = require('../errors'), + utils = require('./utils'), + + // Holds the persistent notifications + notificationsStore = [], + // Holds the last used id + notificationCounter = 0, + notifications; +``` + + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +_baz_bar_foo_ + +__baz_bar_foo__ + +___baz_bar_foo___ + +baz bar foo _baz_bar_foo foo bar baz_ and foo + +foo\_bar\_baz foo\_bar\_baz\_bar\_foo \_foo\_bar baz\_bar\_ baz\_foo + +`foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo` + + + foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + + +```html +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo +``` + +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      + +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      + +
      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
      + + + +[foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo](http://myurl.com/foo_bar_baz_bar_foo) + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo +----- + +### foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +1. foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo +2. foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +> blockquote foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +* foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo +* foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +------- + +http://en.wikipedia.org/wiki/Tourism_in_Germany + +[an example] [wiki] + +Another [example][wiki] of a link + +[wiki]: http://en.wikipedia.org/wiki/Tourism_in_Germany + +

      foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

      + + + +foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo + +![foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo](http://myurl.com/foo_bar_baz_bar_foo) + +http://myurl.com/foo_bar_baz_bar_foo + + + +_italics_. + +_italics_ . + + +escaped word\_with\_underscores + +escaped word\_\_with\_\_double underscores + +escaped word_\_with\__single italic underscore + +escaped word\*with*asterixs + +escaped word\*\*with\*\*asterixs + +escaped word**\*with\***bold asterixs + + +* Item 1 +* Item 2 + +1. Item 1 +2. Item 2 + +- Item 1 +- Item 2 + + +2015-10-04 + + +1. Hi, I am a thing + + ```sh + + $ git clone thing.git + + dfgdfg + ``` + +1. I am another thing! + + ```sh + + $ git clone other-thing.git + + foobar + ``` + + +> a blockquote +# followed by an heading + + +Test pre in a list + +- & < +- `& <` + - & < + - `& <` + - & < + - `& <` + - & < + - `& <` + + +Title 1 +------- + +
      + + +# Title 2 + + +
      +
      + + +
      
      +foo
      +
      +```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +bar
      +
      + +this is a long paragraph + +this is another long paragraph + +
      ```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +```python
      +s = "Python syntax highlighting"
      +print s
      +```
      +
      + + +
      
      +```javascript
      +var s = "JavaScript syntax highlighting";
      +alert(s);
      +```
      +
      +```python
      +s = "Python syntax highlighting"
      +print s
      +```
      +
      +```
      +No language indicated, so no syntax highlighting.
      +But let's throw in a tag.
      +```
      +
      + + +
      ```python
      +var s;
      +```
      +
      + +this is a long paragraph + +
      
      +```javascript
      +var s;
      +```
      +
      + + +![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo] + +foo + +[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo] + +foo + +![sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) + +foo + +[sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) + +foo + +[![sd-ref][sd-logo]](http://www.google.com/) + +[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png + + +![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo] + +foo + +![sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) + +[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png + + +[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo] + +foo + +[sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) + +[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png + + +* list item 1 + + ``` + + child1 + + child2 + some text + + ``` + +* list item 2 + +``` + +child1 + +child2 +some text + +``` + + + * one + 1. two + +foo + + * one + 1. two + +foo + + * one + 1. two + +foo + + * one + 1. two + +foo + + * one + * two + +foo + + * one + * two + +foo + + * one + * two + +foo + + * one +* two + +foo + + * one + * two + + + * one long paragraph of +text + 1. two + +foo + + * one long paragraph of +text + 1. two + + +* one +1. two + +foo + +* one + 1. two + +foo + +* one + 1. two + +foo + +* one + 1. two + +foo + +* uli one +* uli two + +foo + +* uli one + * uli two + +foo + +* uli one + * uli two + +foo + +* uli one + * uli two + + +- - - a + +a + ++ - * - - + a + +a + +1. 2. 3. 4. 5. + +a + +1. 2. 3. 4. 5. a + + +- - - a + ++ - * - - + a + +1. 2. 3. 4. 5. + +1. 2. 3. 4. 5. a + + +- - +a + + +fooo + + +- - - aaaaa + + bbbbb + + +- - - - -- - - - - - - -- - - - - - - - - - - - - - - - - - - - abcd + + + --- + + - - - + + +plain text link http://test.com/this_has/one.html with underscores + +legit·word_with·1·underscore + +a word_with_2underscores (gets em) + + +this is a underscore_test ![my cat](http://myserver.com/my_kitty.jpg) + +another ![my cat](http://myserver.com/my_kitty.jpg) underscore_test bla + + +This is a first paragraph, +on multiple lines. + +This is a second paragraph. +There are spaces in between the two. + + +This is a first paragraph, +on multiple lines. + +This is a second paragraph +which has multiple lines too. + + +A first paragraph. + + + +A second paragraph after 3 CR (carriage return). + + +This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. + +A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line. + + +This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. + +1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line. + + +This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. + +A new long long long long long long long long long long long long long long long long paragraph on 1 line. + + +An ampersand & in the text flow is escaped as an html entity. + + +There is an [ampersand](http://validator.w3.org/check?uri=http://www.w3.org/&verbose=1) in the URI. + + +This is \*an asterisk which should stay as is. + + +This is * an asterisk which should stay as is. + + +\\ backslash +\` backtick +\* asterisk +\_ underscore +\{\} curly braces +\[\] square brackets +\(\) parentheses +\# hash mark +\+ plus sign +\- minus sign (hyphen) +\. dot +\! exclamation mark + + +> # heading level 1 +> +> paragraph + + +>A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line. + +>and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line. + + +>This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a blockquote. + + +> A blockquote +> on multiple lines +> like this. + + +>A blockquote +>on multiple lines +>like this. + + +>A blockquote +>on multiple lines +>like this. +> +>But it has +>two paragraphs. + + +>A blockquote +>on multiple lines +>like this + + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + + +> This is the first level of quoting. +> +> > This is nested blockquote. + + +> This is the first level of quoting. +> > This is nested blockquote. +> Back to the first level. + + +> This is the first level of quoting. +> > This is nested blockquote. + + + 10 PRINT HELLO INFINITE + 20 GOTO 10 + + + 10 PRINT < > & + 20 GOTO 10 + + + 10 PRINT HELLO INFINITE + 20 GOTO 10 + + +as*te*risks + + +*single asterisks* + + +_single underscores_ + + +HTML entities are written using ampersand notation: © + + +These lines all end with end of line (EOL) sequences. + +Seriously, they really do. + +If you don't believe me: HEX EDIT! + + + +These lines all end with end of line (EOL) sequences. Seriously, they really do. If you don't believe me: HEX EDIT! + +These lines all end with end of line (EOL) sequences. + +Seriously, they really do. + +If you don't believe me: HEX EDIT! + + + +This is an H1 +============= + + +# This is an H1 # + + + # This is an H1 + + +# this is an h1 with two trailing spaces +A new paragraph. + + +# This is an H1 + + +This is an H2 +------------- + + +## This is an H2 ## + + +## This is an H2 + + +### This is an H3 ### + + +### This is an H3 + + +#### This is an H4 #### + + +#### This is an H4 + + +##### This is an H5 ##### + + +##### This is an H5 + + +###### This is an H6 ###### + + +###### This is an H6 + + +- - - + + +--- + + +*** + + +___ + + +------- + + +![HTML5][h5] + +[h5]: http://www.w3.org/html/logo/img/mark-word-icon.png "HTML5 for everyone" + + +![HTML5][h5] + +[h5]: http://www.w3.org/html/logo/img/mark-word-icon.png + + +![HTML5](http://www.w3.org/html/logo/img/mark-word-icon.png "HTML5 logo for everyone") + + +![HTML5](http://www.w3.org/html/logo/img/mark-word-icon.png) + + +We love ` and &` for everything + + +``We love `code` for everything`` + + +``We love `code` for everything`` + + +A first sentence +and a line break. + + +A first sentence +and a line break. + + +This is an automatic link + + +[W3C](http://www.w3.org/ "Discover w3c") + + +[W3C](http://www.w3.org/) + + +[World Wide Web Consortium][w3c] + +[w3c]: + + +[World Wide Web Consortium][] + +[World Wide Web Consortium]: http://www.w3.org/ + + +[w3c][] + +[w3c]: http://www.w3.org/ + + +[World Wide Web Consortium] [w3c] + +[w3c]: http://www.w3.org/ + + +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ + "Discover W3C" + + +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ (Discover w3c) + + +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ 'Discover w3c' + + +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ "Discover w3c" + + +[World Wide Web Consortium][w3c] + +[w3c]: http://www.w3.org/ + + +* a list containing a blockquote + + > this the blockquote in the list + + +* a list containing a block of code + + 10 PRINT HELLO INFINITE + 20 GOTO 10 + + +* This is a list item with two paragraphs. Lorem ipsum dolor + sit amet, consectetuer adipiscing elit. Aliquam hendrerit + mi posuere lectus. + + Vestibulum enim wisi, viverra nec, fringilla in, laoreet + vitae, risus. Donec sit amet nisl. Aliquam semper ipsum + sit amet velit. + +* Suspendisse id sem consectetuer libero luctus adipiscing. + + +* This is a list item with two paragraphs. Lorem ipsum dolor + sit amet, consectetuer adipiscing elit. Aliquam hendrerit + mi posuere lectus. + + Vestibulum enim wisi, viverra nec, fringilla in, laoreet + vitae, risus. Donec sit amet nisl. Aliquam semper ipsum + sit amet velit. + +* Suspendisse id sem consectetuer libero luctus adipiscing. + + +1\. ordered list escape + + +1. 1 + + - inner par list + +2. 2 + + +1. list item 1 +8. list item 2 +1. list item 3 + + +1. list item 1 +2. list item 2 +3. list item 3 + + +This is a paragraph +on multiple lines +with hard return. + + +This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. + + + This is a paragraph with a trailing and leading space. + + +This is a paragraph with 1 trailing tab. + + + This is a paragraph with 2 leading spaces. + + + This is a paragraph with 3 leading spaces. + + + This is a paragraph with 1 leading space. + + +This is a paragraph with a trailing space. + +as**te**risks + + +**double asterisks** + + +__double underscores__ + + +* list item 1 +* list item 2 +* list item 3 + + +- list item 1 +- list item 2 +- list item 3 + + + * list item 1 + * list item 2 + * list item 3 + + + * list item 1 + * list item 2 + * list item 3 + + + * list item 1 + * list item 2 + * list item 3 + + ++ list item 1 ++ list item 2 ++ list item 3 + + +* list item in paragraph + +* another list item in paragraph + + +* This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a list. +* and yet another long long long long long long long long long long long long long long long long long long long long long long line. + + +* This is a list item + with the content on + multiline and indented. +* And this another list item + with the same principle. + + diff --git a/node_modules/showdown/test/performance/performance.js b/node_modules/showdown/test/performance/performance.js new file mode 100644 index 0000000..c24c582 --- /dev/null +++ b/node_modules/showdown/test/performance/performance.js @@ -0,0 +1,236 @@ +/** + * Created by Tivie on 21/12/2016. + */ +'use strict'; +var now = require('performance-now'), + fs = require('fs'), + semverSort = require('semver-sort'), + performance = { + version: '', + libraryName: '', + MDFile: 'performance.log.md', + logFile: 'performance.json', + testSuites: [], + silent: false, + githubLink: '' + }; + +performance.setVersion = function (version) { + performance.version = version; +}; + +performance.setLibraryName = function (name) { + performance.libraryName = name; +}; + +performance.setGithubLink = function (url) { + performance.githubLink = url; +}; + +performance.generateLog = function (filename, MDFilename, asTable) { + filename = filename || performance.logFile; + MDFilename = MDFilename || performance.MDFile; + asTable = !!asTable; + + fs.closeSync(fs.openSync(filename, 'a')); + + var json = fs.readFileSync(filename), + jsonParsed; + + try { + jsonParsed = JSON.parse(json); + } catch (err) { + jsonParsed = {}; + } + + var jData = []; + + for (var i = 0; i < performance.testSuites.length; ++i) { + // Suite + var suiteName = performance.testSuites[i].getSuiteName(), + cycles = performance.testSuites[i].getOption('cycles'), + subJData = { + suiteName: suiteName, + cycles: cycles, + tests: [] + }, + testSuite = performance.testSuites[i].getTests(); + //make sure tests have ran first + if (!performance.testSuites[i].hasRun()) { + performance.testSuites[i].run(); + } + + // loop through tests + for (var ii = 0; ii < testSuite.length; ++ii) { + // Test + var test = testSuite[ii]; + subJData.tests.push({ + name: test.name, + time: test.time, + maxTime: test.maxTime, + minTime: test.minTime + }); + } + jData.push(subJData); + } + jsonParsed[performance.version] = jData; + + //Sort jsonParsed + var versions = []; + for (var version in jsonParsed) { + if (jsonParsed.hasOwnProperty(version)) { + versions.push(version); + } + } + + semverSort.desc(versions); + + var finalJsonObj = {}; + + for (i = 0; i < versions.length; ++i) { + if (jsonParsed.hasOwnProperty(versions[i])) { + finalJsonObj[versions[i]] = jsonParsed[versions[i]]; + } + } + + fs.writeFileSync(filename, JSON.stringify(finalJsonObj)); + + generateMD(MDFilename, finalJsonObj, asTable); +}; + +function generateMD (filename, obj, asTable) { + fs.closeSync(fs.openSync(filename, 'w')); + asTable = !!asTable; + + // generate MD + var otp = '# Performance Tests for ' + performance.libraryName + '\n\n\n'; + + for (var version in obj) { + if (obj.hasOwnProperty(version)) { + otp += '## [version ' + version + '](' + performance.githubLink + version + ')\n\n'; + var testSuite = obj[version]; + for (var i = 0; i < testSuite.length; ++i) { + otp += '### Test Suite: ' + testSuite[i].suiteName + ' (' + testSuite[i].cycles + ' cycles)\n'; + var tests = testSuite[i].tests; + if (asTable) { + otp += '| test | avgTime | max | min |\n'; + otp += '|:-----|--------:|----:|----:|\n'; + } + for (var ii = 0; ii < tests.length; ++ii) { + var time = parseFloat(tests[ii].time).toFixed(3), + maxTime = parseFloat(tests[ii].maxTime).toFixed(3), + minTime = parseFloat(tests[ii].minTime).toFixed(3); + if (asTable) { + otp += '|' + tests[ii].name + '|' + time + '|' + maxTime + '|' + minTime + '|\n'; + } else { + otp += ' - **' + tests[ii].name + ':** took ' + time + 'ms (*max: ' + maxTime + 'ms; min: ' + minTime + 'ms*)\n'; + } + } + otp += '\n'; + } + otp += '\n'; + } + } + fs.writeFileSync(filename, otp); +} + +performance.Suite = function (name) { + var suiteName = name || '', + tests = [], + hasRunFlag = false, + options = { + cycles: 20 + }; + + this.setOption = function (key, val) { + options[key] = val; + return this; + }; + + this.getOption = function (key) { + return options[key]; + }; + + this.add = function (name, obj) { + if (typeof obj === 'function') { + obj = { + prepare: function () {}, + test: obj, + teardown: function () {} + }; + } + + if (!obj.hasOwnProperty('test')) { + throw 'obj must have a property called test'; + } + + if (typeof obj.test !== 'function') { + throw 'obj test property must be a function'; + } + + if (!obj.hasOwnProperty('prepare')) { + obj.prepare = function () {}; + } + + if (!obj.hasOwnProperty('teardown')) { + obj.teardown = function () {}; + } + + if (typeof obj.prepare !== 'function') { + throw 'obj prepare property must be a function'; + } + + if (typeof obj.teardown !== 'function') { + throw 'obj teardown property must be a function'; + } + + tests.push({ + name: name, + obj: obj, + time: 0, + maxTime: 0, + minTime: 0 + }); + return this; + }; + + this.run = function run () { + var nn = options.cycles; + console.log('running tests: ' + nn + ' cycles each.'); + for (var i = 0; i < tests.length; ++i) { + var times = [], + passVar = tests[i].obj.prepare(); + for (var ii = 0; ii < nn; ++ii) { + var before = now(); + tests[i].obj.test(passVar); + var after = now(); + times.push(after - before); + } + var total = times.reduce(function (a, b) {return a + b;}, 0); + tests[i].time = total / options.cycles; + tests[i].minTime = Math.min.apply(null, times); + tests[i].maxTime = Math.max.apply(null, times); + if (!options.silent) { + console.log(tests[i].name + ' took an average of ' + tests[i].time + 'ms (min: ' + tests[i].minTime + 'ms; max: ' + tests[i].maxTime + 'ms'); + } + } + hasRunFlag = true; + return this; + }; + + this.hasRun = function () { + return hasRunFlag; + }; + + this.getSuiteName = function () { + return suiteName; + }; + + this.getTests = function () { + return tests; + }; + + performance.testSuites.push(this); +}; + +module.exports = performance; diff --git a/node_modules/strip-eof/index.js b/node_modules/strip-eof/index.js new file mode 100644 index 0000000..a17d0af --- /dev/null +++ b/node_modules/strip-eof/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (x) { + var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); + var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); + + if (x[x.length - 1] === lf) { + x = x.slice(0, x.length - 1); + } + + if (x[x.length - 1] === cr) { + x = x.slice(0, x.length - 1); + } + + return x; +}; diff --git a/node_modules/strip-eof/license b/node_modules/strip-eof/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/strip-eof/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/strip-eof/package.json b/node_modules/strip-eof/package.json new file mode 100644 index 0000000..6709c8f --- /dev/null +++ b/node_modules/strip-eof/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "strip-eof@^1.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa" + ] + ], + "_from": "strip-eof@>=1.0.0 <2.0.0", + "_id": "strip-eof@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/strip-eof", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "strip-eof", + "raw": "strip-eof@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "_shasum": "bb43ff5598a6eb05d89b59fcd129c983313606bf", + "_shrinkwrap": null, + "_spec": "strip-eof@^1.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/execa", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-eof/issues" + }, + "dependencies": {}, + "description": "Strip the End-Of-File (EOF) character from a string/buffer", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "bb43ff5598a6eb05d89b59fcd129c983313606bf", + "tarball": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "365dfe6c19b4e607a0cc2cf7dad0b0620f238333", + "homepage": "https://github.com/sindresorhus/strip-eof", + "keywords": [ + "buffer", + "character", + "delete", + "end", + "eof", + "file", + "linebreak", + "newline", + "remove", + "string", + "strip", + "trim" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "strip-eof", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-eof.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/strip-eof/readme.md b/node_modules/strip-eof/readme.md new file mode 100644 index 0000000..45ffe04 --- /dev/null +++ b/node_modules/strip-eof/readme.md @@ -0,0 +1,28 @@ +# strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof) + +> Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer + + +## Install + +``` +$ npm install --save strip-eof +``` + + +## Usage + +```js +const stripEof = require('strip-eof'); + +stripEof('foo\nbar\n\n'); +//=> 'foo\nbar\n' + +stripEof(new Buffer('foo\nbar\n\n')).toString(); +//=> 'foo\nbar\n' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/which-module/CHANGELOG.md b/node_modules/which-module/CHANGELOG.md new file mode 100644 index 0000000..863d469 --- /dev/null +++ b/node_modules/which-module/CHANGELOG.md @@ -0,0 +1,26 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [2.0.0](https://github.com/nexdrew/which-module/compare/v1.0.0...v2.0.0) (2017-05-01) + + +### Features + +* remove Node < 4 from official testing/support ([#22](https://github.com/nexdrew/which-module/issues/22)) ([ee7aff4](https://github.com/nexdrew/which-module/commit/ee7aff4)) + + +### BREAKING CHANGES + +* Node 0.10 or 0.12 no longer supported, please update to Node 4+ or use which-module@1.0.0 + + + + +# 1.0.0 (2016-06-06) + + +### Features + +* initial code ([08074cd](https://github.com/nexdrew/which-module/commit/08074cd)) diff --git a/node_modules/which-module/LICENSE b/node_modules/which-module/LICENSE new file mode 100644 index 0000000..ab601b6 --- /dev/null +++ b/node_modules/which-module/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/node_modules/which-module/README.md b/node_modules/which-module/README.md new file mode 100644 index 0000000..a8c4bf8 --- /dev/null +++ b/node_modules/which-module/README.md @@ -0,0 +1,55 @@ +# which-module + +> Find the module object for something that was require()d + +[![Build Status](https://travis-ci.org/nexdrew/which-module.svg?branch=master)](https://travis-ci.org/nexdrew/which-module) +[![Coverage Status](https://coveralls.io/repos/github/nexdrew/which-module/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/which-module?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +Find the `module` object in `require.cache` for something that was `require()`d +or `import`ed - essentially a reverse `require()` lookup. + +Useful for libs that want to e.g. lookup a filename for a module or submodule +that it did not `require()` itself. + +## Install and Usage + +``` +npm install --save which-module +``` + +```js +const whichModule = require('which-module') + +console.log(whichModule(require('something'))) +// Module { +// id: '/path/to/project/node_modules/something/index.js', +// exports: [Function], +// parent: ..., +// filename: '/path/to/project/node_modules/something/index.js', +// loaded: true, +// children: [], +// paths: [ '/path/to/project/node_modules/something/node_modules', +// '/path/to/project/node_modules', +// '/path/to/node_modules', +// '/path/node_modules', +// '/node_modules' ] } +``` + +## API + +### `whichModule(exported)` + +Return the [`module` object](https://nodejs.org/api/modules.html#modules_the_module_object), +if any, that represents the given argument in the `require.cache`. + +`exported` can be anything that was previously `require()`d or `import`ed as a +module, submodule, or dependency - which means `exported` is identical to the +`module.exports` returned by this method. + +If `exported` did not come from the `exports` of a `module` in `require.cache`, +then this method returns `null`. + +## License + +ISC © Contributors diff --git a/node_modules/which-module/index.js b/node_modules/which-module/index.js new file mode 100644 index 0000000..45559b7 --- /dev/null +++ b/node_modules/which-module/index.js @@ -0,0 +1,9 @@ +'use strict' + +module.exports = function whichModule (exported) { + for (var i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { + mod = require.cache[files[i]] + if (mod.exports === exported) return mod + } + return null +} diff --git a/node_modules/which-module/package.json b/node_modules/which-module/package.json new file mode 100644 index 0000000..f5363e3 --- /dev/null +++ b/node_modules/which-module/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "which-module@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "which-module@>=2.0.0 <3.0.0", + "_id": "which-module@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/which-module", + "_nodeVersion": "7.9.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/which-module-2.0.0.tgz_1493670259112_0.19386909971944988" + }, + "_npmUser": { + "email": "andrew@npmjs.com", + "name": "nexdrew" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "name": "which-module", + "raw": "which-module@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "_shasum": "d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a", + "_shrinkwrap": null, + "_spec": "which-module@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "name": "nexdrew" + }, + "bugs": { + "url": "https://github.com/nexdrew/which-module/issues" + }, + "dependencies": {}, + "description": "Find the module object for something that was require()d", + "devDependencies": { + "ava": "^0.19.1", + "coveralls": "^2.13.1", + "nyc": "^10.3.0", + "standard": "^10.0.2", + "standard-version": "^4.0.0" + }, + "directories": {}, + "dist": { + "shasum": "d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a", + "tarball": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "7f78f42d0761133263c3947a3b24dde324a467ce", + "homepage": "https://github.com/nexdrew/which-module#readme", + "keywords": [ + "exports", + "filename", + "lookup", + "module", + "require", + "reverse", + "which" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "nexdrew", + "email": "andrew@npmjs.com" + } + ], + "name": "which-module", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nexdrew/which-module.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "nyc ava" + }, + "version": "2.0.0" +} diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 0000000..3d83d26 --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,152 @@ +# Changes + + +## 1.3.1 + +* update deps +* update travis + +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/which/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/which/README.md b/node_modules/which/README.md new file mode 100644 index 0000000..8c0b0cb --- /dev/null +++ b/node_modules/which/README.md @@ -0,0 +1,51 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// if nothrow option is used, returns null if not found +resolved = which.sync('node', {nothrow: true}) + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which new file mode 100644 index 0000000..7cee372 --- /dev/null +++ b/node_modules/which/bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json new file mode 100644 index 0000000..5500adc --- /dev/null +++ b/node_modules/which/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "which@^1.2.9", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cross-spawn" + ] + ], + "_from": "which@>=1.2.9 <2.0.0", + "_hasShrinkwrap": false, + "_id": "which@1.3.1", + "_inCache": true, + "_installable": true, + "_location": "/which", + "_nodeVersion": "10.0.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/which_1.3.1_1527287252351_0.9093966007084426" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "6.0.1", + "_phantomChildren": {}, + "_requested": { + "name": "which", + "raw": "which@^1.2.9", + "rawSpec": "^1.2.9", + "scope": null, + "spec": ">=1.2.9 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "_shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a", + "_shrinkwrap": null, + "_spec": "which@^1.2.9", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cross-spawn", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me" + }, + "bin": { + "which": "./bin/which" + }, + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "dependencies": { + "isexe": "^2.0.0" + }, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.6.2", + "tap": "^12.0.1" + }, + "directories": {}, + "dist": { + "fileCount": 6, + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCI3VCRA9TVsSAnZWagAAILoP/RHSoHTTTbIOg0UG8vtG\nEI7F2ueoGwFFiJAB+xPIEE1B8kP8WqJ3zW2StJ6fY5y53lTDoVyNFKYX9HTI\nBmrhEf2+SaHSYfiG1chBs8MIdatKswhZDy4r+Fyzk50UcgdaaJOBRfer9y8R\nGNISIjep1SQWB+KXhvV2SUg4DkOtcUc9XUHEEopPh9GLGM8HE+aMIYMOvdSK\naSbo8Kq4Ec9Kf8PvPSLV5mU7QFXodqVSkeM4tcZPxi0kGn5ZS/UzpHUian0y\n0EFrfb+IjlXmY7EFIB8Y2aVz8wjowNhAchROdNKAGDzCS4k78vwnSUbYVb5L\nazMs3SoujuYzKxdBo4Ifm/PTfWicgwH1L5vku3zsZ+ss3sgaMjBXDVGc/4bh\nmZ2aPx/DTrySjw6TXySHTbKqFuH6g8n6JWugcGJl0Ai15RNqjojA8FeVR1C0\nabteBcL8ly6pRLX3HwU/l229uFKL0jBVVvtaLsvB3mhMq3k75co36fCz7p13\nqlLXaNvmq6Tu6A0xpRzgkPwmb7DqWqvApz6RulJXobSBn9euJh09dWvMdrgx\n2VzqdpnNkMqXlYtrJEe7bdbCsNRZw/TzYMD+GBabGw4qppGSWkPtYCuTJNE1\nF3QxwZp47woCXnBqPbavSUsVqQQMxHb4y959ltS+0OifWWZy6EU4AG0zv5aL\nTbyd\r\n=c6n/\r\n-----END PGP SIGNATURE-----\r\n", + "shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a", + "tarball": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "unpackedSize": 9419 + }, + "files": [ + "bin/which", + "which.js" + ], + "gitHead": "563406d75b97f97a33e506b9cc7a82b268332b6f", + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "which", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", + "test": "tap test/*.js --cov" + }, + "version": "1.3.1" +} diff --git a/node_modules/which/which.js b/node_modules/which/which.js new file mode 100644 index 0000000..4347f91 --- /dev/null +++ b/node_modules/which/which.js @@ -0,0 +1,135 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js new file mode 100644 index 0000000..ff62543 --- /dev/null +++ b/node_modules/wrap-ansi/index.js @@ -0,0 +1,168 @@ +'use strict'; +var stringWidth = require('string-width'); +var stripAnsi = require('strip-ansi'); + +var ESCAPES = [ + '\u001b', + '\u009b' +]; + +var END_CODE = 39; + +var ESCAPE_CODES = { + 0: 0, + 1: 22, + 2: 22, + 3: 23, + 4: 24, + 7: 27, + 8: 28, + 9: 29, + 30: 39, + 31: 39, + 32: 39, + 33: 39, + 34: 39, + 35: 39, + 36: 39, + 37: 39, + 90: 39, + 40: 49, + 41: 49, + 42: 49, + 43: 49, + 44: 49, + 45: 49, + 46: 49, + 47: 49 +}; + +function wrapAnsi(code) { + return ESCAPES[0] + '[' + code + 'm'; +} + +// calculate the length of words split on ' ', ignoring +// the extra characters added by ansi escape codes. +function wordLengths(str) { + return str.split(' ').map(function (s) { + return stringWidth(s); + }); +} + +// wrap a long word across multiple rows. +// ansi escape codes do not count towards length. +function wrapWord(rows, word, cols) { + var insideEscape = false; + var visible = stripAnsi(rows[rows.length - 1]).length; + + for (var i = 0; i < word.length; i++) { + var x = word[i]; + + rows[rows.length - 1] += x; + + if (ESCAPES.indexOf(x) !== -1) { + insideEscape = true; + } else if (insideEscape && x === 'm') { + insideEscape = false; + continue; + } + + if (insideEscape) { + continue; + } + + visible++; + + if (visible >= cols && i < word.length - 1) { + rows.push(''); + visible = 0; + } + } + + // it's possible that the last row we copy over is only + // ansi escape characters, handle this edge-case. + if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { + rows[rows.length - 2] += rows.pop(); + } +} + +// the wrap-ansi module can be invoked +// in either 'hard' or 'soft' wrap mode. +// +// 'hard' will never allow a string to take up more +// than cols characters. +// +// 'soft' allows long words to expand past the column length. +function exec(str, cols, opts) { + var options = opts || {}; + + var pre = ''; + var ret = ''; + var escapeCode; + + var lengths = wordLengths(str); + var words = str.split(' '); + var rows = ['']; + + for (var i = 0, word; (word = words[i]) !== undefined; i++) { + var rowLength = stringWidth(rows[rows.length - 1]); + + if (rowLength) { + rows[rows.length - 1] += ' '; + rowLength++; + } + + // in 'hard' wrap mode, the length of a line is + // never allowed to extend past 'cols'. + if (lengths[i] > cols && options.hard) { + if (rowLength) { + rows.push(''); + } + wrapWord(rows, word, cols); + continue; + } + + if (rowLength + lengths[i] > cols && rowLength > 0) { + if (options.wordWrap === false && rowLength < cols) { + wrapWord(rows, word, cols); + continue; + } + + rows.push(''); + } + + rows[rows.length - 1] += word; + } + + pre = rows.map(function (r) { + return r.trim(); + }).join('\n'); + + for (var j = 0; j < pre.length; j++) { + var y = pre[j]; + + ret += y; + + if (ESCAPES.indexOf(y) !== -1) { + var code = parseFloat(/[0-9][^m]*/.exec(pre.slice(j, j + 4))); + escapeCode = code === END_CODE ? null : code; + } + + if (escapeCode && ESCAPE_CODES[escapeCode]) { + if (pre[j + 1] === '\n') { + ret += wrapAnsi(ESCAPE_CODES[escapeCode]); + } else if (y === '\n') { + ret += wrapAnsi(escapeCode); + } + } + } + + return ret; +} + +// for each line break, invoke the method separately. +module.exports = function (str, cols, opts) { + return String(str).split('\n').map(function (substr) { + return exec(substr, cols, opts); + }).join('\n'); +}; diff --git a/node_modules/wrap-ansi/license b/node_modules/wrap-ansi/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/wrap-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json new file mode 100644 index 0000000..d970ce5 --- /dev/null +++ b/node_modules/wrap-ansi/package.json @@ -0,0 +1,133 @@ +{ + "_args": [ + [ + "wrap-ansi@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui" + ] + ], + "_from": "wrap-ansi@>=2.0.0 <3.0.0", + "_id": "wrap-ansi@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/wrap-ansi", + "_nodeVersion": "4.6.2", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/wrap-ansi-2.1.0.tgz_1480440082575_0.23112521297298372" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "name": "wrap-ansi", + "raw": "wrap-ansi@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cliui" + ], + "_resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "_shasum": "d8fc3d284dd05794fe84973caecdd1cf824fdd85", + "_shrinkwrap": null, + "_spec": "wrap-ansi@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/wrap-ansi/issues" + }, + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "description": "Wordwrap a string with ANSI escape codes", + "devDependencies": { + "ava": "^0.16.0", + "chalk": "^1.1.0", + "coveralls": "^2.11.4", + "has-ansi": "^2.0.0", + "nyc": "^6.2.1", + "strip-ansi": "^3.0.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "d8fc3d284dd05794fe84973caecdd1cf824fdd85", + "tarball": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "a731af5a3461d92f2af302e81e05ea698a3c8c1a", + "homepage": "https://github.com/chalk/wrap-ansi#readme", + "keywords": [ + "256", + "ansi", + "break", + "cli", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "formatting", + "linewrap", + "log", + "logging", + "rgb", + "shell", + "string", + "styles", + "terminal", + "text", + "tty", + "wordbreak", + "wordwrap", + "wrap", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + }, + { + "name": "dthree", + "email": "threedeecee@gmail.com" + }, + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "wrap-ansi", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/wrap-ansi.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "2.1.0" +} diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md new file mode 100644 index 0000000..59fc96b --- /dev/null +++ b/node_modules/wrap-ansi/readme.md @@ -0,0 +1,73 @@ +# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) + +> Wordwrap a string with [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) + + +## Install + +``` +$ npm install --save wrap-ansi +``` + + +## Usage + +```js +const chalk = require('chalk'); +const wrapAnsi = require('wrap-ansi'); + +const input = 'The quick brown ' + chalk.red('fox jumped over ') + + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); + +console.log(wrapAnsi(input, 20)); +``` + + + + +## API + +### wrapAnsi(input, columns, [options]) + +Wrap words to the specified column width. + +#### input + +Type: `string` + +String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). + +#### columns + +Type: `number` + +Number of columns to wrap the text to. + +#### options + +##### hard + +Type: `boolean`
      +Default: `false` + +By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. + +##### wordWrap + +Type: `boolean`
      +Default: `true` + +By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. + + +## Related + +- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes +- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right +- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/y18n/LICENSE b/node_modules/y18n/LICENSE new file mode 100644 index 0000000..3c157f0 --- /dev/null +++ b/node_modules/y18n/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/node_modules/y18n/README.md b/node_modules/y18n/README.md new file mode 100644 index 0000000..9859458 --- /dev/null +++ b/node_modules/y18n/README.md @@ -0,0 +1,91 @@ +# y18n + +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] +[![NPM version][npm-image]][npm-url] +[![js-standard-style][standard-image]][standard-url] + +The bare-bones internationalization library used by yargs. + +Inspired by [i18n](https://www.npmjs.com/package/i18n). + +## Examples + +_simple string translation:_ + +```js +var __ = require('y18n').__ + +console.log(__('my awesome string %s', 'foo')) +``` + +output: + +`my awesome string foo` + +_pluralization support:_ + +```js +var __n = require('y18n').__n + +console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) +``` + +output: + +`2 fishes foo` + +## JSON Language Files + +The JSON language files should be stored in a `./locales` folder. +File names correspond to locales, e.g., `en.json`, `pirate.json`. + +When strings are observed for the first time they will be +added to the JSON file corresponding to the current locale. + +## Methods + +### require('y18n')(config) + +Create an instance of y18n with the config provided, options include: + +* `directory`: the locale directory, default `./locales`. +* `updateFiles`: should newly observed strings be updated in file, default `true`. +* `locale`: what locale should be used. +* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) + be allowed if a file matching the locale does not exist (e.g. `en_US.json`), + default `true`. + +### y18n.\_\_(str, arg, arg, arg) + +Print a localized string, `%s` will be replaced with `arg`s. + +### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) + +Print a localized string with appropriate pluralization. If `%d` is provided +in the string, the `count` will replace this placeholder. + +### y18n.setLocale(str) + +Set the current locale being used. + +### y18n.getLocale() + +What locale is currently being used? + +### y18n.updateLocale(obj) + +Update the current locale with the key value pairs in `obj`. + +## License + +ISC + +[travis-url]: https://travis-ci.org/yargs/y18n +[travis-image]: https://img.shields.io/travis/yargs/y18n.svg +[coveralls-url]: https://coveralls.io/github/yargs/y18n +[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg +[npm-url]: https://npmjs.org/package/y18n +[npm-image]: https://img.shields.io/npm/v/y18n.svg +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: https://github.com/feross/standard diff --git a/node_modules/y18n/index.js b/node_modules/y18n/index.js new file mode 100644 index 0000000..91b159e --- /dev/null +++ b/node_modules/y18n/index.js @@ -0,0 +1,172 @@ +var fs = require('fs') +var path = require('path') +var util = require('util') + +function Y18N (opts) { + // configurable options. + opts = opts || {} + this.directory = opts.directory || './locales' + this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true + this.locale = opts.locale || 'en' + this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true + + // internal stuff. + this.cache = {} + this.writeQueue = [] +} + +Y18N.prototype.__ = function () { + var args = Array.prototype.slice.call(arguments) + var str = args.shift() + var cb = function () {} // start with noop. + + if (typeof args[args.length - 1] === 'function') cb = args.pop() + cb = cb || function () {} // noop. + + if (!this.cache[this.locale]) this._readLocaleFile() + + // we've observed a new string, update the language file. + if (!this.cache[this.locale][str] && this.updateFiles) { + this.cache[this.locale][str] = str + + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite([this.directory, this.locale, cb]) + } else { + cb() + } + + return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args)) +} + +Y18N.prototype._enqueueWrite = function (work) { + this.writeQueue.push(work) + if (this.writeQueue.length === 1) this._processWriteQueue() +} + +Y18N.prototype._processWriteQueue = function () { + var _this = this + var work = this.writeQueue[0] + + // destructure the enqueued work. + var directory = work[0] + var locale = work[1] + var cb = work[2] + + var languageFile = this._resolveLocaleFile(directory, locale) + var serializedLocale = JSON.stringify(this.cache[locale], null, 2) + + fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { + _this.writeQueue.shift() + if (_this.writeQueue.length > 0) _this._processWriteQueue() + cb(err) + }) +} + +Y18N.prototype._readLocaleFile = function () { + var localeLookup = {} + var languageFile = this._resolveLocaleFile(this.directory, this.locale) + + try { + localeLookup = JSON.parse(fs.readFileSync(languageFile, 'utf-8')) + } catch (err) { + if (err instanceof SyntaxError) { + err.message = 'syntax error in ' + languageFile + } + + if (err.code === 'ENOENT') localeLookup = {} + else throw err + } + + this.cache[this.locale] = localeLookup +} + +Y18N.prototype._resolveLocaleFile = function (directory, locale) { + var file = path.resolve(directory, './', locale + '.json') + if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { + // attempt fallback to language only + var languageFile = path.resolve(directory, './', locale.split('_')[0] + '.json') + if (this._fileExistsSync(languageFile)) file = languageFile + } + return file +} + +// this only exists because fs.existsSync() "will be deprecated" +// see https://nodejs.org/api/fs.html#fs_fs_existssync_path +Y18N.prototype._fileExistsSync = function (file) { + try { + return fs.statSync(file).isFile() + } catch (err) { + return false + } +} + +Y18N.prototype.__n = function () { + var args = Array.prototype.slice.call(arguments) + var singular = args.shift() + var plural = args.shift() + var quantity = args.shift() + + var cb = function () {} // start with noop. + if (typeof args[args.length - 1] === 'function') cb = args.pop() + + if (!this.cache[this.locale]) this._readLocaleFile() + + var str = quantity === 1 ? singular : plural + if (this.cache[this.locale][singular]) { + str = this.cache[this.locale][singular][quantity === 1 ? 'one' : 'other'] + } + + // we've observed a new string, update the language file. + if (!this.cache[this.locale][singular] && this.updateFiles) { + this.cache[this.locale][singular] = { + one: singular, + other: plural + } + + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite([this.directory, this.locale, cb]) + } else { + cb() + } + + // if a %d placeholder is provided, add quantity + // to the arguments expanded by util.format. + var values = [str] + if (~str.indexOf('%d')) values.push(quantity) + + return util.format.apply(util, values.concat(args)) +} + +Y18N.prototype.setLocale = function (locale) { + this.locale = locale +} + +Y18N.prototype.getLocale = function () { + return this.locale +} + +Y18N.prototype.updateLocale = function (obj) { + if (!this.cache[this.locale]) this._readLocaleFile() + + for (var key in obj) { + this.cache[this.locale][key] = obj[key] + } +} + +module.exports = function (opts) { + var y18n = new Y18N(opts) + + // bind all functions to y18n, so that + // they can be used in isolation. + for (var key in y18n) { + if (typeof y18n[key] === 'function') { + y18n[key] = y18n[key].bind(y18n) + } + } + + return y18n +} diff --git a/node_modules/y18n/package.json b/node_modules/y18n/package.json new file mode 100644 index 0000000..a247f90 --- /dev/null +++ b/node_modules/y18n/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "y18n@^3.2.1", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "y18n@>=3.2.1 <4.0.0", + "_id": "y18n@3.2.1", + "_inCache": true, + "_installable": true, + "_location": "/y18n", + "_nodeVersion": "3.2.0", + "_npmOperationalInternal": { + "host": "packages-13-west.internal.npmjs.com", + "tmp": "tmp/y18n-3.2.1.tgz_1458191070611_0.9606689948122948" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "3.3.0", + "_phantomChildren": {}, + "_requested": { + "name": "y18n", + "raw": "y18n@^3.2.1", + "rawSpec": "^3.2.1", + "scope": null, + "spec": ">=3.2.1 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "_shasum": "6d15fba884c08679c0d77e88e7759e811e07fa41", + "_shrinkwrap": null, + "_spec": "y18n@^3.2.1", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/yargs/y18n/issues" + }, + "dependencies": {}, + "description": "the bare-bones internationalization library used by yargs", + "devDependencies": { + "chai": "^3.4.1", + "coveralls": "^2.11.6", + "mocha": "^2.3.4", + "nyc": "^6.1.1", + "rimraf": "^2.5.0", + "standard": "^5.4.1" + }, + "directories": {}, + "dist": { + "shasum": "6d15fba884c08679c0d77e88e7759e811e07fa41", + "tarball": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "34d6ad7bfeac67721ccbcf3bbcc761f33d787c90", + "homepage": "https://github.com/yargs/y18n", + "keywords": [ + "i18n", + "internationalization", + "yargs" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + }, + { + "name": "nexdrew", + "email": "andrew@npmjs.com" + } + ], + "name": "y18n", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/y18n.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "test": "nyc mocha" + }, + "version": "3.2.1" +} diff --git a/node_modules/yallist/LICENSE b/node_modules/yallist/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yallist/README.md b/node_modules/yallist/README.md new file mode 100644 index 0000000..f586101 --- /dev/null +++ b/node_modules/yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/node_modules/yallist/iterator.js b/node_modules/yallist/iterator.js new file mode 100644 index 0000000..4a15bf2 --- /dev/null +++ b/node_modules/yallist/iterator.js @@ -0,0 +1,7 @@ +var Yallist = require('./yallist.js') + +Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } +} diff --git a/node_modules/yallist/package.json b/node_modules/yallist/package.json new file mode 100644 index 0000000..00eccf2 --- /dev/null +++ b/node_modules/yallist/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "yallist@^2.1.2", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/lru-cache" + ] + ], + "_from": "yallist@>=2.1.2 <3.0.0", + "_id": "yallist@2.1.2", + "_inCache": true, + "_installable": true, + "_location": "/yallist", + "_nodeVersion": "8.0.0-pre", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/yallist-2.1.2.tgz_1489443365033_0.47744474792853" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "4.3.0", + "_phantomChildren": {}, + "_requested": { + "name": "yallist", + "raw": "yallist@^2.1.2", + "rawSpec": "^2.1.2", + "scope": null, + "spec": ">=2.1.2 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lru-cache" + ], + "_resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "_shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52", + "_shrinkwrap": null, + "_spec": "yallist@^2.1.2", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/lru-cache", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/yallist/issues" + }, + "dependencies": {}, + "description": "Yet Another Linked List", + "devDependencies": { + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52", + "tarball": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz" + }, + "files": [ + "iterator.js", + "yallist.js" + ], + "gitHead": "566cd4cd1e2ce57ffa84e295981cd9aa72319391", + "homepage": "https://github.com/isaacs/yallist#readme", + "license": "ISC", + "main": "yallist.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "yallist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.1.2" +} diff --git a/node_modules/yallist/yallist.js b/node_modules/yallist/yallist.js new file mode 100644 index 0000000..518d233 --- /dev/null +++ b/node_modules/yallist/yallist.js @@ -0,0 +1,370 @@ +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md new file mode 100644 index 0000000..6d237f6 --- /dev/null +++ b/node_modules/yargs-parser/CHANGELOG.md @@ -0,0 +1,265 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20) + + +### Bug Fixes + +* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9)) +* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c)) +* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d)) +* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef)) +* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57)) +* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9)) + + +### Features + +* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536)) +* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6)) + + + + +# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05) + + +### Bug Fixes + +* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227)) + + +### Features + +* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d)) +* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb)) + + +### BREAKING CHANGES + +* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. + + + + +# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02) + + +### Chores + +* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d)) + + +### BREAKING CHANGES + +* populate-- now defaults to false. + + + + +## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01) + + +### Bug Fixes + +* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc)) + + + + +# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01) + + +### Bug Fixes + +* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) +* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62)) + + +### Chores + +* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa)) + + +### Features + +* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8)) +* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db)) + + +### BREAKING CHANGES + +* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default. +* camelcase now requires Node 4+. +* environment variables will now override config files (args, env, config-file, config-object) + + + + +# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18) + + +### Bug Fixes + +* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) + + +### BREAKING CHANGES + +* environment variables will now override config files (args, env, config-file, config-object) + + + + +## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02) + + +### Bug Fixes + +* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0)) + + + + +# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01) + + +### Bug Fixes + +* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9)) + + +### Features + +* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d)) + + + + +# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07) + + +### Features + +* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b)) +* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545)) + + + + +## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30) + + +### Bug Fixes + +* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a)) + + + + +## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30) + + +### Bug Fixes + +* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11)) + + + + +# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26) + + +### Bug Fixes + +* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da)) + + +### BREAKING CHANGES + +* coerce is no longer applied to individual arguments in an implicit array. + + + + +# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13) + + +### Features + +* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56)) + + + + +# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09) + + +### Bug Fixes + +* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6)) +* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692)) +* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616)) + + +### Features + +* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2)) + + + + +# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07) + + +### Bug Fixes + +* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236)) +* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4)) + +### BREAKING CHANGES + +* subtle change to how values are parsed in a group of single-character arguments. +* _first released in 3.1.0, better handling of negative values should be considered a breaking change._ + + + + +## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16) + + +### Bug Fixes + +* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189)) + + + + +# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11) + + +### Features + +* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b)) + + + + +# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09) + + +### Bug Fixes + +* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20) +* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d)) +* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165)) +* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6)) +* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5)) + +### Features + +* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900)) +* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a)) diff --git a/node_modules/yargs-parser/LICENSE.txt b/node_modules/yargs-parser/LICENSE.txt new file mode 100644 index 0000000..836440b --- /dev/null +++ b/node_modules/yargs-parser/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md new file mode 100644 index 0000000..6d6d0d4 --- /dev/null +++ b/node_modules/yargs-parser/README.md @@ -0,0 +1,308 @@ +# yargs-parser + +[![Build Status](https://travis-ci.org/yargs/yargs-parser.png)](https://travis-ci.org/yargs/yargs-parser) +[![Coverage Status](https://coveralls.io/repos/yargs/yargs-parser/badge.svg?branch=)](https://coveralls.io/r/yargs/yargs-parser?branch=master) +[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) +[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/yargs-parser/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/yargs-parser) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + + +The mighty option parser used by [yargs](https://github.com/yargs/yargs). + +visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. + + + +## Example + +```sh +npm i yargs-parser --save +``` + +```js +var argv = require('yargs-parser')(process.argv.slice(2)) +console.log(argv) +``` + +```sh +node example.js --foo=33 --bar hello +{ _: [], foo: 33, bar: 'hello' } +``` + +_or parse a string!_ + +```js +var argv = require('./')('--foo=99 --bar=33') +console.log(argv) +``` + +```sh +{ _: [], foo: 99, bar: 33 } +``` + +Convert an array of mixed types before passing to `yargs-parser`: + +```js +var parse = require('yargs-parser') +parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string +parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings +``` + +## API + +### require('yargs-parser')(args, opts={}) + +Parses command line arguments returning a simple mapping of keys and values. + +**expects:** + +* `args`: a string or array of strings representing the options to parse. +* `opts`: provide a set of hints indicating how `args` should be parsed: + * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. + * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`. + * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. + * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). + * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided + (or throws an error), e.g. `{coerce: {foo: function (arg) {return modifiedArg}}}`. + * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. + * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. + * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. + * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. + * `opts.normalize`: `path.normalize()` will be applied to values set to this key. + * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). + * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). + * `opts.number`: keys should be treated as numbers. + * `opts['--']`: arguments after the end-of-options flag `--` will be set to the `argv.['--']` array instead of being set to the `argv._` array. + +**returns:** + +* `obj`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. + +### require('yargs-parser').detailed(args, opts={}) + +Parses a command line string, returning detailed information required by the +yargs engine. + +**expects:** + +* `args`: a string or array of strings representing options to parse. +* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. + +**returns:** + +* `argv`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. +* `error`: populated with an error object if an exception occurred during parsing. +* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. +* `newAliases`: any new aliases added via camel-case expansion. +* `configuration`: the configuration loaded from the `yargs` stanza in package.json. + + + +### Configuration + +The yargs-parser applies several automated transformations on the keys provided +in `args`. These features can be turned on and off using the `configuration` field +of `opts`. + +```js +var parsed = parser(['--no-dice'], { + configuration: { + 'boolean-negation': false + } +}) +``` + +### short option groups + +* default: `true`. +* key: `short-option-groups`. + +Should a group of short-options be treated as boolean flags? + +```sh +node example.js -abc +{ _: [], a: true, b: true, c: true } +``` + +_if disabled:_ + +```sh +node example.js -abc +{ _: [], abc: true } +``` + +### camel-case expansion + +* default: `true`. +* key: `camel-case-expansion`. + +Should hyphenated arguments be expanded into camel-case aliases? + +```sh +node example.js --foo-bar +{ _: [], 'foo-bar': true, fooBar: true } +``` + +_if disabled:_ + +```sh +node example.js --foo-bar +{ _: [], 'foo-bar': true } +``` + +### dot-notation + +* default: `true` +* key: `dot-notation` + +Should keys that contain `.` be treated as objects? + +```sh +node example.js --foo.bar +{ _: [], foo: { bar: true } } +``` + +_if disabled:_ + +```sh +node example.js --foo.bar +{ _: [], "foo.bar": true } +``` + +### parse numbers + +* default: `true` +* key: `parse-numbers` + +Should keys that look like numbers be treated as such? + +```sh +node example.js --foo=99.3 +{ _: [], foo: 99.3 } +``` + +_if disabled:_ + +```sh +node example.js --foo=99.3 +{ _: [], foo: "99.3" } +``` + +### boolean negation + +* default: `true` +* key: `boolean-negation` + +Should variables prefixed with `--no` be treated as negations? + +```sh +node example.js --no-foo +{ _: [], foo: false } +``` + +_if disabled:_ + +```sh +node example.js --no-foo +{ _: [], "no-foo": true } +``` + +### combine arrays + +* default: `false` +* key: `combine-arrays` + +Should arrays be combined when provided by both command line arguments and +a configuration file. + +### duplicate arguments array + +* default: `true` +* key: `duplicate-arguments-array` + +Should arguments be coerced into an array when duplicated: + +```sh +node example.js -x 1 -x 2 +{ _: [], x: [1, 2] } +``` + +_if disabled:_ + +```sh +node example.js -x 1 -x 2 +{ _: [], x: 2 } +``` + +### flatten duplicate arrays + +* default: `true` +* key: `flatten-duplicate-arrays` + +Should array arguments be coerced into a single array when duplicated: + +```sh +node example.js -x 1 2 -x 3 4 +{ _: [], x: [1, 2, 3, 4] } +``` + +_if disabled:_ + +```sh +node example.js -x 1 2 -x 3 4 +{ _: [], x: [[1, 2], [3, 4]] } +``` + +### negation prefix + +* default: `no-` +* key: `negation-prefix` + +The prefix to use for negated boolean variables. + +```sh +node example.js --no-foo +{ _: [], foo: false } +``` + +_if set to `quux`:_ + +```sh +node example.js --quuxfoo +{ _: [], foo: false } +``` + +### populate -- + +* default: `false`. +* key: `populate--` + +Should unparsed flags be stored in `--` or `_`. + +_If disabled:_ + +```sh +node example.js a -b -- x y +{ _: [ 'a', 'x', 'y' ], b: true } +``` + +_If enabled:_ + +```sh +node example.js a -b -- x y +{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } +``` + +## Special Thanks + +The yargs project evolves from optimist and minimist. It owes its +existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ + +## License + +ISC diff --git a/node_modules/yargs-parser/index.js b/node_modules/yargs-parser/index.js new file mode 100644 index 0000000..1d3e6b9 --- /dev/null +++ b/node_modules/yargs-parser/index.js @@ -0,0 +1,801 @@ +var camelCase = require('camelcase') +var path = require('path') +var tokenizeArgString = require('./lib/tokenize-arg-string') +var util = require('util') + +function parse (args, opts) { + if (!opts) opts = {} + // allow a string argument to be passed in rather + // than an argv array. + args = tokenizeArgString(args) + // aliases might have transitive relationships, normalize this. + var aliases = combineAliases(opts.alias || {}) + var configuration = assign({ + 'short-option-groups': true, + 'camel-case-expansion': true, + 'dot-notation': true, + 'parse-numbers': true, + 'boolean-negation': true, + 'negation-prefix': 'no-', + 'duplicate-arguments-array': true, + 'flatten-duplicate-arrays': true, + 'populate--': false, + 'combine-arrays': false + }, opts.configuration) + var defaults = opts.default || {} + var configObjects = opts.configObjects || [] + var envPrefix = opts.envPrefix + var notFlagsOption = configuration['populate--'] + var notFlagsArgv = notFlagsOption ? '--' : '_' + var newAliases = {} + // allow a i18n handler to be passed in, default to a fake one (util.format). + var __ = opts.__ || function (str) { + return util.format.apply(util, Array.prototype.slice.call(arguments)) + } + var error = null + var flags = { + aliases: {}, + arrays: {}, + bools: {}, + strings: {}, + numbers: {}, + counts: {}, + normalize: {}, + configs: {}, + defaulted: {}, + nargs: {}, + coercions: {} + } + var negative = /^-[0-9]+(\.[0-9]+)?/ + var negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)') + + ;[].concat(opts.array).filter(Boolean).forEach(function (key) { + flags.arrays[key] = true + }) + + ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) { + flags.bools[key] = true + }) + + ;[].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true + }) + + ;[].concat(opts.number).filter(Boolean).forEach(function (key) { + flags.numbers[key] = true + }) + + ;[].concat(opts.count).filter(Boolean).forEach(function (key) { + flags.counts[key] = true + }) + + ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { + flags.normalize[key] = true + }) + + Object.keys(opts.narg || {}).forEach(function (k) { + flags.nargs[k] = opts.narg[k] + }) + + Object.keys(opts.coerce || {}).forEach(function (k) { + flags.coercions[k] = opts.coerce[k] + }) + + if (Array.isArray(opts.config) || typeof opts.config === 'string') { + ;[].concat(opts.config).filter(Boolean).forEach(function (key) { + flags.configs[key] = true + }) + } else { + Object.keys(opts.config || {}).forEach(function (k) { + flags.configs[k] = opts.config[k] + }) + } + + // create a lookup table that takes into account all + // combinations of aliases: {f: ['foo'], foo: ['f']} + extendAliases(opts.key, aliases, opts.default, flags.arrays) + + // apply default values to all aliases. + Object.keys(defaults).forEach(function (key) { + (flags.aliases[key] || []).forEach(function (alias) { + defaults[alias] = defaults[key] + }) + }) + + var argv = { _: [] } + + Object.keys(flags.bools).forEach(function (key) { + setArg(key, !(key in defaults) ? false : defaults[key]) + setDefaulted(key) + }) + + var notFlags = [] + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--') + 1) + args = args.slice(0, args.indexOf('--')) + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i] + var broken + var key + var letters + var m + var next + var value + + // -- seperated by = + if (arg.match(/^--.+=/) || ( + !configuration['short-option-groups'] && arg.match(/^-.+=/) + )) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + m = arg.match(/^--?([^=]+)=([\s\S]*)$/) + + // nargs format = '--f=monkey washing cat' + if (checkAllAliases(m[1], flags.nargs)) { + args.splice(i + 1, 0, m[2]) + i = eatNargs(i, m[1], args) + // arrays format = '--f=a b c' + } else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) { + args.splice(i + 1, 0, m[2]) + i = eatArray(i, m[1], args) + } else { + setArg(m[1], m[2]) + } + } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { + key = arg.match(negatedBoolean)[1] + setArg(key, false) + + // -- seperated by space. + } else if (arg.match(/^--.+/) || ( + !configuration['short-option-groups'] && arg.match(/^-.+/) + )) { + key = arg.match(/^--?(.+)/)[1] + + // nargs format = '--foo a b c' + if (checkAllAliases(key, flags.nargs)) { + i = eatNargs(i, key, args) + // array format = '--foo a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + i = eatArray(i, key, args) + } else { + next = args[i + 1] + + if (next !== undefined && (!next.match(/^-/) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else if (/^(true|false)$/.test(next)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } + + // dot-notation flag seperated by '='. + } else if (arg.match(/^-.\..+=/)) { + m = arg.match(/^-([^=]+)=([\s\S]*)$/) + setArg(m[1], m[2]) + + // dot-notation flag seperated by space. + } else if (arg.match(/^-.\..+/)) { + next = args[i + 1] + key = arg.match(/^-(.\..+)/)[1] + + if (next !== undefined && !next.match(/^-/) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { + letters = arg.slice(1, -1).split('') + broken = false + + for (var j = 0; j < letters.length; j++) { + next = arg.slice(j + 2) + + if (letters[j + 1] && letters[j + 1] === '=') { + value = arg.slice(j + 3) + key = letters[j] + + // nargs format = '-f=monkey washing cat' + if (checkAllAliases(key, flags.nargs)) { + args.splice(i + 1, 0, value) + i = eatNargs(i, key, args) + // array format = '-f=a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + args.splice(i + 1, 0, value) + i = eatArray(i, key, args) + } else { + setArg(key, value) + } + + broken = true + break + } + + if (next === '-') { + setArg(letters[j], next) + continue + } + + // current letter is an alphabetic character and next value is a number + if (/[A-Za-z]/.test(letters[j]) && + /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next) + broken = true + break + } + + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], next) + broken = true + break + } else { + setArg(letters[j], defaultForType(guessType(letters[j], flags))) + } + } + + key = arg.slice(-1)[0] + + if (!broken && key !== '-') { + // nargs format = '-f a b c' + if (checkAllAliases(key, flags.nargs)) { + i = eatNargs(i, key, args) + // array format = '-f a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + i = eatArray(i, key, args) + } else { + next = args[i + 1] + + if (next !== undefined && (!/^(-|--)[^-]/.test(next) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else if (/^(true|false)$/.test(next)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultForType(guessType(key, flags))) + } + } + } + } else { + argv._.push(maybeCoerceNumber('_', arg)) + } + } + + // order of precedence: + // 1. command line arg + // 2. value from env var + // 3. value from config file + // 4. value from config objects + // 5. configured default value + applyEnvVars(argv, true) // special case: check env vars that point to config file + applyEnvVars(argv, false) + setConfig(argv) + setConfigObjects() + applyDefaultsAndAliases(argv, flags.aliases, defaults) + applyCoercions(argv) + + // for any counts either not in args or without an explicit default, set to 0 + Object.keys(flags.counts).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) setArg(key, 0) + }) + + // '--' defaults to undefined. + if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = [] + notFlags.forEach(function (key) { + argv[notFlagsArgv].push(key) + }) + + // how many arguments should we consume, based + // on the nargs option? + function eatNargs (i, key, args) { + var toEat = checkAllAliases(key, flags.nargs) + + if (args.length - (i + 1) < toEat) error = Error(__('Not enough arguments following: %s', key)) + + for (var ii = i + 1; ii < (toEat + i + 1); ii++) { + setArg(key, args[ii]) + } + + return (i + toEat) + } + + // if an option is an array, eat all non-hyphenated arguments + // following it... YUM! + // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] + function eatArray (i, key, args) { + var start = i + 1 + var argsToSet = [] + var multipleArrayFlag = i > 0 + for (var ii = i + 1; ii < args.length; ii++) { + if (/^-/.test(args[ii]) && !negative.test(args[ii])) { + if (ii === start) { + setArg(key, defaultForType('array')) + } + multipleArrayFlag = true + break + } + i = ii + argsToSet.push(args[ii]) + } + if (multipleArrayFlag) { + setArg(key, argsToSet.map(function (arg) { + return processValue(key, arg) + })) + } else { + argsToSet.forEach(function (arg) { + setArg(key, arg) + }) + } + + return i + } + + function setArg (key, val) { + unsetDefaulted(key) + + if (/-/.test(key) && configuration['camel-case-expansion']) { + addNewAlias(key, camelCase(key)) + } + + var value = processValue(key, val) + + var splitKey = key.split('.') + setKey(argv, splitKey, value) + + // handle populating aliases of the full key + if (flags.aliases[key]) { + flags.aliases[key].forEach(function (x) { + x = x.split('.') + setKey(argv, x, value) + }) + } + + // handle populating aliases of the first element of the dot-notation key + if (splitKey.length > 1 && configuration['dot-notation']) { + ;(flags.aliases[splitKey[0]] || []).forEach(function (x) { + x = x.split('.') + + // expand alias with nested objects in key + var a = [].concat(splitKey) + a.shift() // nuke the old key. + x = x.concat(a) + + setKey(argv, x, value) + }) + } + + // Set normalize getter and setter when key is in 'normalize' but isn't an array + if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { + var keys = [key].concat(flags.aliases[key] || []) + keys.forEach(function (key) { + argv.__defineSetter__(key, function (v) { + val = path.normalize(v) + }) + + argv.__defineGetter__(key, function () { + return typeof val === 'string' ? path.normalize(val) : val + }) + }) + } + } + + function addNewAlias (key, alias) { + if (!(flags.aliases[key] && flags.aliases[key].length)) { + flags.aliases[key] = [alias] + newAliases[alias] = true + } + if (!(flags.aliases[alias] && flags.aliases[alias].length)) { + addNewAlias(alias, key) + } + } + + function processValue (key, val) { + // handle parsing boolean arguments --foo=true --bar false. + if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { + if (typeof val === 'string') val = val === 'true' + } + + var value = maybeCoerceNumber(key, val) + + // increment a count given as arg (either no value or value parsed as boolean) + if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { + value = increment + } + + // Set normalized value when key is in 'normalize' and in 'arrays' + if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { + if (Array.isArray(val)) value = val.map(path.normalize) + else value = path.normalize(val) + } + return value + } + + function maybeCoerceNumber (key, value) { + if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.coercions)) { + const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && ( + Number.isSafeInteger(Math.floor(value)) + ) + if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value) + } + return value + } + + // set args from config.json file, this should be + // applied last so that defaults can be applied. + function setConfig (argv) { + var configLookup = {} + + // expand defaults/aliases, in-case any happen to reference + // the config.json file. + applyDefaultsAndAliases(configLookup, flags.aliases, defaults) + + Object.keys(flags.configs).forEach(function (configKey) { + var configPath = argv[configKey] || configLookup[configKey] + if (configPath) { + try { + var config = null + var resolvedConfigPath = path.resolve(process.cwd(), configPath) + + if (typeof flags.configs[configKey] === 'function') { + try { + config = flags.configs[configKey](resolvedConfigPath) + } catch (e) { + config = e + } + if (config instanceof Error) { + error = config + return + } + } else { + config = require(resolvedConfigPath) + } + + setConfigObject(config) + } catch (ex) { + if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath)) + } + } + }) + } + + // set args from config object. + // it recursively checks nested objects. + function setConfigObject (config, prev) { + Object.keys(config).forEach(function (key) { + var value = config[key] + var fullKey = prev ? prev + '.' + key : key + + // if the value is an inner object and we have dot-notation + // enabled, treat inner objects in config the same as + // heavily nested dot notations (foo.bar.apple). + if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { + // if the value is an object but not an array, check nested object + setConfigObject(value, fullKey) + } else { + // setting arguments via CLI takes precedence over + // values within the config file. + if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) { + setArg(fullKey, value) + } + } + }) + } + + // set all config objects passed in opts + function setConfigObjects () { + if (typeof configObjects === 'undefined') return + configObjects.forEach(function (configObject) { + setConfigObject(configObject) + }) + } + + function applyEnvVars (argv, configOnly) { + if (typeof envPrefix === 'undefined') return + + var prefix = typeof envPrefix === 'string' ? envPrefix : '' + Object.keys(process.env).forEach(function (envVar) { + if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { + // get array of nested keys and convert them to camel case + var keys = envVar.split('__').map(function (key, i) { + if (i === 0) { + key = key.substring(prefix.length) + } + return camelCase(key) + }) + + if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && (!hasKey(argv, keys) || flags.defaulted[keys.join('.')])) { + setArg(keys.join('.'), process.env[envVar]) + } + } + }) + } + + function applyCoercions (argv) { + var coerce + var applied = {} + Object.keys(argv).forEach(function (key) { + if (!applied.hasOwnProperty(key)) { // If we haven't already coerced this option via one of its aliases + coerce = checkAllAliases(key, flags.coercions) + if (typeof coerce === 'function') { + try { + var value = coerce(argv[key]) + ;([].concat(flags.aliases[key] || [], key)).forEach(ali => { + applied[ali] = argv[ali] = value + }) + } catch (err) { + error = err + } + } + } + }) + } + + function applyDefaultsAndAliases (obj, aliases, defaults) { + Object.keys(defaults).forEach(function (key) { + if (!hasKey(obj, key.split('.'))) { + setKey(obj, key.split('.'), defaults[key]) + + ;(aliases[key] || []).forEach(function (x) { + if (hasKey(obj, x.split('.'))) return + setKey(obj, x.split('.'), defaults[key]) + }) + } + }) + } + + function hasKey (obj, keys) { + var o = obj + + if (!configuration['dot-notation']) keys = [keys.join('.')] + + keys.slice(0, -1).forEach(function (key) { + o = (o[key] || {}) + }) + + var key = keys[keys.length - 1] + + if (typeof o !== 'object') return false + else return key in o + } + + function setKey (obj, keys, value) { + var o = obj + + if (!configuration['dot-notation']) keys = [keys.join('.')] + + keys.slice(0, -1).forEach(function (key, index) { + if (typeof o === 'object' && o[key] === undefined) { + o[key] = {} + } + + if (typeof o[key] !== 'object' || Array.isArray(o[key])) { + // ensure that o[key] is an array, and that the last item is an empty object. + if (Array.isArray(o[key])) { + o[key].push({}) + } else { + o[key] = [o[key], {}] + } + + // we want to update the empty object at the end of the o[key] array, so set o to that object + o = o[key][o[key].length - 1] + } else { + o = o[key] + } + }) + + var key = keys[keys.length - 1] + + var isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) + var isValueArray = Array.isArray(value) + var duplicate = configuration['duplicate-arguments-array'] + + if (value === increment) { + o[key] = increment(o[key]) + } else if (Array.isArray(o[key])) { + if (duplicate && isTypeArray && isValueArray) { + o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : [o[key]].concat([value]) + } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { + o[key] = value + } else { + o[key] = o[key].concat([value]) + } + } else if (o[key] === undefined && isTypeArray) { + o[key] = isValueArray ? value : [value] + } else if (duplicate && !(o[key] === undefined || checkAllAliases(key, flags.bools) || checkAllAliases(keys.join('.'), flags.bools) || checkAllAliases(key, flags.counts))) { + o[key] = [ o[key], value ] + } else { + o[key] = value + } + } + + // extend the aliases list with inferred aliases. + function extendAliases () { + Array.prototype.slice.call(arguments).forEach(function (obj) { + Object.keys(obj || {}).forEach(function (key) { + // short-circuit if we've already added a key + // to the aliases array, for example it might + // exist in both 'opts.default' and 'opts.key'. + if (flags.aliases[key]) return + + flags.aliases[key] = [].concat(aliases[key] || []) + // For "--option-name", also set argv.optionName + flags.aliases[key].concat(key).forEach(function (x) { + if (/-/.test(x) && configuration['camel-case-expansion']) { + var c = camelCase(x) + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c) + newAliases[c] = true + } + } + }) + flags.aliases[key].forEach(function (x) { + flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { + return x !== y + })) + }) + }) + }) + } + + // check if a flag is set for any of a key's aliases. + function checkAllAliases (key, flag) { + var isSet = false + var toCheck = [].concat(flags.aliases[key] || [], key) + + toCheck.forEach(function (key) { + if (flag[key]) isSet = flag[key] + }) + + return isSet + } + + function setDefaulted (key) { + [].concat(flags.aliases[key] || [], key).forEach(function (k) { + flags.defaulted[k] = true + }) + } + + function unsetDefaulted (key) { + [].concat(flags.aliases[key] || [], key).forEach(function (k) { + delete flags.defaulted[k] + }) + } + + // return a default value, given the type of a flag., + // e.g., key of type 'string' will default to '', rather than 'true'. + function defaultForType (type) { + var def = { + boolean: true, + string: '', + number: undefined, + array: [] + } + + return def[type] + } + + // given a flag, enforce a default type. + function guessType (key, flags) { + var type = 'boolean' + + if (checkAllAliases(key, flags.strings)) type = 'string' + else if (checkAllAliases(key, flags.numbers)) type = 'number' + else if (checkAllAliases(key, flags.arrays)) type = 'array' + + return type + } + + function isNumber (x) { + if (typeof x === 'number') return true + if (/^0x[0-9a-f]+$/i.test(x)) return true + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) + } + + function isUndefined (num) { + return num === undefined + } + + return { + argv: argv, + error: error, + aliases: flags.aliases, + newAliases: newAliases, + configuration: configuration + } +} + +// if any aliases reference each other, we should +// merge them together. +function combineAliases (aliases) { + var aliasArrays = [] + var change = true + var combined = {} + + // turn alias lookup hash {key: ['alias1', 'alias2']} into + // a simple array ['key', 'alias1', 'alias2'] + Object.keys(aliases).forEach(function (key) { + aliasArrays.push( + [].concat(aliases[key], key) + ) + }) + + // combine arrays until zero changes are + // made in an iteration. + while (change) { + change = false + for (var i = 0; i < aliasArrays.length; i++) { + for (var ii = i + 1; ii < aliasArrays.length; ii++) { + var intersect = aliasArrays[i].filter(function (v) { + return aliasArrays[ii].indexOf(v) !== -1 + }) + + if (intersect.length) { + aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]) + aliasArrays.splice(ii, 1) + change = true + break + } + } + } + } + + // map arrays back to the hash-lookup (de-dupe while + // we're at it). + aliasArrays.forEach(function (aliasArray) { + aliasArray = aliasArray.filter(function (v, i, self) { + return self.indexOf(v) === i + }) + combined[aliasArray.pop()] = aliasArray + }) + + return combined +} + +function assign (defaults, configuration) { + var o = {} + configuration = configuration || {} + + Object.keys(defaults).forEach(function (k) { + o[k] = defaults[k] + }) + Object.keys(configuration).forEach(function (k) { + o[k] = configuration[k] + }) + + return o +} + +// this function should only be called when a count is given as an arg +// it is NOT called to set a default value +// thus we can start the count at 1 instead of 0 +function increment (orig) { + return orig !== undefined ? orig + 1 : 1 +} + +function Parser (args, opts) { + var result = parse(args.slice(), opts) + + return result.argv +} + +// parse arguments and return detailed +// meta information, aliases, etc. +Parser.detailed = function (args, opts) { + return parse(args.slice(), opts) +} + +module.exports = Parser diff --git a/node_modules/yargs-parser/lib/tokenize-arg-string.js b/node_modules/yargs-parser/lib/tokenize-arg-string.js new file mode 100644 index 0000000..6c8d23e --- /dev/null +++ b/node_modules/yargs-parser/lib/tokenize-arg-string.js @@ -0,0 +1,40 @@ +// take an un-split argv string and tokenize it. +module.exports = function (argString) { + if (Array.isArray(argString)) return argString + + argString = argString.trim() + + var i = 0 + var prevC = null + var c = null + var opening = null + var args = [] + + for (var ii = 0; ii < argString.length; ii++) { + prevC = c + c = argString.charAt(ii) + + // split on spaces unless we're in quotes. + if (c === ' ' && !opening) { + if (!(prevC === ' ')) { + i++ + } + continue + } + + // don't split the string if we're in matching + // opening or closing single and double quotes. + if (c === opening) { + opening = null + continue + } else if ((c === "'" || c === '"') && !opening) { + opening = c + continue + } + + if (!args[i]) args[i] = '' + args[i] += c + } + + return args +} diff --git a/node_modules/yargs-parser/node_modules/camelcase/index.js b/node_modules/yargs-parser/node_modules/camelcase/index.js new file mode 100644 index 0000000..c8492a2 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/index.js @@ -0,0 +1,64 @@ +'use strict'; + +function preserveCamelCase(str) { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + + for (let i = 0; i < str.length; i++) { + const c = str[i]; + + if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { + str = str.substr(0, i) + '-' + str.substr(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { + str = str.substr(0, i - 1) + '-' + str.substr(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = c.toLowerCase() === c; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = c.toUpperCase() === c; + } + } + + return str; +} + +module.exports = function (str) { + if (arguments.length > 1) { + str = Array.from(arguments) + .map(x => x.trim()) + .filter(x => x.length) + .join('-'); + } else { + str = str.trim(); + } + + if (str.length === 0) { + return ''; + } + + if (str.length === 1) { + return str.toLowerCase(); + } + + if (/^[a-z0-9]+$/.test(str)) { + return str; + } + + const hasUpperCase = str !== str.toLowerCase(); + + if (hasUpperCase) { + str = preserveCamelCase(str); + } + + return str + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase()); +}; diff --git a/node_modules/yargs-parser/node_modules/camelcase/license b/node_modules/yargs-parser/node_modules/camelcase/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/yargs-parser/node_modules/camelcase/package.json b/node_modules/yargs-parser/node_modules/camelcase/package.json new file mode 100644 index 0000000..d7e67c7 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + "camelcase@^4.1.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs-parser" + ] + ], + "_from": "camelcase@>=4.1.0 <5.0.0", + "_id": "camelcase@4.1.0", + "_inCache": true, + "_installable": true, + "_location": "/yargs-parser/camelcase", + "_nodeVersion": "7.8.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/camelcase-4.1.0.tgz_1490865362489_0.433825216954574" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "name": "camelcase", + "raw": "camelcase@^4.1.0", + "rawSpec": "^4.1.0", + "scope": null, + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs-parser" + ], + "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "_shasum": "d545635be1e33c542649c69173e5de6acfae34dd", + "_shrinkwrap": null, + "_spec": "camelcase@^4.1.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs-parser", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase/issues" + }, + "dependencies": {}, + "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "d545635be1e33c542649c69173e5de6acfae34dd", + "tarball": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "0e6e4a2752aa013b8e9477145c7b8132c95a82ef", + "homepage": "https://github.com/sindresorhus/camelcase#readme", + "keywords": [ + "camel", + "camel-case", + "camelcase", + "case", + "convert", + "dash", + "dot", + "hyphen", + "separator", + "string", + "text", + "underscore" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "camelcase", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.1.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/yargs-parser/node_modules/camelcase/readme.md b/node_modules/yargs-parser/node_modules/camelcase/readme.md new file mode 100644 index 0000000..0610dc6 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/readme.md @@ -0,0 +1,57 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` + + +## Install + +``` +$ npm install --save camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('--foo.bar'); +//=> 'fooBar' + +camelCase('__foo__bar__'); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase('foo', 'bar'); +//=> 'fooBar' + +camelCase('__foo__', '--bar'); +//=> 'fooBar' +``` + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json new file mode 100644 index 0000000..2e565c3 --- /dev/null +++ b/node_modules/yargs-parser/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + "yargs-parser@^8.1.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "yargs-parser@>=8.1.0 <9.0.0", + "_id": "yargs-parser@8.1.0", + "_inCache": true, + "_installable": true, + "_location": "/yargs-parser", + "_nodeVersion": "9.3.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/yargs-parser-8.1.0.tgz_1513750813446_0.41336237522773445" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "5.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "yargs-parser", + "raw": "yargs-parser@^8.1.0", + "rawSpec": "^8.1.0", + "scope": null, + "spec": ">=8.1.0 <9.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", + "_shasum": "f1376a33b6629a5d063782944da732631e966950", + "_shrinkwrap": null, + "_spec": "yargs-parser@^8.1.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/yargs/yargs-parser/issues" + }, + "dependencies": { + "camelcase": "^4.1.0" + }, + "description": "the mighty option parser used by yargs", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.12", + "mocha": "^3.0.1", + "nyc": "^11.4.1", + "standard": "^10.0.2", + "standard-version": "^4.3.0-candidate.0" + }, + "directories": {}, + "dist": { + "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", + "shasum": "f1376a33b6629a5d063782944da732631e966950", + "tarball": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz" + }, + "files": [ + "index.js", + "lib" + ], + "gitHead": "29b02489b2111be89de94bf24f36e8ec8a6ba9e2", + "homepage": "https://github.com/yargs/yargs-parser#readme", + "keywords": [ + "args", + "argument", + "argument", + "cli", + "command", + "option", + "parser", + "parsing", + "yargs" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "nexdrew", + "email": "andrewbgoode@gmail.com" + }, + { + "name": "bcoe", + "email": "ben@npmjs.com" + } + ], + "name": "yargs-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "url": "git+ssh://git@github.com/yargs/yargs-parser.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "nyc mocha test/*.js" + }, + "version": "8.1.0" +} diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md new file mode 100644 index 0000000..f5ec601 --- /dev/null +++ b/node_modules/yargs/CHANGELOG.md @@ -0,0 +1,1111 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [10.1.2](https://github.com/yargs/yargs/compare/v10.1.1...v10.1.2) (2018-01-17) + + +### Bug Fixes + +* requiresArg should only be enforced if argument exists ([#1043](https://github.com/yargs/yargs/issues/1043)) ([fbf41ae](https://github.com/yargs/yargs/commit/fbf41ae)) + + + + +## [10.1.1](https://github.com/yargs/yargs/compare/v10.1.0...v10.1.1) (2018-01-09) + + +### Bug Fixes + +* Add `dirname` sanity check on `findUp` ([#1036](https://github.com/yargs/yargs/issues/1036)) ([331d103](https://github.com/yargs/yargs/commit/331d103)) + + + + +# [10.1.0](https://github.com/yargs/yargs/compare/v10.0.3...v10.1.0) (2018-01-01) + + +### Bug Fixes + +* 'undefined' should be taken to mean no argument was provided ([#1015](https://github.com/yargs/yargs/issues/1015)) ([c679e90](https://github.com/yargs/yargs/commit/c679e90)) + + +### Features + +* add missing simple chinese locale strings ([#1004](https://github.com/yargs/yargs/issues/1004)) ([3cc24ec](https://github.com/yargs/yargs/commit/3cc24ec)) +* add Norwegian Nynorsk translations ([#1028](https://github.com/yargs/yargs/issues/1028)) ([a5ac213](https://github.com/yargs/yargs/commit/a5ac213)) +* async command handlers ([#1001](https://github.com/yargs/yargs/issues/1001)) ([241124b](https://github.com/yargs/yargs/commit/241124b)) +* middleware ([#881](https://github.com/yargs/yargs/issues/881)) ([77b8dbc](https://github.com/yargs/yargs/commit/77b8dbc)) + + + + +## [10.0.3](https://github.com/yargs/yargs/compare/v10.0.2...v10.0.3) (2017-10-21) + + +### Bug Fixes + +* parse array rather than string, so that quotes are safe ([#993](https://github.com/yargs/yargs/issues/993)) ([c351685](https://github.com/yargs/yargs/commit/c351685)) + + + + +## [10.0.2](https://github.com/yargs/yargs/compare/v10.0.1...v10.0.2) (2017-10-21) + + +### Bug Fixes + +* fix tiny spacing issue with usage ([#992](https://github.com/yargs/yargs/issues/992)) ([7871327](https://github.com/yargs/yargs/commit/7871327)) + + + + +## [10.0.1](https://github.com/yargs/yargs/compare/v10.0.0...v10.0.1) (2017-10-19) + + +### Bug Fixes + +* help strings for nested commands were missing parent commands ([#990](https://github.com/yargs/yargs/issues/990)) ([cd1ca15](https://github.com/yargs/yargs/commit/cd1ca15)) +* use correct completion command in generated completion script ([#988](https://github.com/yargs/yargs/issues/988)) ([3c8ac1d](https://github.com/yargs/yargs/commit/3c8ac1d)) + + + + +# [10.0.0](https://github.com/yargs/yargs/compare/v9.1.0...v10.0.0) (2017-10-18) + + +### Bug Fixes + +* config and normalize can be disabled with false ([#952](https://github.com/yargs/yargs/issues/952)) ([3bb8771](https://github.com/yargs/yargs/commit/3bb8771)) +* less eager help command execution ([#972](https://github.com/yargs/yargs/issues/972)) ([8c1d7bf](https://github.com/yargs/yargs/commit/8c1d7bf)) +* the positional argument parse was clobbering global flag arguments ([#984](https://github.com/yargs/yargs/issues/984)) ([7e58453](https://github.com/yargs/yargs/commit/7e58453)) + + +### Features + +* .usage() can now be used to configure a default command ([#975](https://github.com/yargs/yargs/issues/975)) ([7269531](https://github.com/yargs/yargs/commit/7269531)) +* hidden options are now explicitly indicated using "hidden" flag ([#962](https://github.com/yargs/yargs/issues/962)) ([280d0d6](https://github.com/yargs/yargs/commit/280d0d6)) +* introduce .positional() for configuring positional arguments ([#967](https://github.com/yargs/yargs/issues/967)) ([cb16460](https://github.com/yargs/yargs/commit/cb16460)) +* replace $0 with file basename ([#983](https://github.com/yargs/yargs/issues/983)) ([20bb99b](https://github.com/yargs/yargs/commit/20bb99b)) + + +### BREAKING CHANGES + +* .usage() no longer accepts an options object as the second argument. It can instead be used as an alias for configuring a default command. +* previously hidden options were simply implied using a falsy description +* help command now only executes if it's the last positional in argv._ + + + + +# [9.1.0](https://github.com/yargs/yargs/compare/v9.0.1...v9.1.0) (2017-09-25) + + +### Bug Fixes + +* **command:** Run default cmd even if the only cmd ([#950](https://github.com/yargs/yargs/issues/950)) ([7b22203](https://github.com/yargs/yargs/commit/7b22203)) + + +### Features + +* multiple usage calls are now collected, not replaced ([#958](https://github.com/yargs/yargs/issues/958)) ([74a38b2](https://github.com/yargs/yargs/commit/74a38b2)) + + + + +## [9.0.1](https://github.com/yargs/yargs/compare/v9.0.0...v9.0.1) (2017-09-17) + + +### Bug Fixes + +* implications fails only displayed once ([#954](https://github.com/yargs/yargs/issues/954)) ([ac8088b](https://github.com/yargs/yargs/commit/ac8088b)) + + + + +# [9.0.0](https://github.com/yargs/yargs/compare/v8.0.2...v9.0.0) (2017-09-03) + + +### Bug Fixes + +* 'undefined' default value for choices resulted in validation failing ([782b896](https://github.com/yargs/yargs/commit/782b896)) +* address bug with handling of arrays of implications ([c240661](https://github.com/yargs/yargs/commit/c240661)) +* defaulting keys to 'undefined' interfered with conflicting key logic ([a8e0cff](https://github.com/yargs/yargs/commit/a8e0cff)) +* don't bother calling JSON.stringify() on string default values ([#891](https://github.com/yargs/yargs/issues/891)) ([628be21](https://github.com/yargs/yargs/commit/628be21)) +* exclude positional arguments from completion output ([#927](https://github.com/yargs/yargs/issues/927)) ([71c7ec7](https://github.com/yargs/yargs/commit/71c7ec7)) +* strict mode should not fail for hidden options ([#949](https://github.com/yargs/yargs/issues/949)) ([0e0c58d](https://github.com/yargs/yargs/commit/0e0c58d)) + + +### Features + +* allow implies and conflicts to accept array values ([#922](https://github.com/yargs/yargs/issues/922)) ([abdc7da](https://github.com/yargs/yargs/commit/abdc7da)) +* allow parse with no arguments as alias for yargs.argv ([#944](https://github.com/yargs/yargs/issues/944)) ([a9f03e7](https://github.com/yargs/yargs/commit/a9f03e7)) +* enable .help() and .version() by default ([#912](https://github.com/yargs/yargs/issues/912)) ([1ef44e0](https://github.com/yargs/yargs/commit/1ef44e0)) +* to allow both undefined and nulls, for benefit of TypeScript ([#945](https://github.com/yargs/yargs/issues/945)) ([792564d](https://github.com/yargs/yargs/commit/792564d)) + + +### BREAKING CHANGES + +* version() and help() are now enabled by default, and show up in help output; the implicit help command can no longer be enabled/disabled independently from the help command itself (which can now be disabled). +* parse() now behaves as an alias for .argv, unless a parseCallback is provided. + + + + +## [8.0.2](https://github.com/yargs/yargs/compare/v8.0.1...v8.0.2) (2017-06-12) + + + + +## [8.0.1](https://github.com/yargs/yargs/compare/v8.0.0...v8.0.1) (2017-05-02) + + + + +# [8.0.0](https://github.com/yargs/yargs/compare/v7.1.0...v8.0.0) (2017-05-01) + + +### Bug Fixes + +* commands are now applied in order, from left to right ([#857](https://github.com/yargs/yargs/issues/857)) ([baba863](https://github.com/yargs/yargs/commit/baba863)) +* help now takes precedence over command recommendation ([#866](https://github.com/yargs/yargs/issues/866)) ([17e3567](https://github.com/yargs/yargs/commit/17e3567)) +* positional arguments now work if no handler is provided to inner command ([#864](https://github.com/yargs/yargs/issues/864)) ([e28ded3](https://github.com/yargs/yargs/commit/e28ded3)) + + +### Chores + +* upgrade yargs-parser ([#867](https://github.com/yargs/yargs/issues/867)) ([8f9c6c6](https://github.com/yargs/yargs/commit/8f9c6c6)) + + +### Features + +* allow extends to inherit from a module ([#865](https://github.com/yargs/yargs/issues/865)) ([89456d9](https://github.com/yargs/yargs/commit/89456d9)) +* allow strict mode to be disabled ([#840](https://github.com/yargs/yargs/issues/840)) ([6f78c05](https://github.com/yargs/yargs/commit/6f78c05)) + + +### BREAKING CHANGES + +* extends functionality now always loads the JSON provided, rather than reading from a specific key +* Node 4+ is now required; this will allow us to start updating our dependencies. +* the first argument to strict() is now used to enable/disable its functionality, rather than controlling whether or not it is global. + + + + +# [7.1.0](https://github.com/yargs/yargs/compare/v7.0.2...v7.1.0) (2017-04-13) + + +### Bug Fixes + +* fix demandOption no longer treats 'false' as truthy ([#829](https://github.com/yargs/yargs/issues/829)) ([c748dd2](https://github.com/yargs/yargs/commit/c748dd2)) +* get terminalWidth in non interactive mode no longer causes a validation exception ([#837](https://github.com/yargs/yargs/issues/837)) ([360e301](https://github.com/yargs/yargs/commit/360e301)) +* we shouldn't output help if we've printed a prior help-like message ([#847](https://github.com/yargs/yargs/issues/847)) ([17e89bd](https://github.com/yargs/yargs/commit/17e89bd)) + + +### Features + +* add support for numeric commands ([#825](https://github.com/yargs/yargs/issues/825)) ([fde0564](https://github.com/yargs/yargs/commit/fde0564)) + + + + +## [7.0.2](https://github.com/yargs/yargs/compare/v7.0.1...v7.0.2) (2017-03-10) + + +### Bug Fixes + +* populating placeholder arguments broke validation ([b3eb2fe](https://github.com/yargs/yargs/commit/b3eb2fe)) + + + + +## [7.0.1](https://github.com/yargs/yargs/compare/v7.0.0...v7.0.1) (2017-03-03) + + +### Bug Fixes + +* --help with default command should print top-level help ([#810](https://github.com/yargs/yargs/issues/810)) ([9c03fa4](https://github.com/yargs/yargs/commit/9c03fa4)) + + + + +# [7.0.0](https://github.com/yargs/yargs/compare/v6.6.0...v7.0.0) (2017-02-26) + + +### Bug Fixes + +* address min/max validation message regression ([#750](https://github.com/yargs/yargs/issues/750)) ([2e5ce0f](https://github.com/yargs/yargs/commit/2e5ce0f)) +* address positional argument strict() bug introduced in [#766](https://github.com/yargs/yargs/issues/766) ([#784](https://github.com/yargs/yargs/issues/784)) ([a8528e6](https://github.com/yargs/yargs/commit/a8528e6)) +* console.warn() rather than throwing errors when api signatures are incorrect ([#804](https://github.com/yargs/yargs/issues/804)) ([a607061](https://github.com/yargs/yargs/commit/a607061)) +* context should override parsed argv ([#786](https://github.com/yargs/yargs/issues/786)) ([0997288](https://github.com/yargs/yargs/commit/0997288)) +* context variables are now recognized in strict() mode ([#796](https://github.com/yargs/yargs/issues/796)) ([48575cd](https://github.com/yargs/yargs/commit/48575cd)) +* errors were not bubbling appropriately from sub-commands to top-level ([#802](https://github.com/yargs/yargs/issues/802)) ([8a992f5](https://github.com/yargs/yargs/commit/8a992f5)) +* positional arguments of sub-commands threw strict() exception ([#805](https://github.com/yargs/yargs/issues/805)) ([f3f074b](https://github.com/yargs/yargs/commit/f3f074b)) +* pull in yargs-parser with modified env precedence ([#787](https://github.com/yargs/yargs/issues/787)) ([e0fbbe5](https://github.com/yargs/yargs/commit/e0fbbe5)) +* running parse() multiple times on the same yargs instance caused exception if help() enabled ([#790](https://github.com/yargs/yargs/issues/790)) ([07e39b7](https://github.com/yargs/yargs/commit/07e39b7)) +* use path.resolve() to support node 0.10 ([#797](https://github.com/yargs/yargs/issues/797)) ([49a93fc](https://github.com/yargs/yargs/commit/49a93fc)) + + +### Features + +* add conflicts and implies shorthands. ([#753](https://github.com/yargs/yargs/issues/753)) ([bd1472b](https://github.com/yargs/yargs/commit/bd1472b)) +* add traditional Chinese translation ([#780](https://github.com/yargs/yargs/issues/780)) ([6ab6a95](https://github.com/yargs/yargs/commit/6ab6a95)) +* allow provided config object to extend other configs ([#779](https://github.com/yargs/yargs/issues/779)) ([3280dd0](https://github.com/yargs/yargs/commit/3280dd0)) +* function argument validation ([#773](https://github.com/yargs/yargs/issues/773)) ([22ed9bb](https://github.com/yargs/yargs/commit/22ed9bb)) +* if only one column is provided for examples, allow it to take up the entire line ([#749](https://github.com/yargs/yargs/issues/749)) ([7931652](https://github.com/yargs/yargs/commit/7931652)) +* introduce custom yargs error object ([#765](https://github.com/yargs/yargs/issues/765)) ([8308efa](https://github.com/yargs/yargs/commit/8308efa)) +* introduces support for default commands, using the '*' identifier ([#785](https://github.com/yargs/yargs/issues/785)) ([d78a0f5](https://github.com/yargs/yargs/commit/d78a0f5)) +* rethink how options are inherited by commands ([#766](https://github.com/yargs/yargs/issues/766)) ([ab1fa4b](https://github.com/yargs/yargs/commit/ab1fa4b)) + + +### BREAKING CHANGES + +* `extends` key in config file is now used for extending other config files +* environment variables now take precedence over config files. +* context now takes precedence over argv and defaults +* the arguments passed to functions are now validated, there's a good chance this will throw exceptions for a few folks who are using the API in an unexpected way. +* by default options, and many of yargs' parsing helpers will now default to being applied globally; such that they are no-longer reset before being passed into commands. +* yargs will no longer aggressively suppress errors, allowing errors that are not generated internally to bubble. + + + + +# [6.6.0](https://github.com/yargs/yargs/compare/v6.5.0...v6.6.0) (2016-12-29) + + +### Bug Fixes + +* [object Object] was accidentally being populated on options object ([#736](https://github.com/yargs/yargs/issues/736)) ([f755e27](https://github.com/yargs/yargs/commit/f755e27)) +* do not use cwd when resolving package.json for yargs parsing config ([#726](https://github.com/yargs/yargs/issues/726)) ([9bdaab7](https://github.com/yargs/yargs/commit/9bdaab7)) + + +### Features + +* implement conflicts() for defining mutually exclusive arguments; thanks [@madcampos](https://github.com/madcampos)! ([#741](https://github.com/yargs/yargs/issues/741)) ([5883779](https://github.com/yargs/yargs/commit/5883779)) +* split demand() into demandCommand()/demandOption() ([#740](https://github.com/yargs/yargs/issues/740)) ([66573c8](https://github.com/yargs/yargs/commit/66573c8)) +* support for positional argument aliases ([#727](https://github.com/yargs/yargs/issues/727)) ([27e1a57](https://github.com/yargs/yargs/commit/27e1a57)) + + + + +# [6.5.0](https://github.com/yargs/yargs/compare/v6.4.0...v6.5.0) (2016-12-01) + + +### Bug Fixes + +* still freeze/unfreeze if parse() is called in isolation ([#717](https://github.com/yargs/yargs/issues/717)) ([30a9492](https://github.com/yargs/yargs/commit/30a9492)) + + +### Features + +* pull in yargs-parser introducing additional settings ([#688](https://github.com/yargs/yargs/issues/688)), and fixing [#716](https://github.com/yargs/yargs/issues/716) ([#722](https://github.com/yargs/yargs/issues/722)) ([702995a](https://github.com/yargs/yargs/commit/702995a)) + + + + +# [6.4.0](https://github.com/yargs/yargs/compare/v6.3.0...v6.4.0) (2016-11-13) + + +### Bug Fixes + +* **locales:** correct some Russian translations ([#691](https://github.com/yargs/yargs/issues/691)) ([a980671](https://github.com/yargs/yargs/commit/a980671)) + + +### Features + +* **locales:** Added Belarusian translation ([#690](https://github.com/yargs/yargs/issues/690)) ([68dac1f](https://github.com/yargs/yargs/commit/68dac1f)) +* **locales:** Create nl.json ([#687](https://github.com/yargs/yargs/issues/687)) ([46ce1bb](https://github.com/yargs/yargs/commit/46ce1bb)) +* update to yargs-parser that addresses [#598](https://github.com/yargs/yargs/issues/598), [#617](https://github.com/yargs/yargs/issues/617) ([#700](https://github.com/yargs/yargs/issues/700)) ([54cb31d](https://github.com/yargs/yargs/commit/54cb31d)) +* yargs is now passed as the third-argument to fail handler ([#613](https://github.com/yargs/yargs/issues/613)) ([21b74f9](https://github.com/yargs/yargs/commit/21b74f9)) + + +### Performance Improvements + +* normalizing package data is an expensive operation ([#705](https://github.com/yargs/yargs/issues/705)) ([49cf533](https://github.com/yargs/yargs/commit/49cf533)) + + + + +# [6.3.0](https://github.com/yargs/yargs/compare/v6.2.0...v6.3.0) (2016-10-19) + + +### Bug Fixes + +* **command:** subcommands via commandDir() now supported for parse(msg, cb) ([#678](https://github.com/yargs/yargs/issues/678)) ([6b85cc6](https://github.com/yargs/yargs/commit/6b85cc6)) + + +### Features + +* **locales:** Add Thai locale file ([#679](https://github.com/yargs/yargs/issues/679)) ([c05e36b](https://github.com/yargs/yargs/commit/c05e36b)) + + + + +# [6.2.0](https://github.com/yargs/yargs/compare/v6.1.1...v6.2.0) (2016-10-16) + + +### Bug Fixes + +* stop applying parser to context object ([#675](https://github.com/yargs/yargs/issues/675)) ([3fe9b8f](https://github.com/yargs/yargs/commit/3fe9b8f)) + + +### Features + +* add new pt_BR translations ([#674](https://github.com/yargs/yargs/issues/674)) ([5615a82](https://github.com/yargs/yargs/commit/5615a82)) +* Italian translations for 'did you mean' and 'aliases' ([#673](https://github.com/yargs/yargs/issues/673)) ([81984e6](https://github.com/yargs/yargs/commit/81984e6)) + + + + +## [6.1.1](https://github.com/yargs/yargs/compare/v6.1.0...v6.1.1) (2016-10-15) + + +### Bug Fixes + +* freeze was not resetting configObjects to initial state; addressed performance issue raised by [@nexdrew](https://github.com/nexdrew). ([#670](https://github.com/yargs/yargs/issues/670)) ([ae4bcd4](https://github.com/yargs/yargs/commit/ae4bcd4)) + + + + +# [6.1.0](https://github.com/yargs/yargs/compare/v6.0.0...v6.1.0) (2016-10-15) + + +### Bug Fixes + +* **locales:** change some translations ([#667](https://github.com/yargs/yargs/issues/667)) ([aa966c5](https://github.com/yargs/yargs/commit/aa966c5)) +* **locales:** conform hi locale to y18n.__n expectations ([#666](https://github.com/yargs/yargs/issues/666)) ([22adb18](https://github.com/yargs/yargs/commit/22adb18)) + + +### Features + +* initial support for command aliases ([#647](https://github.com/yargs/yargs/issues/647)) ([127a040](https://github.com/yargs/yargs/commit/127a040)) +* **command:** add camelcase commands to argv ([#658](https://github.com/yargs/yargs/issues/658)) ([b1cabae](https://github.com/yargs/yargs/commit/b1cabae)) +* **locales:** add Hindi translations ([9290912](https://github.com/yargs/yargs/commit/9290912)) +* **locales:** add Hungarian translations ([be92327](https://github.com/yargs/yargs/commit/be92327)) +* **locales:** Japanese translations for 'did you mean' and 'aliases' ([#651](https://github.com/yargs/yargs/issues/651)) ([5eb78fc](https://github.com/yargs/yargs/commit/5eb78fc)) +* **locales:** Polish translations for 'did you mean' and 'aliases' ([#650](https://github.com/yargs/yargs/issues/650)) ([c951c0e](https://github.com/yargs/yargs/commit/c951c0e)) +* reworking yargs API to make it easier to run in headless environments, e.g., Slack ([#646](https://github.com/yargs/yargs/issues/646)) ([f284c29](https://github.com/yargs/yargs/commit/f284c29)) +* Turkish translations for 'did you mean' and 'aliases' ([#660](https://github.com/yargs/yargs/issues/660)) ([072fd45](https://github.com/yargs/yargs/commit/072fd45)) + + + + +# [6.0.0](https://github.com/yargs/yargs/compare/v5.0.0...v6.0.0) (2016-09-30) + + +### Bug Fixes + +* changed parsing of the command string to ignore extra spaces ([#600](https://github.com/yargs/yargs/issues/600)) ([e8e5a72](https://github.com/yargs/yargs/commit/e8e5a72)) +* drop lodash.assign ([#641](https://github.com/yargs/yargs/issues/641)) ([ad3146f](https://github.com/yargs/yargs/commit/ad3146f)) +* for args that have skipValidation set to `true`, check if the parsed arg is `true` ([#619](https://github.com/yargs/yargs/issues/619)) ([658a34c](https://github.com/yargs/yargs/commit/658a34c)) +* upgrade standard, and fix appveyor config so that it works with newest standard ([#607](https://github.com/yargs/yargs/issues/607)) ([c301f42](https://github.com/yargs/yargs/commit/c301f42)) + + +### Chores + +* upgrade yargs-parser ([#633](https://github.com/yargs/yargs/issues/633)) ([cc1224e](https://github.com/yargs/yargs/commit/cc1224e)) + + +### Features + +* make opts object optional for .option() ([#624](https://github.com/yargs/yargs/issues/624)) ([4f29de6](https://github.com/yargs/yargs/commit/4f29de6)) + + +### Performance Improvements + +* defer windowWidth() to improve perf for non-help usage ([#610](https://github.com/yargs/yargs/issues/610)) ([cbc3636](https://github.com/yargs/yargs/commit/cbc3636)) + + +### BREAKING CHANGES + +* coerce is now applied as a final step after other parsing is complete + + + + +# [5.0.0](https://github.com/yargs/yargs/compare/v4.8.1...v5.0.0) (2016-08-14) + + +### Bug Fixes + +* **default:** Remove undocumented alias of default() ([#469](https://github.com/yargs/yargs/issues/469)) ([b8591b2](https://github.com/yargs/yargs/commit/b8591b2)) +* remove deprecated zh.json ([#578](https://github.com/yargs/yargs/issues/578)) ([317c62c](https://github.com/yargs/yargs/commit/317c62c)) + + +### Features + +* .help() API can now enable implicit help command ([#574](https://github.com/yargs/yargs/issues/574)) ([7645019](https://github.com/yargs/yargs/commit/7645019)) +* **command:** builder function no longer needs to return the yargs instance ([#549](https://github.com/yargs/yargs/issues/549)) ([eaa2873](https://github.com/yargs/yargs/commit/eaa2873)) +* add coerce api ([#586](https://github.com/yargs/yargs/issues/586)) ([1d53ccb](https://github.com/yargs/yargs/commit/1d53ccb)) +* adds recommendCommands() for command suggestions ([#580](https://github.com/yargs/yargs/issues/580)) ([59474dc](https://github.com/yargs/yargs/commit/59474dc)) +* apply .env() globally ([#553](https://github.com/yargs/yargs/issues/553)) ([be65728](https://github.com/yargs/yargs/commit/be65728)) +* apply default builder to command() and apply fail() handlers globally ([#583](https://github.com/yargs/yargs/issues/583)) ([0aaa68b](https://github.com/yargs/yargs/commit/0aaa68b)) +* update yargs-parser to version 3.1.0 ([#581](https://github.com/yargs/yargs/issues/581)) ([882a127](https://github.com/yargs/yargs/commit/882a127)) + + +### Performance Improvements + +* defer requiring most external libs until needed ([#584](https://github.com/yargs/yargs/issues/584)) ([f9b0ed4](https://github.com/yargs/yargs/commit/f9b0ed4)) + + +### BREAKING CHANGES + +* fail is now applied globally. +* we now default to an empty builder function when command is executed with no builder. +* yargs-parser now better handles negative integer values, at the cost of handling numeric option names, e.g., -1 hello +* default: removed undocumented `defaults` alias for `default`. +* introduces a default `help` command which outputs help, as an alternative to a help flag. +* interpret demand() numbers as relative to executing command ([#582](https://github.com/yargs/yargs/issues/582)) ([927810c](https://github.com/yargs/yargs/commit/927810c)) + + + + +## [4.8.1](https://github.com/yargs/yargs/compare/v4.8.0...v4.8.1) (2016-07-16) + + +### Bug Fixes + +* **commandDir:** make dir relative to caller instead of require.main.filename ([#548](https://github.com/yargs/yargs/issues/548)) ([3c2e479](https://github.com/yargs/yargs/commit/3c2e479)) +* add config lookup for .implies() ([#556](https://github.com/yargs/yargs/issues/556)) ([8d7585c](https://github.com/yargs/yargs/commit/8d7585c)) +* cache pkg lookups by path to avoid returning the wrong one ([#552](https://github.com/yargs/yargs/issues/552)) ([fea7e0b](https://github.com/yargs/yargs/commit/fea7e0b)) +* positional arguments were not being handled appropriately by parse() ([#559](https://github.com/yargs/yargs/issues/559)) ([063a866](https://github.com/yargs/yargs/commit/063a866)) +* pull in [@nexdrew](https://github.com/nexdrew)'s fixes to yargs-parser ([#560](https://github.com/yargs/yargs/issues/560)) ([c77c080](https://github.com/yargs/yargs/commit/c77c080)), closes [#560](https://github.com/yargs/yargs/issues/560) + + + + +# [4.8.0](https://github.com/yargs/yargs/compare/v4.7.1...v4.8.0) (2016-07-09) + + +### Bug Fixes + +* drop unused camelcase dependency fixes [#516](https://github.com/yargs/yargs/issues/516) ([#525](https://github.com/yargs/yargs/issues/525)) ([365fb9a](https://github.com/yargs/yargs/commit/365fb9a)), closes [#516](https://github.com/yargs/yargs/issues/516) [#525](https://github.com/yargs/yargs/issues/525) +* fake a tty in tests, so that we can use the new set-blocking ([#512](https://github.com/yargs/yargs/issues/512)) ([a54c742](https://github.com/yargs/yargs/commit/a54c742)) +* ignore invalid package.json during read-pkg-up ([#546](https://github.com/yargs/yargs/issues/546)) ([e058c87](https://github.com/yargs/yargs/commit/e058c87)) +* keep both zh and zh_CN until yargs[@5](https://github.com/5).x ([0f8faa7](https://github.com/yargs/yargs/commit/0f8faa7)) +* lazy-load package.json and cache. get rid of pkg-conf dependency. ([#544](https://github.com/yargs/yargs/issues/544)) ([2609b2e](https://github.com/yargs/yargs/commit/2609b2e)) +* we now respect the order of _ when applying commands ([#537](https://github.com/yargs/yargs/issues/537)) ([ed86b78](https://github.com/yargs/yargs/commit/ed86b78)) + + +### Features + +* add .commandDir(dir) to API to apply all command modules from a relative directory ([#494](https://github.com/yargs/yargs/issues/494)) ([b299dff](https://github.com/yargs/yargs/commit/b299dff)) +* **command:** derive missing command string from module filename ([#527](https://github.com/yargs/yargs/issues/527)) ([20d4b8a](https://github.com/yargs/yargs/commit/20d4b8a)) +* builder is now optional for a command module ([#545](https://github.com/yargs/yargs/issues/545)) ([8d6ad6e](https://github.com/yargs/yargs/commit/8d6ad6e)) + + + + +## [4.7.1](https://github.com/yargs/yargs/compare/v4.7.0...v4.7.1) (2016-05-15) + + +### Bug Fixes + +* switch to using `const` rather than `var` ([#499](https://github.com/yargs/yargs/pull/499)) +* make stdout flush on newer versions of Node.js ([#501](https://github.com/yargs/yargs/issues/501)) ([9f8c6f4](https://github.com/yargs/yargs/commit/9f8c6f4)) + + + + +# [4.7.0](https://github.com/yargs/yargs/compare/v4.6.0...v4.7.0) (2016-05-02) + + +### Bug Fixes + +* **pkgConf:** fix aliases issues in .pkgConf() ([#478](https://github.com/yargs/yargs/issues/478))([b900502](https://github.com/yargs/yargs/commit/b900502)) + + +### Features + +* **completion:** allow to get completions for any string, not just process.argv ([#470](https://github.com/yargs/yargs/issues/470))([74fcfbc](https://github.com/yargs/yargs/commit/74fcfbc)) +* **configuration:** Allow to directly pass a configuration object to .config() ([#480](https://github.com/yargs/yargs/issues/480))([e0a7e05](https://github.com/yargs/yargs/commit/e0a7e05)) +* **validation:** Add .skipValidation() method ([#471](https://github.com/yargs/yargs/issues/471))([d72badb](https://github.com/yargs/yargs/commit/d72badb)) + + + + +# [4.6.0](https://github.com/yargs/yargs/compare/v4.5.0...v4.6.0) (2016-04-11) + + +### Bug Fixes + +* **my brand!:** I agree with [@osher](https://github.com/osher) lightweight isn't a huge selling point of ours any longer, see [#468](https://github.com/yargs/yargs/issues/468) ([c46d7e1](https://github.com/yargs/yargs/commit/c46d7e1)) + +### Features + +* switch to standard-version for release management ([f70f801](https://github.com/yargs/yargs/commit/f70f801)) +* upgrade to version of yargs-parser that introduces some slick new features, great work [@elas7](https://github.com/elas7). update cliui, replace win-spawn, replace badge. ([#475](https://github.com/yargs/yargs/issues/475)) ([f915dd4](https://github.com/yargs/yargs/commit/f915dd4)) + + + + +# [4.5.0](https://github.com/yargs/yargs/compare/v4.4.0...v4.5.0) (2016-04-05) + + +### Bug Fixes + +* **windows:** handle $0 better on Windows platforms ([eb6e03f](https://github.com/yargs/yargs/commit/eb6e03f)) + +### Features + +* **commands:** implemented variadic positional arguments ([51d926e](https://github.com/yargs/yargs/commit/51d926e)) +* **completion:** completion now better handles aliases, and avoids duplicating keys. ([86416c8](https://github.com/yargs/yargs/commit/86416c8)) +* **config:** If invoking .config() without parameters, set a default option ([0413dd1](https://github.com/yargs/yargs/commit/0413dd1)) +* **conventional-changelog:** switching to using conventional-changelog for generating the changelog ([a2b5a2a](https://github.com/yargs/yargs/commit/a2b5a2a)) + + + +### v4.4.0 (2016/04/03 21:10 +07:00) + +- [#454](https://github.com/yargs/yargs/pull/454) fix demand() when second argument is an array (@elas7) +- [#452](https://github.com/yargs/yargs/pull/452) fix code example for `.help()` docs (@maxrimue) +- [#450](https://github.com/yargs/yargs/pull/450) fix for bash completion trailing space edge-case (@elas7) +- [#448](https://github.com/yargs/yargs/pull/448) allow a method to be passed to `showHelp`, rather than a log-level (@osher) +- [#446](https://github.com/yargs/yargs/pull/446) update yargs-parser, y18n, nyc, cliui, pkg-conf (@bcoe) +- [#436](https://github.com/yargs/yargs/pull/436) the rebase method is only used by tests, do not export it in two places (@elas7) +- [#428](https://github.com/yargs/yargs/pull/428) initial support for subcommands (@nexdrew) + +### v4.3.2 (2016/3/20 15:07 +07:00) + +- [#445](https://github.com/yargs/yargs/pull/445) strict mode was failing if no commands were registered (@nexdrew) +- [#443](https://github.com/yargs/yargs/pull/443) adds Italian translation \o/ (@madrisan) +- [#441](https://github.com/yargs/yargs/pull/441) remove duplicate keys from array options configuration (@elas7) +- [#437](https://github.com/yargs/yargs/pull/437) standardize tests for .command() (@lrlna) + +### v4.3.0 (2016/3/12 14:19 +07:00) + +- [#432](https://github.com/yargs/yargs/pull/432) non-singleton version of yargs (@bcoe) +- [#422, #425, #420] translations for number (@zkat, @rilut, @maxrimue, @watilde) +- [#414](https://github.com/yargs/yargs/pull/414) all command options can be defined in module now (@nexdrew) + +### v4.2.0 (2016/2/22 11:02 +07:00) + +- [#395](https://github.com/yargs/yargs/pull/395) do not reset groups if they contain + global keys (@novemberborn) +- [#393](https://github.com/yargs/yargs/pull/393) use sane default for usage strings (@nexdrew) +- [#392](https://github.com/yargs/yargs/pull/392) resetting wrap() was causing layout issues + with commands (@nexdrew) +- [#391](https://github.com/yargs/yargs/pull/391) commands were being added multiple times (@nexdrew) + +### v4.0.0 (2016/2/14 1:27 +07:00) + +- [#384](https://github.com/bcoe/yargs/pull/384) add new number type to yargs (@lrlna, @maxrimue) +- [#382](https://github.com/bcoe/yargs/pull/382) pass error as extra parameter to fail (@gajus) +- [#378](https://github.com/bcoe/yargs/pull/378) introduces the pkgConf feature, which tells + yargs to load default argument values from a key on a project's package.json (@bcoe) +- [#376](https://github.com/bcoe/yargs/pull/376) **breaking change**, make help() method signature + more consistent with other commands (@maxrimue) +- [#368](https://github.com/bcoe/yargs/pull/368) **breaking change**, overhaul to command handling API: + introducing named positional arguments, commands as modules, introduces the concept of global options (options that don't reset). (@nexdrew, @bcoe). +- [#364](https://github.com/bcoe/yargs/pull/364) add the slick new yargs website to the package.json (@iarna). +- [#357](https://github.com/bcoe/yargs/pull/357) .strict() now requires that a valid command is provided (@lrlna) +- [#356](https://github.com/bcoe/yargs/pull/356) pull the parsing bits of yargs into the separate module yargs-parser. Various parsing options can now be turned on and off using configuration (@bcoe). +- [#330](https://github.com/bcoe/yargs/pull/330) **breaking change**, fix inconsistencies with `.version()` API. (@maxrimue). + +### v3.32.0 (2016/1/14 10:13 +07:00) + +- [#344](https://github.com/bcoe/yargs/pull/344) yargs now has a code of conduct and contributor guidelines (@bcoe) +- [#341](https://github.com/bcoe/yargs/issues/341) Fix edge-case with camel-case arguments (@davibe) +- [#331](https://github.com/bcoe/yargs/pull/331) Handle parsing a raw argument string (@kellyselden) +- [#325](https://github.com/bcoe/yargs/pull/325) Tweaks to make tests pass again on Windows (@isaacs) +- [#321](https://github.com/bcoe/yargs/pull/321) Custom config parsing function (@bcoe) + +### v3.31.0 (2015/12/03 10:15 +07:00) + +- [#239](https://github.com/bcoe/yargs/pull/239) Pass argv to commands (@bcoe) +- [#308](https://github.com/bcoe/yargs/pull/308) Yargs now handles environment variables (@nexdrew) +- [#302](https://github.com/bcoe/yargs/pull/302) Add Indonesian translation (@rilut) +- [#300](https://github.com/bcoe/yargs/pull/300) Add Turkish translation (@feyzo) +- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian Bokmål translation (@sindresorhus) +- [#297](https://github.com/bcoe/yargs/pull/297) Fix for layout of cjk characters (@disjukr) +- [#296](https://github.com/bcoe/yargs/pull/296) Add Korean translation (@disjukr) + +### v3.30.0 (2015/11/13 16:29 +07:00) + +- [#293](https://github.com/bcoe/yargs/pull/293) Polish language support (@kamilogorek) +- [#291](https://github.com/bcoe/yargs/pull/291) fix edge-cases with `.alias()` (@bcoe) +- [#289](https://github.com/bcoe/yargs/pull/289) group options in custom groups (@bcoe) + +### v3.29.0 (2015/10/16 21:51 +07:00) + +- [#282](https://github.com/bcoe/yargs/pull/282) completions now accept promises (@LinusU) +- [#281](https://github.com/bcoe/yargs/pull/281) fix parsing issues with dot notation (@bcoe) + +### v3.28.0 (2015/10/16 1:55 +07:00) + +- [#277](https://github.com/bcoe/yargs/pull/277) adds support for ansi escape codes (@bcoe) + +### v3.27.0 (2015/10/08 1:55 +00:00) + +- [#271](https://github.com/bcoe/yargs/pull/273) skips validation for help or version flags with exitProcess(false) (@tepez) +- [#273](https://github.com/bcoe/yargs/pull/273) implements single output for errors with exitProcess(false) (@nexdrew) +- [#269](https://github.com/bcoe/yargs/pull/269) verifies single output for errors with exitProcess(false) (@tepez) +- [#268](https://github.com/bcoe/yargs/pull/268) adds Chinese translation (@qiu8310) +- [#266](https://github.com/bcoe/yargs/pull/266) adds case for -- after -- in parser test (@geophree) + +### v3.26.0 (2015/09/25 2:14 +00:00) + +- [#263](https://github.com/bcoe/yargs/pull/263) document count() and option() object keys (@nexdrew) +- [#259](https://github.com/bcoe/yargs/pull/259) remove util in readme (@38elements) +- [#258](https://github.com/bcoe/yargs/pull/258) node v4 builds, update deps (@nexdrew) +- [#257](https://github.com/bcoe/yargs/pull/257) fix spelling errors (@dkoleary88) + +### v3.25.0 (2015/09/13 7:38 -07:00) + +- [#254](https://github.com/bcoe/yargs/pull/254) adds Japanese translation (@oti) +- [#253](https://github.com/bcoe/yargs/pull/253) fixes for tests on Windows (@bcoe) + +### v3.24.0 (2015/09/04 12:02 +00:00) + +- [#248](https://github.com/bcoe/yargs/pull/248) reinstate os-locale, no spawning (@nexdrew) +- [#249](https://github.com/bcoe/yargs/pull/249) use travis container-based infrastructure (@nexdrew) +- [#247](https://github.com/bcoe/yargs/pull/247) upgrade standard (@nexdrew) + +### v3.23.0 (2015/08/30 23:00 +00:00) + +- [#246](https://github.com/bcoe/yargs/pull/246) detect locale based only on environment variables (@bcoe) +- [#244](https://github.com/bcoe/yargs/pull/244) adds Windows CI testing (@bcoe) +- [#245](https://github.com/bcoe/yargs/pull/245) adds OSX CI testing (@bcoe, @nexdrew) + +### v3.22.0 (2015/08/28 22:26 +00:00) +- [#242](https://github.com/bcoe/yargs/pull/242) adds detectLocale config option (@bcoe) + +### v3.21.1 (2015/08/28 20:58 +00:00) +- [#240](https://github.com/bcoe/yargs/pull/240) hot-fix for Atom on Windows (@bcoe) + +### v3.21.0 (2015/08/21 21:20 +00:00) +- [#238](https://github.com/bcoe/yargs/pull/238) upgrade camelcase, window-size, chai, mocha (@nexdrew) +- [#237](https://github.com/bcoe/yargs/pull/237) adds defaultDescription to option() (@nexdrew) + +### v3.20.0 (2015/08/20 01:29 +00:00) +- [#231](https://github.com/bcoe/yargs/pull/231) Merge pull request #231 from bcoe/detect-locale (@sindresorhus) +- [#235](https://github.com/bcoe/yargs/pull/235) adds german translation to yargs (@maxrimue) + +### v3.19.0 (2015/08/14 05:12 +00:00) +- [#224](https://github.com/bcoe/yargs/pull/224) added Portuguese translation (@codemonkey3045) + +### v3.18.1 (2015/08/12 05:53 +00:00) + +- [#228](https://github.com/bcoe/yargs/pull/228) notes about embedding yargs in Electron (@etiktin) +- [#223](https://github.com/bcoe/yargs/pull/223) make booleans work in config files (@sgentle) + +### v3.18.0 (2015/08/06 20:05 +00:00) +- [#222](https://github.com/bcoe/yargs/pull/222) updates fr locale (@nexdrew) +- [#221](https://github.com/bcoe/yargs/pull/221) adds missing locale strings (@nexdrew) +- [#220](https://github.com/bcoe/yargs/pull/220) adds es locale (@zkat) + +### v3.17.1 (2015/08/02 19:35 +00:00) +- [#218](https://github.com/bcoe/yargs/pull/218) upgrades nyc (@bcoe) + +### v3.17.0 (2015/08/02 18:39 +00:00) +- [#217](https://github.com/bcoe/yargs/pull/217) sort methods in README.md (@nexdrew) +- [#215](https://github.com/bcoe/yargs/pull/215) adds fr locale (@LoicMahieu) + +### v3.16.0 (2015/07/30 04:35 +00:00) +- [#210](https://github.com/bcoe/yargs/pull/210) adds i18n support to yargs (@bcoe) +- [#209](https://github.com/bcoe/yargs/pull/209) adds choices type to yargs (@nexdrew) +- [#207](https://github.com/bcoe/yargs/pull/207) pretty new shields from shields.io (@SimenB) +- [#208](https://github.com/bcoe/yargs/pull/208) improvements to README.md (@nexdrew) +- [#205](https://github.com/bcoe/yargs/pull/205) faster build times on Travis (@ChristianMurphy) + +### v3.15.0 (2015/07/06 06:01 +00:00) +- [#197](https://github.com/bcoe/yargs/pull/197) tweaks to how errors bubble up from parser.js (@bcoe) +- [#193](https://github.com/bcoe/yargs/pull/193) upgraded nyc, reporting now happens by default (@bcoe) + +### v3.14.0 (2015/06/28 02:12 +00:00) + +- [#192](https://github.com/bcoe/yargs/pull/192) standard style nits (@bcoe) +- [#190](https://github.com/bcoe/yargs/pull/190) allow for hidden commands, e.g., + .completion('completion', false) (@tschaub) + +### v3.13.0 (2015/06/24 04:12 +00:00) + +- [#187](https://github.com/bcoe/yargs/pull/187) completion now behaves differently + if it is being run in the context of a command (@tschaub) +- [#186](https://github.com/bcoe/yargs/pull/186) if no matches are found for a completion + default to filename completion (@tschaub) + +### v3.12.0 (2015/06/19 03:23 +00:00) +- [#183](https://github.com/bcoe/yargs/pull/183) don't complete commands if they've already been completed (@tschaub) +- [#181](https://github.com/bcoe/yargs/pull/181) various fixes for completion. (@bcoe, @tschaub) +- [#182](https://github.com/bcoe/yargs/pull/182) you can now set a maximum # of of required arguments (@bcoe) + +### v3.11.0 (2015/06/15 05:15 +00:00) + +- [#173](https://github.com/bcoe/yargs/pull/173) update standard, window-size, chai (@bcoe) +- [#171](https://github.com/bcoe/yargs/pull/171) a description can now be set + when providing a config option. (@5c077yP) + +### v3.10.0 (2015/05/29 04:25 +00:00) + +- [#165](https://github.com/bcoe/yargs/pull/165) expose yargs.terminalWidth() thanks @ensonic (@bcoe) +- [#164](https://github.com/bcoe/yargs/pull/164) better array handling thanks @getify (@bcoe) + +### v3.9.1 (2015/05/20 05:14 +00:00) +- [b6662b6](https://github.com/bcoe/yargs/commit/b6662b6774cfeab4876f41ec5e2f67b7698f4e2f) clarify .config() docs (@linclark) +- [0291360](https://github.com/bcoe/yargs/commit/02913606285ce31ce81d7f12c48d8a3029776ec7) fixed tests, switched to nyc for coverage, fixed security issue, added Lin as collaborator (@bcoe) + +### v3.9.0 (2015/05/10 18:32 +00:00) +- [#157](https://github.com/bcoe/yargs/pull/157) Merge pull request #157 from bcoe/command-yargs. allows handling of command specific arguments. Thanks for the suggestion @ohjames (@bcoe) +- [#158](https://github.com/bcoe/yargs/pull/158) Merge pull request #158 from kemitchell/spdx-license. Update license format (@kemitchell) + +### v3.8.0 (2015/04/24 23:10 +00:00) +- [#154](https://github.com/bcoe/yargs/pull/154) showHelp's method signature was misleading fixes #153 (@bcoe) +- [#151](https://github.com/bcoe/yargs/pull/151) refactor yargs' table layout logic to use new helper library (@bcoe) +- [#150](https://github.com/bcoe/yargs/pull/150) Fix README example in argument requirements (@annonymouse) + +### v3.7.2 (2015/04/13 11:52 -07:00) + +* [679fbbf](https://github.com/bcoe/yargs/commit/679fbbf55904030ccee8a2635e8e5f46551ab2f0) updated yargs to use the [standard](https://github.com/feross/standard) style guide (agokjr) +* [22382ee](https://github.com/bcoe/yargs/commit/22382ee9f5b495bc2586c1758cd1091cec3647f9 various bug fixes for $0 (@nylen) + +### v3.7.1 (2015/04/10 11:06 -07:00) + +* [89e1992](https://github.com/bcoe/yargs/commit/89e1992a004ba73609b5f9ee6890c4060857aba4) detect iojs bin along with node bin. (@bcoe) +* [755509e](https://github.com/bcoe/yargs/commit/755509ea90041e5f7833bba3b8c5deffe56f0aab) improvements to example documentation in README.md (@rstacruz) +* [0d2dfc8](https://github.com/bcoe/yargs/commit/0d2dfc822a43418242908ad97ddd5291a1b35dc6) showHelp() no longer requires that .argv has been called (@bcoe) + +### v3.7.0 (2015/04/04 02:29 -07:00) + +* [56cbe2d](https://github.com/bcoe/yargs/commit/56cbe2ddd33dc176dcbf97ba40559864a9f114e4) make .requiresArg() work with type hints. (@bcoe). +* [2f5d562](https://github.com/bcoe/yargs/commit/2f5d5624f736741deeedf6a664d57bc4d857bdd0) serialize arrays and objects in usage strings. (@bcoe). +* [5126304](https://github.com/bcoe/yargs/commit/5126304dd18351fc28f10530616fdd9361e0af98) be more lenient about alias/primary key ordering in chaining API. (@bcoe) + +### v3.6.0 (2015/03/21 01:00 +00:00) +- [4e24e22](https://github.com/bcoe/yargs/commit/4e24e22e6a195e55ab943ede704a0231ac33b99c) support for .js configuration files. (@pirxpilot) + +### v3.5.4 (2015/03/12 05:56 +00:00) +- [c16cc08](https://github.com/bcoe/yargs/commit/c16cc085501155cf7fd853ccdf8584b05ab92b78) message for non-option arguments is now optional, thanks to (@raine) + +### v3.5.3 (2015/03/09 06:14 +00:00) +- [870b428](https://github.com/bcoe/yargs/commit/870b428cf515d560926ca392555b7ad57dba9e3d) completion script was missing in package.json (@bcoe) + +### v3.5.2 (2015/03/09 06:11 +00:00) +- [58a4b24](https://github.com/bcoe/yargs/commit/58a4b2473ebbb326713d522be53e32d3aabb08d2) parse was being called multiple times, resulting in strange behavior (@bcoe) + +### v3.5.1 (2015/03/09 04:55 +00:00) +- [4e588e0](https://github.com/bcoe/yargs/commit/4e588e055afbeb9336533095f051496e3977f515) accidentally left testing logic in (@bcoe) + +### v3.5.0 (2015/03/09 04:49 +00:00) +- [718bacd](https://github.com/bcoe/yargs/commit/718bacd81b9b44f786af76b2afe491fe06274f19) added support for bash completions see #4 (@bcoe) +- [a192882](https://github.com/bcoe/yargs/commit/a19288270fc431396c42af01125eeb4443664528) downgrade to mocha 2.1.0 until https://github.com/mochajs/mocha/issues/1585 can be sorted out (@bcoe) + +### v3.4.7 (2015/03/09 04:09 +00:00) +- [9845e5c](https://github.com/bcoe/yargs/commit/9845e5c1a9c684ba0be3f0bfb40e7b62ab49d9c8) the Argv singleton was not being updated when manually parsing arguments, fixes #114 (@bcoe) + +### v3.4.6 (2015/03/09 04:01 +00:00) +- [45b4c80](https://github.com/bcoe/yargs/commit/45b4c80b890d02770b0a94f326695a8a566e8fe9) set placeholders for all keys fixes #115 (@bcoe) + +### v3.4.5 (2015/03/01 20:31 +00:00) +- [a758e0b](https://github.com/bcoe/yargs/commit/a758e0b2556184f067cf3d9c4ef886d39817ebd2) fix for count consuming too many arguments (@bcoe) + +### v3.4.4 (2015/02/28 04:52 +00:00) +- [0476af7](https://github.com/bcoe/yargs/commit/0476af757966acf980d998b45108221d4888cfcb) added nargs feature, allowing you to specify the number of arguments after an option (@bcoe) +- [092477d](https://github.com/bcoe/yargs/commit/092477d7ab3efbf0ba11cede57f7d8cfc70b024f) updated README with full example of v3.0 API (@bcoe) + +### v3.3.3 (2015/02/28 04:23 +00:00) +- [0c4b769](https://github.com/bcoe/yargs/commit/0c4b769516cd8d93a7c4e5e675628ae0049aa9a8) remove string dependency, which conflicted with other libraries see #106 (@bcoe) + +### v3.3.2 (2015/02/28 04:11 +00:00) +- [2a98906](https://github.com/bcoe/yargs/commit/2a9890675821c0e7a12f146ce008b0562cb8ec9a) add $0 to epilog (@schnittstabil) + +### v3.3.1 (2015/02/24 03:28 +00:00) +- [ad485ce](https://github.com/bcoe/yargs/commit/ad485ce748ebdfce25b88ef9d6e83d97a2f68987) fix for applying defaults to camel-case args (@bcoe) + +### v3.3.0 (2015/02/24 00:49 +00:00) +- [8bfe36d](https://github.com/bcoe/yargs/commit/8bfe36d7fb0f93a799ea3f4c756a7467c320f8c0) fix and document restart() command, as a tool for building nested CLIs (@bcoe) + +### v3.2.1 (2015/02/22 05:45 +00:00) +- [49a6d18](https://github.com/bcoe/yargs/commit/49a6d1822a4ef9b1ea6f90cc366be60912628885) you can now provide a function that generates a default value (@bcoe) + +### v3.2.0 (2015/02/22 05:24 +00:00) +- [7a55886](https://github.com/bcoe/yargs/commit/7a55886c9343cf71a20744ca5cdd56d2ea7412d5) improvements to yargs two-column text layout (@bcoe) +- [b6ab513](https://github.com/bcoe/yargs/commit/b6ab5136a4c3fa6aa496f6b6360382e403183989) Tweak NPM version badge (@nylen) + +### v3.1.0 (2015/02/19 19:37 +00:00) +- [9bd2379](https://github.com/bcoe/yargs/commit/9bd237921cf1b61fd9f32c0e6d23f572fc225861) version now accepts a function, making it easy to load version #s from a package.json (@bcoe) + +### v3.0.4 (2015/02/14 01:40 +00:00) +- [0b7c19b](https://github.com/bcoe/yargs/commit/0b7c19beaecb747267ca4cc10e5cb2a8550bc4b7) various fixes for dot-notation handling (@bcoe) + +### v3.0.3 (2015/02/14 00:59 +00:00) +- [c3f35e9](https://github.com/bcoe/yargs/commit/c3f35e99bd5a0d278073fcadd95e2d778616cc17) make sure dot-notation is applied to aliases (@bcoe) + +### 3.0.2 (2015/02/13 16:50 +00:00) +- [74c8967](https://github.com/bcoe/yargs/commit/74c8967c340c204a0a7edf8a702b6f46c2705435) document epilog shorthand of epilogue. (@bcoe) +- [670110f](https://github.com/bcoe/yargs/commit/670110fc01bedc4831b6fec6afac54517d5a71bc) any non-truthy value now causes check to fail see #76 (@bcoe) +- [0d8f791](https://github.com/bcoe/yargs/commit/0d8f791a33c11ced4cd431ea8d3d3a337d456b56) finished implementing my wish-list of fetures for yargs 3.0. see #88 (@bcoe) +- [5768447](https://github.com/bcoe/yargs/commit/5768447447c4c8e8304f178846206ce86540f063) fix coverage. (@bcoe) +- [82e793f](https://github.com/bcoe/yargs/commit/82e793f3f61c41259eaacb67f0796aea2cf2aaa0) detect console width and perform word-wrapping. (@bcoe) +- [67476b3](https://github.com/bcoe/yargs/commit/67476b37eea07fee55f23f35b9e0c7d76682b86d) refactor two-column table layout so that we can use it for examples and usage (@bcoe) +- [4724cdf](https://github.com/bcoe/yargs/commit/4724cdfcc8e37ae1ca3dcce9d762f476e9ef4bb4) major refactor of index.js, in prep for 3.x release. (@bcoe) + +### v2.3.0 (2015/02/08 20:41 +00:00) +- [d824620](https://github.com/bcoe/yargs/commit/d824620493df4e63664af1fe320764dd1a9244e6) allow for undefined boolean defaults (@ashi009) + +### v2.2.0 (2015/02/08 20:07 +00:00) +- [d6edd98](https://github.com/bcoe/yargs/commit/d6edd9848826e7389ed1393858c45d03961365fd) in-prep for further refactoring, and a 3.x release I've shuffled some things around and gotten test-coverage to 100%. (@bcoe) + +### v2.1.2 (2015/02/08 06:05 +00:00) +- [d640745](https://github.com/bcoe/yargs/commit/d640745a7b9f8d476e0223879d056d18d9c265c4) switch to path.relative (@bcoe) +- [3bfd41f](https://github.com/bcoe/yargs/commit/3bfd41ff262a041f29d828b88936a79c63cad594) remove mocha.opts. (@bcoe) +- [47a2f35](https://github.com/bcoe/yargs/commit/47a2f357091db70903a402d6765501c1d63f15fe) document using .string('_') for string ids. see #56 (@bcoe) +- [#57](https://github.com/bcoe/yargs/pull/57) Merge pull request #57 from eush77/option-readme (@eush77) + +### v2.1.1 (2015/02/06 08:08 +00:00) +- [01c6c61](https://github.com/bcoe/yargs/commit/01c6c61d67b4ebf88f41f0b32a345ec67f0ac17d) fix for #71, 'newAliases' of undefined (@bcoe) + +### v2.1.0 (2015/02/06 07:59 +00:00) +- [6a1a3fa](https://github.com/bcoe/yargs/commit/6a1a3fa731958e26ccd56885f183dd8985cc828f) try to guess argument types, and apply sensible defaults see #73 (@bcoe) + +### v2.0.1 (2015/02/06 07:54 +00:00) +- [96a06b2](https://github.com/bcoe/yargs/commit/96a06b2650ff1d085a52b7328d8bba614c20cc12) Fix for strange behavior with --sort option, see #51 (@bcoe) + +### v2.0.0 (2015/02/06 07:45 +00:00) +- [0250517](https://github.com/bcoe/yargs/commit/0250517c9643e53f431b824e8ccfa54937414011) - [108fb84](https://github.com/bcoe/yargs/commit/108fb8409a3a63dcaf99d917fe4dfcfaa1de236d) fixed bug with boolean parsing, when bools separated by = see #66 (@bcoe) +- [a465a59](https://github.com/bcoe/yargs/commit/a465a5915f912715738de890982e4f8395958b10) Add `files` field to the package.json (@shinnn) +- [31043de](https://github.com/bcoe/yargs/commit/31043de7a38a17c4c97711f1099f5fb164334db3) fix for yargs.argv having the same keys added multiple times see #63 (@bcoe) +- [2d68c5b](https://github.com/bcoe/yargs/commit/2d68c5b91c976431001c4863ce47c9297850f1ad) Disable process.exit calls using .exitProcess(false) (@cianclarke) +- [45da9ec](https://github.com/bcoe/yargs/commit/45da9ec4c55a7bd394721bc6a1db0dabad7bc52a) Mention .option in README (@eush77) + +### v1.3.2 (2014/10/06 21:56 +00:00) +- [b8d3472](https://github.com/bcoe/yargs/commit/b8d34725482e5821a3cc809c0df71378f282f526) 1.3.2 (@chevex) + +### list (2014/08/30 18:41 +00:00) +- [fbc777f](https://github.com/bcoe/yargs/commit/fbc777f416eeefd37c84e44d27d7dfc7c1925721) Now that yargs is the successor to optimist, I'm changing the README language to be more universal. Pirate speak isn't very accessible to non-native speakers. (@chevex) +- [a54d068](https://github.com/bcoe/yargs/commit/a54d0682ae2efc2394d407ab171cc8a8bbd135ea) version output will not print extra newline (@boneskull) +- [1cef5d6](https://github.com/bcoe/yargs/commit/1cef5d62a9d6d61a3948a49574892e01932cc6ae) Added contributors section to package.json (@chrisn) +- [cc295c0](https://github.com/bcoe/yargs/commit/cc295c0a80a2de267e0155b60d315fc4b6f7c709) Added 'require' and 'required' as synonyms for 'demand' (@chrisn) +- [d0bf951](https://github.com/bcoe/yargs/commit/d0bf951d949066b6280101ed606593d079ee15c8) Updating minimist. (@chevex) +- [c15f8e7](https://github.com/bcoe/yargs/commit/c15f8e7f245b261e542cf205ce4f4313630cbdb4) Fix #31 (bad interaction between camelCase options and strict mode) (@nylen) +- [d991b9b](https://github.com/bcoe/yargs/commit/d991b9be687a68812dee1e3b185ba64b7778b82d) Added .help() and .version() methods (@chrisn) +- [e8c8aa4](https://github.com/bcoe/yargs/commit/e8c8aa46268379357cb11e9fc34b8c403037724b) Added .showHelpOnFail() method (@chrisn) +- [e855af4](https://github.com/bcoe/yargs/commit/e855af4a933ea966b5bbdd3c4c6397a4bac1a053) Allow boolean flag with .demand() (@chrisn) +- [14dbec2](https://github.com/bcoe/yargs/commit/14dbec24fb7380683198e2b20c4deb8423e64bea) Fixes issue #22. Arguments are no longer printed to the console when using .config. (@chevex) +- [bef74fc](https://github.com/bcoe/yargs/commit/bef74fcddc1544598a804f80d0a3728459f196bf) Informing users that Yargs is the official optimist successor. (@chevex) +- [#24](https://github.com/bcoe/yargs/pull/24) Merge pull request #24 from chrisn/strict (@chrisn) +- [889a2b2](https://github.com/bcoe/yargs/commit/889a2b28eb9768801b05163360a470d0fd6c8b79) Added requiresArg option, for options that require values (@chrisn) +- [eb16369](https://github.com/bcoe/yargs/commit/eb163692262be1fe80b992fd8803d5923c5a9b18) Added .strict() method, to report error if unknown arguments are given (@chrisn) +- [0471c3f](https://github.com/bcoe/yargs/commit/0471c3fd999e1ad4e6cded88b8aa02013b66d14f) Changed optimist to yargs in usage-options.js example (@chrisn) +- [5c88f74](https://github.com/bcoe/yargs/commit/5c88f74e3cf031b17c54b4b6606c83e485ff520e) Change optimist to yargs in examples (@chrisn) +- [66f12c8](https://github.com/bcoe/yargs/commit/66f12c82ba3c943e4de8ca862980e835da8ecb3a) Fix a couple of bad interactions between aliases and defaults (@nylen) +- [8fa1d80](https://github.com/bcoe/yargs/commit/8fa1d80f14b03eb1f2898863a61f1d1615bceb50) Document second argument of usage(message, opts) (@Gobie) +- [56e6528](https://github.com/bcoe/yargs/commit/56e6528cf674ff70d63083fb044ff240f608448e) For "--some-option", also set argv.someOption (@nylen) +- [ed5f6d3](https://github.com/bcoe/yargs/commit/ed5f6d33f57ad1086b11c91b51100f7c6c7fa8ee) Finished porting unit tests to Mocha. (@chevex) + +### v1.0.15 (2014/02/05 23:18 +00:00) +- [e2b1fc0](https://github.com/bcoe/yargs/commit/e2b1fc0c4a59cf532ae9b01b275e1ef57eeb64d2) 1.0.15 update to badges (@chevex) + +### v1.0.14 (2014/02/05 23:17 +00:00) +- [f33bbb0](https://github.com/bcoe/yargs/commit/f33bbb0f00fe18960f849cc8e15a7428a4cd59b8) Revert "Fixed issue which caused .demand function not to work correctly." (@chevex) + +### v1.0.13 (2014/02/05 22:13 +00:00) +- [6509e5e](https://github.com/bcoe/yargs/commit/6509e5e7dee6ef1a1f60eea104be0faa1a045075) Fixed issue which caused .demand function not to work correctly. (@chevex) + +### v1.0.12 (2013/12/13 00:09 +00:00) +- [05eb267](https://github.com/bcoe/yargs/commit/05eb26741c9ce446b33ff006e5d33221f53eaceb) 1.0.12 (@chevex) + +### v1.0.11 (2013/12/13 00:07 +00:00) +- [c1bde46](https://github.com/bcoe/yargs/commit/c1bde46e37318a68b87d17a50c130c861d6ce4a9) 1.0.11 (@chevex) + +### v1.0.10 (2013/12/12 23:57 +00:00) +- [dfebf81](https://github.com/bcoe/yargs/commit/dfebf8164c25c650701528ee581ca483a99dc21c) Fixed formatting in README (@chevex) + +### v1.0.9 (2013/12/12 23:47 +00:00) +- [0b4e34a](https://github.com/bcoe/yargs/commit/0b4e34af5e6d84a9dbb3bb6d02cd87588031c182) Update README.md (@chevex) + +### v1.0.8 (2013/12/06 16:36 +00:00) +- [#1](https://github.com/bcoe/yargs/pull/1) fix error caused by check() see #1 (@martinheidegger) + +### v1.0.7 (2013/11/24 18:01 +00:00) +- [a247d88](https://github.com/bcoe/yargs/commit/a247d88d6e46644cbb7303c18b1bb678fc132d72) Modified Pirate Joe image. (@chevex) + +### v1.0.6 (2013/11/23 19:21 +00:00) +- [d7f69e1](https://github.com/bcoe/yargs/commit/d7f69e1d34bc929736a8bdccdc724583e21b7eab) Updated Pirate Joe image. (@chevex) + +### v1.0.5 (2013/11/23 19:09 +00:00) +- [ece809c](https://github.com/bcoe/yargs/commit/ece809cf317cc659175e1d66d87f3ca68c2760be) Updated readme notice again. (@chevex) + +### v1.0.4 (2013/11/23 19:05 +00:00) +- [9e81e81](https://github.com/bcoe/yargs/commit/9e81e81654028f83ba86ffc3ac772a0476084e5e) Updated README with a notice about yargs being a fork of optimist and what that implies. (@chevex) + +### v1.0.3 (2013/11/23 17:43 +00:00) +- [65e7a78](https://github.com/bcoe/yargs/commit/65e7a782c86764944d63d084416aba9ee6019c5f) Changed some small wording in README.md. (@chevex) +- [459e20e](https://github.com/bcoe/yargs/commit/459e20e539b366b85128dd281ccd42221e96c7da) Fix a bug in the options function, when string and boolean options weren't applied to aliases. (@shockone) + +### v1.0.2 (2013/11/23 09:46 +00:00) +- [3d80ebe](https://github.com/bcoe/yargs/commit/3d80ebed866d3799224b6f7d596247186a3898a9) 1.0.2 (@chevex) + +### v1.0.1 (2013/11/23 09:39 +00:00) +- [f80ff36](https://github.com/bcoe/yargs/commit/f80ff3642d580d4b68bf9f5a94277481bd027142) Updated image. (@chevex) + +### v1.0.0 (2013/11/23 09:33 +00:00) +- [54e31d5](https://github.com/bcoe/yargs/commit/54e31d505f820b80af13644e460894b320bf25a3) Rebranded from optimist to yargs in the spirit of the fork :D (@chevex) +- [4ebb6c5](https://github.com/bcoe/yargs/commit/4ebb6c59f44787db7c24c5b8fe2680f01a23f498) Added documentation for demandCount(). (@chevex) +- [4561ce6](https://github.com/bcoe/yargs/commit/4561ce66dcffa95f49e8b4449b25b94cd68acb25) Simplified the error messages returned by .check(). (@chevex) +- [661c678](https://github.com/bcoe/yargs/commit/661c67886f479b16254a830b7e1db3be29e6b7a6) Fixed an issue with demand not accepting a zero value. (@chevex) +- [731dd3c](https://github.com/bcoe/yargs/commit/731dd3c37624790490bd6df4d5f1da8f4348279e) Add .fail(fn) so death isn't the only option. Should fix issue #39. (@chevex) +- [fa15417](https://github.com/bcoe/yargs/commit/fa15417ff9e70dace0d726627a5818654824c1d8) Added a few missing 'return self' (@chevex) +- [e655e4d](https://github.com/bcoe/yargs/commit/e655e4d99d1ae1d3695ef755d51c2de08d669761) Fix showing help in certain JS environments. (@chevex) +- [a746a31](https://github.com/bcoe/yargs/commit/a746a31cd47c87327028e6ea33762d6187ec5c87) Better string representation of default values. (@chevex) +- [6134619](https://github.com/bcoe/yargs/commit/6134619a7e90b911d5443230b644c5d447c1a68c) Implies: conditional demands (@chevex) +- [046b93b](https://github.com/bcoe/yargs/commit/046b93b5d40a27367af4cb29726e4d781d934639) Added support for JSON config files. (@chevex) +- [a677ec0](https://github.com/bcoe/yargs/commit/a677ec0a0ecccd99c75e571d03323f950688da03) Add .example(cmd, desc) feature. (@chevex) +- [1bd4375](https://github.com/bcoe/yargs/commit/1bd4375e11327ba1687d4bb6e5e9f3c30c1be2af) Added 'defaults' as alias to 'default' so as to avoid usage of a reserved keyword. (@chevex) +- [6b753c1](https://github.com/bcoe/yargs/commit/6b753c16ca09e723060e70b773b430323b29c45c) add .normalize(args..) support for normalizing paths (@chevex) +- [33d7d59](https://github.com/bcoe/yargs/commit/33d7d59341d364f03d3a25f0a55cb99004dbbe4b) Customize error messages with demand(key, msg) (@chevex) +- [647d37f](https://github.com/bcoe/yargs/commit/647d37f164c20f4bafbf67dd9db6cd6e2cd3b49f) Merge branch 'rewrite-duplicate-test' of github.com:isbadawi/node-optimist (@chevex) +- [9059d1a](https://github.com/bcoe/yargs/commit/9059d1ad5e8aea686c2a01c89a23efdf929fff2e) Pass aliases object to check functions for greater versatility. (@chevex) +- [623dc26](https://github.com/bcoe/yargs/commit/623dc26c7331abff2465ef8532e3418996d42fe6) Added ability to count boolean options and rolled minimist library back into project. (@chevex) +- [49f0dce](https://github.com/bcoe/yargs/commit/49f0dcef35de4db544c3966350d36eb5838703f6) Fixed small typo. (@chevex) +- [79ec980](https://github.com/bcoe/yargs/commit/79ec9806d9ca6eb0014cfa4b6d1849f4f004baf2) Removed dependency on wordwrap module. (@chevex) +- [ea14630](https://github.com/bcoe/yargs/commit/ea14630feddd69d1de99dd8c0e08948f4c91f00a) Merge branch 'master' of github.com:chbrown/node-optimist (@chevex) +- [2b75da2](https://github.com/bcoe/yargs/commit/2b75da2624061e0f4f3107d20303c06ec9054906) Merge branch 'master' of github.com:seanzhou1023/node-optimist (@chevex) +- [d9bda11](https://github.com/bcoe/yargs/commit/d9bda1116e26f3b40e833ca9ca19263afea53565) Merge branch 'patch-1' of github.com:thefourtheye/node-optimist (@chevex) +- [d6cc606](https://github.com/bcoe/yargs/commit/d6cc6064a4f1bea38a16a4430b8a1334832fbeff) Renamed README. (@chevex) +- [9498d3f](https://github.com/bcoe/yargs/commit/9498d3f59acfb5e102826503e681623c3a64b178) Renamed readme and added .gitignore. (@chevex) +- [bbd1fe3](https://github.com/bcoe/yargs/commit/bbd1fe37fefa366dde0fb3dc44d91fe8b28f57f5) Included examples for ```help``` and ```showHelp``` functions and fixed few formatting issues (@thefourtheye) +- [37fea04](https://github.com/bcoe/yargs/commit/37fea0470a5796a0294c1dcfff68d8041650e622) .alias({}) behaves differently based on mapping direction when generating descriptions (@chbrown) +- [855b20d](https://github.com/bcoe/yargs/commit/855b20d0be567ca121d06b30bea64001b74f3d6d) Documented function signatures are useful for dynamically typed languages. (@chbrown) + +### 0.6.0 (2013/06/25 08:48 +00:00) +- [d37bfe0](https://github.com/bcoe/yargs/commit/d37bfe05ae6d295a0ab481efe4881222412791f4) all tests passing using minimist (@substack) +- [76f1352](https://github.com/bcoe/yargs/commit/76f135270399d01f2bbc621e524a5966e5c422fd) all parse tests now passing (@substack) +- [a7b6754](https://github.com/bcoe/yargs/commit/a7b6754276c38d1565479a5685c3781aeb947816) using minimist, some tests passing (@substack) +- [6655688](https://github.com/bcoe/yargs/commit/66556882aa731cbbbe16cc4d42c85740a2e98099) Give credit where its due (@DeadAlready) +- [602a2a9](https://github.com/bcoe/yargs/commit/602a2a92a459f93704794ad51b115bbb08b535ce) v0.5.3 - Remove wordwrap as dependency (@DeadAlready) + +### 0.5.2 (2013/05/31 03:46 +00:00) +- [4497ca5](https://github.com/bcoe/yargs/commit/4497ca55e332760a37b866ec119ded347ca27a87) fixed the whitespace bug without breaking anything else (@substack) +- [5a3dd1a](https://github.com/bcoe/yargs/commit/5a3dd1a4e0211a38613c6e02f61328e1031953fa) failing test for whitespace arg (@substack) + +### 0.5.1 (2013/05/30 07:17 +00:00) +- [a20228f](https://github.com/bcoe/yargs/commit/a20228f62a454755dd07f628a7c5759113918327) fix parse() to work with functions before it (@substack) +- [b13bd4c](https://github.com/bcoe/yargs/commit/b13bd4cac856a9821d42fa173bdb58f089365a7d) failing test for parse() with modifiers (@substack) + +### 0.5.0 (2013/05/18 21:59 +00:00) +- [c474a64](https://github.com/bcoe/yargs/commit/c474a649231527915c222156e3b40806d365a87c) fixes for dash (@substack) + +### 0.4.0 (2013/04/13 19:03 +00:00) +- [dafe3e1](https://github.com/bcoe/yargs/commit/dafe3e18d7c6e7c2d68e06559df0e5cbea3adb14) failing short test (@substack) + +### 0.3.7 (2013/04/04 04:07 +00:00) +- [6c7a0ec](https://github.com/bcoe/yargs/commit/6c7a0ec94ce4199a505f0518b4d6635d4e47cc81) Fix for windows. On windows there is no _ in environment. (@hdf) + +### 0.3.6 (2013/04/04 04:04 +00:00) +- [e72346a](https://github.com/bcoe/yargs/commit/e72346a727b7267af5aa008b418db89970873f05) Add support for newlines in -a="" arguments (@danielbeardsley) +- [71e1fb5](https://github.com/bcoe/yargs/commit/71e1fb55ea9987110a669ac6ec12338cfff3821c) drop 0.4, add 0.8 to travis (@substack) + +### 0.3.5 (2012/10/10 11:09 +00:00) +- [ee692b3](https://github.com/bcoe/yargs/commit/ee692b37554c70a0bb16389a50a26b66745cbbea) Fix parsing booleans (@vojtajina) +- [5045122](https://github.com/bcoe/yargs/commit/5045122664c3f5b4805addf1be2148d5856f7ce8) set $0 properly in the tests (@substack) + +### 0.3.4 (2012/04/30 06:54 +00:00) +- [f28c0e6](https://github.com/bcoe/yargs/commit/f28c0e62ca94f6e0bb2e6d82fc3d91a55e69b903) bump for string "true" params (@substack) +- [8f44aeb](https://github.com/bcoe/yargs/commit/8f44aeb74121ddd689580e2bf74ef86a605e9bf2) Fix failing test for aliased booleans. (@coderarity) +- [b9f7b61](https://github.com/bcoe/yargs/commit/b9f7b613b1e68e11e6c23fbda9e555a517dcc976) Add failing test for short aliased booleans. (@coderarity) + +### 0.3.3 (2012/04/30 06:45 +00:00) +- [541bac8](https://github.com/bcoe/yargs/commit/541bac8dd787a5f1a5d28f6d8deb1627871705e7) Fixes #37. + +### 0.3.2 (2012/04/12 20:28 +00:00) +- [3a0f014](https://github.com/bcoe/yargs/commit/3a0f014c1451280ac1c9caa1f639d31675586eec) travis badge (@substack) +- [4fb60bf](https://github.com/bcoe/yargs/commit/4fb60bf17845f4ce3293f8ca49c9a1a7c736cfce) Fix boolean aliases. (@coderarity) +- [f14dda5](https://github.com/bcoe/yargs/commit/f14dda546efc4fe06ace04d36919bfbb7634f79b) Adjusted package.json to use tap (@jfhbrook) +- [88e5d32](https://github.com/bcoe/yargs/commit/88e5d32295be6e544c8d355ff84e355af38a1c74) test/usage.js no longer hangs (@jfhbrook) +- [e1e740c](https://github.com/bcoe/yargs/commit/e1e740c27082f3ce84deca2093d9db2ef735d0e5) two tests for combined boolean/alias opts parsing (@jfhbrook) + +### 0.3.1 (2011/12/31 08:44 +00:00) +- [d09b719](https://github.com/bcoe/yargs/commit/d09b71980ef711b6cf3918cd19beec8257e40e82) If "default" is set to false it was not passed on, fixed. (@wolframkriesing) + +### 0.3.0 (2011/12/09 06:03 +00:00) +- [6e74aa7](https://github.com/bcoe/yargs/commit/6e74aa7b46a65773e20c0cb68d2d336d4a0d553d) bump and documented dot notation (@substack) + +### 0.2.7 (2011/10/20 02:25 +00:00) +- [94adee2](https://github.com/bcoe/yargs/commit/94adee20e17b58d0836f80e8b9cdbe9813800916) argv._ can be told 'Hey! argv._! Don't be messing with my args.', and it WILL obey (@colinta) +- [c46fdd5](https://github.com/bcoe/yargs/commit/c46fdd56a05410ae4a1e724a4820c82e77ff5469) optimistic critter image (@substack) +- [5c95c73](https://github.com/bcoe/yargs/commit/5c95c73aedf4c7482bd423e10c545e86d7c8a125) alias options() to option() (@substack) +- [f7692ea](https://github.com/bcoe/yargs/commit/f7692ea8da342850af819367833abb685fde41d8) [fix] Fix for parsing boolean edge case (@indexzero) +- [d1f92d1](https://github.com/bcoe/yargs/commit/d1f92d1425bd7f356055e78621b30cdf9741a3c2) +- [b01bda8](https://github.com/bcoe/yargs/commit/b01bda8d86e455bbf74ce497864cb8ab5b9fb847) [fix test] Update to ensure optimist is aware of default booleans. Associated tests included (@indexzero) +- [aa753e7](https://github.com/bcoe/yargs/commit/aa753e7c54fb3a12f513769a0ff6d54aa0f63943) [dist test] Update devDependencies in package.json. Update test pathing to be more npm and require.paths future-proof (@indexzero) +- [7bfce2f](https://github.com/bcoe/yargs/commit/7bfce2f3b3c98e6539e7549d35fbabced7e9341e) s/sys/util/ (@substack) +- [d420a7a](https://github.com/bcoe/yargs/commit/d420a7a9c890d2cdb11acfaf3ea3f43bc3e39f41) update usage output (@substack) +- [cf86eed](https://github.com/bcoe/yargs/commit/cf86eede2e5fc7495b6ec15e6d137d9ac814f075) some sage readme protips about parsing rules (@substack) +- [5da9f7a](https://github.com/bcoe/yargs/commit/5da9f7a5c0e1758ec7c5801fb3e94d3f6e970513) documented all the methods finally (@substack) +- [8ca6879](https://github.com/bcoe/yargs/commit/8ca6879311224b25933642987300f6a29de5c21b) fenced syntax highlighting (@substack) +- [b72bacf](https://github.com/bcoe/yargs/commit/b72bacf1d02594778c1935405bc8137eb61761dc) right-alignment of wrapped extra params (@substack) +- [2b980bf](https://github.com/bcoe/yargs/commit/2b980bf2656b4ee8fc5134dc5f56a48855c35198) now with .wrap() (@substack) +- [d614f63](https://github.com/bcoe/yargs/commit/d614f639654057d1b7e35e3f5a306e88ec2ad1e4) don't show 'Options:' when there aren't any (@substack) +- [691eda3](https://github.com/bcoe/yargs/commit/691eda354df97b5a86168317abcbcaabdc08a0fb) failing test for multi-aliasing (@substack) +- [0826c9f](https://github.com/bcoe/yargs/commit/0826c9f462109feab2bc7a99346d22e72bf774b7) "Options:" > "options:" (@substack) +- [72f7490](https://github.com/bcoe/yargs/commit/72f749025d01b7f295738ed370a669d885fbada0) [minor] Update formatting for `.showHelp()` (@indexzero) +- [75aecce](https://github.com/bcoe/yargs/commit/75aeccea74329094072f95800e02c275e7d999aa) options works again, too lazy to write a proper test right now (@substack) +- [f742e54](https://github.com/bcoe/yargs/commit/f742e5439817c662dc3bd8734ddd6467e6018cfd) line_count_options example, which breaks (@substack) +- [4ca06b8](https://github.com/bcoe/yargs/commit/4ca06b8b4ea99b5d5714b315a2a8576bee6e5537) line count example (@substack) +- [eeb8423](https://github.com/bcoe/yargs/commit/eeb8423e0a5ecc9dc3eb1e6df9f3f8c1c88f920b) remove self.argv setting in boolean (@substack) +- [6903412](https://github.com/bcoe/yargs/commit/69034126804660af9cc20ea7f4457b50338ee3d7) removed camel case for now (@substack) +- [5a0d88b](https://github.com/bcoe/yargs/commit/5a0d88bf23e9fa79635dd034e2a1aa992acc83cd) remove dead longest checking code (@substack) +- [d782170](https://github.com/bcoe/yargs/commit/d782170babf7284b1aa34f5350df0dd49c373fa8) .help() too (@substack) +- [622ec17](https://github.com/bcoe/yargs/commit/622ec17379bb5374fdbb190404c82bc600975791) rm old help generator (@substack) +- [7c8baac](https://github.com/bcoe/yargs/commit/7c8baac4d66195e9f5158503ea9ebfb61153dab7) nub keys (@substack) +- [8197785](https://github.com/bcoe/yargs/commit/8197785ad4762465084485b041abd722f69bf344) generate help message based on the previous calls, todo: nub (@substack) +- [3ffbdc3](https://github.com/bcoe/yargs/commit/3ffbdc33c8f5e83d4ea2ac60575ce119570c7ede) stub out new showHelp, better checks (@substack) +- [d4e21f5](https://github.com/bcoe/yargs/commit/d4e21f56a4830f7de841900d3c79756fb9886184) let .options() take single options too (@substack) +- [3c4cf29](https://github.com/bcoe/yargs/commit/3c4cf2901a29bac119cca8e983028d8669230ec6) .options() is now heaps simpler (@substack) +- [89f0d04](https://github.com/bcoe/yargs/commit/89f0d043cbccd302f10ab30c2069e05d2bf817c9) defaults work again, all tests pass (@substack) +- [dd87333](https://github.com/bcoe/yargs/commit/dd8733365423006a6e4156372ebb55f98323af58) update test error messages, down to 2 failing tests (@substack) +- [53f7bc6](https://github.com/bcoe/yargs/commit/53f7bc626b9875f2abdfc5dd7a80bde7f14143a3) fix for bools doubling up, passes the parse test again, others fail (@substack) +- [2213e2d](https://github.com/bcoe/yargs/commit/2213e2ddc7263226fba717fb041dc3fde9bc2ee4) refactored for an argv getter, failing several tests (@substack) +- [d1e7379](https://github.com/bcoe/yargs/commit/d1e737970f15c6c006bebdd8917706827ff2f0f2) just rescan for now, alias test passes (@substack) +- [b2f8c99](https://github.com/bcoe/yargs/commit/b2f8c99cc477a8eb0fdf4cf178e1785b63185cfd) failing alias test (@substack) +- [d0c0174](https://github.com/bcoe/yargs/commit/d0c0174daa144bfb6dc7290fdc448c393c475e15) .alias() (@substack) +- [d85f431](https://github.com/bcoe/yargs/commit/d85f431ad7d07b058af3f2a57daa51495576c164) [api] Remove `.describe()` in favor of building upon the existing `.usage()` API (@indexzero) +- [edbd527](https://github.com/bcoe/yargs/commit/edbd5272a8e213e71acd802782135c7f9699913a) [doc api] Add `.describe()`, `.options()`, and `.showHelp()` methods along with example. (@indexzero) +- [be4902f](https://github.com/bcoe/yargs/commit/be4902ff0961ae8feb9093f2c0a4066463ded2cf) updates for coffee since it now does argv the node way (@substack) +- [e24cb23](https://github.com/bcoe/yargs/commit/e24cb23798ee64e53b60815e7fda78b87f42390c) more general coffeescript detection (@substack) +- [78ac753](https://github.com/bcoe/yargs/commit/78ac753e5d0ec32a96d39d893272afe989e42a4d) Don't trigger the CoffeeScript hack when running under node_g. (@papandreou) +- [bcfe973](https://github.com/bcoe/yargs/commit/bcfe9731d7f90d4632281b8a52e8d76eb0195ae6) .string() but failing test (@substack) +- [1987aca](https://github.com/bcoe/yargs/commit/1987aca28c7ba4e8796c07bbc547cb984804c826) test hex strings (@substack) +- [ef36db3](https://github.com/bcoe/yargs/commit/ef36db32259b0b0d62448dc907c760e5554fb7e7) more keywords (@substack) +- [cc53c56](https://github.com/bcoe/yargs/commit/cc53c56329960bed6ab077a79798e991711ba01d) Added camelCase function that converts --multi-word-option to camel case (so it becomes argv.multiWordOption). (@papandreou) +- [60b57da](https://github.com/bcoe/yargs/commit/60b57da36797716e5783a633c6d5c79099016d45) fixed boolean bug by rescanning (@substack) +- [dff6d07](https://github.com/bcoe/yargs/commit/dff6d078d97f8ac503c7d18dcc7b7a8c364c2883) boolean examples (@substack) +- [0e380b9](https://github.com/bcoe/yargs/commit/0e380b92c4ef4e3c8dac1da18b5c31d85b1d02c9) boolean() with passing test (@substack) +- [62644d4](https://github.com/bcoe/yargs/commit/62644d4bffbb8d1bbf0c2baf58a1d14a6359ef07) coffee compatibility with node regex for versions too (@substack) +- [430fafc](https://github.com/bcoe/yargs/commit/430fafcf1683d23774772826581acff84b456827) argv._ fixed by fixing the coffee detection (@substack) +- [343b8af](https://github.com/bcoe/yargs/commit/343b8afefd98af274ebe21b5a16b3a949ec5429f) whichNodeArgs test fails too (@substack) +- [63df2f3](https://github.com/bcoe/yargs/commit/63df2f371f31e63d7f1dec2cbf0022a5f08da9d2) replicated mnot's bug in whichNodeEmpty test (@substack) +- [35473a4](https://github.com/bcoe/yargs/commit/35473a4d93a45e5e7e512af8bb54ebb532997ae1) test for ./bin usage (@substack) +- [13df151](https://github.com/bcoe/yargs/commit/13df151e44228eed10e5441c7cd163e086c458a4) don't coerce booleans to numbers (@substack) +- [85f8007](https://github.com/bcoe/yargs/commit/85f8007e93b8be7124feea64b1f1916d8ba1894a) package bump for automatic number conversion (@substack) +- [8f17014](https://github.com/bcoe/yargs/commit/8f170141cded4ccc0c6d67a849c5bf996aa29643) updated readme and examples with new auto-numberification goodness (@substack) +- [73dc901](https://github.com/bcoe/yargs/commit/73dc9011ac968e39b55e19e916084a839391b506) auto number conversion works yay (@substack) +- [bcec56b](https://github.com/bcoe/yargs/commit/bcec56b3d031e018064cbb691539ccc4f28c14ad) failing test for not-implemented auto numification (@substack) +- [ebd2844](https://github.com/bcoe/yargs/commit/ebd2844d683feeac583df79af0e5124a7a7db04e) odd that eql doesn't check types careflly (@substack) +- [fd854b0](https://github.com/bcoe/yargs/commit/fd854b02e512ce854b76386d395672a7969c1bc4) package author + keywords (@substack) +- [656a1d5](https://github.com/bcoe/yargs/commit/656a1d5a1b7c0e49d72e80cb13f20671d56f76c6) updated readme with .default() stuff (@substack) +- [cd7f8c5](https://github.com/bcoe/yargs/commit/cd7f8c55f0b82b79b690d14c5f806851236998a1) passing tests for new .default() behavior (@substack) +- [932725e](https://github.com/bcoe/yargs/commit/932725e39ce65bc91a0385a5fab659a5fa976ac2) new default() thing for setting default key/values (@substack) +- [4e6c7ab](https://github.com/bcoe/yargs/commit/4e6c7aba6374ac9ebc6259ecf91f13af7bce40e3) test for coffee usage (@substack) +- [d54ffcc](https://github.com/bcoe/yargs/commit/d54ffccf2a5a905f51ed5108f7c647f35d64ae23) new --key value style with passing tests. NOTE: changes existing behavior (@substack) +- [ed2a2d5](https://github.com/bcoe/yargs/commit/ed2a2d5d828100ebeef6385c0fb88d146a5cfe9b) package bump for summatix's coffee script fix (@substack) +- [75a975e](https://github.com/bcoe/yargs/commit/75a975eed8430d28e2a79dc9e6d819ad545f4587) Added support for CoffeeScript (@summatix) +- [56b2b1d](https://github.com/bcoe/yargs/commit/56b2b1de8d11f8a2b91979d8ae2d6db02d8fe64d) test coverage for the falsy check() usage (@substack) +- [a4843a9](https://github.com/bcoe/yargs/commit/a4843a9f0e69ffb4afdf6a671d89eb6f218be35d) check bug fixed plus a handy string (@substack) +- [857bd2d](https://github.com/bcoe/yargs/commit/857bd2db933a5aaa9cfecba0ced2dc9b415f8111) tests for demandCount, back up to 100% coverage (@substack) +- [073b776](https://github.com/bcoe/yargs/commit/073b7768ebd781668ef05c13f9003aceca2f5c35) call demandCount from demand (@substack) +- [4bd4b7a](https://github.com/bcoe/yargs/commit/4bd4b7a085c8b6ce1d885a0f486cc9865cee2db1) add demandCount to check for the number of arguments in the _ list (@marshall) +- [b8689ac](https://github.com/bcoe/yargs/commit/b8689ac68dacf248119d242bba39a41cb0adfa07) Rebase checks. That will be its own module eventually. (@substack) +- [e688370](https://github.com/bcoe/yargs/commit/e688370b576f0aa733c3f46183df69e1b561668e) a $0 like in perl (@substack) +- [2e5e196](https://github.com/bcoe/yargs/commit/2e5e1960fc19afb21fb3293752316eaa8bcd3609) usage test hacking around process and console (@substack) +- [fcc3521](https://github.com/bcoe/yargs/commit/fcc352163fbec6a1dfe8caf47a0df39de24fe016) description pun (@substack) +- [87a1fe2](https://github.com/bcoe/yargs/commit/87a1fe29037ca2ca5fefda85141aaeb13e8ce761) mit/x11 license (@substack) +- [8d089d2](https://github.com/bcoe/yargs/commit/8d089d24cd687c0bde3640a96c09b78f884900dd) bool example is more consistent and also shows off short option grouping (@substack) +- [448d747](https://github.com/bcoe/yargs/commit/448d7473ac68e8e03d8befc9457b0d9e21725be0) start of the readme and examples (@substack) +- [da74dea](https://github.com/bcoe/yargs/commit/da74dea799a9b59dbf022cbb8001bfdb0d52eec9) more tests for long and short captures (@substack) +- [ab6387e](https://github.com/bcoe/yargs/commit/ab6387e6769ca4af82ca94c4c67c7319f0d9fcfa) silly bug in the tests with s/not/no/, all tests pass now (@substack) +- [102496a](https://github.com/bcoe/yargs/commit/102496a319e8e06f6550d828fc2f72992c7d9ecc) hack an instance for process.argv onto Argv so the export can be called to create an instance or used for argv, which is the most common case (@substack) +- [a01caeb](https://github.com/bcoe/yargs/commit/a01caeb532546d19f68f2b2b87f7036cfe1aaedd) divide example (@substack) +- [443da55](https://github.com/bcoe/yargs/commit/443da55736acbaf8ff8b04d1b9ce19ab016ddda2) start of the lib with a package.json (@substack) diff --git a/node_modules/yargs/LICENSE b/node_modules/yargs/LICENSE new file mode 100644 index 0000000..747ab11 --- /dev/null +++ b/node_modules/yargs/LICENSE @@ -0,0 +1,22 @@ +Copyright 2010 James Halliday (mail@substack.net) +Modified work Copyright 2014 Contributors (ben@npmjs.com) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md new file mode 100644 index 0000000..d16b82d --- /dev/null +++ b/node_modules/yargs/README.md @@ -0,0 +1,107 @@ +# Yargs + +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] +[![NPM version][npm-image]][npm-url] +[![Windows Tests][windows-image]][windows-url] +[![js-standard-style][standard-image]][standard-url] +[![Conventional Commits][conventional-commits-image]][conventional-commits-url] +[![Slack][slack-image]][slack-url] + +_Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_. + +> Yargs be a node.js library fer hearties tryin' ter parse optstrings. + + + +Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. It gives you: + +* commands and (grouped) options (`my-program.js serve --port=5000`). +* a dynamically generated help menu based on your arguments. + +> + +* bash-completion shortcuts for commands and options. +* and [tons more](/docs/api.md). + +## Installation + +```bash +npm i yargs --save +``` + +## Simple Example + +````javascript +#!/usr/bin/env node +const argv = require('yargs').argv + +if (argv.ships > 3 && argv.distance < 53.5) { + console.log('Plunder more riffiwobbles!') +} else { + console.log('Retreat from the xupptumblers!') +} +```` + +```bash +$ ./plunder.js --ships=4 --distance=22 +Plunder more riffiwobbles! + +$ ./plunder.js --ships 12 --distance 98.7 +Retreat from the xupptumblers! +``` + +## Complex Example + +```js +#!/usr/bin/env node +require('yargs') // eslint-disable-line + .command('serve [port]', 'start the server', (yargs) => { + yargs + .positional('port', { + describe: 'port to bind on', + default: 5000 + }) + }, (argv) => { + if (argv.verbose) console.info(`start server on :${argv.port}`) + serve(argv.port) + }) + .option('verbose', { + alias: 'v', + default: false + }) + .argv +``` + +Run the example above with `--help` to see the help for the application. + +## Table of Contents + +* [Yargs' API](/docs/api.md) +* [Examples](/docs/examples.md) +* [Parsing Tricks](/docs/tricks.md) + * [Stop the Parser](/docs/tricks.md#stop) + * [Negating Boolean Arguments](/docs/tricks.md#negate) + * [Numbers](/docs/tricks.md#numbers) + * [Arrays](/docs/tricks.md#arrays) + * [Objects](/docs/tricks.md#objects) +* [Advanced Topics](/docs/advanced.md) + * [Composing Your App Using Commands](/docs/advanced.md#commands) + * [Building Configurable CLI Apps](/docs/advanced.md#configuration) + * [Customizing Yargs' Parser](/docs/advanced.md#customizing) +* [Contributing](/contributing.md) + +[travis-url]: https://travis-ci.org/yargs/yargs +[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg +[coveralls-url]: https://coveralls.io/github/yargs/yargs +[coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg +[npm-url]: https://www.npmjs.com/package/yargs +[npm-image]: https://img.shields.io/npm/v/yargs.svg +[windows-url]: https://ci.appveyor.com/project/bcoe/yargs-ljwvf +[windows-image]: https://img.shields.io/appveyor/ci/bcoe/yargs-ljwvf/master.svg?label=Windows%20Tests +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: http://standardjs.com/ +[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg +[conventional-commits-url]: https://conventionalcommits.org/ +[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg +[slack-url]: http://devtoolscommunity.herokuapp.com diff --git a/node_modules/yargs/completion.sh.hbs b/node_modules/yargs/completion.sh.hbs new file mode 100644 index 0000000..819c8ae --- /dev/null +++ b/node_modules/yargs/completion.sh.hbs @@ -0,0 +1,28 @@ +###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc +# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. +# +_yargs_completions() +{ + local cur_word args type_list + + cur_word="${COMP_WORDS[COMP_CWORD]}" + args=("${COMP_WORDS[@]}") + + # ask yargs to generate completions. + type_list=$({{app_path}} --get-yargs-completions "${args[@]}") + + COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) ) + + # if no match was found, fall back to filename completion + if [ ${#COMPREPLY[@]} -eq 0 ]; then + COMPREPLY=( $(compgen -f -- "${cur_word}" ) ) + fi + + return 0 +} +complete -F _yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### diff --git a/node_modules/yargs/index.js b/node_modules/yargs/index.js new file mode 100644 index 0000000..dfed54b --- /dev/null +++ b/node_modules/yargs/index.js @@ -0,0 +1,32 @@ +'use strict' +// classic singleton yargs API, to use yargs +// without running as a singleton do: +// require('yargs/yargs')(process.argv.slice(2)) +const yargs = require('./yargs') + +Argv(process.argv.slice(2)) + +module.exports = Argv + +function Argv (processArgs, cwd) { + const argv = yargs(processArgs, cwd, require) + singletonify(argv) + return argv +} + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('yargs')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('yargs').argv + to get a parsed version of process.argv. +*/ +function singletonify (inst) { + Object.keys(inst).forEach((key) => { + if (key === 'argv') { + Argv.__defineGetter__(key, inst.__lookupGetter__(key)) + } else { + Argv[key] = typeof inst[key] === 'function' ? inst[key].bind(inst) : inst[key] + } + }) +} diff --git a/node_modules/yargs/lib/apply-extends.js b/node_modules/yargs/lib/apply-extends.js new file mode 100644 index 0000000..3005848 --- /dev/null +++ b/node_modules/yargs/lib/apply-extends.js @@ -0,0 +1,53 @@ + +'use strict' +const fs = require('fs') +const path = require('path') +const YError = require('./yerror') + +let previouslyVisitedConfigs = [] + +function checkForCircularExtends (path) { + if (previouslyVisitedConfigs.indexOf(path) > -1) { + throw new YError(`Circular extended configurations: '${path}'.`) + } +} + +function getPathToDefaultConfig (cwd, pathToExtend) { + return path.resolve(cwd, pathToExtend) +} + +function applyExtends (config, cwd) { + let defaultConfig = {} + + if (config.hasOwnProperty('extends')) { + if (typeof config.extends !== 'string') return defaultConfig + const isPath = /\.json$/.test(config.extends) + let pathToDefault = null + if (!isPath) { + try { + pathToDefault = require.resolve(config.extends) + } catch (err) { + // most likely this simply isn't a module. + } + } else { + pathToDefault = getPathToDefaultConfig(cwd, config.extends) + } + // maybe the module uses key for some other reason, + // err on side of caution. + if (!pathToDefault && !isPath) return config + + checkForCircularExtends(pathToDefault) + + previouslyVisitedConfigs.push(pathToDefault) + + defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends) + delete config.extends + defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault)) + } + + previouslyVisitedConfigs = [] + + return Object.assign({}, defaultConfig, config) +} + +module.exports = applyExtends diff --git a/node_modules/yargs/lib/argsert.js b/node_modules/yargs/lib/argsert.js new file mode 100644 index 0000000..ed1d598 --- /dev/null +++ b/node_modules/yargs/lib/argsert.js @@ -0,0 +1,66 @@ +'use strict' +const command = require('./command')() +const YError = require('./yerror') + +const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'] + +module.exports = function argsert (expected, callerArguments, length) { + // TODO: should this eventually raise an exception. + try { + // preface the argument description with "cmd", so + // that we can run it through yargs' command parser. + let position = 0 + let parsed = {demanded: [], optional: []} + if (typeof expected === 'object') { + length = callerArguments + callerArguments = expected + } else { + parsed = command.parseCommand(`cmd ${expected}`) + } + const args = [].slice.call(callerArguments) + + while (args.length && args[args.length - 1] === undefined) args.pop() + length = length || args.length + + if (length < parsed.demanded.length) { + throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`) + } + + const totalCommands = parsed.demanded.length + parsed.optional.length + if (length > totalCommands) { + throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`) + } + + parsed.demanded.forEach((demanded) => { + const arg = args.shift() + const observedType = guessType(arg) + const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*') + if (matchingTypes.length === 0) argumentTypeError(observedType, demanded.cmd, position, false) + position += 1 + }) + + parsed.optional.forEach((optional) => { + if (args.length === 0) return + const arg = args.shift() + const observedType = guessType(arg) + const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*') + if (matchingTypes.length === 0) argumentTypeError(observedType, optional.cmd, position, true) + position += 1 + }) + } catch (err) { + console.warn(err.stack) + } +} + +function guessType (arg) { + if (Array.isArray(arg)) { + return 'array' + } else if (arg === null) { + return 'null' + } + return typeof arg +} + +function argumentTypeError (observedType, allowedTypes, position, optional) { + throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`) +} diff --git a/node_modules/yargs/lib/command.js b/node_modules/yargs/lib/command.js new file mode 100644 index 0000000..65322db --- /dev/null +++ b/node_modules/yargs/lib/command.js @@ -0,0 +1,426 @@ +'use strict' + +const inspect = require('util').inspect +const path = require('path') +const Parser = require('yargs-parser') + +const DEFAULT_MARKER = /(^\*)|(^\$0)/ + +// handles parsing positional arguments, +// and populating argv with said positional +// arguments. +module.exports = function command (yargs, usage, validation) { + const self = {} + let handlers = {} + let aliasMap = {} + let defaultCommand + self.addHandler = function addHandler (cmd, description, builder, handler, middlewares) { + let aliases = [] + handler = handler || (() => {}) + middlewares = middlewares || [] + if (Array.isArray(cmd)) { + aliases = cmd.slice(1) + cmd = cmd[0] + } else if (typeof cmd === 'object') { + let command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd) + if (cmd.aliases) command = [].concat(command).concat(cmd.aliases) + self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares) + return + } + + // allow a module to be provided instead of separate builder and handler + if (typeof builder === 'object' && builder.builder && typeof builder.handler === 'function') { + self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares) + return + } + + // parse positionals out of cmd string + const parsedCommand = self.parseCommand(cmd) + + // remove positional args from aliases only + aliases = aliases.map(alias => self.parseCommand(alias).cmd) + + // check for default and filter out '*'' + let isDefault = false + const parsedAliases = [parsedCommand.cmd].concat(aliases).filter((c) => { + if (DEFAULT_MARKER.test(c)) { + isDefault = true + return false + } + return true + }) + + // standardize on $0 for default command. + if (parsedAliases.length === 0 && isDefault) parsedAliases.push('$0') + + // shift cmd and aliases after filtering out '*' + if (isDefault) { + parsedCommand.cmd = parsedAliases[0] + aliases = parsedAliases.slice(1) + cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd) + } + + // populate aliasMap + aliases.forEach((alias) => { + aliasMap[alias] = parsedCommand.cmd + }) + + if (description !== false) { + usage.command(cmd, description, isDefault, aliases) + } + + handlers[parsedCommand.cmd] = { + original: cmd, + description: description, + handler, + builder: builder || {}, + middlewares: middlewares || [], + demanded: parsedCommand.demanded, + optional: parsedCommand.optional + } + + if (isDefault) defaultCommand = handlers[parsedCommand.cmd] + } + + self.addDirectory = function addDirectory (dir, context, req, callerFile, opts) { + opts = opts || {} + // disable recursion to support nested directories of subcommands + if (typeof opts.recurse !== 'boolean') opts.recurse = false + // exclude 'json', 'coffee' from require-directory defaults + if (!Array.isArray(opts.extensions)) opts.extensions = ['js'] + // allow consumer to define their own visitor function + const parentVisit = typeof opts.visit === 'function' ? opts.visit : o => o + // call addHandler via visitor function + opts.visit = function visit (obj, joined, filename) { + const visited = parentVisit(obj, joined, filename) + // allow consumer to skip modules with their own visitor + if (visited) { + // check for cyclic reference + // each command file path should only be seen once per execution + if (~context.files.indexOf(joined)) return visited + // keep track of visited files in context.files + context.files.push(joined) + self.addHandler(visited) + } + return visited + } + require('require-directory')({ require: req, filename: callerFile }, dir, opts) + } + + // lookup module object from require()d command and derive name + // if module was not require()d and no name given, throw error + function moduleName (obj) { + const mod = require('which-module')(obj) + if (!mod) throw new Error(`No command name given for module: ${inspect(obj)}`) + return commandFromFilename(mod.filename) + } + + // derive command name from filename + function commandFromFilename (filename) { + return path.basename(filename, path.extname(filename)) + } + + function extractDesc (obj) { + for (let keys = ['describe', 'description', 'desc'], i = 0, l = keys.length, test; i < l; i++) { + test = obj[keys[i]] + if (typeof test === 'string' || typeof test === 'boolean') return test + } + return false + } + + self.parseCommand = function parseCommand (cmd) { + const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ') + const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/) + const bregex = /\.*[\][<>]/g + const parsedCommand = { + cmd: (splitCommand.shift()).replace(bregex, ''), + demanded: [], + optional: [] + } + splitCommand.forEach((cmd, i) => { + let variadic = false + cmd = cmd.replace(/\s/g, '') + if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) variadic = true + if (/^\[/.test(cmd)) { + parsedCommand.optional.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic + }) + } else { + parsedCommand.demanded.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic + }) + } + }) + return parsedCommand + } + + self.getCommands = () => Object.keys(handlers).concat(Object.keys(aliasMap)) + + self.getCommandHandlers = () => handlers + + self.hasDefaultCommand = () => !!defaultCommand + + self.runCommand = function runCommand (command, yargs, parsed, commandIndex) { + let aliases = parsed.aliases + const commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand + const currentContext = yargs.getContext() + let numFiles = currentContext.files.length + const parentCommands = currentContext.commands.slice() + + // what does yargs look like after the buidler is run? + let innerArgv = parsed.argv + let innerYargs = null + let positionalMap = {} + if (command) { + currentContext.commands.push(command) + currentContext.fullCommands.push(commandHandler.original) + } + if (typeof commandHandler.builder === 'function') { + // a function can be provided, which builds + // up a yargs chain and possibly returns it. + innerYargs = commandHandler.builder(yargs.reset(parsed.aliases)) + // if the builder function did not yet parse argv with reset yargs + // and did not explicitly set a usage() string, then apply the + // original command string as usage() for consistent behavior with + // options object below. + if (yargs.parsed === false) { + if (shouldUpdateUsage(yargs)) { + yargs.getUsageInstance().usage( + usageFromParentCommandsCommandHandler(parentCommands, commandHandler), + commandHandler.description + ) + } + innerArgv = innerYargs ? innerYargs._parseArgs(null, null, true, commandIndex) : yargs._parseArgs(null, null, true, commandIndex) + } else { + innerArgv = yargs.parsed.argv + } + + if (innerYargs && yargs.parsed === false) aliases = innerYargs.parsed.aliases + else aliases = yargs.parsed.aliases + } else if (typeof commandHandler.builder === 'object') { + // as a short hand, an object can instead be provided, specifying + // the options that a command takes. + innerYargs = yargs.reset(parsed.aliases) + if (shouldUpdateUsage(innerYargs)) { + innerYargs.getUsageInstance().usage( + usageFromParentCommandsCommandHandler(parentCommands, commandHandler), + commandHandler.description + ) + } + Object.keys(commandHandler.builder).forEach((key) => { + innerYargs.option(key, commandHandler.builder[key]) + }) + innerArgv = innerYargs._parseArgs(null, null, true, commandIndex) + aliases = innerYargs.parsed.aliases + } + + if (!yargs._hasOutput()) { + positionalMap = populatePositionals(commandHandler, innerArgv, currentContext, yargs) + } + + // we apply validation post-hoc, so that custom + // checks get passed populated positional arguments. + if (!yargs._hasOutput()) yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error) + + if (commandHandler.handler && !yargs._hasOutput()) { + yargs._setHasOutput() + if (commandHandler.middlewares.length > 0) { + const middlewareArgs = commandHandler.middlewares.reduce(function (initialObj, middleware) { + return Object.assign(initialObj, middleware(innerArgv)) + }, {}) + Object.assign(innerArgv, middlewareArgs) + } + const handlerResult = commandHandler.handler(innerArgv) + if (handlerResult && typeof handlerResult.then === 'function') { + handlerResult.then( + null, + (error) => yargs.getUsageInstance().fail(null, error) + ) + } + } + + if (command) { + currentContext.commands.pop() + currentContext.fullCommands.pop() + } + numFiles = currentContext.files.length - numFiles + if (numFiles > 0) currentContext.files.splice(numFiles * -1, numFiles) + + return innerArgv + } + + function shouldUpdateUsage (yargs) { + return !yargs.getUsageInstance().getUsageDisabled() && + yargs.getUsageInstance().getUsage().length === 0 + } + + function usageFromParentCommandsCommandHandler (parentCommands, commandHandler) { + const c = DEFAULT_MARKER.test(commandHandler.original) ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() : commandHandler.original + const pc = parentCommands.filter((c) => { return !DEFAULT_MARKER.test(c) }) + pc.push(c) + return `$0 ${pc.join(' ')}` + } + + self.runDefaultBuilderOn = function (yargs) { + if (shouldUpdateUsage(yargs)) { + // build the root-level command string from the default string. + const commandString = DEFAULT_MARKER.test(defaultCommand.original) + ? defaultCommand.original : defaultCommand.original.replace(/^[^[\]<>]*/, '$0 ') + yargs.getUsageInstance().usage( + commandString, + defaultCommand.description + ) + } + const builder = defaultCommand.builder + if (typeof builder === 'function') { + builder(yargs) + } else { + Object.keys(builder).forEach((key) => { + yargs.option(key, builder[key]) + }) + } + } + + // transcribe all positional arguments "command [apple]" + // onto argv. + function populatePositionals (commandHandler, argv, context, yargs) { + argv._ = argv._.slice(context.commands.length) // nuke the current commands + const demanded = commandHandler.demanded.slice(0) + const optional = commandHandler.optional.slice(0) + const positionalMap = {} + + validation.positionalCount(demanded.length, argv._.length) + + while (demanded.length) { + const demand = demanded.shift() + populatePositional(demand, argv, positionalMap) + } + + while (optional.length) { + const maybe = optional.shift() + populatePositional(maybe, argv, positionalMap) + } + + argv._ = context.commands.concat(argv._) + + postProcessPositionals(argv, positionalMap, self.cmdToParseOptions(commandHandler.original)) + + return positionalMap + } + + function populatePositional (positional, argv, positionalMap, parseOptions) { + const cmd = positional.cmd[0] + if (positional.variadic) { + positionalMap[cmd] = argv._.splice(0).map(String) + } else { + if (argv._.length) positionalMap[cmd] = [String(argv._.shift())] + } + } + + // we run yargs-parser against the positional arguments + // applying the same parsing logic used for flags. + function postProcessPositionals (argv, positionalMap, parseOptions) { + // combine the parsing hints we've inferred from the command + // string with explicitly configured parsing hints. + const options = Object.assign({}, yargs.getOptions()) + options.default = Object.assign(parseOptions.default, options.default) + options.alias = Object.assign(parseOptions.alias, options.alias) + options.array = options.array.concat(parseOptions.array) + + const unparsed = [] + Object.keys(positionalMap).forEach((key) => { + positionalMap[key].map((value) => { + unparsed.push(`--${key}`) + unparsed.push(value) + }) + }) + + // short-circuit parse. + if (!unparsed.length) return + + const parsed = Parser.detailed(unparsed, options) + + if (parsed.error) { + yargs.getUsageInstance().fail(parsed.error.message, parsed.error) + } else { + // only copy over positional keys (don't overwrite + // flag arguments that were already parsed). + const positionalKeys = Object.keys(positionalMap) + Object.keys(positionalMap).forEach((key) => { + [].push.apply(positionalKeys, parsed.aliases[key]) + }) + + Object.keys(parsed.argv).forEach((key) => { + if (positionalKeys.indexOf(key) !== -1) { + argv[key] = parsed.argv[key] + } + }) + } + } + + self.cmdToParseOptions = function (cmdString) { + const parseOptions = { + array: [], + default: {}, + alias: {}, + demand: {} + } + + const parsed = self.parseCommand(cmdString) + parsed.demanded.forEach((d) => { + const cmds = d.cmd.slice(0) + const cmd = cmds.shift() + if (d.variadic) { + parseOptions.array.push(cmd) + parseOptions.default[cmd] = [] + } + cmds.forEach((c) => { + parseOptions.alias[cmd] = c + }) + parseOptions.demand[cmd] = true + }) + + parsed.optional.forEach((o) => { + const cmds = o.cmd.slice(0) + const cmd = cmds.shift() + if (o.variadic) { + parseOptions.array.push(cmd) + parseOptions.default[cmd] = [] + } + cmds.forEach((c) => { + parseOptions.alias[cmd] = c + }) + }) + + return parseOptions + } + + self.reset = () => { + handlers = {} + aliasMap = {} + defaultCommand = undefined + return self + } + + // used by yargs.parse() to freeze + // the state of commands such that + // we can apply .parse() multiple times + // with the same yargs instance. + let frozen + self.freeze = () => { + frozen = {} + frozen.handlers = handlers + frozen.aliasMap = aliasMap + frozen.defaultCommand = defaultCommand + } + self.unfreeze = () => { + handlers = frozen.handlers + aliasMap = frozen.aliasMap + defaultCommand = frozen.defaultCommand + frozen = undefined + } + + return self +} diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js new file mode 100644 index 0000000..ad6969a --- /dev/null +++ b/node_modules/yargs/lib/completion.js @@ -0,0 +1,105 @@ +'use strict' +const fs = require('fs') +const path = require('path') + +// add bash completions to your +// yargs-powered applications. +module.exports = function completion (yargs, usage, command) { + const self = { + completionKey: 'get-yargs-completions' + } + + // get a list of completion commands. + // 'args' is the array of strings from the line to be completed + self.getCompletion = function getCompletion (args, done) { + const completions = [] + const current = args.length ? args[args.length - 1] : '' + const argv = yargs.parse(args, true) + const aliases = yargs.parsed.aliases + + // a custom completion function can be provided + // to completion(). + if (completionFunction) { + if (completionFunction.length < 3) { + const result = completionFunction(current, argv) + + // promise based completion function. + if (typeof result.then === 'function') { + return result.then((list) => { + process.nextTick(() => { done(list) }) + }).catch((err) => { + process.nextTick(() => { throw err }) + }) + } + + // synchronous completion function. + return done(result) + } else { + // asynchronous completion function + return completionFunction(current, argv, (completions) => { + done(completions) + }) + } + } + + const handlers = command.getCommandHandlers() + for (let i = 0, ii = args.length; i < ii; ++i) { + if (handlers[args[i]] && handlers[args[i]].builder) { + const builder = handlers[args[i]].builder + if (typeof builder === 'function') { + const y = yargs.reset() + builder(y) + return y.argv + } + } + } + + if (!current.match(/^-/)) { + usage.getCommands().forEach((usageCommand) => { + const commandName = command.parseCommand(usageCommand[0]).cmd + if (args.indexOf(commandName) === -1) { + completions.push(commandName) + } + }) + } + + if (current.match(/^-/)) { + Object.keys(yargs.getOptions().key).forEach((key) => { + // If the key and its aliases aren't in 'args', add the key to 'completions' + const keyAndAliases = [key].concat(aliases[key] || []) + const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1) + if (notInArgs) { + completions.push(`--${key}`) + } + }) + } + + done(completions) + } + + // generate the completion script to add to your .bashrc. + self.generateCompletionScript = function generateCompletionScript ($0, cmd) { + let script = fs.readFileSync( + path.resolve(__dirname, '../completion.sh.hbs'), + 'utf-8' + ) + const name = path.basename($0) + + // add ./to applications not yet installed as bin. + if ($0.match(/\.js$/)) $0 = `./${$0}` + + script = script.replace(/{{app_name}}/g, name) + script = script.replace(/{{completion_command}}/g, cmd) + return script.replace(/{{app_path}}/g, $0) + } + + // register a function to perform your own custom + // completions., this function can be either + // synchrnous or asynchronous. + let completionFunction = null + self.registerFunction = (fn) => { + completionFunction = fn + } + + return self +} diff --git a/node_modules/yargs/lib/levenshtein.js b/node_modules/yargs/lib/levenshtein.js new file mode 100644 index 0000000..f32b0c2 --- /dev/null +++ b/node_modules/yargs/lib/levenshtein.js @@ -0,0 +1,47 @@ +/* +Copyright (c) 2011 Andrei Mackenzie + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed. +// gist, which can be found here: https://gist.github.com/andrei-m/982927 +'use strict' +// Compute the edit distance between the two given strings +module.exports = function levenshtein (a, b) { + if (a.length === 0) return b.length + if (b.length === 0) return a.length + + const matrix = [] + + // increment along the first column of each row + let i + for (i = 0; i <= b.length; i++) { + matrix[i] = [i] + } + + // increment each column in the first row + let j + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j + } + + // Fill in the rest of the matrix + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) === a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1] + } else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution + Math.min(matrix[i][j - 1] + 1, // insertion + matrix[i - 1][j] + 1)) // deletion + } + } + } + + return matrix[b.length][a.length] +} diff --git a/node_modules/yargs/lib/obj-filter.js b/node_modules/yargs/lib/obj-filter.js new file mode 100644 index 0000000..c344ac5 --- /dev/null +++ b/node_modules/yargs/lib/obj-filter.js @@ -0,0 +1,11 @@ +'use strict' +module.exports = function objFilter (original, filter) { + const obj = {} + filter = filter || ((k, v) => true) + Object.keys(original || {}).forEach((key) => { + if (filter(key, original[key])) { + obj[key] = original[key] + } + }) + return obj +} diff --git a/node_modules/yargs/lib/usage.js b/node_modules/yargs/lib/usage.js new file mode 100644 index 0000000..bd0906a --- /dev/null +++ b/node_modules/yargs/lib/usage.js @@ -0,0 +1,524 @@ +'use strict' +// this file handles outputting usage instructions, +// failures, etc. keeps logging in one place. +const stringWidth = require('string-width') +const objFilter = require('./obj-filter') +const path = require('path') +const setBlocking = require('set-blocking') +const YError = require('./yerror') + +module.exports = function usage (yargs, y18n) { + const __ = y18n.__ + const self = {} + + // methods for ouputting/building failure message. + const fails = [] + self.failFn = function failFn (f) { + fails.push(f) + } + + let failMessage = null + let showHelpOnFail = true + self.showHelpOnFail = function showHelpOnFailFn (enabled, message) { + if (typeof enabled === 'string') { + message = enabled + enabled = true + } else if (typeof enabled === 'undefined') { + enabled = true + } + failMessage = message + showHelpOnFail = enabled + return self + } + + let failureOutput = false + self.fail = function fail (msg, err) { + const logger = yargs._getLoggerInstance() + + if (fails.length) { + for (let i = fails.length - 1; i >= 0; --i) { + fails[i](msg, err, self) + } + } else { + if (yargs.getExitProcess()) setBlocking(true) + + // don't output failure message more than once + if (!failureOutput) { + failureOutput = true + if (showHelpOnFail) yargs.showHelp('error') + if (msg || err) logger.error(msg || err) + if (failMessage) { + if (msg || err) logger.error('') + logger.error(failMessage) + } + } + + err = err || new YError(msg) + if (yargs.getExitProcess()) { + return yargs.exit(1) + } else if (yargs._hasParseCallback()) { + return yargs.exit(1, err) + } else { + throw err + } + } + } + + // methods for ouputting/building help (usage) message. + let usages = [] + let usageDisabled = false + self.usage = (msg, description) => { + if (msg === null) { + usageDisabled = true + usages = [] + return + } + usageDisabled = false + usages.push([msg, description || '']) + return self + } + self.getUsage = () => { + return usages + } + self.getUsageDisabled = () => { + return usageDisabled + } + + self.getPositionalGroupName = () => { + return __('Positionals:') + } + + let examples = [] + self.example = (cmd, description) => { + examples.push([cmd, description || '']) + } + + let commands = [] + self.command = function command (cmd, description, isDefault, aliases) { + // the last default wins, so cancel out any previously set default + if (isDefault) { + commands = commands.map((cmdArray) => { + cmdArray[2] = false + return cmdArray + }) + } + commands.push([cmd, description || '', isDefault, aliases]) + } + self.getCommands = () => commands + + let descriptions = {} + self.describe = function describe (key, desc) { + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.describe(k, key[k]) + }) + } else { + descriptions[key] = desc + } + } + self.getDescriptions = () => descriptions + + let epilog + self.epilog = (msg) => { + epilog = msg + } + + let wrapSet = false + let wrap + self.wrap = (cols) => { + wrapSet = true + wrap = cols + } + + function getWrap () { + if (!wrapSet) { + wrap = windowWidth() + wrapSet = true + } + + return wrap + } + + const deferY18nLookupPrefix = '__yargsString__:' + self.deferY18nLookup = str => deferY18nLookupPrefix + str + + const defaultGroup = 'Options:' + self.help = function help () { + normalizeAliases() + + // handle old demanded API + const base$0 = path.basename(yargs.$0) + const demandedOptions = yargs.getDemandedOptions() + const demandedCommands = yargs.getDemandedCommands() + const groups = yargs.getGroups() + const options = yargs.getOptions() + let keys = Object.keys( + Object.keys(descriptions) + .concat(Object.keys(demandedOptions)) + .concat(Object.keys(demandedCommands)) + .concat(Object.keys(options.default)) + .reduce((acc, key) => { + if (key !== '_') acc[key] = true + return acc + }, {}) + ) + + const theWrap = getWrap() + const ui = require('cliui')({ + width: theWrap, + wrap: !!theWrap + }) + + // the usage string. + if (!usageDisabled) { + if (usages.length) { + // user-defined usage. + usages.forEach((usage) => { + ui.div(`${usage[0].replace(/\$0/g, base$0)}`) + if (usage[1]) { + ui.div({text: `${usage[1]}`, padding: [1, 0, 0, 0]}) + } + }) + ui.div() + } else if (commands.length) { + let u = null + // demonstrate how commands are used. + if (demandedCommands._) { + u = `${base$0} <${__('command')}>\n` + } else { + u = `${base$0} [${__('command')}]\n` + } + ui.div(`${u}`) + } + } + + // your application's commands, i.e., non-option + // arguments populated in '_'. + if (commands.length) { + ui.div(__('Commands:')) + + const context = yargs.getContext() + const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : '' + + commands.forEach((command) => { + const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands. + ui.span( + { + text: commandString, + padding: [0, 2, 0, 2], + width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4 + }, + {text: command[1]} + ) + const hints = [] + if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here + if (command[3] && command[3].length) { + hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`) + } + if (hints.length) { + ui.div({text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right'}) + } else { + ui.div() + } + }) + + ui.div() + } + + // perform some cleanup on the keys array, making it + // only include top-level keys not their aliases. + const aliasKeys = (Object.keys(options.alias) || []) + .concat(Object.keys(yargs.parsed.newAliases) || []) + + keys = keys.filter(key => !yargs.parsed.newAliases[key] && aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)) + + // populate 'Options:' group with any keys that have not + // explicitly had a group set. + if (!groups[defaultGroup]) groups[defaultGroup] = [] + addUngroupedKeys(keys, options.alias, groups) + + // display 'Options:' table along with any custom tables: + Object.keys(groups).forEach((groupName) => { + if (!groups[groupName].length) return + + ui.div(__(groupName)) + + // if we've grouped the key 'f', but 'f' aliases 'foobar', + // normalizedKeys should contain only 'foobar'. + const normalizedKeys = groups[groupName].map((key) => { + if (~aliasKeys.indexOf(key)) return key + for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { + if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey + } + return key + }) + + // actually generate the switches string --foo, -f, --bar. + const switches = normalizedKeys.reduce((acc, key) => { + acc[key] = [ key ].concat(options.alias[key] || []) + .map(sw => { + // for the special positional group don't + // add '--' or '-' prefix. + if (groupName === self.getPositionalGroupName()) return sw + else return (sw.length > 1 ? '--' : '-') + sw + }) + .join(', ') + + return acc + }, {}) + + normalizedKeys.forEach((key) => { + const kswitch = switches[key] + let desc = descriptions[key] || '' + let type = null + + if (~desc.lastIndexOf(deferY18nLookupPrefix)) desc = __(desc.substring(deferY18nLookupPrefix.length)) + + if (~options.boolean.indexOf(key)) type = `[${__('boolean')}]` + if (~options.count.indexOf(key)) type = `[${__('count')}]` + if (~options.string.indexOf(key)) type = `[${__('string')}]` + if (~options.normalize.indexOf(key)) type = `[${__('string')}]` + if (~options.array.indexOf(key)) type = `[${__('array')}]` + if (~options.number.indexOf(key)) type = `[${__('number')}]` + + const extra = [ + type, + (key in demandedOptions) ? `[${__('required')}]` : null, + options.choices && options.choices[key] ? `[${__('choices:')} ${ + self.stringifiedValues(options.choices[key])}]` : null, + defaultString(options.default[key], options.defaultDescription[key]) + ].filter(Boolean).join(' ') + + ui.span( + {text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4}, + desc + ) + + if (extra) ui.div({text: extra, padding: [0, 0, 0, 2], align: 'right'}) + else ui.div() + }) + + ui.div() + }) + + // describe some common use-cases for your application. + if (examples.length) { + ui.div(__('Examples:')) + + examples.forEach((example) => { + example[0] = example[0].replace(/\$0/g, base$0) + }) + + examples.forEach((example) => { + if (example[1] === '') { + ui.div( + { + text: example[0], + padding: [0, 2, 0, 2] + } + ) + } else { + ui.div( + { + text: example[0], + padding: [0, 2, 0, 2], + width: maxWidth(examples, theWrap) + 4 + }, { + text: example[1] + } + ) + } + }) + + ui.div() + } + + // the usage string. + if (epilog) { + const e = epilog.replace(/\$0/g, base$0) + ui.div(`${e}\n`) + } + + return ui.toString() + } + + // return the maximum width of a string + // in the left-hand column of a table. + function maxWidth (table, theWrap, modifier) { + let width = 0 + + // table might be of the form [leftColumn], + // or {key: leftColumn} + if (!Array.isArray(table)) { + table = Object.keys(table).map(key => [table[key]]) + } + + table.forEach((v) => { + width = Math.max( + stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]), + width + ) + }) + + // if we've enabled 'wrap' we should limit + // the max-width of the left-column. + if (theWrap) width = Math.min(width, parseInt(theWrap * 0.5, 10)) + + return width + } + + // make sure any options set for aliases, + // are copied to the keys being aliased. + function normalizeAliases () { + // handle old demanded API + const demandedOptions = yargs.getDemandedOptions() + const options = yargs.getOptions() + + ;(Object.keys(options.alias) || []).forEach((key) => { + options.alias[key].forEach((alias) => { + // copy descriptions. + if (descriptions[alias]) self.describe(key, descriptions[alias]) + // copy demanded. + if (alias in demandedOptions) yargs.demandOption(key, demandedOptions[alias]) + // type messages. + if (~options.boolean.indexOf(alias)) yargs.boolean(key) + if (~options.count.indexOf(alias)) yargs.count(key) + if (~options.string.indexOf(alias)) yargs.string(key) + if (~options.normalize.indexOf(alias)) yargs.normalize(key) + if (~options.array.indexOf(alias)) yargs.array(key) + if (~options.number.indexOf(alias)) yargs.number(key) + }) + }) + } + + // given a set of keys, place any keys that are + // ungrouped under the 'Options:' grouping. + function addUngroupedKeys (keys, aliases, groups) { + let groupedKeys = [] + let toCheck = null + Object.keys(groups).forEach((group) => { + groupedKeys = groupedKeys.concat(groups[group]) + }) + + keys.forEach((key) => { + toCheck = [key].concat(aliases[key]) + if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { + groups[defaultGroup].push(key) + } + }) + return groupedKeys + } + + self.showHelp = (level) => { + const logger = yargs._getLoggerInstance() + if (!level) level = 'error' + const emit = typeof level === 'function' ? level : logger[level] + emit(self.help()) + } + + self.functionDescription = (fn) => { + const description = fn.name ? require('decamelize')(fn.name, '-') : __('generated-value') + return ['(', description, ')'].join('') + } + + self.stringifiedValues = function stringifiedValues (values, separator) { + let string = '' + const sep = separator || ', ' + const array = [].concat(values) + + if (!values || !array.length) return string + + array.forEach((value) => { + if (string.length) string += sep + string += JSON.stringify(value) + }) + + return string + } + + // format the default-value-string displayed in + // the right-hand column. + function defaultString (value, defaultDescription) { + let string = `[${__('default:')} ` + + if (value === undefined && !defaultDescription) return null + + if (defaultDescription) { + string += defaultDescription + } else { + switch (typeof value) { + case 'string': + string += `"${value}"` + break + case 'object': + string += JSON.stringify(value) + break + default: + string += value + } + } + + return `${string}]` + } + + // guess the width of the console window, max-width 80. + function windowWidth () { + const maxWidth = 80 + if (typeof process === 'object' && process.stdout && process.stdout.columns) { + return Math.min(maxWidth, process.stdout.columns) + } else { + return maxWidth + } + } + + // logic for displaying application version. + let version = null + self.version = (ver) => { + version = ver + } + + self.showVersion = () => { + const logger = yargs._getLoggerInstance() + logger.log(version) + } + + self.reset = function reset (localLookup) { + // do not reset wrap here + // do not reset fails here + failMessage = null + failureOutput = false + usages = [] + usageDisabled = false + epilog = undefined + examples = [] + commands = [] + descriptions = objFilter(descriptions, (k, v) => !localLookup[k]) + return self + } + + let frozen + self.freeze = function freeze () { + frozen = {} + frozen.failMessage = failMessage + frozen.failureOutput = failureOutput + frozen.usages = usages + frozen.usageDisabled = usageDisabled + frozen.epilog = epilog + frozen.examples = examples + frozen.commands = commands + frozen.descriptions = descriptions + } + self.unfreeze = function unfreeze () { + failMessage = frozen.failMessage + failureOutput = frozen.failureOutput + usages = frozen.usages + usageDisabled = frozen.usageDisabled + epilog = frozen.epilog + examples = frozen.examples + commands = frozen.commands + descriptions = frozen.descriptions + frozen = undefined + } + + return self +} diff --git a/node_modules/yargs/lib/validation.js b/node_modules/yargs/lib/validation.js new file mode 100644 index 0000000..d44d350 --- /dev/null +++ b/node_modules/yargs/lib/validation.js @@ -0,0 +1,375 @@ +'use strict' +const argsert = require('./argsert') +const objFilter = require('./obj-filter') +const specialKeys = ['$0', '--', '_'] + +// validation-type-stuff, missing params, +// bad implications, custom checks. +module.exports = function validation (yargs, usage, y18n) { + const __ = y18n.__ + const __n = y18n.__n + const self = {} + + // validate appropriate # of non-option + // arguments were provided, i.e., '_'. + self.nonOptionCount = function nonOptionCount (argv) { + const demandedCommands = yargs.getDemandedCommands() + // don't count currently executing commands + const _s = argv._.length - yargs.getContext().commands.length + + if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) { + if (_s < demandedCommands._.min) { + if (demandedCommands._.minMsg !== undefined) { + usage.fail( + // replace $0 with observed, $1 with expected. + demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s).replace(/\$1/, demandedCommands._.min) : null + ) + } else { + usage.fail( + __('Not enough non-option arguments: got %s, need at least %s', _s, demandedCommands._.min) + ) + } + } else if (_s > demandedCommands._.max) { + if (demandedCommands._.maxMsg !== undefined) { + usage.fail( + // replace $0 with observed, $1 with expected. + demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s).replace(/\$1/, demandedCommands._.max) : null + ) + } else { + usage.fail( + __('Too many non-option arguments: got %s, maximum of %s', _s, demandedCommands._.max) + ) + } + } + } + } + + // validate the appropriate # of + // positional arguments were provided: + self.positionalCount = function positionalCount (required, observed) { + if (observed < required) { + usage.fail( + __('Not enough non-option arguments: got %s, need at least %s', observed, required) + ) + } + } + + // make sure that any args that require an + // value (--foo=bar), have a value. + self.missingArgumentValue = function missingArgumentValue (argv) { + const defaultValues = [true, false, '', undefined] + const options = yargs.getOptions() + if (options.requiresArg.length > 0) { + const missingRequiredArgs = [] + + options.requiresArg.forEach((key) => { + // if the argument is not set in argv no need to check + // whether a right-hand-side has been provided. + if (!argv.hasOwnProperty(key)) return + + const value = argv[key] + // if a value is explicitly requested, + // flag argument as missing if it does not + // look like foo=bar was entered. + if (~defaultValues.indexOf(value) || + (Array.isArray(value) && !value.length)) { + missingRequiredArgs.push(key) + } + }) + + if (missingRequiredArgs.length > 0) { + usage.fail(__n( + 'Missing argument value: %s', + 'Missing argument values: %s', + missingRequiredArgs.length, + missingRequiredArgs.join(', ') + )) + } + } + } + + // make sure all the required arguments are present. + self.requiredArguments = function requiredArguments (argv) { + const demandedOptions = yargs.getDemandedOptions() + let missing = null + + Object.keys(demandedOptions).forEach((key) => { + if (!argv.hasOwnProperty(key) || typeof argv[key] === 'undefined') { + missing = missing || {} + missing[key] = demandedOptions[key] + } + }) + + if (missing) { + const customMsgs = [] + Object.keys(missing).forEach((key) => { + const msg = missing[key] + if (msg && customMsgs.indexOf(msg) < 0) { + customMsgs.push(msg) + } + }) + + const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : '' + + usage.fail(__n( + 'Missing required argument: %s', + 'Missing required arguments: %s', + Object.keys(missing).length, + Object.keys(missing).join(', ') + customMsg + )) + } + } + + // check for unknown arguments (strict-mode). + self.unknownArguments = function unknownArguments (argv, aliases, positionalMap) { + const commandKeys = yargs.getCommandInstance().getCommands() + const unknown = [] + const currentContext = yargs.getContext() + + Object.keys(argv).forEach((key) => { + if (specialKeys.indexOf(key) === -1 && + !positionalMap.hasOwnProperty(key) && + !yargs._getParseContext().hasOwnProperty(key) && + !aliases.hasOwnProperty(key) + ) { + unknown.push(key) + } + }) + + if (commandKeys.length > 0) { + argv._.slice(currentContext.commands.length).forEach((key) => { + if (commandKeys.indexOf(key) === -1) { + unknown.push(key) + } + }) + } + + if (unknown.length > 0) { + usage.fail(__n( + 'Unknown argument: %s', + 'Unknown arguments: %s', + unknown.length, + unknown.join(', ') + )) + } + } + + // validate arguments limited to enumerated choices + self.limitedChoices = function limitedChoices (argv) { + const options = yargs.getOptions() + const invalid = {} + + if (!Object.keys(options.choices).length) return + + Object.keys(argv).forEach((key) => { + if (specialKeys.indexOf(key) === -1 && + options.choices.hasOwnProperty(key)) { + [].concat(argv[key]).forEach((value) => { + // TODO case-insensitive configurability + if (options.choices[key].indexOf(value) === -1 && + value !== undefined) { + invalid[key] = (invalid[key] || []).concat(value) + } + }) + } + }) + + const invalidKeys = Object.keys(invalid) + + if (!invalidKeys.length) return + + let msg = __('Invalid values:') + invalidKeys.forEach((key) => { + msg += `\n ${__( + 'Argument: %s, Given: %s, Choices: %s', + key, + usage.stringifiedValues(invalid[key]), + usage.stringifiedValues(options.choices[key]) + )}` + }) + usage.fail(msg) + } + + // custom checks, added using the `check` option on yargs. + let checks = [] + self.check = function check (f, global) { + checks.push({ + func: f, + global + }) + } + + self.customChecks = function customChecks (argv, aliases) { + for (let i = 0, f; (f = checks[i]) !== undefined; i++) { + const func = f.func + let result = null + try { + result = func(argv, aliases) + } catch (err) { + usage.fail(err.message ? err.message : err, err) + continue + } + + if (!result) { + usage.fail(__('Argument check failed: %s', func.toString())) + } else if (typeof result === 'string' || result instanceof Error) { + usage.fail(result.toString(), result) + } + } + } + + // check implications, argument foo implies => argument bar. + let implied = {} + self.implies = function implies (key, value) { + argsert(' [array|number|string]', [key, value], arguments.length) + + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.implies(k, key[k]) + }) + } else { + yargs.global(key) + if (!implied[key]) { + implied[key] = [] + } + if (Array.isArray(value)) { + value.forEach((i) => self.implies(key, i)) + } else { + implied[key].push(value) + } + } + } + self.getImplied = function getImplied () { + return implied + } + + self.implications = function implications (argv) { + const implyFail = [] + + Object.keys(implied).forEach((key) => { + const origKey = key + ;(implied[key] || []).forEach((value) => { + let num + let key = origKey + const origValue = value + + // convert string '1' to number 1 + num = Number(key) + key = isNaN(num) ? key : num + + if (typeof key === 'number') { + // check length of argv._ + key = argv._.length >= key + } else if (key.match(/^--no-.+/)) { + // check if key doesn't exist + key = key.match(/^--no-(.+)/)[1] + key = !argv[key] + } else { + // check if key exists + key = argv[key] + } + + num = Number(value) + value = isNaN(num) ? value : num + + if (typeof value === 'number') { + value = argv._.length >= value + } else if (value.match(/^--no-.+/)) { + value = value.match(/^--no-(.+)/)[1] + value = !argv[value] + } else { + value = argv[value] + } + if (key && !value) { + implyFail.push(` ${origKey} -> ${origValue}`) + } + }) + }) + + if (implyFail.length) { + let msg = `${__('Implications failed:')}\n` + + implyFail.forEach((value) => { + msg += (value) + }) + + usage.fail(msg) + } + } + + let conflicting = {} + self.conflicts = function conflicts (key, value) { + argsert(' [array|string]', [key, value], arguments.length) + + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.conflicts(k, key[k]) + }) + } else { + yargs.global(key) + if (!conflicting[key]) { + conflicting[key] = [] + } + if (Array.isArray(value)) { + value.forEach((i) => self.conflicts(key, i)) + } else { + conflicting[key].push(value) + } + } + } + self.getConflicting = () => conflicting + + self.conflicting = function conflictingFn (argv) { + Object.keys(argv).forEach((key) => { + if (conflicting[key]) { + conflicting[key].forEach((value) => { + // we default keys to 'undefined' that have been configured, we should not + // apply conflicting check unless they are a value other than 'undefined'. + if (value && argv[key] !== undefined && argv[value] !== undefined) { + usage.fail(__(`Arguments ${key} and ${value} are mutually exclusive`)) + } + }) + } + }) + } + + self.recommendCommands = function recommendCommands (cmd, potentialCommands) { + const distance = require('./levenshtein') + const threshold = 3 // if it takes more than three edits, let's move on. + potentialCommands = potentialCommands.sort((a, b) => b.length - a.length) + + let recommended = null + let bestDistance = Infinity + for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { + const d = distance(cmd, candidate) + if (d <= threshold && d < bestDistance) { + bestDistance = d + recommended = candidate + } + } + if (recommended) usage.fail(__('Did you mean %s?', recommended)) + } + + self.reset = function reset (localLookup) { + implied = objFilter(implied, (k, v) => !localLookup[k]) + conflicting = objFilter(conflicting, (k, v) => !localLookup[k]) + checks = checks.filter(c => c.global) + return self + } + + let frozen + self.freeze = function freeze () { + frozen = {} + frozen.implied = implied + frozen.checks = checks + frozen.conflicting = conflicting + } + self.unfreeze = function unfreeze () { + implied = frozen.implied + checks = frozen.checks + conflicting = frozen.conflicting + frozen = undefined + } + + return self +} diff --git a/node_modules/yargs/lib/yerror.js b/node_modules/yargs/lib/yerror.js new file mode 100644 index 0000000..53375a0 --- /dev/null +++ b/node_modules/yargs/lib/yerror.js @@ -0,0 +1,11 @@ +'use strict' +function YError (msg) { + this.name = 'YError' + this.message = msg || 'yargs error' + Error.captureStackTrace(this, YError) +} + +YError.prototype = Object.create(Error.prototype) +YError.prototype.constructor = YError + +module.exports = YError diff --git a/node_modules/yargs/locales/be.json b/node_modules/yargs/locales/be.json new file mode 100644 index 0000000..141ebe1 --- /dev/null +++ b/node_modules/yargs/locales/be.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Каманды:", + "Options:": "Опцыі:", + "Examples:": "Прыклады:", + "boolean": "булевы тып", + "count": "падлік", + "string": "радковы тып", + "number": "лік", + "array": "масіў", + "required": "неабходна", + "default:": "па змаўчанні:", + "choices:": "магчымасці:", + "aliases:": "аліасы:", + "generated-value": "згенераванае значэнне", + "Not enough non-option arguments: got %s, need at least %s": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", + "Too many non-option arguments: got %s, maximum of %s": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", + "Missing argument value: %s": { + "one": "Не хапае значэння аргументу: %s", + "other": "Не хапае значэнняў аргументаў: %s" + }, + "Missing required argument: %s": { + "one": "Не хапае неабходнага аргументу: %s", + "other": "Не хапае неабходных аргументаў: %s" + }, + "Unknown argument: %s": { + "one": "Невядомы аргумент: %s", + "other": "Невядомыя аргументы: %s" + }, + "Invalid values:": "Несапраўдныя значэння:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", + "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", + "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", + "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", + "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", + "Path to JSON config file": "Шлях да файла канфігурацыі JSON", + "Show help": "Паказаць дапамогу", + "Show version number": "Паказаць нумар версіі", + "Did you mean %s?": "Вы мелі на ўвазе %s?" +} diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json new file mode 100644 index 0000000..d805710 --- /dev/null +++ b/node_modules/yargs/locales/de.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Kommandos:", + "Options:": "Optionen:", + "Examples:": "Beispiele:", + "boolean": "boolean", + "count": "Zähler", + "string": "string", + "number": "Zahl", + "array": "array", + "required": "erforderlich", + "default:": "Standard:", + "choices:": "Möglichkeiten:", + "aliases:": "Aliase:", + "generated-value": "Generierter-Wert", + "Not enough non-option arguments: got %s, need at least %s": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", + "Too many non-option arguments: got %s, maximum of %s": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", + "Missing argument value: %s": { + "one": "Fehlender Argumentwert: %s", + "other": "Fehlende Argumentwerte: %s" + }, + "Missing required argument: %s": { + "one": "Fehlendes Argument: %s", + "other": "Fehlende Argumente: %s" + }, + "Unknown argument: %s": { + "one": "Unbekanntes Argument: %s", + "other": "Unbekannte Argumente: %s" + }, + "Invalid values:": "Unzulässige Werte:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", + "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", + "Implications failed:": "Implikationen fehlgeschlagen:", + "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", + "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", + "Path to JSON config file": "Pfad zur JSON-Config Datei", + "Show help": "Hilfe anzeigen", + "Show version number": "Version anzeigen", + "Did you mean %s?": "Meintest du %s?" +} diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json new file mode 100644 index 0000000..fc65c2a --- /dev/null +++ b/node_modules/yargs/locales/en.json @@ -0,0 +1,42 @@ +{ + "Commands:": "Commands:", + "Options:": "Options:", + "Examples:": "Examples:", + "boolean": "boolean", + "count": "count", + "string": "string", + "number": "number", + "array": "array", + "required": "required", + "default:": "default:", + "choices:": "choices:", + "aliases:": "aliases:", + "generated-value": "generated-value", + "Not enough non-option arguments: got %s, need at least %s": "Not enough non-option arguments: got %s, need at least %s", + "Too many non-option arguments: got %s, maximum of %s": "Too many non-option arguments: got %s, maximum of %s", + "Missing argument value: %s": { + "one": "Missing argument value: %s", + "other": "Missing argument values: %s" + }, + "Missing required argument: %s": { + "one": "Missing required argument: %s", + "other": "Missing required arguments: %s" + }, + "Unknown argument: %s": { + "one": "Unknown argument: %s", + "other": "Unknown arguments: %s" + }, + "Invalid values:": "Invalid values:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", + "Argument check failed: %s": "Argument check failed: %s", + "Implications failed:": "Implications failed:", + "Not enough arguments following: %s": "Not enough arguments following: %s", + "Invalid JSON config file: %s": "Invalid JSON config file: %s", + "Path to JSON config file": "Path to JSON config file", + "Show help": "Show help", + "Show version number": "Show version number", + "Did you mean %s?": "Did you mean %s?", + "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", + "Positionals:": "Positionals:", + "command": "command" +} diff --git a/node_modules/yargs/locales/es.json b/node_modules/yargs/locales/es.json new file mode 100644 index 0000000..d7c8af9 --- /dev/null +++ b/node_modules/yargs/locales/es.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opciones:", + "Examples:": "Ejemplos:", + "boolean": "booleano", + "count": "cuenta", + "string": "cadena de caracteres", + "number": "número", + "array": "tabla", + "required": "requerido", + "default:": "defecto:", + "choices:": "selección:", + "aliases:": "alias:", + "generated-value": "valor-generado", + "Not enough non-option arguments: got %s, need at least %s": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", + "Too many non-option arguments: got %s, maximum of %s": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", + "Missing argument value: %s": { + "one": "Falta argumento: %s", + "other": "Faltan argumentos: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento requerido: %s", + "other": "Faltan argumentos requeridos: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconocido: %s", + "other": "Argumentos desconocidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", + "Argument check failed: %s": "Verificación de argumento ha fallado: %s", + "Implications failed:": "Implicaciones fallidas:", + "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", + "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", + "Path to JSON config file": "Ruta al archivo de configuración JSON", + "Show help": "Muestra ayuda", + "Show version number": "Muestra número de versión", + "Did you mean %s?": "Quisiste decir %s?" +} diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json new file mode 100644 index 0000000..481f47e --- /dev/null +++ b/node_modules/yargs/locales/fr.json @@ -0,0 +1,37 @@ +{ + "Commands:": "Commandes:", + "Options:": "Options:", + "Examples:": "Exemples:", + "boolean": "booléen", + "count": "comptage", + "string": "chaine de caractère", + "number": "nombre", + "array": "tableau", + "required": "requis", + "default:": "défaut:", + "choices:": "choix:", + "generated-value": "valeur générée", + "Not enough non-option arguments: got %s, need at least %s": "Pas assez d'arguments non-option: reçu %s, besoin d'au moins %s", + "Too many non-option arguments: got %s, maximum of %s": "Trop d'arguments non-option: reçu %s, maximum %s", + "Missing argument value: %s": { + "one": "Argument manquant: %s", + "other": "Arguments manquants: %s" + }, + "Missing required argument: %s": { + "one": "Argument requis manquant: %s", + "other": "Arguments requis manquants: %s" + }, + "Unknown argument: %s": { + "one": "Argument inconnu: %s", + "other": "Arguments inconnus: %s" + }, + "Invalid values:": "Valeurs invalides:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Donné: %s, Choix: %s", + "Argument check failed: %s": "Echec de la vérification de l'argument: %s", + "Implications failed:": "Implications échouées:", + "Not enough arguments following: %s": "Pas assez d'arguments suivant: %s", + "Invalid JSON config file: %s": "Fichier de configuration JSON invalide: %s", + "Path to JSON config file": "Chemin du fichier de configuration JSON", + "Show help": "Affiche de l'aide", + "Show version number": "Affiche le numéro de version" +} diff --git a/node_modules/yargs/locales/hi.json b/node_modules/yargs/locales/hi.json new file mode 100644 index 0000000..2cd677a --- /dev/null +++ b/node_modules/yargs/locales/hi.json @@ -0,0 +1,42 @@ +{ + "Commands:": "आदेश:", + "Options:": "विकल्प:", + "Examples:": "उदाहरण:", + "boolean": "सत्यता", + "count": "संख्या", + "string": "वर्णों का तार ", + "number": "अंक", + "array": "सरणी", + "required": "आवश्यक", + "default:": "डिफॉल्ट:", + "choices:": "विकल्प:", + "aliases:": "उपनाम:", + "generated-value": "उत्पन्न-मूल्य", + "Not enough non-option arguments: got %s, need at least %s": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", + "Too many non-option arguments: got %s, maximum of %s": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", + "Missing argument value: %s": { + "one": "कुछ तर्को के मूल्य गुम हैं: %s", + "other": "कुछ तर्को के मूल्य गुम हैं: %s" + }, + "Missing required argument: %s": { + "one": "आवश्यक तर्क गुम हैं: %s", + "other": "आवश्यक तर्क गुम हैं: %s" + }, + "Unknown argument: %s": { + "one": "अज्ञात तर्क प्राप्त: %s", + "other": "अज्ञात तर्क प्राप्त: %s" + }, + "Invalid values:": "अमान्य मूल्य:", + "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", + "Argument check failed: %s": "तर्क जांच विफल: %s", + "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", + "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", + "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", + "Path to JSON config file": "JSON config फाइल का पथ", + "Show help": "सहायता दिखाएँ", + "Show version number": "Version संख्या दिखाएँ", + "Did you mean %s?": "क्या आपका मतलब है %s?", + "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", + "Positionals:": "स्थानीय:", + "command": "आदेश" +} diff --git a/node_modules/yargs/locales/hu.json b/node_modules/yargs/locales/hu.json new file mode 100644 index 0000000..7b7d166 --- /dev/null +++ b/node_modules/yargs/locales/hu.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Parancsok:", + "Options:": "Opciók:", + "Examples:": "Példák:", + "boolean": "boolean", + "count": "számláló", + "string": "szöveg", + "number": "szám", + "array": "tömb", + "required": "kötelező", + "default:": "alapértelmezett:", + "choices:": "lehetőségek:", + "aliases:": "aliaszok:", + "generated-value": "generált-érték", + "Not enough non-option arguments: got %s, need at least %s": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", + "Too many non-option arguments: got %s, maximum of %s": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", + "Missing argument value: %s": { + "one": "Hiányzó argumentum érték: %s", + "other": "Hiányzó argumentum értékek: %s" + }, + "Missing required argument: %s": { + "one": "Hiányzó kötelező argumentum: %s", + "other": "Hiányzó kötelező argumentumok: %s" + }, + "Unknown argument: %s": { + "one": "Ismeretlen argumentum: %s", + "other": "Ismeretlen argumentumok: %s" + }, + "Invalid values:": "Érvénytelen érték:", + "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", + "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", + "Implications failed:": "Implikációk sikertelenek:", + "Not enough arguments following: %s": "Nem elég argumentum követi: %s", + "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", + "Path to JSON config file": "JSON konfigurációs file helye", + "Show help": "Súgo megjelenítése", + "Show version number": "Verziószám megjelenítése", + "Did you mean %s?": "Erre gondoltál %s?" +} diff --git a/node_modules/yargs/locales/id.json b/node_modules/yargs/locales/id.json new file mode 100644 index 0000000..87e441c --- /dev/null +++ b/node_modules/yargs/locales/id.json @@ -0,0 +1,43 @@ + +{ + "Commands:": "Perintah:", + "Options:": "Pilihan:", + "Examples:": "Contoh:", + "boolean": "boolean", + "count": "jumlah", + "number": "nomor", + "string": "string", + "array": "larik", + "required": "diperlukan", + "default:": "bawaan:", + "aliases:": "istilah lain:", + "choices:": "pilihan:", + "generated-value": "nilai-yang-dihasilkan", + "Not enough non-option arguments: got %s, need at least %s": "Argumen wajib kurang: hanya %s, minimal %s", + "Too many non-option arguments: got %s, maximum of %s": "Terlalu banyak argumen wajib: ada %s, maksimal %s", + "Missing argument value: %s": { + "one": "Kurang argumen: %s", + "other": "Kurang argumen: %s" + }, + "Missing required argument: %s": { + "one": "Kurang argumen wajib: %s", + "other": "Kurang argumen wajib: %s" + }, + "Unknown argument: %s": { + "one": "Argumen tak diketahui: %s", + "other": "Argumen tak diketahui: %s" + }, + "Invalid values:": "Nilai-nilai tidak valid:", + "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", + "Argument check failed: %s": "Pemeriksaan argument gagal: %s", + "Implications failed:": "Implikasi gagal:", + "Not enough arguments following: %s": "Kurang argumen untuk: %s", + "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", + "Path to JSON config file": "Alamat berkas konfigurasi JSON", + "Show help": "Lihat bantuan", + "Show version number": "Lihat nomor versi", + "Did you mean %s?": "Maksud Anda: %s?", + "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", + "Positionals:": "Posisional-posisional:", + "command": "perintah" +} diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json new file mode 100644 index 0000000..f9eb375 --- /dev/null +++ b/node_modules/yargs/locales/it.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Comandi:", + "Options:": "Opzioni:", + "Examples:": "Esempi:", + "boolean": "booleano", + "count": "contatore", + "string": "stringa", + "number": "numero", + "array": "vettore", + "required": "richiesto", + "default:": "predefinito:", + "choices:": "scelte:", + "aliases:": "alias:", + "generated-value": "valore generato", + "Not enough non-option arguments: got %s, need at least %s": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", + "Too many non-option arguments: got %s, maximum of %s": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", + "Missing argument value: %s": { + "one": "Argomento mancante: %s", + "other": "Argomenti mancanti: %s" + }, + "Missing required argument: %s": { + "one": "Argomento richiesto mancante: %s", + "other": "Argomenti richiesti mancanti: %s" + }, + "Unknown argument: %s": { + "one": "Argomento sconosciuto: %s", + "other": "Argomenti sconosciuti: %s" + }, + "Invalid values:": "Valori non validi:", + "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", + "Argument check failed: %s": "Controllo dell'argomento fallito: %s", + "Implications failed:": "Argomenti impliciti non soddisfatti:", + "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", + "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", + "Path to JSON config file": "Percorso del file di configurazione JSON", + "Show help": "Mostra la schermata di aiuto", + "Show version number": "Mostra il numero di versione", + "Did you mean %s?": "Intendi forse %s?" +} diff --git a/node_modules/yargs/locales/ja.json b/node_modules/yargs/locales/ja.json new file mode 100644 index 0000000..64ee6d3 --- /dev/null +++ b/node_modules/yargs/locales/ja.json @@ -0,0 +1,42 @@ +{ + "Commands:": "コマンド:", + "Options:": "オプション:", + "Examples:": "例:", + "boolean": "真偽", + "count": "カウント", + "string": "文字列", + "number": "数値", + "array": "配列", + "required": "必須", + "default:": "デフォルト:", + "choices:": "選択してください:", + "aliases:": "エイリアス:", + "generated-value": "生成された値", + "Not enough non-option arguments: got %s, need at least %s": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", + "Too many non-option arguments: got %s, maximum of %s": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", + "Missing argument value: %s": { + "one": "引数が見つかりません: %s", + "other": "引数が見つかりません: %s" + }, + "Missing required argument: %s": { + "one": "必須の引数が見つかりません: %s", + "other": "必須の引数が見つかりません: %s" + }, + "Unknown argument: %s": { + "one": "未知の引数です: %s", + "other": "未知の引数です: %s" + }, + "Invalid values:": "不正な値です:", + "Argument: %s, Given: %s, Choices: %s": "引数は %s です。指定できるのは %s つです。選択してください: %s", + "Argument check failed: %s": "引数のチェックに失敗しました: %s", + "Implications failed:": "オプションの組み合わせで不正が生じました:", + "Not enough arguments following: %s": "次の引数が不足しています。: %s", + "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", + "Path to JSON config file": "JSONの設定ファイルまでのpath", + "Show help": "ヘルプを表示", + "Show version number": "バージョンを表示", + "Did you mean %s?": "もしかして %s?", + "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", + "Positionals:": "位置:", + "command": "コマンド" +} diff --git a/node_modules/yargs/locales/ko.json b/node_modules/yargs/locales/ko.json new file mode 100644 index 0000000..0eaeab2 --- /dev/null +++ b/node_modules/yargs/locales/ko.json @@ -0,0 +1,42 @@ +{ + "Commands:": "명령:", + "Options:": "옵션:", + "Examples:": "예시:", + "boolean": "여부", + "count": "개수", + "string": "문자열", + "number": "숫자", + "array": "배열", + "required": "필수", + "default:": "기본:", + "choices:": "선택:", + "aliases:": "별칭:", + "generated-value": "생성된 값", + "Not enough non-option arguments: got %s, need at least %s": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다", + "Too many non-option arguments: got %s, maximum of %s": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다", + "Missing argument value: %s": { + "one": "인자값을 받지 못했습니다: %s", + "other": "인자값들을 받지 못했습니다: %s" + }, + "Missing required argument: %s": { + "one": "필수 인자를 받지 못했습니다: %s", + "other": "필수 인자들을 받지 못했습니다: %s" + }, + "Unknown argument: %s": { + "one": "알 수 없는 인자입니다: %s", + "other": "알 수 없는 인자들입니다: %s" + }, + "Invalid values:": "잘못된 값입니다:", + "Argument: %s, Given: %s, Choices: %s": "인자: %s, 입력받은 값: %s, 선택지: %s", + "Argument check failed: %s": "유효하지 않은 인자입니다: %s", + "Implications failed:": "옵션의 조합이 잘못되었습니다:", + "Not enough arguments following: %s": "인자가 충분하게 주어지지 않았습니다: %s", + "Invalid JSON config file: %s": "유효하지 않은 JSON 설정파일입니다: %s", + "Path to JSON config file": "JSON 설정파일 경로", + "Show help": "도움말을 보여줍니다", + "Show version number": "버전 넘버를 보여줍니다", + "Did you mean %s?": "찾고계신게 %s입니까?", + "Arguments %s and %s are mutually exclusive" : "%s와 %s 인자는 같이 사용될 수 없습니다", + "Positionals:": "위치:", + "command": "명령" +} diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json new file mode 100644 index 0000000..fc607fb --- /dev/null +++ b/node_modules/yargs/locales/nb.json @@ -0,0 +1,37 @@ +{ + "Commands:": "Kommandoer:", + "Options:": "Alternativer:", + "Examples:": "Eksempler:", + "boolean": "boolsk", + "count": "antall", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default:": "standard:", + "choices:": "valg:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", + "Too many non-option arguments: got %s, maximum of %s": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", + "Missing argument value: %s": { + "one": "Mangler argument verdi: %s", + "other": "Mangler argument verdier: %s" + }, + "Missing required argument: %s": { + "one": "Mangler obligatorisk argument: %s", + "other": "Mangler obligatoriske argumenter: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjente argumenter: %s" + }, + "Invalid values:": "Ugyldige verdier:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", + "Argument check failed: %s": "Argument sjekk mislyktes: %s", + "Implications failed:": "Konsekvensene mislyktes:", + "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json new file mode 100644 index 0000000..1d14472 --- /dev/null +++ b/node_modules/yargs/locales/nl.json @@ -0,0 +1,42 @@ +{ + "Commands:": "Opdrachten:", + "Options:": "Opties:", + "Examples:": "Voorbeelden:", + "boolean": "boolean", + "count": "aantal", + "string": "text", + "number": "nummer", + "array": "lijst", + "required": "verplicht", + "default:": "standaard:", + "choices:": "keuzes:", + "aliases:": "aliassen:", + "generated-value": "gegenereerde waarde", + "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg non-optie argumenten. Gekregen: %s, minstens nodig: %s", + "Too many non-option arguments: got %s, maximum of %s": "Te veel non-optie argumenten. Gekregen: %s, maximum: %s", + "Missing argument value: %s": { + "one": "Missing argument value: %s", + "other": "Missing argument values: %s" + }, + "Missing required argument: %s": { + "one": "Missend verplichte argument: %s", + "other": "Missende verplichte argumenten: %s" + }, + "Unknown argument: %s": { + "one": "Onbekend argument: %s", + "other": "Onbekende argumenten: %s" + }, + "Invalid values:": "Ongeldige waardes:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", + "Argument check failed: %s": "Argument check mislukt: %s", + "Implications failed:": "Implicaties mislukt:", + "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", + "Invalid JSON config file: %s": "Ongeldig JSON configuratiebestand: %s", + "Path to JSON config file": "Pad naar JSON configuratiebestand", + "Show help": "Toon help", + "Show version number": "Toon versie nummer", + "Did you mean %s?": "Bedoelde u misschien %s?", + "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s zijn onderling uitsluitend", + "Positionals:": "Positie-afhankelijke argumenten", + "command": "commando" +} diff --git a/node_modules/yargs/locales/nn.json b/node_modules/yargs/locales/nn.json new file mode 100644 index 0000000..5e03c50 --- /dev/null +++ b/node_modules/yargs/locales/nn.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Kommandoar:", + "Options:": "Alternativ:", + "Examples:": "Døme:", + "boolean": "boolsk", + "count": "mengd", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default:": "standard:", + "choices:": "val:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": + "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", + "Too many non-option arguments: got %s, maximum of %s": + "For mange ikkje-alternativ argument: fekk %s, maksimum %s", + "Missing argument value: %s": { + "one": "Manglar argumentverdi: %s", + "other": "Manglar argumentverdiar: %s" + }, + "Missing required argument: %s": { + "one": "Manglar obligatorisk argument: %s", + "other": "Manglar obligatoriske argument: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjende argument: %s" + }, + "Invalid values:": "Ugyldige verdiar:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", + "Argument check failed: %s": "Argument sjekk mislukkast: %s", + "Implications failed:": "Konsekvensane mislukkast:", + "Not enough arguments following: %s": "Ikkje nok fylgande argument: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json new file mode 100644 index 0000000..1f4e19e --- /dev/null +++ b/node_modules/yargs/locales/pirate.json @@ -0,0 +1,12 @@ +{ + "Commands:": "Choose yer command:", + "Options:": "Options for me hearties!", + "Examples:": "Ex. marks the spot:", + "required": "requi-yar-ed", + "Missing required argument: %s": { + "one": "Ye be havin' to set the followin' argument land lubber: %s", + "other": "Ye be havin' to set the followin' arguments land lubber: %s" + }, + "Show help": "Parlay this here code of conduct", + "Show version number": "'Tis the version ye be askin' fer" +} diff --git a/node_modules/yargs/locales/pl.json b/node_modules/yargs/locales/pl.json new file mode 100644 index 0000000..6926a45 --- /dev/null +++ b/node_modules/yargs/locales/pl.json @@ -0,0 +1,42 @@ +{ + "Commands:": "Polecenia:", + "Options:": "Opcje:", + "Examples:": "Przykłady:", + "boolean": "boolean", + "count": "ilość", + "string": "ciąg znaków", + "number": "liczba", + "array": "tablica", + "required": "wymagany", + "default:": "domyślny:", + "choices:": "dostępne:", + "aliases:": "aliasy:", + "generated-value": "wygenerowana-wartość", + "Not enough non-option arguments: got %s, need at least %s": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", + "Too many non-option arguments: got %s, maximum of %s": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", + "Missing argument value: %s": { + "one": "Brak wartości dla argumentu: %s", + "other": "Brak wartości dla argumentów: %s" + }, + "Missing required argument: %s": { + "one": "Brak wymaganego argumentu: %s", + "other": "Brak wymaganych argumentów: %s" + }, + "Unknown argument: %s": { + "one": "Nieznany argument: %s", + "other": "Nieznane argumenty: %s" + }, + "Invalid values:": "Nieprawidłowe wartości:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", + "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", + "Implications failed:": "Założenia nie zostały spełnione:", + "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", + "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", + "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", + "Show help": "Pokaż pomoc", + "Show version number": "Pokaż numer wersji", + "Did you mean %s?": "Czy chodziło Ci o %s?", + "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", + "Positionals:": "Pozycyjne:", + "command": "polecenie" +} diff --git a/node_modules/yargs/locales/pt.json b/node_modules/yargs/locales/pt.json new file mode 100644 index 0000000..75c3921 --- /dev/null +++ b/node_modules/yargs/locales/pt.json @@ -0,0 +1,38 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "boolean", + "count": "contagem", + "string": "cadeia de caracteres", + "number": "número", + "array": "arranjo", + "required": "requerido", + "default:": "padrão:", + "choices:": "escolhas:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", + "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", + "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", + "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", + "Show help": "Mostra ajuda", + "Show version number": "Mostra número de versão", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" +} diff --git a/node_modules/yargs/locales/pt_BR.json b/node_modules/yargs/locales/pt_BR.json new file mode 100644 index 0000000..904cb66 --- /dev/null +++ b/node_modules/yargs/locales/pt_BR.json @@ -0,0 +1,42 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "booleano", + "count": "contagem", + "string": "string", + "number": "número", + "array": "array", + "required": "obrigatório", + "default:": "padrão:", + "choices:": "opções:", + "aliases:": "sinônimos:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", + "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos: recebido %s, máximo de %s", + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", + "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", + "Path to JSON config file": "Caminho para o arquivo JSON de configuração", + "Show help": "Exibe ajuda", + "Show version number": "Exibe a versão", + "Did you mean %s?": "Você quis dizer %s?", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", + "Positionals:": "Posicionais:", + "command": "comando" +} diff --git a/node_modules/yargs/locales/ru.json b/node_modules/yargs/locales/ru.json new file mode 100644 index 0000000..cb7b88b --- /dev/null +++ b/node_modules/yargs/locales/ru.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Команды:", + "Options:": "Опции:", + "Examples:": "Примеры:", + "boolean": "булевый тип", + "count": "подсчет", + "string": "строковой тип", + "number": "число", + "array": "массив", + "required": "необходимо", + "default:": "по умолчанию:", + "choices:": "возможности:", + "aliases:": "алиасы:", + "generated-value": "генерированное значение", + "Not enough non-option arguments: got %s, need at least %s": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", + "Too many non-option arguments: got %s, maximum of %s": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", + "Missing argument value: %s": { + "one": "Не хватает значения аргумента: %s", + "other": "Не хватает значений аргументов: %s" + }, + "Missing required argument: %s": { + "one": "Не хватает необходимого аргумента: %s", + "other": "Не хватает необходимых аргументов: %s" + }, + "Unknown argument: %s": { + "one": "Неизвестный аргумент: %s", + "other": "Неизвестные аргументы: %s" + }, + "Invalid values:": "Недействительные значения:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", + "Argument check failed: %s": "Проверка аргументов не удалась: %s", + "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", + "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", + "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", + "Path to JSON config file": "Путь к файлу конфигурации JSON", + "Show help": "Показать помощь", + "Show version number": "Показать номер версии", + "Did you mean %s?": "Вы имели в виду %s?" +} diff --git a/node_modules/yargs/locales/th.json b/node_modules/yargs/locales/th.json new file mode 100644 index 0000000..3f08dcd --- /dev/null +++ b/node_modules/yargs/locales/th.json @@ -0,0 +1,39 @@ +{ + "Commands:": "คอมมาน", + "Options:": "ออฟชั่น", + "Examples:": "ตัวอย่าง", + "boolean": "บูลีน", + "count": "นับ", + "string": "สตริง", + "number": "ตัวเลข", + "array": "อาเรย์", + "required": "จำเป็น", + "default:": "ค่าเริ่มต้น", + "choices:": "ตัวเลือก", + "aliases:": "เอเลียส", + "generated-value": "ค่าที่ถูกสร้างขึ้น", + "Not enough non-option arguments: got %s, need at least %s": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", + "Too many non-option arguments: got %s, maximum of %s": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", + "Missing argument value: %s": { + "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", + "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" + }, + "Missing required argument: %s": { + "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", + "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" + }, + "Unknown argument: %s": { + "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", + "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" + }, + "Invalid values:": "ค่าไม่ถูกต้อง:", + "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", + "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", + "Implications failed:": "Implications ไม่สำเร็จ:", + "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", + "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", + "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", + "Show help": "ขอความช่วยเหลือ", + "Show version number": "แสดงตัวเลขเวอร์ชั่น", + "Did you mean %s?": "คุณหมายถึง %s?" +} diff --git a/node_modules/yargs/locales/tr.json b/node_modules/yargs/locales/tr.json new file mode 100644 index 0000000..9b06c52 --- /dev/null +++ b/node_modules/yargs/locales/tr.json @@ -0,0 +1,41 @@ +{ + "Commands:": "Komutlar:", + "Options:": "Seçenekler:", + "Examples:": "Örnekler:", + "boolean": "boolean", + "count": "sayı", + "string": "string", + "number": "numara", + "array": "array", + "required": "zorunlu", + "default:": "varsayılan:", + "choices:": "seçimler:", + "aliases:": "takma adlar:", + "generated-value": "oluşturulan-değer", + "Not enough non-option arguments: got %s, need at least %s": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", + "Too many non-option arguments: got %s, maximum of %s": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", + "Missing argument value: %s": { + "one": "Eksik argüman değeri: %s", + "other": "Eksik argüman değerleri: %s" + }, + "Missing required argument: %s": { + "one": "Eksik zorunlu argüman: %s", + "other": "Eksik zorunlu argümanlar: %s" + }, + "Unknown argument: %s": { + "one": "Bilinmeyen argüman: %s", + "other": "Bilinmeyen argümanlar: %s" + }, + "Invalid values:": "Geçersiz değerler:", + "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", + "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", + "Implications failed:": "Sonuçlar başarısız oldu:", + "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", + "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", + "Path to JSON config file": "JSON yapılandırma dosya konumu", + "Show help": "Yardım detaylarını göster", + "Show version number": "Versiyon detaylarını göster", + "Did you mean %s?": "Bunu mu demek istediniz: %s?", + "Positionals:": "Sıralılar:", + "command": "komut" +} diff --git a/node_modules/yargs/locales/zh_CN.json b/node_modules/yargs/locales/zh_CN.json new file mode 100644 index 0000000..03a3d94 --- /dev/null +++ b/node_modules/yargs/locales/zh_CN.json @@ -0,0 +1,41 @@ +{ + "Commands:": "命令:", + "Options:": "选项:", + "Examples:": "示例:", + "boolean": "布尔", + "count": "计数", + "string": "字符串", + "number": "数字", + "array": "数组", + "required": "必需", + "default:": "默认值:", + "choices:": "可选值:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", + "Too many non-option arguments: got %s, maximum of %s": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", + "Missing argument value: %s": { + "one": "没有给此选项指定值:%s", + "other": "没有给这些选项指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必须的选项:%s", + "other": "缺少这些必须的选项:%s" + }, + "Unknown argument: %s": { + "one": "无法识别的选项:%s", + "other": "无法识别这些选项:%s" + }, + "Invalid values:": "无效的选项值:", + "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", + "Argument check failed: %s": "选项值验证失败:%s", + "Implications failed:": "缺少依赖的选项:", + "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", + "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", + "Path to JSON config file": "JSON 配置文件的路径", + "Show help": "显示帮助信息", + "Show version number": "显示版本号", + "Did you mean %s?": "是指 %s?", + "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", + "Positionals:": "位置:", + "command": "命令" +} diff --git a/node_modules/yargs/locales/zh_TW.json b/node_modules/yargs/locales/zh_TW.json new file mode 100644 index 0000000..1249888 --- /dev/null +++ b/node_modules/yargs/locales/zh_TW.json @@ -0,0 +1,40 @@ +{ + "Commands:": "命令:", + "Options:": "選項:", + "Examples:": "例:", + "boolean": "布林", + "count": "次數", + "string": "字串", + "number": "數字", + "array": "陣列", + "required": "必須", + "default:": "預設值:", + "choices:": "可選值:", + "aliases:": "別名:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", + "Too many non-option arguments: got %s, maximum of %s": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", + "Missing argument value: %s": { + "one": "此引數無指定值:%s", + "other": "這些引數無指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必須的引數:%s", + "other": "缺少這些必須的引數:%s" + }, + "Unknown argument: %s": { + "one": "未知的引數:%s", + "other": "未知的這些引數:%s" + }, + "Invalid values:": "無效的選項值:", + "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", + "Argument check failed: %s": "引數驗證失敗:%s", + "Implications failed:": "缺少依賴的選項:", + "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", + "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", + "Path to JSON config file": "JSON 設置文件的路徑", + "Show help": "顯示說明", + "Show version number": "顯示版本", + "Did you mean %s?": "是指 %s?", + "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 是互斥的" +} diff --git a/node_modules/yargs/node_modules/ansi-regex/index.js b/node_modules/yargs/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..c4aaecf --- /dev/null +++ b/node_modules/yargs/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = () => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, 'g'); +}; diff --git a/node_modules/yargs/node_modules/ansi-regex/license b/node_modules/yargs/node_modules/ansi-regex/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/yargs/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/yargs/node_modules/ansi-regex/package.json b/node_modules/yargs/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..4fdcab8 --- /dev/null +++ b/node_modules/yargs/node_modules/ansi-regex/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + "ansi-regex@^3.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui/node_modules/strip-ansi" + ], + [ + "ansi-regex@^3.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs/node_modules/strip-ansi" + ] + ], + "_from": "ansi-regex@>=3.0.0 <4.0.0", + "_id": "ansi-regex@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/yargs/ansi-regex", + "_nodeVersion": "4.8.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/ansi-regex-3.0.0.tgz_1497985412590_0.5700640194118023" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "name": "ansi-regex", + "raw": "ansi-regex@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs/strip-ansi" + ], + "_shrinkwrap": null, + "_spec": "ansi-regex@^3.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs/node_modules/strip-ansi", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "ed0317c322064f79466c02966bddb605ab37d998", + "tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "0a8cc19946c03c38520fe8c086b8adb66f9cce0b", + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "find", + "formatting", + "match", + "pattern", + "re", + "regex", + "regexp", + "rgb", + "shell", + "string", + "styles", + "terminal", + "test", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dthree", + "email": "threedeecee@gmail.com" + }, + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-regex", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/yargs/node_modules/ansi-regex/readme.md b/node_modules/yargs/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..22db1c3 --- /dev/null +++ b/node_modules/yargs/node_modules/ansi-regex/readme.md @@ -0,0 +1,46 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] +``` + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/yargs/node_modules/find-up/index.js b/node_modules/yargs/node_modules/find-up/index.js new file mode 100644 index 0000000..939c955 --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/index.js @@ -0,0 +1,48 @@ +'use strict'; +const path = require('path'); +const locatePath = require('locate-path'); + +module.exports = (filename, opts) => { + opts = opts || {}; + + const startDir = path.resolve(opts.cwd || ''); + const root = path.parse(startDir).root; + + const filenames = [].concat(filename); + + return new Promise(resolve => { + (function find(dir) { + locatePath(filenames, {cwd: dir}).then(file => { + if (file) { + resolve(path.join(dir, file)); + } else if (dir === root) { + resolve(null); + } else { + find(path.dirname(dir)); + } + }); + })(startDir); + }); +}; + +module.exports.sync = (filename, opts) => { + opts = opts || {}; + + let dir = path.resolve(opts.cwd || ''); + const root = path.parse(dir).root; + + const filenames = [].concat(filename); + + // eslint-disable-next-line no-constant-condition + while (true) { + const file = locatePath.sync(filenames, {cwd: dir}); + + if (file) { + return path.join(dir, file); + } else if (dir === root) { + return null; + } + + dir = path.dirname(dir); + } +}; diff --git a/node_modules/yargs/node_modules/find-up/license b/node_modules/yargs/node_modules/find-up/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/yargs/node_modules/find-up/package.json b/node_modules/yargs/node_modules/find-up/package.json new file mode 100644 index 0000000..f8a92cf --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + "find-up@^2.1.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "find-up@>=2.1.0 <3.0.0", + "_id": "find-up@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/yargs/find-up", + "_nodeVersion": "6.9.1", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/find-up-2.1.0.tgz_1480684911017_0.33125952794216573" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "4.0.2", + "_phantomChildren": {}, + "_requested": { + "name": "find-up", + "raw": "find-up@^2.1.0", + "rawSpec": "^2.1.0", + "scope": null, + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "_shasum": "45d1b7e506c717ddd482775a2b77920a3c0c57a7", + "_shrinkwrap": null, + "_spec": "find-up@^2.1.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/find-up/issues" + }, + "dependencies": { + "locate-path": "^2.0.0" + }, + "description": "Find a file by walking up parent directories", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.1", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "45d1b7e506c717ddd482775a2b77920a3c0c57a7", + "tarball": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "10202fb1621f0c277d5d5eeaf01c1c32b008fbef", + "homepage": "https://github.com/sindresorhus/find-up#readme", + "keywords": [ + "dir", + "directory", + "file", + "find", + "find-up", + "findup", + "folder", + "look", + "look-up", + "match", + "package", + "parent", + "parents", + "path", + "resolve", + "search", + "up", + "walk", + "walking" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "find-up", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/find-up.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/yargs/node_modules/find-up/readme.md b/node_modules/yargs/node_modules/find-up/readme.md new file mode 100644 index 0000000..b5ad694 --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/readme.md @@ -0,0 +1,85 @@ +# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master) + +> Find a file by walking up parent directories + + +## Install + +``` +$ npm install --save find-up +``` + + +## Usage + +``` +/ +└── Users + └── sindresorhus + ├── unicorn.png + └── foo + └── bar + ├── baz + └── example.js +``` + +```js +// example.js +const findUp = require('find-up'); + +findUp('unicorn.png').then(filepath => { + console.log(filepath); + //=> '/Users/sindresorhus/unicorn.png' +}); + +findUp(['rainbow.png', 'unicorn.png']).then(filepath => { + console.log(filepath); + //=> '/Users/sindresorhus/unicorn.png' +}); +``` + + +## API + +### findUp(filename, [options]) + +Returns a `Promise` for the filepath or `null`. + +### findUp([filenameA, filenameB], [options]) + +Returns a `Promise` for the first filepath found (by respecting the order) or `null`. + +### findUp.sync(filename, [options]) + +Returns a filepath or `null`. + +### findUp.sync([filenameA, filenameB], [options]) + +Returns the first filepath found (by respecting the order) or `null`. + +#### filename + +Type: `string` + +Filename of the file to find. + +#### options + +##### cwd + +Type: `string`
      +Default: `process.cwd()` + +Directory to start from. + + +## Related + +- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module +- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file +- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js b/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000..d506327 --- /dev/null +++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +/* eslint-disable yoda */ +module.exports = x => { + if (Number.isNaN(x)) { + return false; + } + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= x && x <= 0x4dbf) || + // CJK Unified Ideographs .. Yi Radicals + (0x4e00 <= x && x <= 0xa4c6) || + // Hangul Jamo Extended-A + (0xa960 <= x && x <= 0xa97c) || + // Hangul Syllables + (0xac00 <= x && x <= 0xd7a3) || + // CJK Compatibility Ideographs + (0xf900 <= x && x <= 0xfaff) || + // Vertical Forms + (0xfe10 <= x && x <= 0xfe19) || + // CJK Compatibility Forms .. Small Form Variants + (0xfe30 <= x && x <= 0xfe6b) || + // Halfwidth and Fullwidth Forms + (0xff01 <= x && x <= 0xff60) || + (0xffe0 <= x && x <= 0xffe6) || + // Kana Supplement + (0x1b000 <= x && x <= 0x1b001) || + // Enclosed Ideographic Supplement + (0x1f200 <= x && x <= 0x1f251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= x && x <= 0x3fffd) + ) + ) { + return true; + } + + return false; +}; diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/license b/node_modules/yargs/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json b/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000..646e4bb --- /dev/null +++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + "is-fullwidth-code-point@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui/node_modules/string-width" + ], + [ + "is-fullwidth-code-point@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs/node_modules/string-width" + ] + ], + "_from": "is-fullwidth-code-point@>=2.0.0 <3.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/yargs/is-fullwidth-code-point", + "_nodeVersion": "4.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/is-fullwidth-code-point-2.0.0.tgz_1474526567505_0.299921662081033" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "name": "is-fullwidth-code-point", + "raw": "is-fullwidth-code-point@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs/string-width" + ], + "_shrinkwrap": null, + "_spec": "is-fullwidth-code-point@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs/node_modules/string-width", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "dependencies": {}, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "tarball": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "e94a78056056c5546f2bf4c4cf812a2163a46dae", + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "char", + "character", + "check", + "code", + "codepoint", + "detect", + "full", + "full-width", + "fullwidth", + "is", + "point", + "str", + "string", + "unicode", + "width" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-fullwidth-code-point", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md b/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000..093b028 --- /dev/null +++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('谢'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/string-width/index.js b/node_modules/yargs/node_modules/string-width/index.js new file mode 100644 index 0000000..bbc49d2 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/index.js @@ -0,0 +1,36 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +module.exports = str => { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + str = stripAnsi(str); + + let width = 0; + + for (let i = 0; i < str.length; i++) { + const code = str.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/node_modules/yargs/node_modules/string-width/license b/node_modules/yargs/node_modules/string-width/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/yargs/node_modules/string-width/package.json b/node_modules/yargs/node_modules/string-width/package.json new file mode 100644 index 0000000..0410b0a --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + "string-width@^2.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs" + ] + ], + "_from": "string-width@>=2.0.0 <3.0.0", + "_id": "string-width@2.1.1", + "_inCache": true, + "_installable": true, + "_location": "/yargs/string-width", + "_nodeVersion": "8.0.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/string-width-2.1.1.tgz_1500376154382_0.7171604454051703" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "5.0.0", + "_phantomChildren": {}, + "_requested": { + "name": "string-width", + "raw": "string-width@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "_shasum": "ab93f27a8dc13d28cac815c462143a6d9012ae9e", + "_shrinkwrap": null, + "_spec": "string-width@^2.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "shasum": "ab93f27a8dc13d28cac815c462143a6d9012ae9e", + "tarball": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "74d8d552b465692790c41169b123409669d41079", + "homepage": "https://github.com/sindresorhus/string-width#readme", + "keywords": [ + "ansi", + "char", + "character", + "chinese", + "cjk", + "cli", + "codes", + "column", + "columns", + "command-line", + "console", + "escape", + "fixed-width", + "full", + "full-width", + "fullwidth", + "japanese", + "korean", + "str", + "string", + "terminal", + "unicode", + "visual", + "width" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "string-width", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.1" +} diff --git a/node_modules/yargs/node_modules/string-width/readme.md b/node_modules/yargs/node_modules/string-width/readme.md new file mode 100644 index 0000000..df5b719 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/readme.md @@ -0,0 +1,42 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/strip-ansi/index.js b/node_modules/yargs/node_modules/strip-ansi/index.js new file mode 100644 index 0000000..96e0292 --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; diff --git a/node_modules/yargs/node_modules/strip-ansi/license b/node_modules/yargs/node_modules/strip-ansi/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/yargs/node_modules/strip-ansi/package.json b/node_modules/yargs/node_modules/strip-ansi/package.json new file mode 100644 index 0000000..a0d5784 --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + "strip-ansi@^4.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/cliui" + ], + [ + "strip-ansi@^4.0.0", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs/node_modules/string-width" + ] + ], + "_from": "strip-ansi@>=4.0.0 <5.0.0", + "_id": "strip-ansi@4.0.0", + "_inCache": true, + "_installable": true, + "_location": "/yargs/strip-ansi", + "_nodeVersion": "4.8.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/strip-ansi-4.0.0.tgz_1497986904730_0.4528853143565357" + }, + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "name": "strip-ansi", + "raw": "strip-ansi@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs/string-width" + ], + "_shrinkwrap": null, + "_spec": "strip-ansi@^4.0.0", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/yargs/node_modules/string-width", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "description": "Strip ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a8479022eb1ac368a871389b635262c505ee368f", + "tarball": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "c299056a42b31d7a479d6a89b41318b2a2462cc7", + "homepage": "https://github.com/chalk/strip-ansi#readme", + "keywords": [ + "256", + "ansi", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "formatting", + "log", + "logging", + "remove", + "rgb", + "shell", + "string", + "strip", + "styles", + "terminal", + "text", + "trim", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dthree", + "email": "threedeecee@gmail.com" + }, + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "strip-ansi", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.0.0" +} diff --git a/node_modules/yargs/node_modules/strip-ansi/readme.md b/node_modules/yargs/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000..dc76f0c --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/readme.md @@ -0,0 +1,39 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json new file mode 100644 index 0000000..c4e4fbc --- /dev/null +++ b/node_modules/yargs/package.json @@ -0,0 +1,139 @@ +{ + "_args": [ + [ + "yargs@^10.0.3", + "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/showdown" + ] + ], + "_from": "yargs@>=10.0.3 <11.0.0", + "_id": "yargs@10.1.2", + "_inCache": true, + "_installable": true, + "_location": "/yargs", + "_nodeVersion": "8.8.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/yargs-10.1.2.tgz_1516169615790_0.48233411903493106" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "5.4.2", + "_phantomChildren": { + "locate-path": "2.0.0" + }, + "_requested": { + "name": "yargs", + "raw": "yargs@^10.0.3", + "rawSpec": "^10.0.3", + "scope": null, + "spec": ">=10.0.3 <11.0.0", + "type": "range" + }, + "_requiredBy": [ + "/showdown" + ], + "_resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz", + "_shasum": "454d074c2b16a51a43e2fb7807e4f9de69ccb5c5", + "_shrinkwrap": null, + "_spec": "yargs@^10.0.3", + "_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-client/node_modules/showdown", + "bugs": { + "url": "https://github.com/yargs/yargs/issues" + }, + "dependencies": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.1.0" + }, + "description": "yargs the modern, pirate-themed, successor to optimist.", + "devDependencies": { + "chai": "^4.1.2", + "chalk": "^1.1.3", + "coveralls": "^2.11.11", + "cpr": "^2.0.0", + "cross-spawn": "^5.0.1", + "es6-promise": "^4.0.2", + "hashish": "0.0.4", + "mocha": "^3.0.1", + "nyc": "^11.2.1", + "rimraf": "^2.5.0", + "standard": "^8.6.0", + "standard-version": "^4.2.0", + "which": "^1.2.9", + "yargs-test-extends": "^1.0.1" + }, + "directories": {}, + "dist": { + "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", + "shasum": "454d074c2b16a51a43e2fb7807e4f9de69ccb5c5", + "tarball": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz" + }, + "engine": { + "node": ">=4" + }, + "files": [ + "LICENSE", + "completion.sh.hbs", + "index.js", + "lib", + "locales", + "yargs.js" + ], + "gitHead": "6bad6a92062fde7396e1646e40016288ac6feadf", + "homepage": "http://yargs.js.org/", + "keywords": [ + "args", + "argument", + "cli", + "command", + "option", + "parser", + "parsing" + ], + "license": "MIT", + "main": "./index.js", + "maintainers": [ + { + "name": "nexdrew", + "email": "andrewbgoode@gmail.com" + }, + { + "name": "bcoe", + "email": "ben@npmjs.com" + }, + { + "name": "chevex", + "email": "alex.ford@codetunnel.com" + } + ], + "name": "yargs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/yargs.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "posttest": "standard", + "release": "standard-version", + "test": "nyc --cache mocha --require ./test/before.js --timeout=8000 --check-leaks" + }, + "standard": { + "ignore": [ + "**/example/**" + ] + }, + "version": "10.1.2" +} diff --git a/node_modules/yargs/yargs.js b/node_modules/yargs/yargs.js new file mode 100644 index 0000000..524404f --- /dev/null +++ b/node_modules/yargs/yargs.js @@ -0,0 +1,1153 @@ +'use strict' +const argsert = require('./lib/argsert') +const fs = require('fs') +const Command = require('./lib/command') +const Completion = require('./lib/completion') +const Parser = require('yargs-parser') +const path = require('path') +const Usage = require('./lib/usage') +const Validation = require('./lib/validation') +const Y18n = require('y18n') +const objFilter = require('./lib/obj-filter') +const setBlocking = require('set-blocking') +const applyExtends = require('./lib/apply-extends') +const YError = require('./lib/yerror') + +exports = module.exports = Yargs +function Yargs (processArgs, cwd, parentRequire) { + processArgs = processArgs || [] // handle calling yargs(). + + const self = {} + let command = null + let completion = null + let groups = {} + let output = '' + let preservedGroups = {} + let usage = null + let validation = null + + const y18n = Y18n({ + directory: path.resolve(__dirname, './locales'), + updateFiles: false + }) + + if (!cwd) cwd = process.cwd() + + self.$0 = process.argv + .slice(0, 2) + .map((x, i) => { + // ignore the node bin, specify this in your + // bin file with #!/usr/bin/env node + if (i === 0 && /\b(node|iojs)(\.exe)?$/.test(x)) return + const b = rebase(cwd, x) + return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x + }) + .join(' ').trim() + + if (process.env._ !== undefined && process.argv[1] === process.env._) { + self.$0 = process.env._.replace( + `${path.dirname(process.execPath)}/`, '' + ) + } + + // use context object to keep track of resets, subcommand execution, etc + // submodules should modify and check the state of context as necessary + const context = { resets: -1, commands: [], fullCommands: [], files: [] } + self.getContext = () => context + + // puts yargs back into an initial state. any keys + // that have been set to "global" will not be reset + // by this action. + let options + self.resetOptions = self.reset = function resetOptions (aliases) { + context.resets++ + aliases = aliases || {} + options = options || {} + // put yargs back into an initial state, this + // logic is used to build a nested command + // hierarchy. + const tmpOptions = {} + tmpOptions.local = options.local ? options.local : [] + tmpOptions.configObjects = options.configObjects ? options.configObjects : [] + + // if a key has been explicitly set as local, + // we should reset it before passing options to command. + const localLookup = {} + tmpOptions.local.forEach((l) => { + localLookup[l] = true + ;(aliases[l] || []).forEach((a) => { + localLookup[a] = true + }) + }) + + // preserve all groups not set to local. + preservedGroups = Object.keys(groups).reduce((acc, groupName) => { + const keys = groups[groupName].filter(key => !(key in localLookup)) + if (keys.length > 0) { + acc[groupName] = keys + } + return acc + }, {}) + // groups can now be reset + groups = {} + + const arrayOptions = [ + 'array', 'boolean', 'string', 'requiresArg', 'skipValidation', + 'count', 'normalize', 'number' + ] + + const objectOptions = [ + 'narg', 'key', 'alias', 'default', 'defaultDescription', + 'config', 'choices', 'demandedOptions', 'demandedCommands', 'coerce' + ] + + arrayOptions.forEach((k) => { + tmpOptions[k] = (options[k] || []).filter(k => !localLookup[k]) + }) + + objectOptions.forEach((k) => { + tmpOptions[k] = objFilter(options[k], (k, v) => !localLookup[k]) + }) + + tmpOptions.envPrefix = options.envPrefix + options = tmpOptions + + // if this is the first time being executed, create + // instances of all our helpers -- otherwise just reset. + usage = usage ? usage.reset(localLookup) : Usage(self, y18n) + validation = validation ? validation.reset(localLookup) : Validation(self, usage, y18n) + command = command ? command.reset() : Command(self, usage, validation) + if (!completion) completion = Completion(self, usage, command) + + completionCommand = null + output = '' + exitError = null + hasOutput = false + self.parsed = false + + return self + } + self.resetOptions() + + // temporary hack: allow "freezing" of reset-able state for parse(msg, cb) + let frozen + function freeze () { + frozen = {} + frozen.options = options + frozen.configObjects = options.configObjects.slice(0) + frozen.exitProcess = exitProcess + frozen.groups = groups + usage.freeze() + validation.freeze() + command.freeze() + frozen.strict = strict + frozen.completionCommand = completionCommand + frozen.output = output + frozen.exitError = exitError + frozen.hasOutput = hasOutput + frozen.parsed = self.parsed + } + function unfreeze () { + options = frozen.options + options.configObjects = frozen.configObjects + exitProcess = frozen.exitProcess + groups = frozen.groups + output = frozen.output + exitError = frozen.exitError + hasOutput = frozen.hasOutput + self.parsed = frozen.parsed + usage.unfreeze() + validation.unfreeze() + command.unfreeze() + strict = frozen.strict + completionCommand = frozen.completionCommand + parseFn = null + parseContext = null + frozen = undefined + } + + self.boolean = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('boolean', keys) + return self + } + + self.array = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('array', keys) + return self + } + + self.number = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('number', keys) + return self + } + + self.normalize = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('normalize', keys) + return self + } + + self.count = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('count', keys) + return self + } + + self.string = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('string', keys) + return self + } + + self.requiresArg = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('requiresArg', keys) + return self + } + + self.skipValidation = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('skipValidation', keys) + return self + } + + function populateParserHintArray (type, keys, value) { + keys = [].concat(keys) + keys.forEach((key) => { + options[type].push(key) + }) + } + + self.nargs = function (key, value) { + argsert(' [number]', [key, value], arguments.length) + populateParserHintObject(self.nargs, false, 'narg', key, value) + return self + } + + self.choices = function (key, value) { + argsert(' [string|array]', [key, value], arguments.length) + populateParserHintObject(self.choices, true, 'choices', key, value) + return self + } + + self.alias = function (key, value) { + argsert(' [string|array]', [key, value], arguments.length) + populateParserHintObject(self.alias, true, 'alias', key, value) + return self + } + + // TODO: actually deprecate self.defaults. + self.default = self.defaults = function (key, value, defaultDescription) { + argsert(' [*] [string]', [key, value, defaultDescription], arguments.length) + if (defaultDescription) options.defaultDescription[key] = defaultDescription + if (typeof value === 'function') { + if (!options.defaultDescription[key]) options.defaultDescription[key] = usage.functionDescription(value) + value = value.call() + } + populateParserHintObject(self.default, false, 'default', key, value) + return self + } + + self.describe = function (key, desc) { + argsert(' [string]', [key, desc], arguments.length) + populateParserHintObject(self.describe, false, 'key', key, true) + usage.describe(key, desc) + return self + } + + self.demandOption = function (keys, msg) { + argsert(' [string]', [keys, msg], arguments.length) + populateParserHintObject(self.demandOption, false, 'demandedOptions', keys, msg) + return self + } + + self.coerce = function (keys, value) { + argsert(' [function]', [keys, value], arguments.length) + populateParserHintObject(self.coerce, false, 'coerce', keys, value) + return self + } + + function populateParserHintObject (builder, isArray, type, key, value) { + if (Array.isArray(key)) { + // an array of keys with one value ['x', 'y', 'z'], function parse () {} + const temp = {} + key.forEach((k) => { + temp[k] = value + }) + builder(temp) + } else if (typeof key === 'object') { + // an object of key value pairs: {'x': parse () {}, 'y': parse() {}} + Object.keys(key).forEach((k) => { + builder(k, key[k]) + }) + } else { + // a single key value pair 'x', parse() {} + if (isArray) { + options[type][key] = (options[type][key] || []).concat(value) + } else { + options[type][key] = value + } + } + } + + function deleteFromParserHintObject (optionKey) { + // delete from all parsing hints: + // boolean, array, key, alias, etc. + Object.keys(options).forEach((hintKey) => { + const hint = options[hintKey] + if (Array.isArray(hint)) { + if (~hint.indexOf(optionKey)) hint.splice(hint.indexOf(optionKey), 1) + } else if (typeof hint === 'object') { + delete hint[optionKey] + } + }) + // now delete the description from usage.js. + delete usage.getDescriptions()[optionKey] + } + + self.config = function config (key, msg, parseFn) { + argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length) + // allow a config object to be provided directly. + if (typeof key === 'object') { + key = applyExtends(key, cwd) + options.configObjects = (options.configObjects || []).concat(key) + return self + } + + // allow for a custom parsing function. + if (typeof msg === 'function') { + parseFn = msg + msg = null + } + + key = key || 'config' + self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file')) + ;(Array.isArray(key) ? key : [key]).forEach((k) => { + options.config[k] = parseFn || true + }) + + return self + } + + self.example = function (cmd, description) { + argsert(' [string]', [cmd, description], arguments.length) + usage.example(cmd, description) + return self + } + + self.command = function (cmd, description, builder, handler, middlewares) { + argsert(' [string|boolean] [function|object] [function] [array]', [cmd, description, builder, handler, middlewares], arguments.length) + command.addHandler(cmd, description, builder, handler, middlewares) + return self + } + + self.commandDir = function (dir, opts) { + argsert(' [object]', [dir, opts], arguments.length) + const req = parentRequire || require + command.addDirectory(dir, self.getContext(), req, require('get-caller-file')(), opts) + return self + } + + // TODO: deprecate self.demand in favor of + // .demandCommand() .demandOption(). + self.demand = self.required = self.require = function demand (keys, max, msg) { + // you can optionally provide a 'max' key, + // which will raise an exception if too many '_' + // options are provided. + if (Array.isArray(max)) { + max.forEach((key) => { + self.demandOption(key, msg) + }) + max = Infinity + } else if (typeof max !== 'number') { + msg = max + max = Infinity + } + + if (typeof keys === 'number') { + self.demandCommand(keys, max, msg, msg) + } else if (Array.isArray(keys)) { + keys.forEach((key) => { + self.demandOption(key, msg) + }) + } else { + if (typeof msg === 'string') { + self.demandOption(keys, msg) + } else if (msg === true || typeof msg === 'undefined') { + self.demandOption(keys) + } + } + + return self + } + + self.demandCommand = function demandCommand (min, max, minMsg, maxMsg) { + argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length) + + if (typeof min === 'undefined') min = 1 + + if (typeof max !== 'number') { + minMsg = max + max = Infinity + } + + self.global('_', false) + + options.demandedCommands._ = { + min, + max, + minMsg, + maxMsg + } + + return self + } + + self.getDemandedOptions = () => { + argsert([], 0) + return options.demandedOptions + } + + self.getDemandedCommands = () => { + argsert([], 0) + return options.demandedCommands + } + + self.implies = function (key, value) { + argsert(' [number|string|array]', [key, value], arguments.length) + validation.implies(key, value) + return self + } + + self.conflicts = function (key1, key2) { + argsert(' [string|array]', [key1, key2], arguments.length) + validation.conflicts(key1, key2) + return self + } + + self.usage = function (msg, description, builder, handler) { + argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length) + + if (description !== undefined) { + // .usage() can be used as an alias for defining + // a default command. + if ((msg || '').match(/^\$0( |$)/)) { + return self.command(msg, description, builder, handler) + } else { + throw new YError('.usage() description must start with $0 if being used as alias for .command()') + } + } else { + usage.usage(msg) + return self + } + } + + self.epilogue = self.epilog = function (msg) { + argsert('', [msg], arguments.length) + usage.epilog(msg) + return self + } + + self.fail = function (f) { + argsert('', [f], arguments.length) + usage.failFn(f) + return self + } + + self.check = function (f, _global) { + argsert(' [boolean]', [f, _global], arguments.length) + validation.check(f, _global !== false) + return self + } + + self.global = function global (globals, global) { + argsert(' [boolean]', [globals, global], arguments.length) + globals = [].concat(globals) + if (global !== false) { + options.local = options.local.filter(l => globals.indexOf(l) === -1) + } else { + globals.forEach((g) => { + if (options.local.indexOf(g) === -1) options.local.push(g) + }) + } + return self + } + + self.pkgConf = function pkgConf (key, path) { + argsert(' [string]', [key, path], arguments.length) + let conf = null + // prefer cwd to require-main-filename in this method + // since we're looking for e.g. "nyc" config in nyc consumer + // rather than "yargs" config in nyc (where nyc is the main filename) + const obj = pkgUp(path || cwd) + + // If an object exists in the key, add it to options.configObjects + if (obj[key] && typeof obj[key] === 'object') { + conf = applyExtends(obj[key], path || cwd) + options.configObjects = (options.configObjects || []).concat(conf) + } + + return self + } + + const pkgs = {} + function pkgUp (path) { + const npath = path || '*' + if (pkgs[npath]) return pkgs[npath] + const findUp = require('find-up') + + let obj = {} + try { + const pkgJsonPath = findUp.sync('package.json', { + cwd: path || require('path').dirname(require('require-main-filename')(parentRequire || require)), + normalize: false + }) + obj = JSON.parse(fs.readFileSync(pkgJsonPath)) + } catch (noop) {} + + pkgs[npath] = obj || {} + return pkgs[npath] + } + + let parseFn = null + let parseContext = null + self.parse = function parse (args, shortCircuit, _parseFn) { + argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length) + if (typeof args === 'undefined') args = processArgs + + // a context object can optionally be provided, this allows + // additional information to be passed to a command handler. + if (typeof shortCircuit === 'object') { + parseContext = shortCircuit + shortCircuit = _parseFn + } + + // by providing a function as a second argument to + // parse you can capture output that would otherwise + // default to printing to stdout/stderr. + if (typeof shortCircuit === 'function') { + parseFn = shortCircuit + shortCircuit = null + } + // completion short-circuits the parsing process, + // skipping validation, etc. + if (!shortCircuit) processArgs = args + + freeze() + if (parseFn) exitProcess = false + + const parsed = self._parseArgs(args, shortCircuit) + if (parseFn) parseFn(exitError, parsed, output) + unfreeze() + + return parsed + } + + self._getParseContext = () => parseContext || {} + + self._hasParseCallback = () => !!parseFn + + self.option = self.options = function option (key, opt) { + argsert(' [object]', [key, opt], arguments.length) + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.options(k, key[k]) + }) + } else { + if (typeof opt !== 'object') { + opt = {} + } + + options.key[key] = true // track manually set keys. + + if (opt.alias) self.alias(key, opt.alias) + + const demand = opt.demand || opt.required || opt.require + + // deprecated, use 'demandOption' instead + if (demand) { + self.demand(key, demand) + } + + if (opt.demandOption) { + self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined) + } + + if ('conflicts' in opt) { + self.conflicts(key, opt.conflicts) + } + + if ('default' in opt) { + self.default(key, opt.default) + } + + if ('implies' in opt) { + self.implies(key, opt.implies) + } + + if ('nargs' in opt) { + self.nargs(key, opt.nargs) + } + + if (opt.config) { + self.config(key, opt.configParser) + } + + if (opt.normalize) { + self.normalize(key) + } + + if ('choices' in opt) { + self.choices(key, opt.choices) + } + + if ('coerce' in opt) { + self.coerce(key, opt.coerce) + } + + if ('group' in opt) { + self.group(key, opt.group) + } + + if (opt.boolean || opt.type === 'boolean') { + self.boolean(key) + if (opt.alias) self.boolean(opt.alias) + } + + if (opt.array || opt.type === 'array') { + self.array(key) + if (opt.alias) self.array(opt.alias) + } + + if (opt.number || opt.type === 'number') { + self.number(key) + if (opt.alias) self.number(opt.alias) + } + + if (opt.string || opt.type === 'string') { + self.string(key) + if (opt.alias) self.string(opt.alias) + } + + if (opt.count || opt.type === 'count') { + self.count(key) + } + + if (typeof opt.global === 'boolean') { + self.global(key, opt.global) + } + + if (opt.defaultDescription) { + options.defaultDescription[key] = opt.defaultDescription + } + + if (opt.skipValidation) { + self.skipValidation(key) + } + + const desc = opt.describe || opt.description || opt.desc + if (!opt.hidden) { + self.describe(key, desc) + } + + if (opt.requiresArg) { + self.requiresArg(key) + } + } + + return self + } + self.getOptions = () => options + + self.positional = function (key, opts) { + argsert(' ', [key, opts], arguments.length) + if (context.resets === 0) { + throw new YError(".positional() can only be called in a command's builder function") + } + + // .positional() only supports a subset of the configuration + // options availble to .option(). + const supportedOpts = ['default', 'implies', 'normalize', + 'choices', 'conflicts', 'coerce', 'type', 'describe', + 'desc', 'description', 'alias'] + opts = objFilter(opts, (k, v) => { + let accept = supportedOpts.indexOf(k) !== -1 + // type can be one of string|number|boolean. + if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1) accept = false + return accept + }) + + // copy over any settings that can be inferred from the command string. + const fullCommand = context.fullCommands[context.fullCommands.length - 1] + const parseOptions = fullCommand ? command.cmdToParseOptions(fullCommand) : { + array: [], + alias: {}, + default: {}, + demand: {} + } + Object.keys(parseOptions).forEach((pk) => { + if (Array.isArray(parseOptions[pk])) { + if (parseOptions[pk].indexOf(key) !== -1) opts[pk] = true + } else { + if (parseOptions[pk][key] && !(pk in opts)) opts[pk] = parseOptions[pk][key] + } + }) + self.group(key, usage.getPositionalGroupName()) + return self.option(key, opts) + } + + self.group = function group (opts, groupName) { + argsert(' ', [opts, groupName], arguments.length) + const existing = preservedGroups[groupName] || groups[groupName] + if (preservedGroups[groupName]) { + // we now only need to track this group name in groups. + delete preservedGroups[groupName] + } + + const seen = {} + groups[groupName] = (existing || []).concat(opts).filter((key) => { + if (seen[key]) return false + return (seen[key] = true) + }) + return self + } + // combine explicit and preserved groups. explicit groups should be first + self.getGroups = () => Object.assign({}, groups, preservedGroups) + + // as long as options.envPrefix is not undefined, + // parser will apply env vars matching prefix to argv + self.env = function (prefix) { + argsert('[string|boolean]', [prefix], arguments.length) + if (prefix === false) options.envPrefix = undefined + else options.envPrefix = prefix || '' + return self + } + + self.wrap = function (cols) { + argsert('', [cols], arguments.length) + usage.wrap(cols) + return self + } + + let strict = false + self.strict = function (enabled) { + argsert('[boolean]', [enabled], arguments.length) + strict = enabled !== false + return self + } + self.getStrict = () => strict + + self.showHelp = function (level) { + argsert('[string|function]', [level], arguments.length) + if (!self.parsed) self._parseArgs(processArgs) // run parser, if it has not already been executed. + if (command.hasDefaultCommand()) { + context.resets++ // override the restriction on top-level positoinals. + command.runDefaultBuilderOn(self, true) + } + usage.showHelp(level) + return self + } + + let versionOpt = null + self.version = function version (opt, msg, ver) { + const defaultVersionOpt = 'version' + argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length) + + // nuke the key previously configured + // to return version #. + if (versionOpt) { + deleteFromParserHintObject(versionOpt) + usage.version(undefined) + versionOpt = null + } + + if (arguments.length === 0) { + ver = guessVersion() + opt = defaultVersionOpt + } else if (arguments.length === 1) { + if (opt === false) { // disable default 'version' key. + return self + } + ver = opt + opt = defaultVersionOpt + } else if (arguments.length === 2) { + ver = msg + msg = null + } + + versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt + msg = msg || usage.deferY18nLookup('Show version number') + + usage.version(ver || undefined) + self.boolean(versionOpt) + self.describe(versionOpt, msg) + return self + } + + function guessVersion () { + const obj = pkgUp() + + return obj.version || 'unknown' + } + + let helpOpt = null + self.addHelpOpt = self.help = function addHelpOpt (opt, msg) { + const defaultHelpOpt = 'help' + argsert('[string|boolean] [string]', [opt, msg], arguments.length) + + // nuke the key previously configured + // to return help. + if (helpOpt) { + deleteFromParserHintObject(helpOpt) + helpOpt = null + } + + if (arguments.length === 1) { + if (opt === false) return self + } + + // use arguments, fallback to defaults for opt and msg + helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt + self.boolean(helpOpt) + self.describe(helpOpt, msg || usage.deferY18nLookup('Show help')) + return self + } + + self.showHelpOnFail = function showHelpOnFail (enabled, message) { + argsert('[boolean|string] [string]', [enabled, message], arguments.length) + usage.showHelpOnFail(enabled, message) + return self + } + + var exitProcess = true + self.exitProcess = function (enabled) { + argsert('[boolean]', [enabled], arguments.length) + if (typeof enabled !== 'boolean') { + enabled = true + } + exitProcess = enabled + return self + } + self.getExitProcess = () => exitProcess + + var completionCommand = null + self.completion = function (cmd, desc, fn) { + argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length) + + // a function to execute when generating + // completions can be provided as the second + // or third argument to completion. + if (typeof desc === 'function') { + fn = desc + desc = null + } + + // register the completion command. + completionCommand = cmd || 'completion' + if (!desc && desc !== false) { + desc = 'generate bash completion script' + } + self.command(completionCommand, desc) + + // a function can be provided + if (fn) completion.registerFunction(fn) + + return self + } + + self.showCompletionScript = function ($0) { + argsert('[string]', [$0], arguments.length) + $0 = $0 || self.$0 + _logger.log(completion.generateCompletionScript($0, completionCommand)) + return self + } + + self.getCompletion = function (args, done) { + argsert(' ', [args, done], arguments.length) + completion.getCompletion(args, done) + } + + self.locale = function (locale) { + argsert('[string]', [locale], arguments.length) + if (arguments.length === 0) { + guessLocale() + return y18n.getLocale() + } + detectLocale = false + y18n.setLocale(locale) + return self + } + + self.updateStrings = self.updateLocale = function (obj) { + argsert('', [obj], arguments.length) + detectLocale = false + y18n.updateLocale(obj) + return self + } + + let detectLocale = true + self.detectLocale = function (detect) { + argsert('', [detect], arguments.length) + detectLocale = detect + return self + } + self.getDetectLocale = () => detectLocale + + var hasOutput = false + var exitError = null + // maybe exit, always capture + // context about why we wanted to exit. + self.exit = (code, err) => { + hasOutput = true + exitError = err + if (exitProcess) process.exit(code) + } + + // we use a custom logger that buffers output, + // so that we can print to non-CLIs, e.g., chat-bots. + const _logger = { + log () { + const args = [] + for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) + if (!self._hasParseCallback()) console.log.apply(console, args) + hasOutput = true + if (output.length) output += '\n' + output += args.join(' ') + }, + error () { + const args = [] + for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) + if (!self._hasParseCallback()) console.error.apply(console, args) + hasOutput = true + if (output.length) output += '\n' + output += args.join(' ') + } + } + self._getLoggerInstance = () => _logger + // has yargs output an error our help + // message in the current execution context. + self._hasOutput = () => hasOutput + + self._setHasOutput = () => { + hasOutput = true + } + + let recommendCommands + self.recommendCommands = function (recommend) { + argsert('[boolean]', [recommend], arguments.length) + recommendCommands = typeof recommend === 'boolean' ? recommend : true + return self + } + + self.getUsageInstance = () => usage + + self.getValidationInstance = () => validation + + self.getCommandInstance = () => command + + self.terminalWidth = () => { + argsert([], 0) + return typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null + } + + Object.defineProperty(self, 'argv', { + get: () => self._parseArgs(processArgs), + enumerable: true + }) + + self._parseArgs = function parseArgs (args, shortCircuit, _skipValidation, commandIndex) { + let skipValidation = !!_skipValidation + args = args || processArgs + + options.__ = y18n.__ + options.configuration = pkgUp()['yargs'] || {} + const parsed = Parser.detailed(args, options) + let argv = parsed.argv + if (parseContext) argv = Object.assign({}, argv, parseContext) + const aliases = parsed.aliases + + argv.$0 = self.$0 + self.parsed = parsed + + try { + guessLocale() // guess locale lazily, so that it can be turned off in chain. + + // while building up the argv object, there + // are two passes through the parser. If completion + // is being performed short-circuit on the first pass. + if (shortCircuit) { + return argv + } + + // if there's a handler associated with a + // command defer processing to it. + if (helpOpt) { + // consider any multi-char helpOpt alias as a valid help command + // unless all helpOpt aliases are single-char + // note that parsed.aliases is a normalized bidirectional map :) + const helpCmds = [helpOpt] + .concat(aliases[helpOpt] || []) + .filter(k => k.length > 1) + // check if help should trigger and strip it from _. + if (~helpCmds.indexOf(argv._[argv._.length - 1])) { + argv._.pop() + argv[helpOpt] = true + } + } + const handlerKeys = command.getCommands() + const skipDefaultCommand = argv[helpOpt] && (handlerKeys.length > 1 || handlerKeys[0] !== '$0') + + if (argv._.length) { + if (handlerKeys.length) { + let firstUnknownCommand + for (let i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) { + cmd = String(argv._[i]) + if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) { + setPlaceholderKeys(argv) + // commands are executed using a recursive algorithm that executes + // the deepest command first; we keep track of the position in the + // argv._ array that is currently being executed. + return command.runCommand(cmd, self, parsed, i + 1) + } else if (!firstUnknownCommand && cmd !== completionCommand) { + firstUnknownCommand = cmd + break + } + } + + // run the default command, if defined + if (command.hasDefaultCommand() && !skipDefaultCommand) { + setPlaceholderKeys(argv) + return command.runCommand(null, self, parsed) + } + + // recommend a command if recommendCommands() has + // been enabled, and no commands were found to execute + if (recommendCommands && firstUnknownCommand && !argv[helpOpt]) { + validation.recommendCommands(firstUnknownCommand, handlerKeys) + } + } + + // generate a completion script for adding to ~/.bashrc. + if (completionCommand && ~argv._.indexOf(completionCommand) && !argv[completion.completionKey]) { + if (exitProcess) setBlocking(true) + self.showCompletionScript() + self.exit(0) + } + } else if (command.hasDefaultCommand() && !skipDefaultCommand) { + setPlaceholderKeys(argv) + return command.runCommand(null, self, parsed) + } + + // we must run completions first, a user might + // want to complete the --help or --version option. + if (completion.completionKey in argv) { + if (exitProcess) setBlocking(true) + + // we allow for asynchronous completions, + // e.g., loading in a list of commands from an API. + const completionArgs = args.slice(args.indexOf(`--${completion.completionKey}`) + 1) + completion.getCompletion(completionArgs, (completions) => { + ;(completions || []).forEach((completion) => { + _logger.log(completion) + }) + + self.exit(0) + }) + return setPlaceholderKeys(argv) + } + + // Handle 'help' and 'version' options + // if we haven't already output help! + if (!hasOutput) { + Object.keys(argv).forEach((key) => { + if (key === helpOpt && argv[key]) { + if (exitProcess) setBlocking(true) + + skipValidation = true + self.showHelp('log') + self.exit(0) + } else if (key === versionOpt && argv[key]) { + if (exitProcess) setBlocking(true) + + skipValidation = true + usage.showVersion() + self.exit(0) + } + }) + } + + // Check if any of the options to skip validation were provided + if (!skipValidation && options.skipValidation.length > 0) { + skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true) + } + + // If the help or version options where used and exitProcess is false, + // or if explicitly skipped, we won't run validations. + if (!skipValidation) { + if (parsed.error) throw new YError(parsed.error.message) + + // if we're executed via bash completion, don't + // bother with validation. + if (!argv[completion.completionKey]) { + self._runValidation(argv, aliases, {}, parsed.error) + } + } + } catch (err) { + if (err instanceof YError) usage.fail(err.message, err) + else throw err + } + + return setPlaceholderKeys(argv) + } + + self._runValidation = function runValidation (argv, aliases, positionalMap, parseErrors) { + if (parseErrors) throw new YError(parseErrors.message) + validation.nonOptionCount(argv) + validation.missingArgumentValue(argv) + validation.requiredArguments(argv) + if (strict) validation.unknownArguments(argv, aliases, positionalMap) + validation.customChecks(argv, aliases) + validation.limitedChoices(argv) + validation.implications(argv) + validation.conflicting(argv) + } + + function guessLocale () { + if (!detectLocale) return + + try { + const osLocale = require('os-locale') + self.locale(osLocale.sync({ spawn: false })) + } catch (err) { + // if we explode looking up locale just noop + // we'll keep using the default language 'en'. + } + } + + function setPlaceholderKeys (argv) { + Object.keys(options.key).forEach((key) => { + // don't set placeholder keys for dot + // notation options 'foo.bar'. + if (~key.indexOf('.')) return + if (typeof argv[key] === 'undefined') argv[key] = undefined + }) + return argv + } + + // an app should almost always have --version and --help, + // if you *really* want to disable this use .help(false)/.version(false). + self.help() + self.version() + + return self +} + +// rebase an absolute path to a relative one with respect to a base directory +// exported for tests +exports.rebase = rebase +function rebase (base, dir) { + return path.relative(base, dir) +} diff --git a/scripts/formatting.js b/scripts/formatting.js new file mode 100644 index 0000000..fe41724 --- /dev/null +++ b/scripts/formatting.js @@ -0,0 +1,212 @@ + +// This function was copied from https://stackoverflow.com/a/4835406/5302652 +function escapeHtml(text) { + var map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + return text.replace(/[&<>"']/g, function(m) { return map[m]; }); +} + +// Get a list of links sent to the user +var sent_chat_links = []; + +function open_link_id(id) +{ + // Open the saved link + open(sent_chat_links[id]); +} + +function is_url(text) { + return /^(ftp|http|https):\/\/[^ "]+$/.test(text); +} + +function text_to_html(text) +{ + // Make the text XSS safe + text = escapeHtml(text); + + // Split the text into an array + text = text.split(" "); + + // Some varibles for remembering parts of the string + var underline_check = false; + var strikethrough_check = false; + var italic_check = false; + var bold_check = false; + var code_check = false; + var ignore_check = 0; + + var last_word = ""; + + // Create an out varible + var out = ""; + + // Loop over the rows + for(var r=0;r"+text[r]+""; + } + + else + { + // Loop over the text + for(var i=0;i 0) + { + // Remove 1 + ignore_check -= 1; + + // Add the next character, ignoring the formatting + out += text[r][i]; + } + + else + { + // Is the text a backslash (ignore) + if(text[r][i] == "\\" && !code_check) + { + // Set ignore check + ignore_check = 1; + } + + // Is the text a dash (underline) + if(text[r][i] == "-" && !code_check) + { + // Invert the varible + underline_check = !underline_check; + + if(underline_check) + { + // Open the underline element + out += ""; + } + + else + { + // Close the underline element + out += ""; + } + } + + // Is the text a star (bold) + else if(text[r][i] == "*" && !code_check) + { + // Invert the varible + bold_check = !bold_check; + + if(bold_check) + { + // Open the bold element + out += ""; + } + + else + { + // Close the bold element + out += ""; + } + } + + // Is the text an underline (italic) + else if(text[r][i] == "_" && !code_check) + { + // Invert the varible + italic_check = !italic_check; + + if(italic_check) + { + // Open the bold element + out += ""; + } + + else + { + // Close the bold element + out += ""; + } + } + + // Is the text a ~ (strikethrough) + else if(text[r][i] == "~" && !code_check) + { + // Invert the varible + strikethrough_check = !strikethrough_check; + + if(strikethrough_check) + { + // Open the strikethrough element + out += ""; + } + + else + { + // Close the strikethrough element + out += ""; + } + } + + // Is this a newline + else if(text[r][i] == "\n") + { + // Add a break + out += "
      "; + } + + // Is this a code marker + else if(text[r][i] == "`") + { + // Invert the varible + code_check = !code_check; + + if(code_check) + { + // Open the code element + out += ""; + } + + else + { + // Close the code element + out += ""; + } + } + + else + { + out += text[r][i]; + } + } + } + } + + // Add a space + out += " "; + } + + // Close some unclosed elements + if(bold_check) out += ""; + if(italic_check) out += ""; + if(underline_check) out += ""; + if(strikethrough_check) out += ""; + if(code_check) out += ""; + + console.log(out) + + // Send out back + return out; +} diff --git a/scripts/include.js b/scripts/include.js index eb7ea10..928b4fa 100644 --- a/scripts/include.js +++ b/scripts/include.js @@ -6,5 +6,10 @@ const path = require("path"); const node_rsa = require("node-rsa"); const bsplit = require("buffer-split"); const child_process = require('child_process'); +const showdown = require("showdown"); +const open = require("open"); + +// Create the markdown converter +var md = new showdown.Converter(); const PORT_DEFAULT = 22068; diff --git a/scripts/profiles.js b/scripts/profiles.js index de2ffef..01a4292 100644 --- a/scripts/profiles.js +++ b/scripts/profiles.js @@ -158,6 +158,9 @@ function chat_switch_to(id) // Create the chat html var chat_html = ""; + // Setup some memory varibles + var last_chat_user = ""; + // Loop over the messages for(var i=0;i

      "; + } + // Add some html data to the chat chat_html += "\ -
      \ -

      "+connections[active_profile].chats[id].messages[i].from+"

      \ -

      "+connections[active_profile].chats[id].messages[i].message+"

      \ +
      "+message_header+"\ +

      "+text_to_html(connections[active_profile].chats[id].messages[i].message)+"

      \
      \ "; } @@ -197,20 +214,55 @@ function chat_switch_to(id) // Set the active chat active_chat = id; + + var next = function() + { + // Get the chat content element + var chat_content = document.getElementById("chat-content"); + + // Scroll to the bottom of the div + chat_content.scrollTop = chat_content.scrollHeight; + } + + // Register this to happen when shift enter is pressed in the textarea + $("#chat-content-send-textarea").on('keydown', function(event) + { + // Is the keypress an enter + if(event.keyCode == 13) + { + // Is shift pressed + if(event.shiftKey) + { + // Submit the form + chat_send(); + } + } + }); + + // Try to scroll to the bottom of the div + next(); + setTimeout(next,1); } function chat_send() { - // Send the message - socket_write( - connections[active_profile].client, - connections[active_profile].encryption, - { - mode: "send_message", - channel: active_chat, - message: document.getElementById("chat-content-send-textarea").value - } - ); + // Get the message + var message = document.getElementById("chat-content-send-textarea").value; + + // Is the message not empty and isnt a newline + if(message.length > 0 && message != "\n") + { + // Send the message + socket_write( + connections[active_profile].client, + connections[active_profile].encryption, + { + mode: "send_message", + channel: active_chat, + message: message + } + ); + } // Clear the textarea document.getElementById("chat-content-send-textarea").value = ""; diff --git a/settings.json b/settings.json index 945aabb..3932829 100644 --- a/settings.json +++ b/settings.json @@ -5,6 +5,6 @@ "private": "key" }, "size": 2048, - "in_memory": true + "in_memory": false } } diff --git a/style.css b/style.css index 2fb94d2..b4929d4 100644 --- a/style.css +++ b/style.css @@ -80,16 +80,27 @@ } .chat-content-message { - padding: 8px; - margin: 8px; - border-radius: 8px; - background-color: #CCD; display: inline-block; float: left; width: 80%; } +.chat-content-message div +{ + padding: 8px; + margin: 4px; + border-radius: 6px; + background-color: #CCD; +} + +.chat-content-message p.message-header { + margin: 8px 12px; +} + .chat-content-message.sender { - background-color: #AAE; float: right; } + +.chat-content-message.sender div { + background-color: #AAE; +}