pax_global_header00006660000000000000000000000064135640322350014515gustar00rootroot0000000000000052 comment=3b9ef610dd88eb3e942744c14f8616ae35f7b447 d3-dsv-1.2.0/000077500000000000000000000000001356403223500126155ustar00rootroot00000000000000d3-dsv-1.2.0/.eslintrc.json000066400000000000000000000003421356403223500154100ustar00rootroot00000000000000{ "extends": "eslint:recommended", "parserOptions": { "sourceType": "module", "ecmaVersion": 8 }, "env": { "es6": true, "node": true, "browser": true }, "rules": { "no-cond-assign": 0 } } d3-dsv-1.2.0/.gitignore000066400000000000000000000000771356403223500146110ustar00rootroot00000000000000*.sublime-workspace .DS_Store dist/ node_modules npm-debug.log d3-dsv-1.2.0/LICENSE000066400000000000000000000027031356403223500136240ustar00rootroot00000000000000Copyright 2013-2016 Mike Bostock 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 of the author nor the names of 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. d3-dsv-1.2.0/README.md000066400000000000000000000620321356403223500140770ustar00rootroot00000000000000# d3-dsv This module provides a parser and formatter for delimiter-separated values, most commonly [comma-](https://en.wikipedia.org/wiki/Comma-separated_values) (CSV) or tab-separated values (TSV). These tabular formats are popular with spreadsheet programs such as Microsoft Excel, and are often more space-efficient than JSON. This implementation is based on [RFC 4180](http://tools.ietf.org/html/rfc4180). Comma (CSV) and tab (TSV) delimiters are built-in. For example, to parse: ```js d3.csvParse("foo,bar\n1,2"); // [{foo: "1", bar: "2"}, columns: ["foo", "bar"]] d3.tsvParse("foo\tbar\n1\t2"); // [{foo: "1", bar: "2"}, columns: ["foo", "bar"]] ``` Or to format: ```js d3.csvFormat([{foo: "1", bar: "2"}]); // "foo,bar\n1,2" d3.tsvFormat([{foo: "1", bar: "2"}]); // "foo\tbar\n1\t2" ``` To use a different delimiter, such as “|” for pipe-separated values, use [d3.dsvFormat](#dsvFormat): ```js var psv = d3.dsvFormat("|"); console.log(psv.parse("foo|bar\n1|2")); // [{foo: "1", bar: "2"}, columns: ["foo", "bar"]] ``` For easy loading of DSV files in a browser, see [d3-fetch](https://github.com/d3/d3-fetch)’s [d3.csv](https://github.com/d3/d3-fetch/blob/master/README.md#csv) and [d3.tsv](https://github.com/d3/d3-fetch/blob/master/README.md#tsv) methods. ## Installing If you use NPM, `npm install d3-dsv`. Otherwise, download the [latest release](https://github.com/d3/d3-dsv/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-dsv.v1.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: ```html ``` [Try d3-dsv in your browser.](https://tonicdev.com/npm/d3-dsv) ## API Reference # d3.csvParse(string[, row]) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") Equivalent to [dsvFormat](#dsvFormat)(",").[parse](#dsv_parse). # d3.csvParseRows(string[, row]) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") Equivalent to [dsvFormat](#dsvFormat)(",").[parseRows](#dsv_parseRows). # d3.csvFormat(rows[, columns]) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") Equivalent to [dsvFormat](#dsvFormat)(",").[format](#dsv_format). # d3.csvFormatBody(rows[, columns]) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") Equivalent to [dsvFormat](#dsvFormat)(",").[formatBody](#dsv_formatBody). # d3.csvFormatRows(rows) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") Equivalent to [dsvFormat](#dsvFormat)(",").[formatRows](#dsv_formatRows). # d3.csvFormatRow(row) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") Equivalent to [dsvFormat](#dsvFormat)(",").[formatRow](#dsv_formatRow). # d3.csvFormatValue(value) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") Equivalent to [dsvFormat](#dsvFormat)(",").[formatValue](#dsv_formatValue). # d3.tsvParse(string[, row]) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") Equivalent to [dsvFormat](#dsvFormat)("\t").[parse](#dsv_parse). # d3.tsvParseRows(string[, row]) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") Equivalent to [dsvFormat](#dsvFormat)("\t").[parseRows](#dsv_parseRows). # d3.tsvFormat(rows[, columns]) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") Equivalent to [dsvFormat](#dsvFormat)("\t").[format](#dsv_format). # d3.tsvFormatBody(rows[, columns]) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") Equivalent to [dsvFormat](#dsvFormat)("\t").[formatBody](#dsv_formatBody). # d3.tsvFormatRows(rows) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") Equivalent to [dsvFormat](#dsvFormat)("\t").[formatRows](#dsv_formatRows). # d3.tsvFormatRow(row) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") Equivalent to [dsvFormat](#dsvFormat)("\t").[formatRow](#dsv_formatRow). # d3.tsvFormatValue(value) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") Equivalent to [dsvFormat](#dsvFormat)("\t").[formatValue](#dsv_formatValue). # d3.dsvFormat(delimiter) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js) Constructs a new DSV parser and formatter for the specified *delimiter*. The *delimiter* must be a single character (*i.e.*, a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not. # *dsv*.parse(string[, row]) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") Parses the specified *string*, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of objects representing the parsed rows. Unlike [*dsv*.parseRows](#dsv_parseRows), this method requires that the first line of the DSV content contains a delimiter-separated list of column names; these column names become the attributes on the returned objects. For example, consider the following CSV file: ``` Year,Make,Model,Length 1997,Ford,E350,2.34 2000,Mercury,Cougar,2.38 ``` The resulting JavaScript array is: ```js [ {"Year": "1997", "Make": "Ford", "Model": "E350", "Length": "2.34"}, {"Year": "2000", "Make": "Mercury", "Model": "Cougar", "Length": "2.38"} ] ``` The returned array also exposes a `columns` property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary). For example: ```js data.columns; // ["Year", "Make", "Model", "Length"] ``` If a *row* conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types. In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the `+` operator), but better is to specify a *row* conversion function. See [d3.autoType](#autoType) for a convenient *row* conversion function that infers and coerces common types like numbers and strings. If a *row* conversion function is specified, the specified function is invoked for each row, being passed an object representing the current row (`d`), the index (`i`) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, the row is skipped and will be omitted from the array returned by *dsv*.parse; otherwise, the returned value defines the corresponding row object. For example: ```js var data = d3.csvParse(string, function(d) { return { year: new Date(+d.Year, 0, 1), // lowercase and convert "Year" to Date make: d.Make, // lowercase model: d.Model, // lowercase length: +d.Length // lowercase and convert "Length" to number }; }); ``` Note: using `+` rather than [parseInt](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseInt) or [parseFloat](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseFloat) is typically faster, though more restrictive. For example, `"30px"` when coerced using `+` returns `NaN`, while parseInt and parseFloat return `30`. # dsv.parseRows(string[, row]) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") Parses the specified *string*, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of arrays representing the parsed rows. Unlike [*dsv*.parse](#dsv_parse), this method treats the header line as a standard row, and should be used whenever DSV content does not contain a header. Each row is represented as an array rather than an object. Rows may have variable length. For example, consider the following CSV file, which notably lacks a header line: ``` 1997,Ford,E350,2.34 2000,Mercury,Cougar,2.38 ``` The resulting JavaScript array is: ```js [ ["1997", "Ford", "E350", "2.34"], ["2000", "Mercury", "Cougar", "2.38"] ] ``` If a *row* conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types. In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the `+` operator), but better is to specify a *row* conversion function. See [d3.autoType](#autoType) for a convenient *row* conversion function that infers and coerces common types like numbers and strings. If a *row* conversion function is specified, the specified function is invoked for each row, being passed an array representing the current row (`d`), the index (`i`) starting at zero for the first row, and the array of column names. If the returned value is null or undefined, the row is skipped and will be omitted from the array returned by *dsv*.parse; otherwise, the returned value defines the corresponding row object. For example: ```js var data = d3.csvParseRows(string, function(d, i) { return { year: new Date(+d[0], 0, 1), // convert first colum column to Date make: d[1], model: d[2], length: +d[3] // convert fourth column to number }; }); ``` In effect, *row* is similar to applying a [map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) and [filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) operator to the returned rows. # dsv.format(rows[, columns]) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") Formats the specified array of object *rows* as delimiter-separated values, returning a string. This operation is the inverse of [*dsv*.parse](#dsv_parse). Each row will be separated by a newline (`\n`), and each column within each row will be separated by the delimiter (such as a comma, `,`). Values that contain either the delimiter, a double-quote (`"`) or a newline will be escaped using double-quotes. If *columns* is not specified, the list of column names that forms the header row is determined by the union of all properties on all objects in *rows*; the order of columns is nondeterministic. If *columns* is specified, it is an array of strings representing the column names. For example: ```js var string = d3.csvFormat(data, ["year", "make", "model", "length"]); ``` All fields on each row object will be coerced to strings. If the field value is null or undefined, the empty string is used. If the field value is a Date, the [ECMAScript date-time string format](https://www.ecma-international.org/ecma-262/9.0/index.html#sec-date-time-string-format) (a subset of ISO 8601) is used: for example, dates at UTC midnight are formatted as `YYYY-MM-DD`. For more control over which and how fields are formatted, first map *rows* to an array of array of string, and then use [*dsv*.formatRows](#dsv_formatRows). # dsv.formatBody(rows[, columns]) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") Equivalent to [*dsv*.format](#dsv_format), but omits the header row. This is useful, for example, when appending rows to an existing file. # dsv.formatRows(rows) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") Formats the specified array of array of string *rows* as delimiter-separated values, returning a string. This operation is the reverse of [*dsv*.parseRows](#dsv_parseRows). Each row will be separated by a newline (`\n`), and each column within each row will be separated by the delimiter (such as a comma, `,`). Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. To convert an array of objects to an array of arrays while explicitly specifying the columns, use [*array*.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). For example: ```js var string = d3.csvFormatRows(data.map(function(d, i) { return [ d.year.getFullYear(), // Assuming d.year is a Date object. d.make, d.model, d.length ]; })); ``` If you like, you can also [*array*.concat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) this result with an array of column names to generate the first row: ```js var string = d3.csvFormatRows([[ "year", "make", "model", "length" ]].concat(data.map(function(d, i) { return [ d.year.getFullYear(), // Assuming d.year is a Date object. d.make, d.model, d.length ]; }))); ``` # dsv.formatRow(row) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") Formats a single array *row* of strings as delimiter-separated values, returning a string. Each column within the row will be separated by the delimiter (such as a comma, `,`). Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. # dsv.formatValue(value) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") Format a single *value* or string as a delimiter-separated value, returning a string. A value that contains either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. # d3.autoType(object) [<>](https://github.com/d3/d3-dsv/blob/master/src/autoType.js "Source") Given an *object* (or array) representing a parsed row, infers the types of values on the *object* and coerces them accordingly, returning the mutated *object*. This function is intended to be used as a *row* accessor function in conjunction with [*dsv*.parse](#dsv_parse) and [*dsv*.parseRows](#dsv_parseRow). For example, consider the following CSV file: ``` Year,Make,Model,Length 1997,Ford,E350,2.34 2000,Mercury,Cougar,2.38 ``` When used with [d3.csvParse](#csvParse), ```js d3.csvParse(string, d3.autoType) ``` the resulting JavaScript array is: ```js [ {"Year": 1997, "Make": "Ford", "Model": "E350", "Length": 2.34}, {"Year": 2000, "Make": "Mercury", "Model": "Cougar", "Length": 2.38} ] ``` Type inference works as follows. For each *value* in the given *object*, the [trimmed](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) value is computed; the value is then re-assigned as follows: 1. If empty, then `null`. 1. If exactly `"true"`, then `true`. 1. If exactly `"false"`, then `false`. 1. If exactly `"NaN"`, then `NaN`. 1. Otherwise, if [coercible to a number](https://www.ecma-international.org/ecma-262/9.0/index.html#sec-tonumber-applied-to-the-string-type), then a number. 1. Otherwise, if a [date-only or date-time string](https://www.ecma-international.org/ecma-262/9.0/index.html#sec-date-time-string-format), then a Date. 1. Otherwise, a string (the original untrimmed value). Values with leading zeroes may be coerced to numbers; for example `"08904"` coerces to `8904`. However, extra characters such as commas or units (*e.g.*, `"$1.00"`, `"(123)"`, `"1,234"` or `"32px"`) will prevent number coercion, resulting in a string. Date strings must be in ECMAScript’s subset of the [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601). When a date-only string such as YYYY-MM-DD is specified, the inferred time is midnight UTC; however, if a date-time string such as YYYY-MM-DDTHH:MM is specified without a time zone, it is assumed to be local time. Automatic type inference is primarily intended to provide safe, predictable behavior in conjunction with [*dsv*.format](#dsv_format) and [*dsv*.formatRows](#dsv_formatRows) for common JavaScript types. If you need different behavior, you should implement your own row accessor function. For more, see [the d3.autoType notebook](https://observablehq.com/@d3/d3-autotype). ### Content Security Policy If a [content security policy](http://www.w3.org/TR/CSP/) is in place, note that [*dsv*.parse](#dsv_parse) requires `unsafe-eval` in the `script-src` directive, due to the (safe) use of dynamic code generation for fast parsing. (See [source](https://github.com/d3/d3-dsv/blob/master/src/dsv.js).) Alternatively, use [*dsv*.parseRows](#dsv_parseRows). ### Byte-Order Marks DSV files sometimes begin with a [byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark); saving a spreadsheet in CSV UTF-8 format from Microsoft Excel, for example, will include a BOM. On the web this is not usually a problem because the [UTF-8 decode algorithm](https://encoding.spec.whatwg.org/#utf-8-decode) specified in the Encoding standard removes the BOM. Node.js, on the other hand, [does not remove the BOM](https://github.com/nodejs/node-v0.x-archive/issues/1918) when decoding UTF-8. If the BOM is not removed, the first character of the text is a zero-width non-breaking space. So if a CSV file with a BOM is parsed by [d3.csvParse](#csvParse), the first column’s name will begin with a zero-width non-breaking space. This can be hard to spot since this character is usually invisible when printed. To remove the BOM before parsing, consider using [strip-bom](https://www.npmjs.com/package/strip-bom). ## Command Line Reference ### dsv2dsv # dsv2dsv [options…] [file] Converts the specified DSV input *file* to DSV (typically with a different delimiter or encoding). If *file* is not specified, defaults to reading from stdin. For example, to convert to CSV to TSV: ``` csv2tsv < example.csv > example.tsv ``` To convert windows-1252 CSV to utf-8 CSV: ``` dsv2dsv --input-encoding windows-1252 < latin1.csv > utf8.csv ``` # dsv2dsv -h
# dsv2dsv --help Output usage information. # dsv2dsv -V
# dsv2dsv --version Output the version number. # dsv2dsv -o file
# dsv2dsv --out file Specify the output file name. Defaults to “-” for stdout. # dsv2dsv -r delimiter
# dsv2dsv --input-delimiter delimiter Specify the input delimiter character. Defaults to “,” for reading CSV. (You can enter a tab on the command line by typing ⌃V.) # dsv2dsv --input-encoding encoding Specify the input character encoding. Defaults to “utf8”. # dsv2dsv -w delimiter
# dsv2dsv --output-delimiter delimiter Specify the output delimiter character. Defaults to “,” for writing CSV. (You can enter a tab on the command line by typing ⌃V.) # dsv2dsv --output-encoding encoding Specify the output character encoding. Defaults to “utf8”. # csv2tsv [options…] [file] Equivalent to [dsv2dsv](#dsv2dsv), but the [output delimiter](#dsv2dsv_output_delimiter) defaults to the tab character (\t). # tsv2csv [options…] [file] Equivalent to [dsv2dsv](#dsv2dsv), but the [input delimiter](#dsv2dsv_output_delimiter) defaults to the tab character (\t). ### dsv2json # dsv2json [options…] [file] Converts the specified DSV input *file* to JSON. If *file* is not specified, defaults to reading from stdin. For example, to convert to CSV to JSON: ``` csv2json < example.csv > example.json ``` Or to convert CSV to a newline-delimited JSON stream: ``` csv2json -n < example.csv > example.ndjson ``` # dsv2json -h
# dsv2json --help Output usage information. # dsv2json -V
# dsv2json --version Output the version number. # dsv2json -o file
# dsv2json --out file Specify the output file name. Defaults to “-” for stdout. # dsv2json -r delimiter
# dsv2json --input-delimiter delimiter Specify the input delimiter character. Defaults to “,” for reading CSV. (You can enter a tab on the command line by typing ⌃V.) # dsv2json --input-encoding encoding Specify the input character encoding. Defaults to “utf8”. # dsv2json -r encoding
# dsv2json --output-encoding encoding Specify the output character encoding. Defaults to “utf8”. # dsv2json -n
# dsv2json --newline-delimited Output [newline-delimited JSON](https://github.com/mbostock/ndjson-cli) instead of a single JSON array. # csv2json [options…] [file] Equivalent to [dsv2json](#dsv2json). # tsv2json [options…] [file] Equivalent to [dsv2json](#dsv2json), but the [input delimiter](#dsv2json_input_delimiter) defaults to the tab character (\t). ### json2dsv # json2dsv [options…] [file] Converts the specified JSON input *file* to DSV. If *file* is not specified, defaults to reading from stdin. For example, to convert to JSON to CSV: ``` json2csv < example.json > example.csv ``` Or to convert a newline-delimited JSON stream to CSV: ``` json2csv -n < example.ndjson > example.csv ``` # json2dsv -h
# json2dsv --help Output usage information. # json2dsv -V
# json2dsv --version Output the version number. # json2dsv -o file
# json2dsv --out file Specify the output file name. Defaults to “-” for stdout. # json2dsv --input-encoding encoding Specify the input character encoding. Defaults to “utf8”. # json2dsv -w delimiter
# json2dsv --output-delimiter delimiter Specify the output delimiter character. Defaults to “,” for writing CSV. (You can enter a tab on the command line by typing ⌃V.) # json2dsv --output-encoding encoding Specify the output character encoding. Defaults to “utf8”. # json2dsv -n
# json2dsv --newline-delimited Read [newline-delimited JSON](https://github.com/mbostock/ndjson-cli) instead of a single JSON array. # csv2json [options…] [file] Equivalent to [json2dsv](#json2dsv). # tsv2json [options…] [file] Equivalent to [json2dsv](#json2dsv), but the [output delimiter](#json2dsv_output_delimiter) defaults to the tab character (\t). d3-dsv-1.2.0/bin/000077500000000000000000000000001356403223500133655ustar00rootroot00000000000000d3-dsv-1.2.0/bin/dsv2dsv000077500000000000000000000025761356403223500147200ustar00rootroot00000000000000#!/usr/bin/env node var os = require("os"), rw = require("rw").dash, path = require("path"), iconv = require("iconv-lite"), commander = require("commander"), dsv = require("../"); var program = path.basename(process.argv[1]), defaultInDelimiter = program.slice(0, 3) === "tsv" ? "\t" : ",", defaultOutDelimiter = program.slice(-3) === "tsv" ? "\t" : ","; commander .version(require("../package.json").version) .usage("[options] [file]") .option("-o, --out ", "output file name; defaults to “-” for stdout", "-") .option("-r, --input-delimiter ", "input delimiter character", defaultInDelimiter) .option("-w, --output-delimiter ", "output delimiter character", defaultOutDelimiter) .option("--input-encoding ", "input character encoding; defaults to “utf8”", "utf8") .option("--output-encoding ", "output character encoding; defaults to “utf8”", "utf8") .parse(process.argv); var inFormat = dsv.dsvFormat(commander.inputDelimiter), outFormat = dsv.dsvFormat(commander.outputDelimiter); rw.readFile(commander.args[0] || "-", function(error, text) { if (error) throw error; rw.writeFile("-", iconv.encode(outFormat.format(inFormat.parse(iconv.decode(text, commander.inputEncoding))) + os.EOL, commander.outputEncoding), function(error) { if (error) throw error; }); }); d3-dsv-1.2.0/bin/dsv2json000077500000000000000000000025631356403223500150710ustar00rootroot00000000000000#!/usr/bin/env node var os = require("os"), rw = require("rw").dash, path = require("path"), iconv = require("iconv-lite"), commander = require("commander"), dsv = require("../"); var program = path.basename(process.argv[1]), defaultInDelimiter = program.slice(0, 3) === "tsv" ? "\t" : ","; commander .version(require("../package.json").version) .usage("[options] [file]") .option("-o, --out ", "output file name; defaults to “-” for stdout", "-") .option("-r, --input-delimiter ", "input delimiter character", defaultInDelimiter) .option("-n, --newline-delimited", "output newline-delimited JSON") .option("--input-encoding ", "input character encoding; defaults to “utf8”", "utf8") .option("--output-encoding ", "output character encoding; defaults to “utf8”", "utf8") .parse(process.argv); var inFormat = dsv.dsvFormat(commander.inputDelimiter); rw.readFile(commander.args[0] || "-", function(error, text) { if (error) throw error; var rows = inFormat.parse(iconv.decode(text, commander.inputEncoding)); rw.writeFile(commander.out, iconv.encode(commander.newlineDelimited ? rows.map(function(row) { return JSON.stringify(row); }).join("\n") + "\n" : JSON.stringify(rows) + os.EOL, commander.outputEncoding), function(error) { if (error) throw error; }); }); d3-dsv-1.2.0/bin/json2dsv000077500000000000000000000025641356403223500150720ustar00rootroot00000000000000#!/usr/bin/env node var os = require("os"), rw = require("rw").dash, path = require("path"), iconv = require("iconv-lite"), commander = require("commander"), dsv = require("../"); var program = path.basename(process.argv[1]), defaultOutDelimiter = program.slice(-3) === "tsv" ? "\t" : ","; commander .version(require("../package.json").version) .usage("[options] [file]") .option("-o, --out ", "output file name; defaults to “-” for stdout", "-") .option("-w, --output-delimiter ", "output delimiter character", defaultOutDelimiter) .option("-n, --newline-delimited", "accept newline-delimited JSON") .option("--input-encoding ", "input character encoding; defaults to “utf8”", "utf8") .option("--output-encoding ", "output character encoding; defaults to “utf8”", "utf8") .parse(process.argv); var outFormat = dsv.dsvFormat(commander.outputDelimiter); rw.readFile(commander.args[0] || "-", function(error, text) { if (error) throw error; text = iconv.decode(text, commander.inputEncoding); rw.writeFile(commander.out, iconv.encode(outFormat.format(commander.newlineDelimited ? text.trim().split(/\r?\n/g).map(function(line) { return JSON.parse(line); }) : JSON.parse(text)) + os.EOL, commander.outputEncoding), function(error) { if (error) throw error; }); }); d3-dsv-1.2.0/d3-dsv.sublime-project000066400000000000000000000005241356403223500167440ustar00rootroot00000000000000{ "folders": [ { "path": ".", "file_exclude_patterns": ["*.sublime-workspace"], "folder_exclude_patterns": ["dist"] } ], "build_systems": [ { "name": "yarn test", "cmd": ["yarn", "test"], "file_regex": "\\((...*?):([0-9]*):([0-9]*)\\)", "working_dir": "$project_path" } ] } d3-dsv-1.2.0/package.json000066400000000000000000000037371356403223500151150ustar00rootroot00000000000000{ "name": "d3-dsv", "version": "1.2.0", "description": "A parser and formatter for delimiter-separated values, such as CSV and TSV", "keywords": [ "d3", "d3-module", "dsv", "csv", "tsv" ], "homepage": "https://d3js.org/d3-dsv/", "license": "BSD-3-Clause", "author": { "name": "Mike Bostock", "url": "http://bost.ocks.org/mike" }, "main": "dist/d3-dsv.js", "unpkg": "dist/d3-dsv.min.js", "jsdelivr": "dist/d3-dsv.min.js", "module": "src/index.js", "bin": { "csv2json": "bin/dsv2json", "csv2tsv": "bin/dsv2dsv", "dsv2dsv": "bin/dsv2dsv", "dsv2json": "bin/dsv2json", "json2csv": "bin/json2dsv", "json2dsv": "bin/json2dsv", "json2tsv": "bin/json2dsv", "tsv2csv": "bin/dsv2dsv", "tsv2json": "bin/dsv2json" }, "repository": { "type": "git", "url": "https://github.com/d3/d3-dsv.git" }, "files": [ "bin/*", "dist/**/*.js", "src/**/*.js" ], "scripts": { "pretest": "rollup -c", "test": "TZ=America/Los_Angeles tape 'test/**/*-test.js' && eslint src test", "prepublishOnly": "rm -rf dist && yarn test", "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js" }, "dependencies": { "commander": "2", "iconv-lite": "0.4", "rw": "1" }, "sideEffects": false, "devDependencies": { "csv-spectrum": "1", "eslint": "6", "rollup": "1", "rollup-plugin-terser": "5", "tape": "4" } } d3-dsv-1.2.0/rollup.config.js000066400000000000000000000015451356403223500157410ustar00rootroot00000000000000import {terser} from "rollup-plugin-terser"; import * as meta from "./package.json"; const config = { input: "src/index.js", external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)), output: { file: `dist/${meta.name}.js`, name: "d3", format: "umd", indent: false, extend: true, banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`, globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) }, plugins: [] }; export default [ config, { ...config, output: { ...config.output, file: `dist/${meta.name}.min.js` }, plugins: [ ...config.plugins, terser({ output: { preamble: config.output.banner } }) ] } ]; d3-dsv-1.2.0/src/000077500000000000000000000000001356403223500134045ustar00rootroot00000000000000d3-dsv-1.2.0/src/autoType.js000066400000000000000000000014321356403223500155540ustar00rootroot00000000000000export default function autoType(object) { for (var key in object) { var value = object[key].trim(), number, m; if (!value) value = null; else if (value === "true") value = true; else if (value === "false") value = false; else if (value === "NaN") value = NaN; else if (!isNaN(number = +value)) value = number; else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) { if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " "); value = new Date(value); } else continue; object[key] = value; } return object; } // https://github.com/d3/d3-dsv/issues/45 var fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours();d3-dsv-1.2.0/src/csv.js000066400000000000000000000005131356403223500145340ustar00rootroot00000000000000import dsv from "./dsv.js"; var csv = dsv(","); export var csvParse = csv.parse; export var csvParseRows = csv.parseRows; export var csvFormat = csv.format; export var csvFormatBody = csv.formatBody; export var csvFormatRows = csv.formatRows; export var csvFormatRow = csv.formatRow; export var csvFormatValue = csv.formatValue; d3-dsv-1.2.0/src/dsv.js000066400000000000000000000113461356403223500145430ustar00rootroot00000000000000var EOL = {}, EOF = {}, QUOTE = 34, NEWLINE = 10, RETURN = 13; function objectConverter(columns) { return new Function("d", "return {" + columns.map(function(name, i) { return JSON.stringify(name) + ": d[" + i + "] || \"\""; }).join(",") + "}"); } function customConverter(columns, f) { var object = objectConverter(columns); return function(row, i) { return f(object(row), i, columns); }; } // Compute unique columns in order of discovery. function inferColumns(rows) { var columnSet = Object.create(null), columns = []; rows.forEach(function(row) { for (var column in row) { if (!(column in columnSet)) { columns.push(columnSet[column] = column); } } }); return columns; } function pad(value, width) { var s = value + "", length = s.length; return length < width ? new Array(width - length + 1).join(0) + s : s; } function formatYear(year) { return year < 0 ? "-" + pad(-year, 6) : year > 9999 ? "+" + pad(year, 6) : pad(year, 4); } function formatDate(date) { var hours = date.getUTCHours(), minutes = date.getUTCMinutes(), seconds = date.getUTCSeconds(), milliseconds = date.getUTCMilliseconds(); return isNaN(date) ? "Invalid Date" : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" : ""); } export default function(delimiter) { var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), DELIMITER = delimiter.charCodeAt(0); function parse(text, f) { var convert, columns, rows = parseRows(text, function(row, i) { if (convert) return convert(row, i - 1); columns = row, convert = f ? customConverter(row, f) : objectConverter(row); }); rows.columns = columns || []; return rows; } function parseRows(text, f) { var rows = [], // output rows N = text.length, I = 0, // current character index n = 0, // current line number t, // current token eof = N <= 0, // current token followed by EOF? eol = false; // current token followed by EOL? // Strip the trailing newline. if (text.charCodeAt(N - 1) === NEWLINE) --N; if (text.charCodeAt(N - 1) === RETURN) --N; function token() { if (eof) return EOF; if (eol) return eol = false, EOL; // Unescape quotes. var i, j = I, c; if (text.charCodeAt(j) === QUOTE) { while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); if ((i = I) >= N) eof = true; else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } return text.slice(j + 1, i - 1).replace(/""/g, "\""); } // Find next delimiter or newline. while (I < N) { if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } else if (c !== DELIMITER) continue; return text.slice(j, i); } // Return last token before EOF. return eof = true, text.slice(j, N); } while ((t = token()) !== EOF) { var row = []; while (t !== EOL && t !== EOF) row.push(t), t = token(); if (f && (row = f(row, n++)) == null) continue; rows.push(row); } return rows; } function preformatBody(rows, columns) { return rows.map(function(row) { return columns.map(function(column) { return formatValue(row[column]); }).join(delimiter); }); } function format(rows, columns) { if (columns == null) columns = inferColumns(rows); return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); } function formatBody(rows, columns) { if (columns == null) columns = inferColumns(rows); return preformatBody(rows, columns).join("\n"); } function formatRows(rows) { return rows.map(formatRow).join("\n"); } function formatRow(row) { return row.map(formatValue).join(delimiter); } function formatValue(value) { return value == null ? "" : value instanceof Date ? formatDate(value) : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" : value; } return { parse: parse, parseRows: parseRows, format: format, formatBody: formatBody, formatRows: formatRows, formatRow: formatRow, formatValue: formatValue }; } d3-dsv-1.2.0/src/index.js000066400000000000000000000005221356403223500150500ustar00rootroot00000000000000export {default as dsvFormat} from "./dsv.js"; export {csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue} from "./csv.js"; export {tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue} from "./tsv.js"; export {default as autoType} from "./autoType.js"; d3-dsv-1.2.0/src/tsv.js000066400000000000000000000005141356403223500145560ustar00rootroot00000000000000import dsv from "./dsv.js"; var tsv = dsv("\t"); export var tsvParse = tsv.parse; export var tsvParseRows = tsv.parseRows; export var tsvFormat = tsv.format; export var tsvFormatBody = tsv.formatBody; export var tsvFormatRows = tsv.formatRows; export var tsvFormatRow = tsv.formatRow; export var tsvFormatValue = tsv.formatValue; d3-dsv-1.2.0/test/000077500000000000000000000000001356403223500135745ustar00rootroot00000000000000d3-dsv-1.2.0/test/autoType-test.js000066400000000000000000000115061356403223500167240ustar00rootroot00000000000000var tape = require("tape"), dsv = require("../"); tape("autoType(object) mutates in-place", function(test) { var object = {foo: "4.2"}; test.strictEqual(dsv.autoType(object), object); test.deepEqual(object, {foo: 4.2}); test.end(); }); tape("autoType(object) detects numbers", function(test) { test.deepEqual(dsv.autoType({foo: "4.2"}), {foo: 4.2}); test.deepEqual(dsv.autoType({foo: "04.2"}), {foo: 4.2}); test.deepEqual(dsv.autoType({foo: "-4.2"}), {foo: -4.2}); test.deepEqual(dsv.autoType({foo: "1e4"}), {foo: 10000}); test.end(); }); tape("autoType(object) detects NaN", function(test) { test.equal(Number.isNaN(dsv.autoType({foo: "NaN"}).foo), true); test.end(); }); // https://www.ecma-international.org/ecma-262/9.0/index.html#sec-date-time-string-format // When the time zone offset is absent, date-only forms are interpreted as a UTC time and date-time forms are interpreted as a local time. // YYYY is ambiguous with number, so the number takes priority. tape("autoType(object) detects dates", function(test) { test.deepEqual(dsv.autoType({foo: "2018-01"}), {foo: new Date("2018-01-01T00:00:00.000Z")}); test.deepEqual(dsv.autoType({foo: "2018-01-01"}), {foo: new Date("2018-01-01T00:00:00.000Z")}); test.end(); }); tape("autoType(object) detects extended years", function(test) { test.deepEqual(dsv.autoType({foo: "-010001-01-01T00:00:00Z"}), {foo: new Date("-010001-01-01T00:00:00Z")}); test.deepEqual(dsv.autoType({foo: "+010001-01-01T00:00:00Z"}), {foo: new Date("+010001-01-01T00:00:00Z")}); test.end(); }); tape("autoType(object) detects date-times", function(test) { test.deepEqual(dsv.autoType({foo: "2018T00:00Z"}), {foo: new Date("2018-01-01T00:00:00.000Z")}); test.deepEqual(dsv.autoType({foo: "2018T00:00+08:00"}), {foo: new Date("2017-12-31T16:00:00.000Z")}); test.deepEqual(dsv.autoType({foo: "2018-01T12:23"}), {foo: new Date("2018-01-01T12:23:00.000")}); test.deepEqual(dsv.autoType({foo: "2018-01T12:23Z"}), {foo: new Date("2018-01-01T12:23:00.000Z")}); test.deepEqual(dsv.autoType({foo: "2018-01T12:23+00:00"}), {foo: new Date("2018-01-01T12:23:00.000Z")}); test.deepEqual(dsv.autoType({foo: "2018-01-01T00:00"}), {foo: new Date("2018-01-01T00:00:00.000")}); test.deepEqual(dsv.autoType({foo: "2018-01-01T00:00+00:00"}), {foo: new Date("2018-01-01T00:00:00.000Z")}); test.deepEqual(dsv.autoType({foo: "2018-01-01T00:00-00:00"}), {foo: new Date("2018-01-01T00:00:00.000Z")}); test.end(); }); tape("autoType(object) detects booleans", function(test) { test.deepEqual(dsv.autoType({foo: "true"}), {foo: true}); test.deepEqual(dsv.autoType({foo: "false"}), {foo: false}); test.end(); }); tape("autoType(object) detects null", function(test) { test.deepEqual(dsv.autoType({foo: ""}), {foo: null}); test.end(); }); tape("autoType(object) detects strings", function(test) { test.deepEqual(dsv.autoType({foo: "yes"}), {foo: "yes"}); test.deepEqual(dsv.autoType({foo: "no"}), {foo: "no"}); test.deepEqual(dsv.autoType({foo: "01/01/2018"}), {foo: "01/01/2018"}); test.deepEqual(dsv.autoType({foo: "January 1, 2018"}), {foo: "January 1, 2018"}); test.deepEqual(dsv.autoType({foo: "1,431"}), {foo: "1,431"}); test.deepEqual(dsv.autoType({foo: "$1.00"}), {foo: "$1.00"}); test.deepEqual(dsv.autoType({foo: "(1.00)"}), {foo: "(1.00)"}); test.deepEqual(dsv.autoType({foo: "Nan"}), {foo: "Nan"}); test.deepEqual(dsv.autoType({foo: "True"}), {foo: "True"}); test.deepEqual(dsv.autoType({foo: "False"}), {foo: "False"}); test.deepEqual(dsv.autoType({foo: "TRUE"}), {foo: "TRUE"}); test.deepEqual(dsv.autoType({foo: "FALSE"}), {foo: "FALSE"}); test.deepEqual(dsv.autoType({foo: "NAN"}), {foo: "NAN"}); test.deepEqual(dsv.autoType({foo: "nan"}), {foo: "nan"}); test.deepEqual(dsv.autoType({foo: "NA"}), {foo: "NA"}); test.deepEqual(dsv.autoType({foo: "na"}), {foo: "na"}); test.end(); }); tape("autoType(object) ignores leading and trailing whitespace", function(test) { test.deepEqual(dsv.autoType({foo: " 4.2 "}), {foo: 4.2}); test.deepEqual(dsv.autoType({foo: " -4.2 "}), {foo: -4.2}); test.deepEqual(dsv.autoType({foo: " 1e4 "}), {foo: 10000}); test.deepEqual(dsv.autoType({foo: " 2018-01 "}), {foo: new Date("2018-01-01T00:00:00.000Z")}); test.deepEqual(dsv.autoType({foo: " 2018T00:00Z "}), {foo: new Date("2018-01-01T00:00:00.000Z")}); test.equal(Number.isNaN(dsv.autoType({foo: " NaN "}).foo), true); test.deepEqual(dsv.autoType({foo: " true "}), {foo: true}); test.deepEqual(dsv.autoType({foo: " "}), {foo: null}); test.end(); }); tape("autoType(array) mutates in-place", function(test) { var array = ["4.2"]; test.strictEqual(dsv.autoType(array), array); test.deepEqual(array, [4.2]); test.end(); }); tape("autoType(array) can take an array", function(test) { test.deepEqual(dsv.autoType(["4.2", " 2018-01 "]), [4.2, new Date("2018-01-01T00:00:00.000Z")]); test.end(); }); d3-dsv-1.2.0/test/csv-test.js000066400000000000000000000374701356403223500157150ustar00rootroot00000000000000var tape = require("tape"), dsv = require("../"), fs = require("fs"), table = require("./table"), spectrum = require("csv-spectrum"); tape("csvParse(string) returns the expected objects", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,2,3\n"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.deepEqual(dsv.csvParse(fs.readFileSync("test/data/sample.csv", "utf-8")), table([{Hello: "42", World: "\"fish\""}], ["Hello", "World"])); test.end(); }); tape("csvParse(string) does not strip whitespace", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n 1, 2 ,3 "), table([{a: " 1", b: " 2 ", c: "3 "}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) treats empty fields as the empty string", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,,3"), table([{a: "1", b: "", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) treats a trailing empty field as the empty string", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,2,\n1,2,\n"), table([{a: "1", b: "2", c: ""}, {a: "1", b: "2", c: ""}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) treats a trailing empty field on the last line as the empty string", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,2,\n1,2,"), table([{a: "1", b: "2", c: ""}, {a: "1", b: "2", c: ""}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) treats quoted empty strings as the empty string", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,\"\",3"), table([{a: "1", b: "", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) allows the last field to have unterminated quotes", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,2,\"3"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.deepEqual(dsv.csvParse("a,b,c\n1,2,\""), table([{a: "1", b: "2", c: ""}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) ignores a blank last line", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,2,3\n"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) treats a blank non-last line as a single-column empty string", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,2,3\n\n"), table([{a: "1", b: "2", c: "3"}, {a: "", b: "", c: ""}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) returns empty strings for missing columns", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1\n1,2"), table([{a: "1", b: "", c: ""}, {a: "1", b: "2", c: ""}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) does not ignore a whitespace-only last line", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,2,3\n "), table([{a: "1", b: "2", c: "3"}, {a: " ", b: "", c: ""}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) parses quoted values", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n\"1\",2,3"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.deepEqual(dsv.csvParse("a,b,c\n\"1\",2,3\n"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) parses quoted values with quotes", function(test) { test.deepEqual(dsv.csvParse("a\n\"\"\"hello\"\"\""), table([{a: "\"hello\""}], ["a"])); test.end(); }); tape("csvParse(string) parses quoted values with newlines", function(test) { test.deepEqual(dsv.csvParse("a\n\"new\nline\""), table([{a: "new\nline"}], ["a"])); test.deepEqual(dsv.csvParse("a\n\"new\rline\""), table([{a: "new\rline"}], ["a"])); test.deepEqual(dsv.csvParse("a\n\"new\r\nline\""), table([{a: "new\r\nline"}], ["a"])); test.end(); }); tape("csvParse(string) observes Unix, Mac and DOS newlines", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n1,2,3\n4,5,\"6\"\n7,8,9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.deepEqual(dsv.csvParse("a,b,c\r1,2,3\r4,5,\"6\"\r7,8,9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.deepEqual(dsv.csvParse("a,b,c\r\n1,2,3\r\n4,5,\"6\"\r\n7,8,9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string) returns columns in the input order", function(test) { test.deepEqual(dsv.csvParse("a,b,c\n").columns, ["a", "b", "c"]); test.deepEqual(dsv.csvParse("a,c,b\n").columns, ["a", "c", "b"]); test.deepEqual(dsv.csvParse("a,0,1\n").columns, ["a", "0", "1"]); test.deepEqual(dsv.csvParse("1,0,a\n").columns, ["1", "0", "a"]); test.end(); }); tape("csvParse(string) passes the csv-spectrum test suite", function(test) { spectrum(function(error, samples) { samples.forEach(function(sample) { var actual = dsv.csvParse(sample.csv.toString()), expected = JSON.parse(sample.json.toString()); delete actual.columns; test.deepEqual(actual, expected); }); test.end(); }); }); tape("csvParse(string, row) returns the expected converted objects", function(test) { function row(d) { d.Hello = -d.Hello; return d; } test.deepEqual(dsv.csvParse(fs.readFileSync("test/data/sample.csv", "utf-8"), row), table([{Hello: -42, World: "\"fish\""}], ["Hello", "World"])); test.deepEqual(dsv.csvParse("a,b,c\n1,2,3\n", function(d) { return d; }), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string, row) skips rows if row returns null or undefined", function(test) { function row(d, i) { return [d, null, undefined, false][i]; } test.deepEqual(dsv.csvParse("field\n42\n\n\n\n", row), table([{field: "42"}, false], ["field"])); test.deepEqual(dsv.csvParse("a,b,c\n1,2,3\n2,3,4", function(d) { return d.a & 1 ? null : d; }), table([{a: "2", b: "3", c: "4"}], ["a", "b", "c"])); test.deepEqual(dsv.csvParse("a,b,c\n1,2,3\n2,3,4", function(d) { return d.a & 1 ? undefined : d; }), table([{a: "2", b: "3", c: "4"}], ["a", "b", "c"])); test.end(); }); tape("csvParse(string, row) calls row(d, i) for each row d, in order", function(test) { var rows = []; dsv.csvParse("a\n1\n2\n3\n4", function(d, i) { rows.push({d: d, i: i}); }); test.deepEqual(rows, [{d: {a: "1"}, i: 0}, {d: {a: "2"}, i: 1}, {d: {a: "3"}, i: 2}, {d: {a: "4"}, i: 3}]); test.end(); }); tape("csvParseRows(string) returns the expected array of array of string", function(test) { test.deepEqual(dsv.csvParseRows("a,b,c"), [["a", "b", "c"]]); test.deepEqual(dsv.csvParseRows("a,b,c\n1,2,3"), [["a", "b", "c"], ["1", "2", "3"]]); test.end(); }); tape("csvParseRows(string) does not strip whitespace", function(test) { test.deepEqual(dsv.csvParseRows(" 1, 2 ,3 "), [[" 1", " 2 ", "3 "]]); test.end(); }); tape("csvParseRows(string) treats empty fields as the empty string", function(test) { test.deepEqual(dsv.csvParseRows("1,,3"), [["1", "", "3"]]); test.end(); }); tape("csvParseRows(string) treats a trailing empty field as the empty string", function(test) { test.deepEqual(dsv.csvParseRows("1,2,\n1,2,3"), [["1", "2", ""], ["1", "2", "3"]]); test.end(); }); tape("csvParseRows(string) treats a trailing empty field on the last line as the empty string", function(test) { test.deepEqual(dsv.csvParseRows("1,2,\n"), [["1", "2", ""]]); test.deepEqual(dsv.csvParseRows("1,2,"), [["1", "2", ""]]); test.end(); }); tape("csvParseRows(string) treats quoted empty strings as the empty string", function(test) { test.deepEqual(dsv.csvParseRows("\"\",2,3"), [["", "2", "3"]]); test.deepEqual(dsv.csvParseRows("1,\"\",3"), [["1", "", "3"]]); test.deepEqual(dsv.csvParseRows("1,2,\"\""), [["1", "2", ""]]); test.end(); }); tape("csvParseRows(string) allows the last field to have unterminated quotes", function(test) { test.deepEqual(dsv.csvParseRows("1,2,\"3"), [["1", "2", "3"]]); test.deepEqual(dsv.csvParseRows("1,2,\""), [["1", "2", ""]]); test.end(); }); tape("csvParseRows(string) ignores a blank last line", function(test) { test.deepEqual(dsv.csvParseRows("1,2,3\n"), [["1", "2", "3"]]); test.end(); }); tape("csvParseRows(string) treats a blank non-last line as a single-column empty string", function(test) { test.deepEqual(dsv.csvParseRows("1,2,3\n\n"), [["1", "2", "3"], [""]]); test.deepEqual(dsv.csvParseRows("1,2,3\n\"\"\n"), [["1", "2", "3"], [""]]); test.end(); }); tape("csvParseRows(string) can return rows of varying length", function(test) { test.deepEqual(dsv.csvParseRows("1\n1,2\n1,2,3"), [["1"], ["1", "2"], ["1", "2", "3"]]); test.end(); }); tape("csvParseRows(string) does not ignore a whitespace-only last line", function(test) { test.deepEqual(dsv.csvParseRows("1,2,3\n "), [["1", "2", "3"], [" "]]); test.end(); }); tape("csvParseRows(string) parses quoted values", function(test) { test.deepEqual(dsv.csvParseRows("\"1\",2,3\n"), [["1", "2", "3"]]); test.deepEqual(dsv.csvParseRows("\"hello\""), [["hello"]]); test.end(); }); tape("csvParseRows(string) parses quoted values with quotes", function(test) { test.deepEqual(dsv.csvParseRows("\"\"\"hello\"\"\""), [["\"hello\""]]); test.end(); }); tape("csvParseRows(string) parses quoted values with newlines", function(test) { test.deepEqual(dsv.csvParseRows("\"new\nline\""), [["new\nline"]]); test.deepEqual(dsv.csvParseRows("\"new\rline\""), [["new\rline"]]); test.deepEqual(dsv.csvParseRows("\"new\r\nline\""), [["new\r\nline"]]); test.end(); }); tape("csvParseRows(string) parses Unix, Mac and DOS newlines", function(test) { test.deepEqual(dsv.csvParseRows("a,b,c\n1,2,3\n4,5,\"6\"\n7,8,9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.deepEqual(dsv.csvParseRows("a,b,c\r1,2,3\r4,5,\"6\"\r7,8,9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.deepEqual(dsv.csvParseRows("a,b,c\r\n1,2,3\r\n4,5,\"6\"\r\n7,8,9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.end(); }); tape("csvParseRows(\"\") returns the empty array", function(test) { test.deepEqual(dsv.csvParseRows(""), []); test.end(); }); tape("csvParseRows(\"\n\") returns an array of one empty string", function(test) { test.deepEqual(dsv.csvParseRows("\n"), [[""]]); test.deepEqual(dsv.csvParseRows("\r"), [[""]]); test.deepEqual(dsv.csvParseRows("\r\n"), [[""]]); test.end(); }); tape("csvParseRows(\"\n\n\") returns an array of two empty strings", function(test) { test.deepEqual(dsv.csvParseRows("\n\n"), [[""], [""]]); test.end(); }); tape("csvParseRows(string, row) returns the expected converted array of array of string", function(test) { function row(d, i) { if (i) d[0] = -d[0]; return d; } test.deepEqual(dsv.csvParseRows(fs.readFileSync("test/data/sample.csv", "utf-8"), row), [["Hello", "World"], [-42, "\"fish\""]]); test.deepEqual(dsv.csvParseRows("a,b,c\n1,2,3\n", function(d) { return d; }), [["a", "b", "c"], ["1", "2", "3"]]); test.end(); }); tape("csvParseRows(string, row) skips rows if row returns null or undefined", function(test) { function row(d, i) { return [d, null, undefined, false][i]; } test.deepEqual(dsv.csvParseRows("field\n42\n\n\n", row), [["field"], false]); test.deepEqual(dsv.csvParseRows("a,b,c\n1,2,3\n2,3,4", function(d, i) { return i & 1 ? null : d; }), [["a", "b", "c"], ["2", "3", "4"]]); test.deepEqual(dsv.csvParseRows("a,b,c\n1,2,3\n2,3,4", function(d, i) { return i & 1 ? undefined : d; }), [["a", "b", "c"], ["2", "3", "4"]]); test.end(); }); tape("csvParseRows(string, row) invokes row(d, i) for each row d, in order", function(test) { var rows = []; dsv.csvParseRows("a\n1\n2\n3\n4", function(d, i) { rows.push({d: d, i: i}); }); test.deepEqual(rows, [{d: ["a"], i: 0}, {d: ["1"], i: 1}, {d: ["2"], i: 2}, {d: ["3"], i: 3}, {d: ["4"], i: 4}]); test.end(); }); tape("csvFormat(array) takes an array of objects as input", function(test) { test.deepEqual(dsv.csvFormat([{a: 1, b: 2, c: 3}]), "a,b,c\n1,2,3"); test.end(); }); tape("csvFormat(array) converts dates to ISO 8601", function(test) { test.deepEqual(dsv.csvFormat([{date: new Date(Date.UTC(2018, 0, 1))}]), "date\n2018-01-01"); test.deepEqual(dsv.csvFormat([{date: new Date(2018, 0, 1)}]), "date\n2018-01-01T08:00Z"); test.end(); }); tape("csvFormat(array) escapes field names and values containing delimiters", function(test) { test.deepEqual(dsv.csvFormat([{"foo,bar": true}]), "\"foo,bar\"\ntrue"); test.deepEqual(dsv.csvFormat([{field: "foo,bar"}]), "field\n\"foo,bar\""); test.end(); }); tape("csvFormat(array) computes the union of all fields", function(test) { test.deepEqual(dsv.csvFormat([{a: 1}, {a: 1, b: 2}, {a: 1, b: 2, c: 3}, {b: 1, c: 2}, {c: 1}]), "a,b,c\n1,,\n1,2,\n1,2,3\n,1,2\n,,1"); test.end(); }); tape("csvFormat(array) orders fields by first-seen", function(test) { test.deepEqual(dsv.csvFormat([{a: 1, b: 2}, {c: 3, b: 4}, {c: 5, a: 1, b: 2}]), "a,b,c\n1,2,\n,4,3\n1,2,5"); test.end(); }); tape("csvFormat(array, columns) observes the specified array of column names", function(test) { test.deepEqual(dsv.csvFormat([{a: 1, b: 2, c: 3}], ["c", "b", "a"]), "c,b,a\n3,2,1"); test.deepEqual(dsv.csvFormat([{a: 1, b: 2, c: 3}], ["c", "a"]), "c,a\n3,1"); test.deepEqual(dsv.csvFormat([{a: 1, b: 2, c: 3}], []), "\n"); test.deepEqual(dsv.csvFormat([{a: 1, b: 2, c: 3}], ["d"]), "d\n"); test.end(); }); tape("csvFormat(array, columns) coerces column names to strings", function(test) { test.deepEqual(dsv.csvFormat([{a: 1, b: 2, "\"fish\"": 3}], [{toString: function() { return "\"fish\""; }}]), "\"\"\"fish\"\"\"\n3"); test.deepEqual(dsv.csvFormat([{a: 1, b: 2, c: 3}], ["a", null, "b", undefined, "c"]), "a,,b,,c\n1,,2,,3"); test.end(); }); tape("csvFormat(array, columns) coerces field values to strings", function(test) { test.deepEqual(dsv.csvFormat([{a: {toString: function() { return "\"fish\""; }}}]), "a\n\"\"\"fish\"\"\""); test.deepEqual(dsv.csvFormat([{a: null, b: undefined, c: 3}]), "a,b,c\n,,3"); test.end(); }); tape("csvFormatBody(array) omits the header row", function(test) { test.deepEqual(dsv.csvFormatBody([{a: 1, b: 2}, {c: 3, b: 4}, {c: 5, a: 1, b: 2}]), "1,2,\n,4,3\n1,2,5"); test.end(); }); tape("csvFormatBody(array, columns) omits the header row", function(test) { test.deepEqual(dsv.csvFormatBody([{a: 1, b: 2}, {c: 3, b: 4}, {c: 5, a: 1, b: 2}], ["a", "b"]), "1,2\n,4\n1,2"); test.end(); }); tape("csvFormatRows(array) takes an array of array of string as input", function(test) { test.deepEqual(dsv.csvFormatRows([["a", "b", "c"], ["1", "2", "3"]]), "a,b,c\n1,2,3"); test.end(); }); tape("csvFormatRows(array) separates lines using Unix newline", function(test) { test.deepEqual(dsv.csvFormatRows([[], []]), "\n"); test.end(); }); tape("csvFormatRows(array) converts dates to ISO 8601", function(test) { test.deepEqual(dsv.csvFormatRows([[new Date(Date.UTC(2018, 0, 1))]]), "2018-01-01"); test.deepEqual(dsv.csvFormatRows([[new Date(2018, 0, 1)]]), "2018-01-01T08:00Z"); test.end(); }); tape("csvFormatRows(array) does not strip whitespace", function(test) { test.deepEqual(dsv.csvFormatRows([["a ", " b", "c"], ["1", "2", "3 "]]), "a , b,c\n1,2,3 "); test.end(); }); tape("csvFormatRows(array) does not quote simple values", function(test) { test.deepEqual(dsv.csvFormatRows([["a"], [1]]), "a\n1"); test.end(); }); tape("csvFormatRows(array) escapes double quotes", function(test) { test.deepEqual(dsv.csvFormatRows([["\"fish\""]]), "\"\"\"fish\"\"\""); test.end(); }); tape("csvFormatRows(array) escapes Unix newlines", function(test) { test.deepEqual(dsv.csvFormatRows([["new\nline"]]), "\"new\nline\""); test.end(); }); tape("csvFormatRows(array) escapes Windows newlines", function(test) { test.deepEqual(dsv.csvFormatRows([["new\rline"]]), "\"new\rline\""); test.end(); }); tape("csvFormatRows(array) escapes values containing delimiters", function(test) { test.deepEqual(dsv.csvFormatRows([["oxford,comma"]]), "\"oxford,comma\""); test.end(); }); tape("csvFormatRow(array) takes a single array of string as input", function(test) { test.deepEqual(dsv.csvFormatRow(["a", "b", "c"]), "a,b,c"); test.end(); }); d3-dsv-1.2.0/test/data/000077500000000000000000000000001356403223500145055ustar00rootroot00000000000000d3-dsv-1.2.0/test/data/sample.csv000066400000000000000000000000321356403223500164760ustar00rootroot00000000000000Hello,World 42,"""fish""" d3-dsv-1.2.0/test/data/sample.psv000066400000000000000000000000321356403223500165130ustar00rootroot00000000000000Hello|World 42|"""fish""" d3-dsv-1.2.0/test/data/sample.tsv000066400000000000000000000000321356403223500165170ustar00rootroot00000000000000Hello World 42 """fish""" d3-dsv-1.2.0/test/data/sample2.csv000066400000000000000000000000421356403223500165610ustar00rootroot00000000000000Hello,World 42,"""fish""" foo,bar d3-dsv-1.2.0/test/data/sample2.tsv000066400000000000000000000000421356403223500166020ustar00rootroot00000000000000Hello World 42 """fish""" foo bar d3-dsv-1.2.0/test/dsv-test.js000066400000000000000000000216611356403223500157110ustar00rootroot00000000000000var tape = require("tape"), dsv = require("../"), fs = require("fs"), table = require("./table"); var psv = dsv.dsvFormat("|"); tape("dsv(\"|\").parse(string) returns the expected objects", function(test) { test.deepEqual(psv.parse("a|b|c\n1|2|3\n"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.deepEqual(psv.parse(fs.readFileSync("test/data/sample.psv", "utf-8")), table([{Hello: "42", World: "\"fish\""}], ["Hello", "World"])); test.end(); }); tape("dsv(\"|\").parse(string) does not strip whitespace", function(test) { test.deepEqual(psv.parse("a|b|c\n 1| 2|3\n"), table([{a: " 1", b: " 2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("dsv(\"|\").parse(string) parses quoted values", function(test) { test.deepEqual(psv.parse("a|b|c\n\"1\"|2|3"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.deepEqual(psv.parse("a|b|c\n\"1\"|2|3\n"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("dsv(\"|\").parse(string) parses quoted values with quotes", function(test) { test.deepEqual(psv.parse("a\n\"\"\"hello\"\"\""), table([{a: "\"hello\""}], ["a"])); test.end(); }); tape("dsv(\"|\").parse(string) parses quoted values with newlines", function(test) { test.deepEqual(psv.parse("a\n\"new\nline\""), table([{a: "new\nline"}], ["a"])); test.deepEqual(psv.parse("a\n\"new\rline\""), table([{a: "new\rline"}], ["a"])); test.deepEqual(psv.parse("a\n\"new\r\nline\""), table([{a: "new\r\nline"}], ["a"])); test.end(); }); tape("dsv(\"|\").parse(string) observes Unix, Mac and DOS newlines", function(test) { test.deepEqual(psv.parse("a|b|c\n1|2|3\n4|5|\"6\"\n7|8|9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.deepEqual(psv.parse("a|b|c\r1|2|3\r4|5|\"6\"\r7|8|9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.deepEqual(psv.parse("a|b|c\r\n1|2|3\r\n4|5|\"6\"\r\n7|8|9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.end(); }); tape("dsv(\"|\").parse(string, row) returns the expected converted objects", function(test) { function row(d) { d.Hello = -d.Hello; return d; } test.deepEqual(psv.parse(fs.readFileSync("test/data/sample.psv", "utf-8"), row), table([{Hello: -42, World: "\"fish\""}], ["Hello", "World"])); test.deepEqual(psv.parse("a|b|c\n1|2|3\n", function(d) { return d; }), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("dsv(\"|\").parse(string, row) skips rows if row returns null or undefined", function(test) { function row(d, i) { return [d, null, undefined, false][i]; } test.deepEqual(psv.parse("field\n42\n\n\n\n", row), table([{field: "42"}, false], ["field"])); test.deepEqual(psv.parse("a|b|c\n1|2|3\n2|3|4", function(d) { return d.a & 1 ? null : d; }), table([{a: "2", b: "3", c: "4"}], ["a", "b", "c"])); test.deepEqual(psv.parse("a|b|c\n1|2|3\n2|3|4", function(d) { return d.a & 1 ? undefined : d; }), table([{a: "2", b: "3", c: "4"}], ["a", "b", "c"])); test.end(); }); tape("dsv(\"|\").parse(string, row) invokes row(d, i, columns) for each row d, in order", function(test) { var rows = []; psv.parse("a\n1\n2\n3\n4", function(d, i, columns) { rows.push({d: d, i: i, columns: columns}); }); test.deepEqual(rows, [{d: {a: "1"}, i: 0, columns: ["a"]}, {d: {a: "2"}, i: 1, columns: ["a"]}, {d: {a: "3"}, i: 2, columns: ["a"]}, {d: {a: "4"}, i: 3, columns: ["a"]}]); test.end(); }); tape("dsv(\"|\").parseRows(string) returns the expected array of array of string", function(test) { test.deepEqual(psv.parseRows("a|b|c\n"), [["a", "b", "c"]]); test.end(); }); tape("dsv(\"|\").parseRows(string) parses quoted values", function(test) { test.deepEqual(psv.parseRows("\"1\"|2|3\n"), [["1", "2", "3"]]); test.deepEqual(psv.parseRows("\"hello\""), [["hello"]]); test.end(); }); tape("dsv(\"|\").parseRows(string) parses quoted values with quotes", function(test) { test.deepEqual(psv.parseRows("\"\"\"hello\"\"\""), [["\"hello\""]]); test.end(); }); tape("dsv(\"|\").parseRows(string) parses quoted values with newlines", function(test) { test.deepEqual(psv.parseRows("\"new\nline\""), [["new\nline"]]); test.deepEqual(psv.parseRows("\"new\rline\""), [["new\rline"]]); test.deepEqual(psv.parseRows("\"new\r\nline\""), [["new\r\nline"]]); test.end(); }); tape("dsv(\"|\").parseRows(string) parses Unix, Mac and DOS newlines", function(test) { test.deepEqual(psv.parseRows("a|b|c\n1|2|3\n4|5|\"6\"\n7|8|9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.deepEqual(psv.parseRows("a|b|c\r1|2|3\r4|5|\"6\"\r7|8|9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.deepEqual(psv.parseRows("a|b|c\r\n1|2|3\r\n4|5|\"6\"\r\n7|8|9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.end(); }); tape("dsv(\"|\").parseRows(string, row) returns the expected converted array of array of string", function(test) { function row(d, i) { if (i) d[0] = -d[0]; return d; } test.deepEqual(psv.parseRows(fs.readFileSync("test/data/sample.psv", "utf-8"), row), [["Hello", "World"], [-42, "\"fish\""]]); test.deepEqual(psv.parseRows("a|b|c\n1|2|3\n", function(d) { return d; }), [["a", "b", "c"], ["1", "2", "3"]]); test.end(); }); tape("dsv(\"|\").parseRows(string, row) skips rows if row returns null or undefined", function(test) { function row(d, i) { return [d, null, undefined, false][i]; } test.deepEqual(psv.parseRows("field\n42\n\n\n", row), [["field"], false]); test.deepEqual(psv.parseRows("a|b|c\n1|2|3\n2|3|4", function(d, i) { return i & 1 ? null : d; }), [["a", "b", "c"], ["2", "3", "4"]]); test.deepEqual(psv.parseRows("a|b|c\n1|2|3\n2|3|4", function(d, i) { return i & 1 ? undefined : d; }), [["a", "b", "c"], ["2", "3", "4"]]); test.end(); }); tape("dsv(\"|\").parseRows(string, row) invokes row(d, i) for each row d, in order", function(test) { var rows = []; psv.parseRows("a\n1\n2\n3\n4", function(d, i) { rows.push({d: d, i: i}); }); test.deepEqual(rows, [{d: ["a"], i: 0}, {d: ["1"], i: 1}, {d: ["2"], i: 2}, {d: ["3"], i: 3}, {d: ["4"], i: 4}]); test.end(); }); tape("dsv(\"|\").format(array) takes an array of objects as input", function(test) { test.deepEqual(psv.format([{a: 1, b: 2, c: 3}]), "a|b|c\n1|2|3"); test.end(); }); tape("dsv(\"|\").format(array) escapes field names and values containing delimiters", function(test) { test.deepEqual(psv.format([{"foo|bar": true}]), "\"foo|bar\"\ntrue"); test.deepEqual(psv.format([{field: "foo|bar"}]), "field\n\"foo|bar\""); test.end(); }); tape("dsv(\"|\").format(array) computes the union of all fields", function(test) { test.deepEqual(psv.format([{a: 1}, {a: 1, b: 2}, {a: 1, b: 2, c: 3}, {b: 1, c: 2}, {c: 1}]), "a|b|c\n1||\n1|2|\n1|2|3\n|1|2\n||1"); test.end(); }); tape("dsv(\"|\").format(array) orders fields by first-seen", function(test) { test.deepEqual(psv.format([{a: 1, b: 2}, {c: 3, b: 4}, {c: 5, a: 1, b: 2}]), "a|b|c\n1|2|\n|4|3\n1|2|5"); test.end(); }); tape("dsv(\"|\").format(array, columns) observes the specified array of column names", function(test) { test.deepEqual(psv.format([{a: 1, b: 2, c: 3}], ["c", "b", "a"]), "c|b|a\n3|2|1"); test.deepEqual(psv.format([{a: 1, b: 2, c: 3}], ["c", "a"]), "c|a\n3|1"); test.deepEqual(psv.format([{a: 1, b: 2, c: 3}], []), "\n"); test.deepEqual(psv.format([{a: 1, b: 2, c: 3}], ["d"]), "d\n"); test.end(); }); tape("dsv(\"|\").formatRows(array) takes an array of array of string as input", function(test) { test.deepEqual(psv.formatRows([["a", "b", "c"], ["1", "2", "3"]]), "a|b|c\n1|2|3"); test.end(); }); tape("dsv(\"|\").formatRows(array) separates lines using Unix newline", function(test) { test.deepEqual(psv.formatRows([[], []]), "\n"); test.end(); }); tape("dsv(\"|\").formatRows(array) does not strip whitespace", function(test) { test.deepEqual(psv.formatRows([["a ", " b", "c"], ["1", "2", "3 "]]), "a | b|c\n1|2|3 "); test.end(); }); tape("dsv(\"|\").formatRows(array) does not quote simple values", function(test) { test.deepEqual(psv.formatRows([["a"], [1]]), "a\n1"); test.end(); }); tape("dsv(\"|\").formatRows(array) escapes double quotes", function(test) { test.deepEqual(psv.formatRows([["\"fish\""]]), "\"\"\"fish\"\"\""); test.end(); }); tape("dsv(\"|\").formatRows(array) escapes Unix newlines", function(test) { test.deepEqual(psv.formatRows([["new\nline"]]), "\"new\nline\""); test.end(); }); tape("dsv(\"|\").formatRows(array) escapes Windows newlines", function(test) { test.deepEqual(psv.formatRows([["new\rline"]]), "\"new\rline\""); test.end(); }); tape("dsv(\"|\").formatRows(array) escapes values containing delimiters", function(test) { test.deepEqual(psv.formatRows([["oxford|tab"]]), "\"oxford|tab\""); test.end(); }); tape("dsv(\"|\").formatRow(array) takes a single array of string as input", function(test) { test.deepEqual(psv.formatRow(["a", "b", "c"]), "a|b|c"); test.end(); }); d3-dsv-1.2.0/test/table.js000066400000000000000000000001271356403223500152210ustar00rootroot00000000000000module.exports = function(rows, columns) { rows.columns = columns; return rows; }; d3-dsv-1.2.0/test/tsv-test.js000066400000000000000000000215441356403223500157310ustar00rootroot00000000000000var tape = require("tape"), dsv = require("../"), fs = require("fs"), table = require("./table"); tape("tsvParse(string) returns the expected objects", function(test) { test.deepEqual(dsv.tsvParse("a\tb\tc\n1\t2\t3\n"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.deepEqual(dsv.tsvParse(fs.readFileSync("test/data/sample.tsv", "utf-8")), table([{Hello: "42", World: "\"fish\""}], ["Hello", "World"])); test.end(); }); tape("tsvParse(string) does not strip whitespace", function(test) { test.deepEqual(dsv.tsvParse("a\tb\tc\n 1\t 2\t3\n"), table([{a: " 1", b: " 2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("tsvParse(string) parses quoted values", function(test) { test.deepEqual(dsv.tsvParse("a\tb\tc\n\"1\"\t2\t3"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.deepEqual(dsv.tsvParse("a\tb\tc\n\"1\"\t2\t3\n"), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("tsvParse(string) parses quoted values with quotes", function(test) { test.deepEqual(dsv.tsvParse("a\n\"\"\"hello\"\"\""), table([{a: "\"hello\""}], ["a"])); test.end(); }); tape("tsvParse(string) parses quoted values with newlines", function(test) { test.deepEqual(dsv.tsvParse("a\n\"new\nline\""), table([{a: "new\nline"}], ["a"])); test.deepEqual(dsv.tsvParse("a\n\"new\rline\""), table([{a: "new\rline"}], ["a"])); test.deepEqual(dsv.tsvParse("a\n\"new\r\nline\""), table([{a: "new\r\nline"}], ["a"])); test.end(); }); tape("tsvParse(string) observes Unix, Mac and DOS newlines", function(test) { test.deepEqual(dsv.tsvParse("a\tb\tc\n1\t2\t3\n4\t5\t\"6\"\n7\t8\t9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.deepEqual(dsv.tsvParse("a\tb\tc\r1\t2\t3\r4\t5\t\"6\"\r7\t8\t9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.deepEqual(dsv.tsvParse("a\tb\tc\r\n1\t2\t3\r\n4\t5\t\"6\"\r\n7\t8\t9"), table([{a: "1", b: "2", c: "3"}, {a: "4", b: "5", c: "6"}, {a: "7", b: "8", c: "9"}], ["a", "b", "c"])); test.end(); }); tape("tsvParse(string, row) returns the expected converted objects", function(test) { function row(d) { d.Hello = -d.Hello; return d; } test.deepEqual(dsv.tsvParse(fs.readFileSync("test/data/sample.tsv", "utf-8"), row), table([{Hello: -42, World: "\"fish\""}], ["Hello", "World"])); test.deepEqual(dsv.tsvParse("a\tb\tc\n1\t2\t3\n", function(d) { return d; }), table([{a: "1", b: "2", c: "3"}], ["a", "b", "c"])); test.end(); }); tape("tsvParse(string, row) skips rows if row returns null or undefined", function(test) { function row(d, i) { return [d, null, undefined, false][i]; } test.deepEqual(dsv.tsvParse("field\n42\n\n\n\n", row), table([{field: "42"}, false], ["field"])); test.deepEqual(dsv.tsvParse("a\tb\tc\n1\t2\t3\n2\t3\t4", function(d) { return d.a & 1 ? null : d; }), table([{a: "2", b: "3", c: "4"}], ["a", "b", "c"])); test.deepEqual(dsv.tsvParse("a\tb\tc\n1\t2\t3\n2\t3\t4", function(d) { return d.a & 1 ? undefined : d; }), table([{a: "2", b: "3", c: "4"}], ["a", "b", "c"])); test.end(); }); tape("tsvParse(string, row) invokes row(d, i) for each row d, in order", function(test) { var rows = []; dsv.tsvParse("a\n1\n2\n3\n4", function(d, i) { rows.push({d: d, i: i}); }); test.deepEqual(rows, [{d: {a: "1"}, i: 0}, {d: {a: "2"}, i: 1}, {d: {a: "3"}, i: 2}, {d: {a: "4"}, i: 3}]); test.end(); }); tape("tsvParseRows(string) returns the expected array of array of string", function(test) { test.deepEqual(dsv.tsvParseRows("a\tb\tc\n"), [["a", "b", "c"]]); test.end(); }); tape("tsvParseRows(string) parses quoted values", function(test) { test.deepEqual(dsv.tsvParseRows("\"1\"\t2\t3\n"), [["1", "2", "3"]]); test.deepEqual(dsv.tsvParseRows("\"hello\""), [["hello"]]); test.end(); }); tape("tsvParseRows(string) parses quoted values with quotes", function(test) { test.deepEqual(dsv.tsvParseRows("\"\"\"hello\"\"\""), [["\"hello\""]]); test.end(); }); tape("tsvParseRows(string) parses quoted values with newlines", function(test) { test.deepEqual(dsv.tsvParseRows("\"new\nline\""), [["new\nline"]]); test.deepEqual(dsv.tsvParseRows("\"new\rline\""), [["new\rline"]]); test.deepEqual(dsv.tsvParseRows("\"new\r\nline\""), [["new\r\nline"]]); test.end(); }); tape("tsvParseRows(string) parses Unix, Mac and DOS newlines", function(test) { test.deepEqual(dsv.tsvParseRows("a\tb\tc\n1\t2\t3\n4\t5\t\"6\"\n7\t8\t9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.deepEqual(dsv.tsvParseRows("a\tb\tc\r1\t2\t3\r4\t5\t\"6\"\r7\t8\t9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.deepEqual(dsv.tsvParseRows("a\tb\tc\r\n1\t2\t3\r\n4\t5\t\"6\"\r\n7\t8\t9"), [["a", "b", "c"], ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]]); test.end(); }); tape("tsvParseRows(string, row) returns the expected converted array of array of string", function(test) { function row(d, i) { if (i) d[0] = -d[0]; return d; } test.deepEqual(dsv.tsvParseRows(fs.readFileSync("test/data/sample.tsv", "utf-8"), row), [["Hello", "World"], [-42, "\"fish\""]]); test.deepEqual(dsv.tsvParseRows("a\tb\tc\n1\t2\t3\n", function(d) { return d; }), [["a", "b", "c"], ["1", "2", "3"]]); test.end(); }); tape("tsvParseRows(string, row) skips rows if row returns null or undefined", function(test) { function row(d, i) { return [d, null, undefined, false][i]; } test.deepEqual(dsv.tsvParseRows("field\n42\n\n\n", row), [["field"], false]); test.deepEqual(dsv.tsvParseRows("a\tb\tc\n1\t2\t3\n2\t3\t4", function(d, i) { return i & 1 ? null : d; }), [["a", "b", "c"], ["2", "3", "4"]]); test.deepEqual(dsv.tsvParseRows("a\tb\tc\n1\t2\t3\n2\t3\t4", function(d, i) { return i & 1 ? undefined : d; }), [["a", "b", "c"], ["2", "3", "4"]]); test.end(); }); tape("tsvParseRows(string, row) invokes row(d, i) for each row d, in order", function(test) { var rows = []; dsv.tsvParseRows("a\n1\n2\n3\n4", function(d, i) { rows.push({d: d, i: i}); }); test.deepEqual(rows, [{d: ["a"], i: 0}, {d: ["1"], i: 1}, {d: ["2"], i: 2}, {d: ["3"], i: 3}, {d: ["4"], i: 4}]); test.end(); }); tape("tsvFormat(array) takes an array of objects as input", function(test) { test.deepEqual(dsv.tsvFormat([{a: 1, b: 2, c: 3}]), "a\tb\tc\n1\t2\t3"); test.end(); }); tape("tsvFormat(array) escapes field names and values containing delimiters", function(test) { test.deepEqual(dsv.tsvFormat([{"foo\tbar": true}]), "\"foo\tbar\"\ntrue"); test.deepEqual(dsv.tsvFormat([{field: "foo\tbar"}]), "field\n\"foo\tbar\""); test.end(); }); tape("tsvFormat(array) computes the union of all fields", function(test) { test.deepEqual(dsv.tsvFormat([{a: 1}, {a: 1, b: 2}, {a: 1, b: 2, c: 3}, {b: 1, c: 2}, {c: 1}]), "a\tb\tc\n1\t\t\n1\t2\t\n1\t2\t3\n\t1\t2\n\t\t1"); test.end(); }); tape("tsvFormat(array) orders fields by first-seen", function(test) { test.deepEqual(dsv.tsvFormat([{a: 1, b: 2}, {c: 3, b: 4}, {c: 5, a: 1, b: 2}]), "a\tb\tc\n1\t2\t\n\t4\t3\n1\t2\t5"); test.end(); }); tape("tsvFormat(array, columns) observes the specified array of column names", function(test) { test.deepEqual(dsv.tsvFormat([{a: 1, b: 2, c: 3}], ["c", "b", "a"]), "c\tb\ta\n3\t2\t1"); test.deepEqual(dsv.tsvFormat([{a: 1, b: 2, c: 3}], ["c", "a"]), "c\ta\n3\t1"); test.deepEqual(dsv.tsvFormat([{a: 1, b: 2, c: 3}], []), "\n"); test.deepEqual(dsv.tsvFormat([{a: 1, b: 2, c: 3}], ["d"]), "d\n"); test.end(); }); tape("tsvFormatRows(array) takes an array of array of string as input", function(test) { test.deepEqual(dsv.tsvFormatRows([["a", "b", "c"], ["1", "2", "3"]]), "a\tb\tc\n1\t2\t3"); test.end(); }); tape("tsvFormatRows(array) separates lines using Unix newline", function(test) { test.deepEqual(dsv.tsvFormatRows([[], []]), "\n"); test.end(); }); tape("tsvFormatRows(array) does not strip whitespace", function(test) { test.deepEqual(dsv.tsvFormatRows([["a ", " b", "c"], ["1", "2", "3 "]]), "a \t b\tc\n1\t2\t3 "); test.end(); }); tape("tsvFormatRows(array) does not quote simple values", function(test) { test.deepEqual(dsv.tsvFormatRows([["a"], [1]]), "a\n1"); test.end(); }); tape("tsvFormatRows(array) escapes double quotes", function(test) { test.deepEqual(dsv.tsvFormatRows([["\"fish\""]]), "\"\"\"fish\"\"\""); test.end(); }); tape("tsvFormatRows(array) escapes Unix newlines", function(test) { test.deepEqual(dsv.tsvFormatRows([["new\nline"]]), "\"new\nline\""); test.end(); }); tape("tsvFormatRows(array) escapes Windows newlines", function(test) { test.deepEqual(dsv.tsvFormatRows([["new\rline"]]), "\"new\rline\""); test.end(); }); tape("tsvFormatRows(array) escapes values containing delimiters", function(test) { test.deepEqual(dsv.tsvFormatRows([["oxford\ttab"]]), "\"oxford\ttab\""); test.end(); }); tape("tsvFormatRow(array) takes a single array of string as input", function(test) { test.deepEqual(dsv.tsvFormatRow(["a", "b", "c"]), "a\tb\tc"); test.end(); }); d3-dsv-1.2.0/yarn.lock000066400000000000000000001322041356403223500144420ustar00rootroot00000000000000# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@babel/code-frame@^7.0.0": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== dependencies: "@babel/highlight" "^7.0.0" "@babel/highlight@^7.0.0": version "7.5.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== "@types/node@^12.6.2": version "12.6.8" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== acorn-jsx@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== acorn@^6.0.7, acorn@^6.2.0: version "6.2.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== ajv@^6.10.0, ajv@^6.10.2: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= dependencies: restore-cursor "^2.0.0" cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= commander@2, commander@^2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" semver "^5.5.0" shebang-command "^1.2.0" which "^1.2.9" csv-spectrum@1: version "1.0.0" resolved "https://registry.yarnpkg.com/csv-spectrum/-/csv-spectrum-1.0.0.tgz#591ac9ff48ad4f3eb4338457bc9801b349e3d628" integrity sha1-WRrJ/0itTz60M4RXvJgBs0nj1ig= debug@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" deep-equal@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= define-properties@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== dependencies: object-keys "^1.0.12" defined@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== es-abstract@^1.5.0: version "1.13.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== dependencies: es-to-primitive "^1.2.0" function-bind "^1.1.1" has "^1.0.3" is-callable "^1.1.4" is-regex "^1.0.4" object-keys "^1.0.12" es-to-primitive@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== dependencies: is-callable "^1.1.4" is-date-object "^1.0.1" is-symbol "^1.0.2" escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= eslint-scope@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" eslint-utils@^1.3.1: version "1.4.3" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: eslint-visitor-keys "^1.1.0" eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== eslint@6: version "6.1.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.1.0.tgz#06438a4a278b1d84fb107d24eaaa35471986e646" integrity sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^4.0.1" doctrine "^3.0.0" eslint-scope "^5.0.0" eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" espree "^6.0.0" esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" globals "^11.7.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" inquirer "^6.4.1" is-glob "^4.0.0" js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" lodash "^4.17.14" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" progress "^2.0.0" regexpp "^2.0.1" semver "^6.1.2" strip-ansi "^5.2.0" strip-json-comments "^3.0.1" table "^5.2.3" text-table "^0.2.0" v8-compile-cache "^2.0.3" espree@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/espree/-/espree-6.0.0.tgz#716fc1f5a245ef5b9a7fdb1d7b0d3f02322e75f6" integrity sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q== dependencies: acorn "^6.0.7" acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== dependencies: estraverse "^4.0.0" esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== dependencies: estraverse "^4.1.0" estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= estree-walker@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: chardet "^0.7.0" iconv-lite "^0.4.24" tmp "^0.0.33" fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= dependencies: escape-string-regexp "^1.0.5" file-entry-cache@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== dependencies: flat-cache "^2.0.1" flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== dependencies: flatted "^2.0.0" rimraf "2.6.3" write "1.0.3" flatted@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== for-each@~0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== dependencies: is-callable "^1.1.3" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= glob-parent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== dependencies: is-glob "^4.0.1" glob@^7.1.3, glob@~7.1.4: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" globals@^11.7.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= has@^1.0.1, has@^1.0.3, has@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" iconv-lite@0.4, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== import-fresh@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.1.0.tgz#6d33fa1dcef6df930fae003446f33415af905118" integrity sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" inherits@2, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== inquirer@^6.4.1: version "6.5.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42" integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA== dependencies: ansi-escapes "^3.2.0" chalk "^2.4.2" cli-cursor "^2.1.0" cli-width "^2.0.0" external-editor "^3.0.3" figures "^2.0.0" lodash "^4.17.12" mute-stream "0.0.7" run-async "^2.2.0" rxjs "^6.4.0" string-width "^2.1.0" strip-ansi "^5.1.0" through "^2.3.6" is-callable@^1.1.3, is-callable@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== dependencies: is-extglob "^2.1.1" is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= dependencies: has "^1.0.1" is-symbol@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== dependencies: has-symbols "^1.0.0" isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= jest-worker@^24.6.0: version "24.6.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.6.0.tgz#7f81ceae34b7cde0c9827a6980c35b7cdc0161b3" integrity sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ== dependencies: merge-stream "^1.0.1" supports-color "^6.1.0" js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== dependencies: argparse "^1.0.7" esprima "^4.0.0" json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" lodash@^4.17.12, lodash@^4.17.14: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= dependencies: readable-stream "^2.0.1" mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= minimist@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== object-inspect@~1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== object-keys@^1.0.12: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= dependencies: mimic-fn "^1.0.0" optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" wordwrap "~1.0.0" os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== readable-stream@^2.0.1: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" isarray "~1.0.0" process-nextick-args "~2.0.0" safe-buffer "~5.1.1" string_decoder "~1.1.1" util-deprecate "~1.0.1" regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve@~1.11.1: version "1.11.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e" integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== dependencies: path-parse "^1.0.6" restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= dependencies: onetime "^2.0.0" signal-exit "^3.0.2" resumer@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= dependencies: through "~2.3.4" rimraf@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: glob "^7.1.3" rollup-plugin-terser@5: version "5.1.1" resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.1.1.tgz#e9d2545ec8d467f96ba99b9216d2285aad8d5b66" integrity sha512-McIMCDEY8EU6Y839C09UopeRR56wXHGdvKKjlfiZG/GrP6wvZQ62u2ko/Xh1MNH2M9WDL+obAAHySljIZYCuPQ== dependencies: "@babel/code-frame" "^7.0.0" jest-worker "^24.6.0" rollup-pluginutils "^2.8.1" serialize-javascript "^1.7.0" terser "^4.1.0" rollup-pluginutils@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz#8fa6dd0697344938ef26c2c09d2488ce9e33ce97" integrity sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg== dependencies: estree-walker "^0.6.1" rollup@1: version "1.17.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.17.0.tgz#47ee8b04514544fc93b39bae06271244c8db7dfa" integrity sha512-k/j1m0NIsI4SYgCJR4MWPstGJOWfJyd6gycKoMhyoKPVXxm+L49XtbUwZyFsrSU2YXsOkM4u1ll9CS/ZgJBUpw== dependencies: "@types/estree" "0.0.39" "@types/node" "^12.6.2" acorn "^6.2.0" run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= dependencies: is-promise "^2.1.0" rw@1: version "1.3.3" resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q= rxjs@^6.4.0: version "6.5.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== dependencies: tslib "^1.9.0" safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== semver@^5.5.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== semver@^6.1.2: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== serialize-javascript@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA== shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= slice-ansi@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== dependencies: ansi-styles "^3.2.0" astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" source-map-support@~0.5.12: version "0.5.12" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" source-map@^0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" string-width@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== dependencies: emoji-regex "^7.0.1" is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" string.prototype.trim@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" integrity sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo= dependencies: define-properties "^1.1.2" es-abstract "^1.5.0" function-bind "^1.0.2" string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= dependencies: ansi-regex "^3.0.0" strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== dependencies: ansi-regex "^4.1.0" strip-json-comments@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-color@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== dependencies: has-flag "^3.0.0" table@^5.2.3: version "5.4.4" resolved "https://registry.yarnpkg.com/table/-/table-5.4.4.tgz#6e0f88fdae3692793d1077fd172a4667afe986a6" integrity sha512-IIfEAUx5QlODLblLrGTTLJA7Tk0iLSGBvgY8essPRVNGHAzThujww1YqHLs6h3HfTg55h++RzLHH5Xw/rfv+mg== dependencies: ajv "^6.10.2" lodash "^4.17.14" slice-ansi "^2.1.0" string-width "^3.0.0" tape@4: version "4.11.0" resolved "https://registry.yarnpkg.com/tape/-/tape-4.11.0.tgz#63d41accd95e45a23a874473051c57fdbc58edc1" integrity sha512-yixvDMX7q7JIs/omJSzSZrqulOV51EC9dK8dM0TzImTIkHWfe2/kFyL5v+d9C+SrCMaICk59ujsqFAVidDqDaA== dependencies: deep-equal "~1.0.1" defined "~1.0.0" for-each "~0.3.3" function-bind "~1.1.1" glob "~7.1.4" has "~1.0.3" inherits "~2.0.4" minimist "~1.2.0" object-inspect "~1.6.0" resolve "~1.11.1" resumer "~0.0.0" string.prototype.trim "~1.1.2" through "~2.3.8" terser@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/terser/-/terser-4.1.2.tgz#b2656c8a506f7ce805a3f300a2ff48db022fa391" integrity sha512-jvNoEQSPXJdssFwqPSgWjsOrb+ELoE+ILpHPKXC83tIxOlh2U75F1KuB2luLD/3a6/7K3Vw5pDn+hvu0C4AzSw== dependencies: commander "^2.20.0" source-map "~0.6.1" source-map-support "~0.5.12" text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= through@^2.3.6, through@~2.3.4, through@~2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== dependencies: os-tmpdir "~1.0.2" tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== dependencies: punycode "^2.1.0" util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= v8-compile-cache@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== dependencies: mkdirp "^0.5.1"