pax_global_header 0000666 0000000 0000000 00000000064 13534242567 0014525 g ustar 00root root 0000000 0000000 52 comment=0fc995885f3058a4f5566e07aa16ea3388105021
d3-format-1.4.1/ 0000775 0000000 0000000 00000000000 13534242567 0013324 5 ustar 00root root 0000000 0000000 d3-format-1.4.1/.eslintrc.json 0000664 0000000 0000000 00000000342 13534242567 0016117 0 ustar 00root root 0000000 0000000 {
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8
},
"env": {
"es6": true,
"node": true,
"browser": true
},
"rules": {
"no-cond-assign": 0
}
}
d3-format-1.4.1/.gitignore 0000664 0000000 0000000 00000000077 13534242567 0015320 0 ustar 00root root 0000000 0000000 *.sublime-workspace
.DS_Store
dist/
node_modules
npm-debug.log
d3-format-1.4.1/LICENSE 0000664 0000000 0000000 00000002703 13534242567 0014333 0 ustar 00root root 0000000 0000000 Copyright 2010-2015 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-format-1.4.1/README.md 0000664 0000000 0000000 00000037225 13534242567 0014614 0 ustar 00root root 0000000 0000000 # d3-format
Ever noticed how sometimes JavaScript doesn’t display numbers the way you expect? Like, you tried to print tenths with a simple loop:
```js
for (var i = 0; i < 10; i++) {
console.log(0.1 * i);
}
```
And you got this:
```js
0
0.1
0.2
0.30000000000000004
0.4
0.5
0.6000000000000001
0.7000000000000001
0.8
0.9
```
Welcome to [binary floating point](https://en.wikipedia.org/wiki/Double-precision_floating-point_format)! ಠ_ಠ
Yet rounding error is not the only reason to customize number formatting. A table of numbers should be formatted consistently for comparison; above, 0.0 would be better than 0. Large numbers should have grouped digits (e.g., 42,000) or be in scientific or metric notation (4.2e+4, 42k). Currencies should have fixed precision ($3.50). Reported numerical results should be rounded to significant digits (4021 becomes 4000). Number formats should appropriate to the reader’s locale (42.000,00 or 42,000.00). The list goes on.
Formatting numbers for human consumption is the purpose of d3-format, which is modeled after Python 3’s [format specification mini-language](https://docs.python.org/3/library/string.html#format-specification-mini-language) ([PEP 3101](https://www.python.org/dev/peps/pep-3101/)). Revisiting the example above:
```js
var f = d3.format(".1f");
for (var i = 0; i < 10; i++) {
console.log(f(0.1 * i));
}
```
Now you get this:
```js
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
```
But d3-format is much more than an alias for [number.toFixed](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)! A few more examples:
```js
d3.format(".0%")(0.123); // rounded percentage, "12%"
d3.format("($.2f")(-3.5); // localized fixed-point currency, "(£3.50)"
d3.format("+20")(42); // space-filled and signed, " +42"
d3.format(".^20")(42); // dot-filled and centered, ".........42........."
d3.format(".2s")(42e6); // SI-prefix with two significant digits, "42M"
d3.format("#x")(48879); // prefixed lowercase hexadecimal, "0xbeef"
d3.format(",.2r")(4223); // grouped thousands with two significant digits, "4,200"
```
See [*locale*.format](#locale_format) for a detailed specification, and try running [d3.formatSpecifier](#formatSpecifier) on the above formats to decode their meaning.
## Installing
If you use NPM, `npm install d3-format`. Otherwise, download the [latest release](https://github.com/d3/d3-format/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-format.v1.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:
```html
```
Locale files are hosted on [unpkg](https://unpkg.com/) and can be loaded using [d3.json](https://github.com/d3/d3-request/blob/master/README.md#json). For example, to set Russian as the default locale:
```js
d3.json("https://unpkg.com/d3-format@1/locale/ru-RU.json", function(error, locale) {
if (error) throw error;
d3.formatDefaultLocale(locale);
var format = d3.format("$,");
console.log(format(1234.56)); // 1 234,56 руб.
});
```
[Try d3-format in your browser.](https://tonicdev.com/npm/d3-format)
## API Reference
# d3.format(specifier) [<>](https://github.com/d3/d3-format/blob/master/src/defaultLocale.js#L4 "Source")
An alias for [*locale*.format](#locale_format) on the [default locale](#formatDefaultLocale).
# d3.formatPrefix(specifier, value) [<>](https://github.com/d3/d3-format/blob/master/src/defaultLocale.js#L5 "Source")
An alias for [*locale*.formatPrefix](#locale_formatPrefix) on the [default locale](#formatDefaultLocale).
# locale.format(specifier) [<>](https://github.com/d3/d3-format/blob/master/src/locale.js#L18 "Source")
Returns a new format function for the given string *specifier*. The returned function takes a number as the only argument, and returns a string representing the formatted number. The general form of a specifier is:
```
[[fill]align][sign][symbol][0][width][,][.precision][~][type]
```
The *fill* can be any character. The presence of a fill character is signaled by the *align* character following it, which must be one of the following:
* `>` - Forces the field to be right-aligned within the available space. (Default behavior).
* `<` - Forces the field to be left-aligned within the available space.
* `^` - Forces the field to be centered within the available space.
* `=` - like `>`, but with any sign and symbol to the left of any padding.
The *sign* can be:
* `-` - nothing for zero or positive and a minus sign for negative. (Default behavior.)
* `+` - a plus sign for zero or positive and a minus sign for negative.
* `(` - nothing for zero or positive and parentheses for negative.
* ` ` (space) - a space for zero or positive and a minus sign for negative.
The *symbol* can be:
* `$` - apply currency symbols per the locale definition.
* `#` - for binary, octal, or hexadecimal notation, prefix by `0b`, `0o`, or `0x`, respectively.
The *zero* (`0`) option enables zero-padding; this implicitly sets *fill* to `0` and *align* to `=`. The *width* defines the minimum field width; if not specified, then the width will be determined by the content. The *comma* (`,`) option enables the use of a group separator, such as a comma for thousands.
Depending on the *type*, the *precision* either indicates the number of digits that follow the decimal point (types `f` and `%`), or the number of significant digits (types ``, `e`, `g`, `r`, `s` and `p`). If the precision is not specified, it defaults to 6 for all types except `` (none), which defaults to 12. Precision is ignored for integer formats (types `b`, `o`, `d`, `x`, `X` and `c`). See [precisionFixed](#precisionFixed) and [precisionRound](#precisionRound) for help picking an appropriate precision.
The `~` option trims insignificant trailing zeros across all format types. This is most commonly used in conjunction with types `r`, `e`, `s` and `%`. For example:
```js
d3.format("s")(1500); // "1.50000k"
d3.format("~s")(1500); // "1.5k"
```
The available *type* values are:
* `e` - exponent notation.
* `f` - fixed point notation.
* `g` - either decimal or exponent notation, rounded to significant digits.
* `r` - decimal notation, rounded to significant digits.
* `s` - decimal notation with an [SI prefix](#locale_formatPrefix), rounded to significant digits.
* `%` - multiply by 100, and then decimal notation with a percent sign.
* `p` - multiply by 100, round to significant digits, and then decimal notation with a percent sign.
* `b` - binary notation, rounded to integer.
* `o` - octal notation, rounded to integer.
* `d` - decimal notation, rounded to integer.
* `x` - hexadecimal notation, using lower-case letters, rounded to integer.
* `X` - hexadecimal notation, using upper-case letters, rounded to integer.
* `c` - converts the integer to the corresponding unicode character before printing.
The type `` (none) is also supported as shorthand for `~g` (with a default precision of 12 instead of 6), and the type `n` is shorthand for `,g`. For the `g`, `n` and `` (none) types, decimal notation is used if the resulting string would have *precision* or fewer digits; otherwise, exponent notation is used. For example:
```js
d3.format(".2")(42); // "42"
d3.format(".2")(4.2); // "4.2"
d3.format(".1")(42); // "4e+1"
d3.format(".1")(4.2); // "4"
```
# locale.formatPrefix(specifier, value) [<>](https://github.com/d3/d3-format/blob/master/src/locale.js#L127 "Source")
Equivalent to [*locale*.format](#locale_format), except the returned function will convert values to the units of the appropriate [SI prefix](https://en.wikipedia.org/wiki/Metric_prefix#List_of_SI_prefixes) for the specified numeric reference *value* before formatting in fixed point notation. The following prefixes are supported:
* `y` - yocto, 10⁻²⁴
* `z` - zepto, 10⁻²¹
* `a` - atto, 10⁻¹⁸
* `f` - femto, 10⁻¹⁵
* `p` - pico, 10⁻¹²
* `n` - nano, 10⁻⁹
* `µ` - micro, 10⁻⁶
* `m` - milli, 10⁻³
* `` (none) - 10⁰
* `k` - kilo, 10³
* `M` - mega, 10⁶
* `G` - giga, 10⁹
* `T` - tera, 10¹²
* `P` - peta, 10¹⁵
* `E` - exa, 10¹⁸
* `Z` - zetta, 10²¹
* `Y` - yotta, 10²⁴
Unlike [*locale*.format](#locale_format) with the `s` format type, this method returns a formatter with a consistent SI prefix, rather than computing the prefix dynamically for each number. In addition, the *precision* for the given *specifier* represents the number of digits past the decimal point (as with `f` fixed point notation), not the number of significant digits. For example:
```js
var f = d3.formatPrefix(",.0", 1e-6);
f(0.00042); // "420µ"
f(0.0042); // "4,200µ"
```
This method is useful when formatting multiple numbers in the same units for easy comparison. See [precisionPrefix](#precisionPrefix) for help picking an appropriate precision, and [bl.ocks.org/9764126](http://bl.ocks.org/mbostock/9764126) for an example.
# d3.formatSpecifier(specifier) [<>](https://github.com/d3/d3-format/blob/master/src/formatSpecifier.js "Source")
Parses the specified *specifier*, returning an object with exposed fields that correspond to the [format specification mini-language](#locale_format) and a toString method that reconstructs the specifier. For example, `formatSpecifier("s")` returns:
```js
FormatSpecifier {
"fill": " ",
"align": ">",
"sign": "-",
"symbol": "",
"zero": false,
"width": undefined,
"comma": false,
"precision": undefined,
"trim": false,
"type": "s"
}
```
This method is useful for understanding how format specifiers are parsed and for deriving new specifiers. For example, you might compute an appropriate precision based on the numbers you want to format using [precisionFixed](#precisionFixed) and then create a new format:
```js
var s = d3.formatSpecifier("f");
s.precision = d3.precisionFixed(0.01);
var f = d3.format(s);
f(42); // "42.00";
```
# new d3.FormatSpecifier(specifier) [<>](https://github.com/d3/d3-format/blob/master/src/formatSpecifier.js "Source")
Given the specified *specifier* object, returning an object with exposed fields that correspond to the [format specification mini-language](#locale_format) and a toString method that reconstructs the specifier. For example, `new FormatSpecifier({type: "s"})` returns:
```js
FormatSpecifier {
"fill": " ",
"align": ">",
"sign": "-",
"symbol": "",
"zero": false,
"width": undefined,
"comma": false,
"precision": undefined,
"trim": false,
"type": "s"
}
```
# d3.precisionFixed(step) [<>](https://github.com/d3/d3-format/blob/master/src/precisionFixed.js "Source")
Returns a suggested decimal precision for fixed point notation given the specified numeric *step* value. The *step* represents the minimum absolute difference between values that will be formatted. (This assumes that the values to be formatted are also multiples of *step*.) For example, given the numbers 1, 1.5, and 2, the *step* should be 0.5 and the suggested precision is 1:
```js
var p = d3.precisionFixed(0.5),
f = d3.format("." + p + "f");
f(1); // "1.0"
f(1.5); // "1.5"
f(2); // "2.0"
```
Whereas for the numbers 1, 2 and 3, the *step* should be 1 and the suggested precision is 0:
```js
var p = d3.precisionFixed(1),
f = d3.format("." + p + "f");
f(1); // "1"
f(2); // "2"
f(3); // "3"
```
Note: for the `%` format type, subtract two:
```js
var p = Math.max(0, d3.precisionFixed(0.05) - 2),
f = d3.format("." + p + "%");
f(0.45); // "45%"
f(0.50); // "50%"
f(0.55); // "55%"
```
# d3.precisionPrefix(step, value) [<>](https://github.com/d3/d3-format/blob/master/src/precisionPrefix.js "Source")
Returns a suggested decimal precision for use with [*locale*.formatPrefix](#locale_formatPrefix) given the specified numeric *step* and reference *value*. The *step* represents the minimum absolute difference between values that will be formatted, and *value* determines which SI prefix will be used. (This assumes that the values to be formatted are also multiples of *step*.) For example, given the numbers 1.1e6, 1.2e6, and 1.3e6, the *step* should be 1e5, the *value* could be 1.3e6, and the suggested precision is 1:
```js
var p = d3.precisionPrefix(1e5, 1.3e6),
f = d3.formatPrefix("." + p, 1.3e6);
f(1.1e6); // "1.1M"
f(1.2e6); // "1.2M"
f(1.3e6); // "1.3M"
```
# d3.precisionRound(step, max) [<>](https://github.com/d3/d3-format/blob/master/src/precisionRound.js "Source")
Returns a suggested decimal precision for format types that round to significant digits given the specified numeric *step* and *max* values. The *step* represents the minimum absolute difference between values that will be formatted, and the *max* represents the largest absolute value that will be formatted. (This assumes that the values to be formatted are also multiples of *step*.) For example, given the numbers 0.99, 1.0, and 1.01, the *step* should be 0.01, the *max* should be 1.01, and the suggested precision is 3:
```js
var p = d3.precisionRound(0.01, 1.01),
f = d3.format("." + p + "r");
f(0.99); // "0.990"
f(1.0); // "1.00"
f(1.01); // "1.01"
```
Whereas for the numbers 0.9, 1.0, and 1.1, the *step* should be 0.1, the *max* should be 1.1, and the suggested precision is 2:
```js
var p = d3.precisionRound(0.1, 1.1),
f = d3.format("." + p + "r");
f(0.9); // "0.90"
f(1.0); // "1.0"
f(1.1); // "1.1"
```
Note: for the `e` format type, subtract one:
```js
var p = Math.max(0, d3.precisionRound(0.01, 1.01) - 1),
f = d3.format("." + p + "e");
f(0.01); // "1.00e-2"
f(1.01); // "1.01e+0"
```
### Locales
# d3.formatLocale(definition) [<>](https://github.com/d3/d3-format/blob/master/src/locale.js "Source")
Returns a *locale* object for the specified *definition* with [*locale*.format](#locale_format) and [*locale*.formatPrefix](#locale_formatPrefix) methods. The *definition* must include the following properties:
* `decimal` - the decimal point (e.g., `"."`).
* `thousands` - the group separator (e.g., `","`).
* `grouping` - the array of group sizes (e.g., `[3]`), cycled as needed.
* `currency` - the currency prefix and suffix (e.g., `["$", ""]`).
* `numerals` - optional; an array of ten strings to replace the numerals 0-9.
* `percent` - optional; the percent sign (defaults to `"%"`).
* `minus` - optional; the minus sign (defaults to hyphen-minus, `"-"`).
* `nan` - optional; the not-a-number value (defaults `"NaN"`).
Note that the *thousands* property is a misnomer, as the grouping definition allows groups other than thousands.
# d3.formatDefaultLocale(definition) [<>](https://github.com/d3/d3-format/blob/master/src/defaultLocale.js "Source")
Equivalent to [d3.formatLocale](#formatLocale), except it also redefines [d3.format](#format) and [d3.formatPrefix](#formatPrefix) to the new locale’s [*locale*.format](#locale_format) and [*locale*.formatPrefix](#locale_formatPrefix). If you do not set a default locale, it defaults to [U.S. English](https://github.com/d3/d3-format/blob/master/locale/en-US.json).
d3-format-1.4.1/d3-format.sublime-project 0000664 0000000 0000000 00000000524 13534242567 0020147 0 ustar 00root root 0000000 0000000 {
"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-format-1.4.1/locale/ 0000775 0000000 0000000 00000000000 13534242567 0014563 5 ustar 00root root 0000000 0000000 d3-format-1.4.1/locale/ar-001.json 0000664 0000000 0000000 00000000323 13534242567 0016354 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", ""],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-AE.json 0000664 0000000 0000000 00000000354 13534242567 0016345 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u062f\u002e\u0625\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-BH.json 0000664 0000000 0000000 00000000354 13534242567 0016351 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u062f\u002e\u0628\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-DJ.json 0000664 0000000 0000000 00000000354 13534242567 0016355 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["\u200f\u0046\u0064\u006a ", ""],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-DZ.json 0000664 0000000 0000000 00000000167 13534242567 0016377 0 ustar 00root root 0000000 0000000 {
"decimal": "\u002c",
"thousands": "\u002e",
"grouping": [3],
"currency": ["\u062f\u002e\u062c\u002e ", ""]
}
d3-format-1.4.1/locale/ar-EG.json 0000664 0000000 0000000 00000000354 13534242567 0016353 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u062c\u002e\u0645\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-EH.json 0000664 0000000 0000000 00000000167 13534242567 0016356 0 ustar 00root root 0000000 0000000 {
"decimal": "\u002e",
"thousands": "\u002c",
"grouping": [3],
"currency": ["\u062f\u002e\u0645\u002e ", ""]
}
d3-format-1.4.1/locale/ar-ER.json 0000664 0000000 0000000 00000000346 13534242567 0016367 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["\u004e\u0066\u006b ", ""],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-IL.json 0000664 0000000 0000000 00000000332 13534242567 0016360 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["\u20aa ", ""],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-IQ.json 0000664 0000000 0000000 00000000354 13534242567 0016371 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u062f\u002e\u0639\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-JO.json 0000664 0000000 0000000 00000000354 13534242567 0016370 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u062f\u002e\u0623\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-KM.json 0000664 0000000 0000000 00000000370 13534242567 0016365 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u0641\u002e\u062c\u002e\u0642\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-KW.json 0000664 0000000 0000000 00000000354 13534242567 0016401 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u062f\u002e\u0643\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-LB.json 0000664 0000000 0000000 00000000354 13534242567 0016355 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u0644\u002e\u0644\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-LY.json 0000664 0000000 0000000 00000000167 13534242567 0016406 0 ustar 00root root 0000000 0000000 {
"decimal": "\u002c",
"thousands": "\u002e",
"grouping": [3],
"currency": ["\u062f\u002e\u0644\u002e ", ""]
}
d3-format-1.4.1/locale/ar-MA.json 0000664 0000000 0000000 00000000167 13534242567 0016357 0 ustar 00root root 0000000 0000000 {
"decimal": "\u002c",
"thousands": "\u002e",
"grouping": [3],
"currency": ["\u062f\u002e\u0645\u002e ", ""]
}
d3-format-1.4.1/locale/ar-MR.json 0000664 0000000 0000000 00000000354 13534242567 0016376 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u0623\u002e\u0645\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-OM.json 0000664 0000000 0000000 00000000354 13534242567 0016373 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u0631\u002e\u0639\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-PS.json 0000664 0000000 0000000 00000000332 13534242567 0016376 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["\u20aa ", ""],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-QA.json 0000664 0000000 0000000 00000000354 13534242567 0016361 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u0631\u002e\u0642\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-SA.json 0000664 0000000 0000000 00000000354 13534242567 0016363 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u0631\u002e\u0633\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-SD.json 0000664 0000000 0000000 00000000354 13534242567 0016366 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u062c\u002e\u0633\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-SO.json 0000664 0000000 0000000 00000000340 13534242567 0016374 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["\u200f\u0053 ", ""],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-SS.json 0000664 0000000 0000000 00000000332 13534242567 0016401 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["\u00a3 ", ""],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-SY.json 0000664 0000000 0000000 00000000354 13534242567 0016413 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u0644\u002e\u0633\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-TD.json 0000664 0000000 0000000 00000000362 13534242567 0016366 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["\u200f\u0046\u0043\u0046\u0041 ", ""],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ar-TN.json 0000664 0000000 0000000 00000000167 13534242567 0016403 0 ustar 00root root 0000000 0000000 {
"decimal": "\u002c",
"thousands": "\u002e",
"grouping": [3],
"currency": ["\u062f\u002e\u062a\u002e ", ""]
}
d3-format-1.4.1/locale/ar-YE.json 0000664 0000000 0000000 00000000354 13534242567 0016375 0 ustar 00root root 0000000 0000000 {
"decimal": "\u066b",
"thousands": "\u066c",
"grouping": [3],
"currency": ["", " \u0631\u002e\u0649\u002e"],
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
d3-format-1.4.1/locale/ca-ES.json 0000664 0000000 0000000 00000000135 13534242567 0016345 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["", "\u00a0€"]
}
d3-format-1.4.1/locale/cs-CZ.json 0000664 0000000 0000000 00000000142 13534242567 0016372 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "\u00a0",
"grouping": [3],
"currency": ["", "\u00a0Kč"]
}
d3-format-1.4.1/locale/de-CH.json 0000664 0000000 0000000 00000000135 13534242567 0016335 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "'",
"grouping": [3],
"currency": ["", "\u00a0CHF"]
}
d3-format-1.4.1/locale/de-DE.json 0000664 0000000 0000000 00000000135 13534242567 0016333 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["", "\u00a0€"]
}
d3-format-1.4.1/locale/en-CA.json 0000664 0000000 0000000 00000000125 13534242567 0016337 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["$", ""]
}
d3-format-1.4.1/locale/en-GB.json 0000664 0000000 0000000 00000000126 13534242567 0016345 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["£", ""]
}
d3-format-1.4.1/locale/en-IE.json 0000664 0000000 0000000 00000000127 13534242567 0016353 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["€", ""]
}
d3-format-1.4.1/locale/en-IN.json 0000664 0000000 0000000 00000000162 13534242567 0016363 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3, 2, 2, 2, 2, 2, 2, 2, 2, 2],
"currency": ["₹", ""]
}
d3-format-1.4.1/locale/en-US.json 0000664 0000000 0000000 00000000125 13534242567 0016403 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["$", ""]
}
d3-format-1.4.1/locale/es-BO.json 0000664 0000000 0000000 00000000164 13534242567 0016364 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["Bs\u00a0", ""],
"percent": "\u202f%"
}
d3-format-1.4.1/locale/es-ES.json 0000664 0000000 0000000 00000000135 13534242567 0016371 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["", "\u00a0€"]
}
d3-format-1.4.1/locale/es-MX.json 0000664 0000000 0000000 00000000125 13534242567 0016405 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["$", ""]
}
d3-format-1.4.1/locale/fi-FI.json 0000664 0000000 0000000 00000000142 13534242567 0016345 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "\u00a0",
"grouping": [3],
"currency": ["", "\u00a0€"]
}
d3-format-1.4.1/locale/fr-CA.json 0000664 0000000 0000000 00000000132 13534242567 0016342 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "\u00a0",
"grouping": [3],
"currency": ["", "$"]
}
d3-format-1.4.1/locale/fr-FR.json 0000664 0000000 0000000 00000000172 13534242567 0016372 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "\u00a0",
"grouping": [3],
"currency": ["", "\u00a0€"],
"percent": "\u202f%"
}
d3-format-1.4.1/locale/he-IL.json 0000664 0000000 0000000 00000000127 13534242567 0016354 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["₪", ""]
}
d3-format-1.4.1/locale/hu-HU.json 0000664 0000000 0000000 00000000141 13534242567 0016400 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "\u00a0",
"grouping": [3],
"currency": ["", "\u00a0Ft"]
}
d3-format-1.4.1/locale/it-IT.json 0000664 0000000 0000000 00000000127 13534242567 0016404 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["€", ""]
}
d3-format-1.4.1/locale/ja-JP.json 0000664 0000000 0000000 00000000127 13534242567 0016357 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["", "円"]
}
d3-format-1.4.1/locale/ko-KR.json 0000664 0000000 0000000 00000000127 13534242567 0016401 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["₩", ""]
}
d3-format-1.4.1/locale/mk-MK.json 0000664 0000000 0000000 00000000141 13534242567 0016366 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["", "\u00a0ден."]
}
d3-format-1.4.1/locale/nl-NL.json 0000664 0000000 0000000 00000000135 13534242567 0016375 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["€\u00a0", ""]
}
d3-format-1.4.1/locale/pl-PL.json 0000664 0000000 0000000 00000000127 13534242567 0016402 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["", "zł"]
}
d3-format-1.4.1/locale/pt-BR.json 0000664 0000000 0000000 00000000126 13534242567 0016401 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["R$", ""]
}
d3-format-1.4.1/locale/ru-RU.json 0000664 0000000 0000000 00000000146 13534242567 0016431 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "\u00a0",
"grouping": [3],
"currency": ["", "\u00a0руб."]
}
d3-format-1.4.1/locale/sv-SE.json 0000664 0000000 0000000 00000000134 13534242567 0016411 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "\u00a0",
"grouping": [3],
"currency": ["", " kr"]
}
d3-format-1.4.1/locale/uk-UA.json 0000664 0000000 0000000 00000000143 13534242567 0016376 0 ustar 00root root 0000000 0000000 {
"decimal": ",",
"thousands": "\u00a0",
"grouping": [3],
"currency": ["", "\u00a0₴."]
}
d3-format-1.4.1/locale/zh-CN.json 0000664 0000000 0000000 00000000126 13534242567 0016374 0 ustar 00root root 0000000 0000000 {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["¥", ""]
}
d3-format-1.4.1/package.json 0000664 0000000 0000000 00000003043 13534242567 0015612 0 ustar 00root root 0000000 0000000 {
"name": "d3-format",
"version": "1.4.1",
"description": "Format numbers for human consumption.",
"keywords": [
"d3",
"d3-module",
"format",
"localization"
],
"homepage": "https://d3js.org/d3-format/",
"license": "BSD-3-Clause",
"author": {
"name": "Mike Bostock",
"url": "http://bost.ocks.org/mike"
},
"main": "dist/d3-format.js",
"unpkg": "dist/d3-format.min.js",
"jsdelivr": "dist/d3-format.min.js",
"module": "src/index.js",
"repository": {
"type": "git",
"url": "https://github.com/d3/d3-format.git"
},
"files": [
"dist/**/*.js",
"src/**/*.js",
"locale/*.json"
],
"scripts": {
"pretest": "rollup -c",
"test": "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"
},
"devDependencies": {
"d3-queue": "3",
"eslint": "6",
"rollup": "1",
"rollup-plugin-terser": "5",
"tape": "4"
}
}
d3-format-1.4.1/rollup.config.js 0000664 0000000 0000000 00000001545 13534242567 0016450 0 ustar 00root root 0000000 0000000 import {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-format-1.4.1/src/ 0000775 0000000 0000000 00000000000 13534242567 0014113 5 ustar 00root root 0000000 0000000 d3-format-1.4.1/src/defaultLocale.js 0000664 0000000 0000000 00000000572 13534242567 0017221 0 ustar 00root root 0000000 0000000 import formatLocale from "./locale.js";
var locale;
export var format;
export var formatPrefix;
defaultLocale({
decimal: ".",
thousands: ",",
grouping: [3],
currency: ["$", ""],
minus: "-"
});
export default function defaultLocale(definition) {
locale = formatLocale(definition);
format = locale.format;
formatPrefix = locale.formatPrefix;
return locale;
}
d3-format-1.4.1/src/exponent.js 0000664 0000000 0000000 00000000211 13534242567 0016303 0 ustar 00root root 0000000 0000000 import formatDecimal from "./formatDecimal.js";
export default function(x) {
return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;
}
d3-format-1.4.1/src/formatDecimal.js 0000664 0000000 0000000 00000001220 13534242567 0017213 0 ustar 00root root 0000000 0000000 // Computes the decimal coefficient and exponent of the specified number x with
// significant digits p, where x is positive and p is in [1, 21] or undefined.
// For example, formatDecimal(1.23) returns ["123", 0].
export default function(x, p) {
if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
var i, coefficient = x.slice(0, i);
// The string returned by toExponential either has the form \d\.\d+e[-+]\d+
// (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
return [
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
+x.slice(i + 1)
];
}
d3-format-1.4.1/src/formatGroup.js 0000664 0000000 0000000 00000000733 13534242567 0016761 0 ustar 00root root 0000000 0000000 export default function(grouping, thousands) {
return function(value, width) {
var i = value.length,
t = [],
j = 0,
g = grouping[0],
length = 0;
while (i > 0 && g > 0) {
if (length + g + 1 > width) g = Math.max(1, width - length);
t.push(value.substring(i -= g, i + g));
if ((length += g + 1) > width) break;
g = grouping[j = (j + 1) % grouping.length];
}
return t.reverse().join(thousands);
};
}
d3-format-1.4.1/src/formatNumerals.js 0000664 0000000 0000000 00000000232 13534242567 0017445 0 ustar 00root root 0000000 0000000 export default function(numerals) {
return function(value) {
return value.replace(/[0-9]/g, function(i) {
return numerals[+i];
});
};
}
d3-format-1.4.1/src/formatPrefixAuto.js 0000664 0000000 0000000 00000001146 13534242567 0017752 0 ustar 00root root 0000000 0000000 import formatDecimal from "./formatDecimal.js";
export var prefixExponent;
export default function(x, p) {
var d = formatDecimal(x, p);
if (!d) return x + "";
var coefficient = d[0],
exponent = d[1],
i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
n = coefficient.length;
return i === n ? coefficient
: i > n ? coefficient + new Array(i - n + 1).join("0")
: i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
: "0." + new Array(1 - i).join("0") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!
}
d3-format-1.4.1/src/formatRounded.js 0000664 0000000 0000000 00000000715 13534242567 0017265 0 ustar 00root root 0000000 0000000 import formatDecimal from "./formatDecimal.js";
export default function(x, p) {
var d = formatDecimal(x, p);
if (!d) return x + "";
var coefficient = d[0],
exponent = d[1];
return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
: coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
: coefficient + new Array(exponent - coefficient.length + 2).join("0");
}
d3-format-1.4.1/src/formatSpecifier.js 0000664 0000000 0000000 00000003267 13534242567 0017603 0 ustar 00root root 0000000 0000000 // [[fill]align][sign][symbol][0][width][,][.precision][~][type]
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
export default function formatSpecifier(specifier) {
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
var match;
return new FormatSpecifier({
fill: match[1],
align: match[2],
sign: match[3],
symbol: match[4],
zero: match[5],
width: match[6],
comma: match[7],
precision: match[8] && match[8].slice(1),
trim: match[9],
type: match[10]
});
}
formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
export function FormatSpecifier(specifier) {
this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
this.align = specifier.align === undefined ? ">" : specifier.align + "";
this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
this.zero = !!specifier.zero;
this.width = specifier.width === undefined ? undefined : +specifier.width;
this.comma = !!specifier.comma;
this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
this.trim = !!specifier.trim;
this.type = specifier.type === undefined ? "" : specifier.type + "";
}
FormatSpecifier.prototype.toString = function() {
return this.fill
+ this.align
+ this.sign
+ this.symbol
+ (this.zero ? "0" : "")
+ (this.width === undefined ? "" : Math.max(1, this.width | 0))
+ (this.comma ? "," : "")
+ (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
+ (this.trim ? "~" : "")
+ this.type;
};
d3-format-1.4.1/src/formatTrim.js 0000664 0000000 0000000 00000000623 13534242567 0016576 0 ustar 00root root 0000000 0000000 // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
export default function(s) {
out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
switch (s[i]) {
case ".": i0 = i1 = i; break;
case "0": if (i0 === 0) i0 = i; i1 = i; break;
default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;
}
}
return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
}
d3-format-1.4.1/src/formatTypes.js 0000664 0000000 0000000 00000001422 13534242567 0016765 0 ustar 00root root 0000000 0000000 import formatPrefixAuto from "./formatPrefixAuto.js";
import formatRounded from "./formatRounded.js";
export default {
"%": function(x, p) { return (x * 100).toFixed(p); },
"b": function(x) { return Math.round(x).toString(2); },
"c": function(x) { return x + ""; },
"d": function(x) { return Math.round(x).toString(10); },
"e": function(x, p) { return x.toExponential(p); },
"f": function(x, p) { return x.toFixed(p); },
"g": function(x, p) { return x.toPrecision(p); },
"o": function(x) { return Math.round(x).toString(8); },
"p": function(x, p) { return formatRounded(x * 100, p); },
"r": formatRounded,
"s": formatPrefixAuto,
"X": function(x) { return Math.round(x).toString(16).toUpperCase(); },
"x": function(x) { return Math.round(x).toString(16); }
};
d3-format-1.4.1/src/identity.js 0000664 0000000 0000000 00000000053 13534242567 0016300 0 ustar 00root root 0000000 0000000 export default function(x) {
return x;
}
d3-format-1.4.1/src/index.js 0000664 0000000 0000000 00000000637 13534242567 0015566 0 ustar 00root root 0000000 0000000 export {default as formatDefaultLocale, format, formatPrefix} from "./defaultLocale.js";
export {default as formatLocale} from "./locale.js";
export {default as formatSpecifier, FormatSpecifier} from "./formatSpecifier.js";
export {default as precisionFixed} from "./precisionFixed.js";
export {default as precisionPrefix} from "./precisionPrefix.js";
export {default as precisionRound} from "./precisionRound.js";
d3-format-1.4.1/src/locale.js 0000664 0000000 0000000 00000013617 13534242567 0015720 0 ustar 00root root 0000000 0000000 import exponent from "./exponent.js";
import formatGroup from "./formatGroup.js";
import formatNumerals from "./formatNumerals.js";
import formatSpecifier from "./formatSpecifier.js";
import formatTrim from "./formatTrim.js";
import formatTypes from "./formatTypes.js";
import {prefixExponent} from "./formatPrefixAuto.js";
import identity from "./identity.js";
var map = Array.prototype.map,
prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
export default function(locale) {
var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
decimal = locale.decimal === undefined ? "." : locale.decimal + "",
numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),
percent = locale.percent === undefined ? "%" : locale.percent + "",
minus = locale.minus === undefined ? "-" : locale.minus + "",
nan = locale.nan === undefined ? "NaN" : locale.nan + "";
function newFormat(specifier) {
specifier = formatSpecifier(specifier);
var fill = specifier.fill,
align = specifier.align,
sign = specifier.sign,
symbol = specifier.symbol,
zero = specifier.zero,
width = specifier.width,
comma = specifier.comma,
precision = specifier.precision,
trim = specifier.trim,
type = specifier.type;
// The "n" type is an alias for ",g".
if (type === "n") comma = true, type = "g";
// The "" type, and any invalid type, is an alias for ".12~g".
else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g";
// If zero fill is specified, padding goes after sign and before digits.
if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
// Compute the prefix and suffix.
// For SI-prefix, the suffix is lazily computed.
var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
// What format function should we use?
// Is this an integer type?
// Can this type generate exponential notation?
var formatType = formatTypes[type],
maybeSuffix = /[defgprs%]/.test(type);
// Set the default precision if not specified,
// or clamp the specified precision to the supported range.
// For significant precision, it must be in [1, 21].
// For fixed precision, it must be in [0, 20].
precision = precision === undefined ? 6
: /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
: Math.max(0, Math.min(20, precision));
function format(value) {
var valuePrefix = prefix,
valueSuffix = suffix,
i, n, c;
if (type === "c") {
valueSuffix = formatType(value) + valueSuffix;
value = "";
} else {
value = +value;
// Perform the initial formatting.
var valueNegative = value < 0;
value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
// Trim insignificant zeros.
if (trim) value = formatTrim(value);
// If a negative value rounds to zero during formatting, treat as positive.
if (valueNegative && +value === 0) valueNegative = false;
// Compute the prefix and suffix.
valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
// Break the formatted value into the integer “value” part that can be
// grouped, and fractional or exponential “suffix” part that is not.
if (maybeSuffix) {
i = -1, n = value.length;
while (++i < n) {
if (c = value.charCodeAt(i), 48 > c || c > 57) {
valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
value = value.slice(0, i);
break;
}
}
}
}
// If the fill character is not "0", grouping is applied before padding.
if (comma && !zero) value = group(value, Infinity);
// Compute the padding.
var length = valuePrefix.length + value.length + valueSuffix.length,
padding = length < width ? new Array(width - length + 1).join(fill) : "";
// If the fill character is "0", grouping is applied after padding.
if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
// Reconstruct the final output based on the desired alignment.
switch (align) {
case "<": value = valuePrefix + value + valueSuffix + padding; break;
case "=": value = valuePrefix + padding + value + valueSuffix; break;
case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
default: value = padding + valuePrefix + value + valueSuffix; break;
}
return numerals(value);
}
format.toString = function() {
return specifier + "";
};
return format;
}
function formatPrefix(specifier, value) {
var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
k = Math.pow(10, -e),
prefix = prefixes[8 + e / 3];
return function(value) {
return f(k * value) + prefix;
};
}
return {
format: newFormat,
formatPrefix: formatPrefix
};
}
d3-format-1.4.1/src/precisionFixed.js 0000664 0000000 0000000 00000000172 13534242567 0017424 0 ustar 00root root 0000000 0000000 import exponent from "./exponent.js";
export default function(step) {
return Math.max(0, -exponent(Math.abs(step)));
}
d3-format-1.4.1/src/precisionPrefix.js 0000664 0000000 0000000 00000000301 13534242567 0017614 0 ustar 00root root 0000000 0000000 import exponent from "./exponent.js";
export default function(step, value) {
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
}
d3-format-1.4.1/src/precisionRound.js 0000664 0000000 0000000 00000000275 13534242567 0017460 0 ustar 00root root 0000000 0000000 import exponent from "./exponent.js";
export default function(step, max) {
step = Math.abs(step), max = Math.abs(max) - step;
return Math.max(0, exponent(max) - exponent(step)) + 1;
}
d3-format-1.4.1/test/ 0000775 0000000 0000000 00000000000 13534242567 0014303 5 ustar 00root root 0000000 0000000 d3-format-1.4.1/test/arabicLocale-test.js 0000664 0000000 0000000 00000014326 13534242567 0020165 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
d3 = require("../");
tape("formatLocale(…) can format numbers using ar-001 locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-001"));
test.equal(locale.format("$,.2f")(-1234.56), "-١٬٢٣٤٫٥٦");
test.end();
});
tape("formatLocale(…) can format numbers using ar-AE locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-AE"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ د.إ.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-BH locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-BH"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ د.ب.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-DJ locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-DJ"));
test.equal(locale.format("$,.2f")(1234.56), "\u200fFdj ١٬٢٣٤٫٥٦");
test.end();
});
tape("formatLocale(…) can format numbers using ar-DZ locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-DZ"));
test.equal(locale.format("$,.2f")(1234.56), "د.ج. 1.234,56");
test.end();
});
tape("formatLocale(…) can format numbers using ar-EG locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-EG"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ج.م.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-EH locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-EH"));
test.equal(locale.format("$,.2f")(1234.56), "د.م. 1,234.56");
test.end();
});
tape("formatLocale(…) can format numbers using ar-ER locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-ER"));
test.equal(locale.format("$,.2f")(1234.56), "Nfk ١٬٢٣٤٫٥٦");
test.end();
});
tape("formatLocale(…) can format numbers using ar-IL locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-IL"));
test.equal(locale.format("$,.2f")(1234.56), "₪ ١٬٢٣٤٫٥٦");
test.end();
});
tape("formatLocale(…) can format numbers using ar-IQ locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-IQ"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ د.ع.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-JO locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-JO"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ د.أ.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-KM locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-KM"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ف.ج.ق.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-KW locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-KW"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ د.ك.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-LB locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-LB"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ل.ل.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-MA locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-MA"));
test.equal(locale.format("$,.2f")(1234.56), "د.م. 1.234,56");
test.end();
});
tape("formatLocale(…) can format numbers using ar-MR locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-MR"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ أ.م.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-OM locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-OM"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ر.ع.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-PS locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-PS"));
test.equal(locale.format("$,.2f")(1234.56), "₪ ١٬٢٣٤٫٥٦");
test.end();
});
tape("formatLocale(…) can format numbers using ar-QA locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-QA"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ر.ق.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-SA locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-SA"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ر.س.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-SD locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-SD"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ج.س.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-SO locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-SO"));
test.equal(locale.format("$,.2f")(1234.56), "S ١٬٢٣٤٫٥٦");
test.end();
});
tape("formatLocale(…) can format numbers using ar-SS locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-SS"));
test.equal(locale.format("$,.2f")(1234.56), "£ ١٬٢٣٤٫٥٦");
test.end();
});
tape("formatLocale(…) can format numbers using ar-SY locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-SY"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ل.س.");
test.end();
});
tape("formatLocale(…) can format numbers using ar-TD locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-TD"));
test.equal(locale.format("$,.2f")(1234.56), "\u200fFCFA ١٬٢٣٤٫٥٦");
test.end();
});
tape("formatLocale(…) can format numbers using ar-TN locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-TN"));
test.equal(locale.format("$,.2f")(1234.56), "د.ت. 1.234,56");
test.end();
});
tape("formatLocale(…) can format numbers using ar-YE locale.", function(test) {
var locale = d3.formatLocale(require("../locale/ar-YE"));
test.equal(locale.format("$,.2f")(1234.56), "١٬٢٣٤٫٥٦ ر.ى.");
test.end();
});
d3-format-1.4.1/test/defaultLocale-test.js 0000664 0000000 0000000 00000002426 13534242567 0020366 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
d3 = require("../");
var enUs = {
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["$", ""]
};
var frFr = {
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["", "\u00a0€"],
"percent": "\u202f%"
};
tape("d3.formatDefaultLocale(definition) returns the new default locale", function(test) {
var locale = d3.formatDefaultLocale(frFr);
try {
test.equal(locale.format("$,.2f")(12345678.90), "12.345.678,90 €");
test.equal(locale.format(",.0%")(12345678.90), "1.234.567.890\u202f%");
test.end();
} finally {
d3.formatDefaultLocale(enUs);
}
});
tape("d3.formatDefaultLocale(definition) affects d3.format", function(test) {
var locale = d3.formatDefaultLocale(frFr);
try {
test.equal(d3.format, locale.format);
test.equal(d3.format("$,.2f")(12345678.90), "12.345.678,90 €");
test.end();
} finally {
d3.formatDefaultLocale(enUs);
}
});
tape("d3.formatDefaultLocale(definition) affects d3.formatPrefix", function(test) {
var locale = d3.formatDefaultLocale(frFr);
try {
test.equal(d3.formatPrefix, locale.formatPrefix);
test.equal(d3.formatPrefix(",.2", 1e3)(12345678.90), "12.345,68k");
test.end();
} finally {
d3.formatDefaultLocale(enUs);
}
});
d3-format-1.4.1/test/format-test.js 0000664 0000000 0000000 00000004123 13534242567 0017106 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(specifier)(number) returns a string", function(test) {
test.equal(typeof format.format("d")(0), "string");
test.end();
});
tape("format(specifier).toString() returns the normalized specifier", function(test) {
test.equal(format.format("d") + "", " >-d");
test.end();
});
tape("format(specifier) throws an error for invalid formats", function(test) {
test.throws(function() { format.format("foo"); }, /invalid format: foo/);
test.throws(function() { format.format(".-2s"); }, /invalid format: \.-2s/);
test.throws(function() { format.format(".f"); }, /invalid format: \.f/);
test.end();
});
tape("format(\",.\") unreasonable precision values are clamped to reasonable values", function(test) {
test.equal(format.format(".30f")(0), "0.00000000000000000000");
test.equal(format.format(".0g")(1), "1");
test.end();
});
tape("format(\"s\") handles very small and very large values", function(test) {
test.equal(format.format("s")(Number.MIN_VALUE), "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005y");
test.equal(format.format("s")(Number.MAX_VALUE), "179769000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Y");
test.end();
});
tape("format(\"n\") is equivalent to format(\",g\")", function(test) {
test.equal(format.format("n")(123456.78), "123,457");
test.equal(format.format(",g")(123456.78), "123,457");
test.end();
});
tape("format(\"012\") is equivalent to format(\"0=12\")", function(test) {
test.equal(format.format("012")(123.456), "00000123.456");
test.equal(format.format("0=12")(123.456), "00000123.456");
test.end();
});
d3-format-1.4.1/test/format-trim-test.js 0000664 0000000 0000000 00000004124 13534242567 0020060 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"~r\") trims insignificant zeros", function(test) {
var f = format.format("~r");
test.equal(f(1), "1");
test.equal(f(0.1), "0.1");
test.equal(f(0.01), "0.01");
test.equal(f(10.0001), "10.0001");
test.equal(f(123.45), "123.45");
test.equal(f(123.456), "123.456");
test.equal(f(123.4567), "123.457");
test.equal(f(0.000009), "0.000009");
test.equal(f(0.0000009), "0.0000009");
test.equal(f(0.00000009), "0.00000009");
test.equal(f(0.111119), "0.111119");
test.equal(f(0.1111119), "0.111112");
test.equal(f(0.11111119), "0.111111");
test.end();
});
tape("format(\"~e\") trims insignificant zeros", function(test) {
var f = format.format("~e");
test.equal(f(0), "0e+0");
test.equal(f(42), "4.2e+1");
test.equal(f(42000000), "4.2e+7");
test.equal(f(0.042), "4.2e-2");
test.equal(f(-4), "-4e+0");
test.equal(f(-42), "-4.2e+1");
test.end();
});
tape("format(\"~s\") trims insignificant zeros", function(test) {
var f = format.format("~s");
test.equal(f(0), "0");
test.equal(f(1), "1");
test.equal(f(10), "10");
test.equal(f(100), "100");
test.equal(f(999.5), "999.5");
test.equal(f(999500), "999.5k");
test.equal(f(1000), "1k");
test.equal(f(1400), "1.4k");
test.equal(f(1500), "1.5k");
test.equal(f(1500.5), "1.5005k");
test.equal(f(1e-15), "1f");
test.equal(f(1e-12), "1p");
test.equal(f(1e-9), "1n");
test.equal(f(1e-6), "1µ");
test.equal(f(1e-3), "1m");
test.equal(f(1e0), "1");
test.equal(f(1e3), "1k");
test.equal(f(1e6), "1M");
test.equal(f(1e9), "1G");
test.equal(f(1e12), "1T");
test.equal(f(1e15), "1P");
test.end();
});
tape("format(\"~%\") trims insignificant zeros", function(test) {
var f = format.format("~%");
test.equal(f(0), "0%");
test.equal(f(0.1), "10%");
test.equal(f(0.01), "1%");
test.equal(f(0.001), "0.1%");
test.equal(f(0.0001), "0.01%");
test.end();
});
tape("trimming respects commas", function(test) {
var f = format.format(",~g");
test.equal(f(10000.0), "10,000");
test.equal(f(10000.1), "10,000.1");
test.end();
});
d3-format-1.4.1/test/format-type-%-test.js 0000664 0000000 0000000 00000002173 13534242567 0020212 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"%\") can output a whole percentage", function(test) {
var f = format.format(".0%");
test.equal(f(0), "0%");
test.equal(f(.042), "4%");
test.equal(f(.42), "42%");
test.equal(f(4.2), "420%");
test.equal(f(-.042), "-4%");
test.equal(f(-.42), "-42%");
test.equal(f(-4.2), "-420%");
test.end();
});
tape("format(\".%\") can output a percentage with precision", function(test) {
var f1 = format.format(".1%");
test.equal(f1(.234), "23.4%");
var f2 = format.format(".2%");
test.equal(f2(.234), "23.40%");
test.end();
});
tape("format(\"%\") fill respects suffix", function(test) {
test.equal(format.format("020.0%")(42), "0000000000000004200%");
test.equal(format.format("20.0%")(42), " 4200%");
test.end();
});
tape("format(\"^%\") align center puts suffix adjacent to number", function(test) {
test.equal(format.format("^21.0%")(.42), " 42% ");
test.equal(format.format("^21,.0%")(422), " 42,200% ");
test.equal(format.format("^21,.0%")(-422), " -42,200% ");
test.end();
});
d3-format-1.4.1/test/format-type-b-test.js 0000664 0000000 0000000 00000000447 13534242567 0020311 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"b\") binary", function(test) {
test.equal(format.format("b")(10), "1010");
test.end();
});
tape("format(\"#b\") binary with prefix", function(test) {
test.equal(format.format("#b")(10), "0b1010");
test.end();
});
d3-format-1.4.1/test/format-type-c-test.js 0000664 0000000 0000000 00000001032 13534242567 0020301 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"c\") unicode character", function(test) {
test.equal(format.format("c")("☃"), "☃");
test.equal(format.format("020c")("☃"), "0000000000000000000☃");
test.equal(format.format(" ^20c")("☃"), " ☃ ");
test.equal(format.format("$c")("☃"), "$☃");
test.end();
});
tape("format(\"c\") does not localize a decimal point", function(test) {
test.equal(format.formatLocale({decimal: "/"}).format("c")("."), ".");
test.end();
});
d3-format-1.4.1/test/format-type-d-test.js 0000664 0000000 0000000 00000021371 13534242567 0020312 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"d\") can zero fill", function(test) {
var f = format.format("08d");
test.equal(f(0), "00000000");
test.equal(f(42), "00000042");
test.equal(f(42000000), "42000000");
test.equal(f(420000000), "420000000");
test.equal(f(-4), "-0000004");
test.equal(f(-42), "-0000042");
test.equal(f(-4200000), "-4200000");
test.equal(f(-42000000), "-42000000");
test.end();
});
tape("format(\"d\") can space fill", function(test) {
var f = format.format("8d");
test.equal(f(0), " 0");
test.equal(f(42), " 42");
test.equal(f(42000000), "42000000");
test.equal(f(420000000), "420000000");
test.equal(f(-4), " -4");
test.equal(f(-42), " -42");
test.equal(f(-4200000), "-4200000");
test.equal(f(-42000000), "-42000000");
test.end();
});
tape("format(\"d\") can underscore fill", function(test) {
var f = format.format("_>8d");
test.equal(f(0), "_______0");
test.equal(f(42), "______42");
test.equal(f(42000000), "42000000");
test.equal(f(420000000), "420000000");
test.equal(f(-4), "______-4");
test.equal(f(-42), "_____-42");
test.equal(f(-4200000), "-4200000");
test.equal(f(-42000000), "-42000000");
test.end();
});
tape("format(\"d\") can zero fill with sign and group", function(test) {
var f = format.format("+08,d");
test.equal(f(0), "+0,000,000");
test.equal(f(42), "+0,000,042");
test.equal(f(42000000), "+42,000,000");
test.equal(f(420000000), "+420,000,000");
test.equal(f(-4), "-0,000,004");
test.equal(f(-42), "-0,000,042");
test.equal(f(-4200000), "-4,200,000");
test.equal(f(-42000000), "-42,000,000");
test.end();
});
tape("format(\"d\") always uses zero precision", function(test) {
var f = format.format(".2d");
test.equal(f(0), "0");
test.equal(f(42), "42");
test.equal(f(-4.2), "-4");
test.end();
});
tape("format(\"d\") rounds non-integers", function(test) {
var f = format.format("d");
test.equal(f(4.2), "4");
test.end();
});
tape("format(\",d\") can group thousands", function(test) {
var f = format.format(",d");
test.equal(f(0), "0");
test.equal(f(42), "42");
test.equal(f(42000000), "42,000,000");
test.equal(f(420000000), "420,000,000");
test.equal(f(-4), "-4");
test.equal(f(-42), "-42");
test.equal(f(-4200000), "-4,200,000");
test.equal(f(-42000000), "-42,000,000");
test.equal(f(1e21), "1e+21");
test.end();
});
tape("format(\"0,d\") can group thousands and zero fill", function(test) {
test.equal(format.format("01,d")(0), "0");
test.equal(format.format("01,d")(0), "0");
test.equal(format.format("02,d")(0), "00");
test.equal(format.format("03,d")(0), "000");
test.equal(format.format("04,d")(0), "0,000");
test.equal(format.format("05,d")(0), "0,000");
test.equal(format.format("06,d")(0), "00,000");
test.equal(format.format("08,d")(0), "0,000,000");
test.equal(format.format("013,d")(0), "0,000,000,000");
test.equal(format.format("021,d")(0), "0,000,000,000,000,000");
test.equal(format.format("013,d")(-42000000), "-0,042,000,000");
test.equal(format.format("012,d")(1e21), "0,000,001e+21");
test.equal(format.format("013,d")(1e21), "0,000,001e+21");
test.equal(format.format("014,d")(1e21), "00,000,001e+21");
test.equal(format.format("015,d")(1e21), "000,000,001e+21");
test.end();
});
tape("format(\"0,d\") can group thousands and zero fill with overflow", function(test) {
test.equal(format.format("01,d")(1), "1");
test.equal(format.format("01,d")(1), "1");
test.equal(format.format("02,d")(12), "12");
test.equal(format.format("03,d")(123), "123");
test.equal(format.format("05,d")(12345), "12,345");
test.equal(format.format("08,d")(12345678), "12,345,678");
test.equal(format.format("013,d")(1234567890123), "1,234,567,890,123");
test.end();
});
tape("format(\",d\") can group thousands and space fill", function(test) {
test.equal(format.format("1,d")(0), "0");
test.equal(format.format("1,d")(0), "0");
test.equal(format.format("2,d")(0), " 0");
test.equal(format.format("3,d")(0), " 0");
test.equal(format.format("5,d")(0), " 0");
test.equal(format.format("8,d")(0), " 0");
test.equal(format.format("13,d")(0), " 0");
test.equal(format.format("21,d")(0), " 0");
test.end();
});
tape("format(\",d\") can group thousands and space fill with overflow", function(test) {
test.equal(format.format("1,d")(1), "1");
test.equal(format.format("1,d")(1), "1");
test.equal(format.format("2,d")(12), "12");
test.equal(format.format("3,d")(123), "123");
test.equal(format.format("5,d")(12345), "12,345");
test.equal(format.format("8,d")(12345678), "12,345,678");
test.equal(format.format("13,d")(1234567890123), "1,234,567,890,123");
test.end();
});
tape("format(\"d\") align right", function(test) {
test.equal(format.format(">1,d")(0), "0");
test.equal(format.format(">1,d")(0), "0");
test.equal(format.format(">2,d")(0), " 0");
test.equal(format.format(">3,d")(0), " 0");
test.equal(format.format(">5,d")(0), " 0");
test.equal(format.format(">8,d")(0), " 0");
test.equal(format.format(">13,d")(0), " 0");
test.equal(format.format(">21,d")(0), " 0");
test.equal(format.format(">21,d")(1000), " 1,000");
test.equal(format.format(">21,d")(1e21), " 1e+21");
test.end();
});
tape("format(\"^d\") align center", function(test) {
test.equal(format.format("^1,d")(0), "0");
test.equal(format.format("^1,d")(0), "0");
test.equal(format.format("^2,d")(0), "0 ");
test.equal(format.format("^3,d")(0), " 0 ");
test.equal(format.format("^5,d")(0), " 0 ");
test.equal(format.format("^8,d")(0), " 0 ");
test.equal(format.format("^13,d")(0), " 0 ");
test.equal(format.format("^21,d")(0), " 0 ");
test.equal(format.format("^21,d")(1000), " 1,000 ");
test.equal(format.format("^21,d")(1e21), " 1e+21 ");
test.end();
});
tape("format(\"=+,d\") pad after sign", function(test) {
test.equal(format.format("=+1,d")(0), "+0");
test.equal(format.format("=+1,d")(0), "+0");
test.equal(format.format("=+2,d")(0), "+0");
test.equal(format.format("=+3,d")(0), "+ 0");
test.equal(format.format("=+5,d")(0), "+ 0");
test.equal(format.format("=+8,d")(0), "+ 0");
test.equal(format.format("=+13,d")(0), "+ 0");
test.equal(format.format("=+21,d")(0), "+ 0");
test.equal(format.format("=+21,d")(1e21), "+ 1e+21");
test.end();
});
tape("format(\"=+$,d\") pad after sign with currency", function(test) {
test.equal(format.format("=+$1,d")(0), "+$0");
test.equal(format.format("=+$1,d")(0), "+$0");
test.equal(format.format("=+$2,d")(0), "+$0");
test.equal(format.format("=+$3,d")(0), "+$0");
test.equal(format.format("=+$5,d")(0), "+$ 0");
test.equal(format.format("=+$8,d")(0), "+$ 0");
test.equal(format.format("=+$13,d")(0), "+$ 0");
test.equal(format.format("=+$21,d")(0), "+$ 0");
test.equal(format.format("=+$21,d")(1e21), "+$ 1e+21");
test.end();
});
tape("format(\" ,d\") a space can denote positive numbers", function(test) {
test.equal(format.format(" 1,d")(-1), "-1");
test.equal(format.format(" 1,d")(0), " 0");
test.equal(format.format(" 2,d")(0), " 0");
test.equal(format.format(" 3,d")(0), " 0");
test.equal(format.format(" 5,d")(0), " 0");
test.equal(format.format(" 8,d")(0), " 0");
test.equal(format.format(" 13,d")(0), " 0");
test.equal(format.format(" 21,d")(0), " 0");
test.equal(format.format(" 21,d")(1e21), " 1e+21");
test.end();
});
tape("format(\"-,d\") explicitly only use a sign for negative numbers", function(test) {
test.equal(format.format("-1,d")(-1), "-1");
test.equal(format.format("-1,d")(0), "0");
test.equal(format.format("-2,d")(0), " 0");
test.equal(format.format("-3,d")(0), " 0");
test.equal(format.format("-5,d")(0), " 0");
test.equal(format.format("-8,d")(0), " 0");
test.equal(format.format("-13,d")(0), " 0");
test.equal(format.format("-21,d")(0), " 0");
test.end();
});
tape("format(\"d\") can format negative zero as zero", function(test) {
test.equal(format.format("1d")(-0), "0");
test.equal(format.format("1d")(-1e-12), "0");
test.end();
});
d3-format-1.4.1/test/format-type-e-test.js 0000664 0000000 0000000 00000001647 13534242567 0020317 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"e\") can output exponent notation", function(test) {
var f = format.format("e");
test.equal(f(0), "0.000000e+0");
test.equal(f(42), "4.200000e+1");
test.equal(f(42000000), "4.200000e+7");
test.equal(f(420000000), "4.200000e+8");
test.equal(f(-4), "-4.000000e+0");
test.equal(f(-42), "-4.200000e+1");
test.equal(f(-4200000), "-4.200000e+6");
test.equal(f(-42000000), "-4.200000e+7");
test.equal(format.format(".0e")(42), "4e+1")
test.equal(format.format(".3e")(42), "4.200e+1")
test.end();
});
tape("format(\"e\") can format negative zero as zero", function(test) {
test.equal(format.format("1e")(-0), "0.000000e+0");
test.equal(format.format("1e")(-1e-12), "-1.000000e-12");
test.end();
});
tape("format(\",e\") does not group Infinity", function(test) {
test.equal(format.format(",e")(Infinity), "Infinity");
test.end();
});
d3-format-1.4.1/test/format-type-f-test.js 0000664 0000000 0000000 00000004206 13534242567 0020312 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"f\") can output fixed-point notation", function(test) {
test.equal(format.format(".1f")(0.49), "0.5");
test.equal(format.format(".2f")(0.449), "0.45");
test.equal(format.format(".3f")(0.4449), "0.445");
test.equal(format.format(".5f")(0.444449), "0.44445");
test.equal(format.format(".1f")(100), "100.0");
test.equal(format.format(".2f")(100), "100.00");
test.equal(format.format(".3f")(100), "100.000");
test.equal(format.format(".5f")(100), "100.00000");
test.end();
});
tape("format(\"+$,f\") can output a currency with comma-grouping and sign", function(test) {
var f = format.format("+$,.2f");
test.equal(f(0), "+$0.00");
test.equal(f(0.429), "+$0.43");
test.equal(f(-0.429), "-$0.43");
test.equal(f(-1), "-$1.00");
test.equal(f(1e4), "+$10,000.00");
test.end();
});
tape("format(\",.f\") can group thousands, space fill, and round to significant digits", function(test) {
test.equal(format.format("10,.1f")(123456.49), " 123,456.5");
test.equal(format.format("10,.2f")(1234567.449), "1,234,567.45");
test.equal(format.format("10,.3f")(12345678.4449), "12,345,678.445");
test.equal(format.format("10,.5f")(123456789.444449), "123,456,789.44445");
test.equal(format.format("10,.1f")(123456), " 123,456.0");
test.equal(format.format("10,.2f")(1234567), "1,234,567.00");
test.equal(format.format("10,.3f")(12345678), "12,345,678.000");
test.equal(format.format("10,.5f")(123456789), "123,456,789.00000");
test.end();
});
tape("format(\"f\") can display integers in fixed-point notation", function(test) {
test.equal(format.format("f")(42), "42.000000");
test.end();
});
tape("format(\"f\") can format negative zero as zero", function(test) {
test.equal(format.format("f")(-0), "0.000000");
test.equal(format.format("f")(-1e-12), "0.000000");
test.end();
});
tape("format(\"f\") can format negative infinity", function(test) {
test.equal(format.format("f")(-Infinity), "-Infinity");
test.end();
});
tape("format(\",f\") does not group Infinity", function(test) {
test.equal(format.format(",f")(Infinity), "Infinity");
test.end();
});
d3-format-1.4.1/test/format-type-g-test.js 0000664 0000000 0000000 00000002242 13534242567 0020311 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"g\") can output general notation", function(test) {
test.equal(format.format(".1g")(0.049), "0.05");
test.equal(format.format(".1g")(0.49), "0.5");
test.equal(format.format(".2g")(0.449), "0.45");
test.equal(format.format(".3g")(0.4449), "0.445");
test.equal(format.format(".5g")(0.444449), "0.44445");
test.equal(format.format(".1g")(100), "1e+2");
test.equal(format.format(".2g")(100), "1.0e+2");
test.equal(format.format(".3g")(100), "100");
test.equal(format.format(".5g")(100), "100.00");
test.equal(format.format(".5g")(100.2), "100.20");
test.equal(format.format(".2g")(0.002), "0.0020");
test.end();
});
tape("format(\",g\") can group thousands with general notation", function(test) {
var f = format.format(",.12g");
test.equal(f(0), "0.00000000000");
test.equal(f(42), "42.0000000000");
test.equal(f(42000000), "42,000,000.0000");
test.equal(f(420000000), "420,000,000.000");
test.equal(f(-4), "-4.00000000000");
test.equal(f(-42), "-42.0000000000");
test.equal(f(-4200000), "-4,200,000.00000");
test.equal(f(-42000000), "-42,000,000.0000");
test.end();
});
d3-format-1.4.1/test/format-type-n-test.js 0000664 0000000 0000000 00000002204 13534242567 0020316 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"n\") is an alias for \",g\"", function(test) {
var f = format.format(".12n");
test.equal(f(0), "0.00000000000");
test.equal(f(42), "42.0000000000");
test.equal(f(42000000), "42,000,000.0000");
test.equal(f(420000000), "420,000,000.000");
test.equal(f(-4), "-4.00000000000");
test.equal(f(-42), "-42.0000000000");
test.equal(f(-4200000), "-4,200,000.00000");
test.equal(f(-42000000), "-42,000,000.0000");
test.equal(f(.0042), "0.00420000000000");
test.equal(f(.42), "0.420000000000");
test.equal(f(1e21), "1.00000000000e+21");
test.end();
});
tape("format(\"n\") uses zero padding", function(test) {
test.equal(format.format("01.0n")(0), "0");
test.equal(format.format("02.0n")(0), "00");
test.equal(format.format("03.0n")(0), "000");
test.equal(format.format("05.0n")(0), "0,000");
test.equal(format.format("08.0n")(0), "0,000,000");
test.equal(format.format("013.0n")(0), "0,000,000,000");
test.equal(format.format("021.0n")(0), "0,000,000,000,000,000");
test.equal(format.format("013.8n")(-42000000), "-0,042,000,000");
test.end();
});
d3-format-1.4.1/test/format-type-none-test.js 0000664 0000000 0000000 00000004733 13534242567 0021031 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\".[precision]\") uses significant precision and trims insignificant zeros", function(test) {
test.equal(format.format(".1")(4.9), "5");
test.equal(format.format(".1")(0.49), "0.5");
test.equal(format.format(".2")(4.9), "4.9");
test.equal(format.format(".2")(0.49), "0.49");
test.equal(format.format(".2")(0.449), "0.45");
test.equal(format.format(".3")(4.9), "4.9");
test.equal(format.format(".3")(0.49), "0.49");
test.equal(format.format(".3")(0.449), "0.449");
test.equal(format.format(".3")(0.4449), "0.445");
test.equal(format.format(".5")(0.444449), "0.44445");
test.end();
});
tape("format(\".[precision]\") does not trim significant zeros", function(test) {
test.equal(format.format(".5")(10), "10");
test.equal(format.format(".5")(100), "100");
test.equal(format.format(".5")(1000), "1000");
test.equal(format.format(".5")(21010), "21010");
test.equal(format.format(".5")(1.10001), "1.1");
test.equal(format.format(".5")(1.10001e6), "1.1e+6");
test.equal(format.format(".6")(1.10001), "1.10001");
test.equal(format.format(".6")(1.10001e6), "1.10001e+6");
test.end();
});
tape("format(\".[precision]\") also trims the decimal point if there are only insignificant zeros", function(test) {
test.equal(format.format(".5")(1.00001), "1");
test.equal(format.format(".5")(1.00001e6), "1e+6");
test.equal(format.format(".6")(1.00001), "1.00001");
test.equal(format.format(".6")(1.00001e6), "1.00001e+6");
test.end();
});
tape("format(\"$\") can output a currency", function(test) {
var f = format.format("$");
test.equal(f(0), "$0");
test.equal(f(.042), "$0.042");
test.equal(f(.42), "$0.42");
test.equal(f(4.2), "$4.2");
test.equal(f(-.042), "-$0.042");
test.equal(f(-.42), "-$0.42");
test.equal(f(-4.2), "-$4.2");
test.end();
});
tape("format(\"($\") can output a currency with parentheses for negative values", function(test) {
var f = format.format("($");
test.equal(f(0), "$0");
test.equal(f(.042), "$0.042");
test.equal(f(.42), "$0.42");
test.equal(f(4.2), "$4.2");
test.equal(f(-.042), "($0.042)");
test.equal(f(-.42), "($0.42)");
test.equal(f(-4.2), "($4.2)");
test.end();
});
tape("format(\"\") can format negative zero as zero", function(test) {
test.equal(format.format("")(-0), "0");
test.end();
});
tape("format(\"\") can format negative infinity", function(test) {
test.equal(format.format("")(-Infinity), "-Infinity");
test.end();
});
d3-format-1.4.1/test/format-type-o-test.js 0000664 0000000 0000000 00000000441 13534242567 0020320 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"o\") octal", function(test) {
test.equal(format.format("o")(10), "12");
test.end();
});
tape("format(\"#o\") octal with prefix", function(test) {
test.equal(format.format("#o")(10), "0o12");
test.end();
});
d3-format-1.4.1/test/format-type-p-test.js 0000664 0000000 0000000 00000001611 13534242567 0020321 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"p\") can output a percentage", function(test) {
var f = format.format("p");
test.equal(f(.00123), "0.123000%");
test.equal(f(.0123), "1.23000%");
test.equal(f(.123), "12.3000%");
test.equal(f(.234), "23.4000%");
test.equal(f(1.23), "123.000%");
test.equal(f(-.00123), "-0.123000%");
test.equal(f(-.0123), "-1.23000%");
test.equal(f(-.123), "-12.3000%");
test.equal(f(-1.23), "-123.000%");
test.end();
});
tape("format(\"+p\") can output a percentage with rounding and sign", function(test) {
var f = format.format("+.2p");
test.equal(f(.00123), "+0.12%");
test.equal(f(.0123), "+1.2%");
test.equal(f(.123), "+12%");
test.equal(f(1.23), "+120%");
test.equal(f(-.00123), "-0.12%");
test.equal(f(-.0123), "-1.2%");
test.equal(f(-.123), "-12%");
test.equal(f(-1.23), "-120%");
test.end();
});
d3-format-1.4.1/test/format-type-r-test.js 0000664 0000000 0000000 00000003512 13534242567 0020325 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"r\") can round to significant digits", function(test) {
test.equal(format.format(".2r")(0), "0.0");
test.equal(format.format(".1r")(0.049), "0.05");
test.equal(format.format(".1r")(-0.049), "-0.05");
test.equal(format.format(".1r")(0.49), "0.5");
test.equal(format.format(".1r")(-0.49), "-0.5");
test.equal(format.format(".2r")(0.449), "0.45");
test.equal(format.format(".3r")(0.4449), "0.445");
test.equal(format.format(".3r")(1.00), "1.00");
test.equal(format.format(".3r")(0.9995), "1.00");
test.equal(format.format(".5r")(0.444449), "0.44445");
test.equal(format.format("r")(123.45), "123.450");
test.equal(format.format(".1r")(123.45), "100");
test.equal(format.format(".2r")(123.45), "120");
test.equal(format.format(".3r")(123.45), "123");
test.equal(format.format(".4r")(123.45), "123.5");
test.equal(format.format(".5r")(123.45), "123.45");
test.equal(format.format(".6r")(123.45), "123.450");
test.equal(format.format(".1r")(.9), "0.9");
test.equal(format.format(".1r")(.09), "0.09");
test.equal(format.format(".1r")(.949), "0.9");
test.equal(format.format(".1r")(.0949), "0.09");
test.equal(format.format(".1r")(.0000000129), "0.00000001");
test.equal(format.format(".2r")(.0000000129), "0.000000013");
test.equal(format.format(".2r")(.00000000129), "0.0000000013");
test.equal(format.format(".3r")(.00000000129), "0.00000000129");
test.equal(format.format(".4r")(.00000000129), "0.000000001290");
test.equal(format.format(".10r")(.9999999999), "0.9999999999");
test.equal(format.format(".15r")(.999999999999999), "0.999999999999999");
test.end();
});
tape("format(\"r\") can round very small numbers", function(test) {
var f = format.format(".2r");
test.equal(f(1e-22), "0.00000000000000000000010");
test.end();
});
d3-format-1.4.1/test/format-type-s-test.js 0000664 0000000 0000000 00000012710 13534242567 0020326 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"s\") outputs SI-prefix notation with default precision 6", function(test) {
var f = format.format("s");
test.equal(f(0), "0.00000");
test.equal(f(1), "1.00000");
test.equal(f(10), "10.0000");
test.equal(f(100), "100.000");
test.equal(f(999.5), "999.500");
test.equal(f(999500), "999.500k");
test.equal(f(1000), "1.00000k");
test.equal(f(100), "100.000");
test.equal(f(1400), "1.40000k");
test.equal(f(1500.5), "1.50050k");
test.equal(f(.00001), "10.0000µ");
test.equal(f(.000001), "1.00000µ");
test.end();
});
tape("format(\"[.precision]s\") outputs SI-prefix notation with precision significant digits", function(test) {
var f1 = format.format(".3s");
test.equal(f1(0), "0.00");
test.equal(f1(1), "1.00");
test.equal(f1(10), "10.0");
test.equal(f1(100), "100");
test.equal(f1(999.5), "1.00k");
test.equal(f1(999500), "1.00M");
test.equal(f1(1000), "1.00k");
test.equal(f1(1500.5), "1.50k");
test.equal(f1(145500000), "146M");
test.equal(f1(145999999.999999347), "146M");
test.equal(f1(1e26), "100Y");
test.equal(f1(.000001), "1.00µ");
test.equal(f1(.009995), "10.0m");
var f2 = format.format(".4s");
test.equal(f2(999.5), "999.5");
test.equal(f2(999500), "999.5k");
test.equal(f2(.009995), "9.995m");
test.end();
});
tape("format(\"s\") formats numbers smaller than 1e-24 with yocto", function(test) {
var f = format.format(".8s");
test.equal(f(1.29e-30), "0.0000013y"); // Note: rounded!
test.equal(f(1.29e-29), "0.0000129y");
test.equal(f(1.29e-28), "0.0001290y");
test.equal(f(1.29e-27), "0.0012900y");
test.equal(f(1.29e-26), "0.0129000y");
test.equal(f(1.29e-25), "0.1290000y");
test.equal(f(1.29e-24), "1.2900000y");
test.equal(f(1.29e-23), "12.900000y");
test.equal(f(1.29e-22), "129.00000y");
test.equal(f(1.29e-21), "1.2900000z");
test.equal(f(-1.29e-30), "-0.0000013y"); // Note: rounded!
test.equal(f(-1.29e-29), "-0.0000129y");
test.equal(f(-1.29e-28), "-0.0001290y");
test.equal(f(-1.29e-27), "-0.0012900y");
test.equal(f(-1.29e-26), "-0.0129000y");
test.equal(f(-1.29e-25), "-0.1290000y");
test.equal(f(-1.29e-24), "-1.2900000y");
test.equal(f(-1.29e-23), "-12.900000y");
test.equal(f(-1.29e-22), "-129.00000y");
test.equal(f(-1.29e-21), "-1.2900000z");
test.end();
});
tape("format(\"s\") formats numbers larger than 1e24 with yotta", function(test) {
var f = format.format(".8s");
test.equal(f(1.23e+21), "1.2300000Z");
test.equal(f(1.23e+22), "12.300000Z");
test.equal(f(1.23e+23), "123.00000Z");
test.equal(f(1.23e+24), "1.2300000Y");
test.equal(f(1.23e+25), "12.300000Y");
test.equal(f(1.23e+26), "123.00000Y");
test.equal(f(1.23e+27), "1230.0000Y");
test.equal(f(1.23e+28), "12300.000Y");
test.equal(f(1.23e+29), "123000.00Y");
test.equal(f(1.23e+30), "1230000.0Y");
test.equal(f(-1.23e+21), "-1.2300000Z");
test.equal(f(-1.23e+22), "-12.300000Z");
test.equal(f(-1.23e+23), "-123.00000Z");
test.equal(f(-1.23e+24), "-1.2300000Y");
test.equal(f(-1.23e+25), "-12.300000Y");
test.equal(f(-1.23e+26), "-123.00000Y");
test.equal(f(-1.23e+27), "-1230.0000Y");
test.equal(f(-1.23e+28), "-12300.000Y");
test.equal(f(-1.23e+29), "-123000.00Y");
test.equal(f(-1.23e+30), "-1230000.0Y");
test.end();
});
tape("format(\"$s\") outputs SI-prefix notation with a currency symbol", function(test) {
var f1 = format.format("$.2s");
test.equal(f1(0), "$0.0");
test.equal(f1(2.5e5), "$250k");
test.equal(f1(-2.5e8), "-$250M");
test.equal(f1(2.5e11), "$250G");
var f2 = format.format("$.3s");
test.equal(f2(0), "$0.00");
test.equal(f2(1), "$1.00");
test.equal(f2(10), "$10.0");
test.equal(f2(100), "$100");
test.equal(f2(999.5), "$1.00k");
test.equal(f2(999500), "$1.00M");
test.equal(f2(1000), "$1.00k");
test.equal(f2(1500.5), "$1.50k");
test.equal(f2(145500000), "$146M");
test.equal(f2(145999999.999999347), "$146M");
test.equal(f2(1e26), "$100Y");
test.equal(f2(.000001), "$1.00µ");
test.equal(f2(.009995), "$10.0m");
var f3 = format.format("$.4s");
test.equal(f3(999.5), "$999.5");
test.equal(f3(999500), "$999.5k");
test.equal(f3(.009995), "$9.995m");
test.end();
});
tape("format(\"s\") SI-prefix notation precision is consistent for small and large numbers", function(test) {
var f1 = format.format(".0s");
test.equal(f1(1e-5), "10µ");
test.equal(f1(1e-4), "100µ");
test.equal(f1(1e-3), "1m");
test.equal(f1(1e-2), "10m");
test.equal(f1(1e-1), "100m");
test.equal(f1(1e+0), "1");
test.equal(f1(1e+1), "10");
test.equal(f1(1e+2), "100");
test.equal(f1(1e+3), "1k");
test.equal(f1(1e+4), "10k");
test.equal(f1(1e+5), "100k");
var f2 = format.format(".4s");
test.equal(f2(1e-5), "10.00µ");
test.equal(f2(1e-4), "100.0µ");
test.equal(f2(1e-3), "1.000m");
test.equal(f2(1e-2), "10.00m");
test.equal(f2(1e-1), "100.0m");
test.equal(f2(1e+0), "1.000");
test.equal(f2(1e+1), "10.00");
test.equal(f2(1e+2), "100.0");
test.equal(f2(1e+3), "1.000k");
test.equal(f2(1e+4), "10.00k");
test.equal(f2(1e+5), "100.0k");
test.end();
});
tape("format(\"0[width],s\") will group thousands due to zero fill", function(test) {
var f = format.format("020,s");
test.equal(f(42), "000,000,000,042.0000");
test.equal(f(42e12), "00,000,000,042.0000T");
test.end();
});
tape("format(\",s\") will group thousands for very large numbers", function(test) {
var f = format.format(",s");
test.equal(f(42e30), "42,000,000Y");
test.end();
});
d3-format-1.4.1/test/format-type-x-test.js 0000664 0000000 0000000 00000005756 13534242567 0020347 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("format(\"x\") returns the expected hexadecimal (lowercase) string", function(test) {
test.equal(format.format("x")(0xdeadbeef), "deadbeef");
test.end();
});
tape("format(\"#x\") returns the expected hexadecimal (lowercase) string with prefix", function(test) {
test.equal(format.format("#x")(0xdeadbeef), "0xdeadbeef");
test.end();
});
tape("format(\",x\") groups thousands", function(test) {
test.equal(format.format(",x")(0xdeadbeef), "de,adb,eef");
test.end();
});
tape("format(\",x\") groups thousands", function(test) {
test.equal(format.format(",x")(0xdeadbeef), "de,adb,eef");
test.end();
});
tape("format(\"#,x\") does not group the prefix", function(test) {
test.equal(format.format("#,x")(0xadeadbeef), "0xade,adb,eef");
test.end();
});
tape("format(\"+#x\") puts the sign before the prefix", function(test) {
test.equal(format.format("+#x")(0xdeadbeef), "+0xdeadbeef");
test.equal(format.format("+#x")(-0xdeadbeef), "-0xdeadbeef");
test.equal(format.format(" #x")(0xdeadbeef), " 0xdeadbeef");
test.equal(format.format(" #x")(-0xdeadbeef), "-0xdeadbeef");
test.end();
});
tape("format(\"$,x\") formats hexadecimal currency", function(test) {
test.equal(format.format("$,x")(0xdeadbeef), "$de,adb,eef");
test.end();
});
tape("format(\"[.precision]x\") always has precision zero", function(test) {
test.equal(format.format(".2x")(0xdeadbeef), "deadbeef");
test.equal(format.format(".2x")(-4.2), "-4");
test.end();
});
tape("format(\"x\") rounds non-integers", function(test) {
test.equal(format.format("x")(2.4), "2");
test.end();
});
tape("format(\"x\") can format negative zero as zero", function(test) {
test.equal(format.format("x")(-0), "0");
test.equal(format.format("x")(-1e-12), "0");
test.end();
});
tape("format(\"x\") does not consider -0xeee to be positive", function(test) {
test.equal(format.format("x")(-0xeee), "-eee");
test.end();
});
tape("format(\"X\") returns the expected hexadecimal (uppercase) string", function(test) {
test.equal(format.format("X")(0xdeadbeef), "DEADBEEF");
test.end();
});
tape("format(\"#X\") returns the expected hexadecimal (uppercase) string with prefix", function(test) {
test.equal(format.format("#X")(0xdeadbeef), "0xDEADBEEF");
test.end();
});
tape("format(\"X\") can format negative zero as zero", function(test) {
test.equal(format.format("X")(-0), "0");
test.equal(format.format("X")(-1e-12), "0");
test.end();
});
tape("format(\"X\") does not consider -0xeee to be positive", function(test) {
test.equal(format.format("X")(-0xeee), "-EEE");
test.end();
});
tape("format(\"#[width]x\") considers the prefix", function(test) {
test.equal(format.format("20x")(0xdeadbeef), " deadbeef");
test.equal(format.format("#20x")(0xdeadbeef), " 0xdeadbeef");
test.equal(format.format("020x")(0xdeadbeef), "000000000000deadbeef");
test.equal(format.format("#020x")(0xdeadbeef), "0x0000000000deadbeef");
test.end();
});
d3-format-1.4.1/test/formatPrefix-test.js 0000664 0000000 0000000 00000001770 13534242567 0020271 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("formatPrefix(\"s\", value)(number) formats with the SI prefix appropriate to the specified value", function(test) {
test.equal(format.formatPrefix(",.0s", 1e-6)(.00042), "420µ");
test.equal(format.formatPrefix(",.0s", 1e-6)(.0042), "4,200µ");
test.equal(format.formatPrefix(",.3s", 1e-3)(.00042), "0.420m");
test.end();
});
tape("formatPrefix(\"s\", value)(number) uses yocto for very small reference values", function(test) {
test.equal(format.formatPrefix(",.0s", 1e-27)(1e-24), "1y");
test.end();
});
tape("formatPrefix(\"s\", value)(number) uses yotta for very small reference values", function(test) {
test.equal(format.formatPrefix(",.0s", 1e27)(1e24), "1Y");
test.end();
});
tape("formatPrefix(\"$,s\", value)(number) formats with the specified SI prefix", function(test) {
var f = format.formatPrefix(" $12,.1s", 1e6);
test.equal(f(-42e6), " -$42.0M");
test.equal(f(+4.2e6), " $4.2M");
test.end();
});
d3-format-1.4.1/test/formatSpecifier-test.js 0000664 0000000 0000000 00000007065 13534242567 0020750 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("formatSpecifier(specifier) throws an error for invalid formats", function(test) {
test.throws(function() { format.formatSpecifier("foo"); }, /invalid format: foo/);
test.throws(function() { format.formatSpecifier(".-2s"); }, /invalid format: \.-2s/);
test.throws(function() { format.formatSpecifier(".f"); }, /invalid format: \.f/);
test.end();
});
tape("formatSpecifier(specifier) returns an instanceof formatSpecifier", function(test) {
var s = format.formatSpecifier("");
test.equal(s instanceof format.formatSpecifier, true);
test.end();
});
tape("formatSpecifier(\"\") has the expected defaults", function(test) {
var s = format.formatSpecifier("");
test.equal(s.fill, " ");
test.equal(s.align, ">");
test.equal(s.sign, "-");
test.equal(s.symbol, "");
test.equal(s.zero, false);
test.equal(s.width, undefined);
test.equal(s.comma, false);
test.equal(s.precision, undefined);
test.equal(s.trim, false);
test.equal(s.type, "");
test.end();
});
tape("formatSpecifier(specifier) preserves unknown types", function(test) {
var s = format.formatSpecifier("q");
test.equal(s.trim, false);
test.equal(s.type, "q");
test.end();
});
tape("formatSpecifier(specifier) preserves shorthand", function(test) {
var s = format.formatSpecifier("");
test.equal(s.trim, false);
test.equal(s.type, "");
test.end();
});
tape("formatSpecifier(specifier).toString() reflects current field values", function(test) {
var s = format.formatSpecifier("");
test.equal((s.fill = "_", s) + "", "_>-");
test.equal((s.align = "^", s) + "", "_^-");
test.equal((s.sign = "+", s) + "", "_^+");
test.equal((s.symbol = "$", s) + "", "_^+$");
test.equal((s.zero = true, s) + "", "_^+$0");
test.equal((s.width = 12, s) + "", "_^+$012");
test.equal((s.comma = true, s) + "", "_^+$012,");
test.equal((s.precision = 2, s) + "", "_^+$012,.2");
test.equal((s.type = "f", s) + "", "_^+$012,.2f");
test.equal((s.trim = true, s) + "", "_^+$012,.2~f");
test.equal(format.format(s)(42), "+$0,000,000,042");
test.end();
});
tape("formatSpecifier(specifier).toString() clamps precision to zero", function(test) {
var s = format.formatSpecifier("");
test.equal((s.precision = -1, s) + "", " >-.0");
test.end();
});
tape("formatSpecifier(specifier).toString() clamps width to one", function(test) {
var s = format.formatSpecifier("");
test.equal((s.width = -1, s) + "", " >-1");
test.end();
});
tape("new FormatSpecifier({}) has the expected defaults", function(test) {
var s = new format.FormatSpecifier({});
test.strictEqual(s.fill, " ");
test.strictEqual(s.align, ">");
test.strictEqual(s.sign, "-");
test.strictEqual(s.symbol, "");
test.strictEqual(s.zero, false);
test.strictEqual(s.width, undefined);
test.strictEqual(s.comma, false);
test.strictEqual(s.precision, undefined);
test.strictEqual(s.trim, false);
test.strictEqual(s.type, "");
test.end();
});
tape("new FormatSpecifier({…}) coerces all inputs to the expected types", function(test) {
var s = new format.FormatSpecifier({
fill: 1,
align: 2,
sign: 3,
symbol: 4,
zero: 5,
width: 6,
comma: 7,
precision: 8,
trim: 9,
type: 10
});
test.strictEqual(s.fill, "1");
test.strictEqual(s.align, "2");
test.strictEqual(s.sign, "3");
test.strictEqual(s.symbol, "4");
test.strictEqual(s.zero, true);
test.strictEqual(s.width, 6);
test.strictEqual(s.comma, true);
test.strictEqual(s.precision, 8);
test.strictEqual(s.trim, true);
test.strictEqual(s.type, "10");
test.end();
});
d3-format-1.4.1/test/inDelta.js 0000664 0000000 0000000 00000000417 13534242567 0016223 0 ustar 00root root 0000000 0000000 var tape = require("tape");
tape.Test.prototype.inDelta = function(actual, expected) {
this._assert(expected - 1e-6 < actual && actual < expected + 1e-6, {
message: "should be in delta",
operator: "inDelta",
actual: actual,
expected: expected
});
};
d3-format-1.4.1/test/locale-test.js 0000664 0000000 0000000 00000011773 13534242567 0017066 0 ustar 00root root 0000000 0000000 var fs = require("fs"),
path = require("path"),
tape = require("tape"),
queue = require("d3-queue"),
d3 = require("../");
tape("formatLocale({decimal: decimal}) observes the specified decimal point", function(test) {
test.equal(d3.formatLocale({decimal: "|"}).format("06.2f")(2), "002|00");
test.equal(d3.formatLocale({decimal: "/"}).format("06.2f")(2), "002/00");
test.end();
});
tape("formatLocale({currency: [prefix, suffix]}) observes the specified currency prefix and suffix", function(test) {
test.equal(d3.formatLocale({decimal: ".", currency: ["฿", ""]}).format("$06.2f")(2), "฿02.00");
test.equal(d3.formatLocale({decimal: ".", currency: ["", "฿"]}).format("$06.2f")(2), "02.00฿");
test.end();
});
tape("formatLocale({currency: [prefix, suffix]}) places the currency suffix after the SI suffix", function(test) {
test.equal(d3.formatLocale({decimal: ",", currency: ["", " €"]}).format("$.3s")(1.2e9), "1,20G €");
test.end();
});
tape("formatLocale({grouping: undefined}) does not perform any grouping", function(test) {
test.equal(d3.formatLocale({decimal: "."}).format("012,.2f")(2), "000000002.00");
test.end();
});
tape("formatLocale({grouping: [sizes…]}) observes the specified group sizes", function(test) {
test.equal(d3.formatLocale({decimal: ".", grouping: [3], thousands: ","}).format("012,.2f")(2), "0,000,002.00");
test.equal(d3.formatLocale({decimal: ".", grouping: [2], thousands: ","}).format("012,.2f")(2), "0,00,00,02.00");
test.equal(d3.formatLocale({decimal: ".", grouping: [2, 3], thousands: ","}).format("012,.2f")(2), "00,000,02.00");
test.equal(d3.formatLocale({decimal: ".", grouping: [3, 2, 2, 2, 2, 2, 2], thousands: ","}).format(",d")(1e12), "10,00,00,00,00,000");
test.end();
});
tape("formatLocale(…) can format numbers using the Indian numbering system.", function(test) {
var format = d3.formatLocale(require("../locale/en-IN")).format(",");
test.equal(format(10), "10");
test.equal(format(100), "100");
test.equal(format(1000), "1,000");
test.equal(format(10000), "10,000");
test.equal(format(100000), "1,00,000");
test.equal(format(1000000), "10,00,000");
test.equal(format(10000000), "1,00,00,000");
test.equal(format(10000000.4543), "1,00,00,000.4543");
test.equal(format(1000.321), "1,000.321");
test.equal(format(10.5), "10.5");
test.equal(format(-10), "-10");
test.equal(format(-100), "-100");
test.equal(format(-1000), "-1,000");
test.equal(format(-10000), "-10,000");
test.equal(format(-100000), "-1,00,000");
test.equal(format(-1000000), "-10,00,000");
test.equal(format(-10000000), "-1,00,00,000");
test.equal(format(-10000000.4543), "-1,00,00,000.4543");
test.equal(format(-1000.321), "-1,000.321");
test.equal(format(-10.5), "-10.5");
test.end();
});
tape("formatLocale({thousands: separator}) observes the specified group separator", function(test) {
test.equal(d3.formatLocale({decimal: ".", grouping: [3], thousands: " "}).format("012,.2f")(2), "0 000 002.00");
test.equal(d3.formatLocale({decimal: ".", grouping: [3], thousands: "/"}).format("012,.2f")(2), "0/000/002.00");
test.end();
});
tape("formatLocale({percent: percent}) observes the specified percent sign", function(test) {
test.equal(d3.formatLocale({decimal: ".", percent: "!"}).format("06.2%")(2), "200.00!");
test.equal(d3.formatLocale({decimal: ".", percent: "﹪"}).format("06.2%")(2), "200.00﹪");
test.end();
});
tape("formatLocale({minus: minus}) observes the specified minus sign", function(test) {
test.equal(d3.formatLocale({decimal: ".", minus: "-"}).format("06.2f")(-2), "-02.00");
test.equal(d3.formatLocale({decimal: ".", minus: "−"}).format("06.2f")(-2), "−02.00");
test.equal(d3.formatLocale({decimal: ".", minus: "➖"}).format("06.2f")(-2), "➖02.00");
test.equal(d3.formatLocale({decimal: "."}).format("06.2f")(-2), "-02.00");
test.end();
});
tape("formatLocale({nan: nan}) observes the specified not-a-number representation", function(test) {
test.equal(d3.formatLocale({nan: "N/A"}).format("6.2f")(undefined), " N/A");
test.equal(d3.formatLocale({nan: "-"}).format("<6.2g")(undefined), "- ");
test.equal(d3.formatLocale({}).format(" 6.2f")(undefined), " NaN");
test.end();
});
tape("locale data is valid", function(test) {
fs.readdir("locale", function(error, locales) {
if (error) throw error;
var q = queue.queue(1);
locales.forEach(function(locale) {
if (!/\.json$/i.test(locale)) return;
q.defer(testLocale, path.join("locale", locale));
});
q.awaitAll(function(error) {
if (error) throw error;
test.end();
});
});
function testLocale(locale, callback) {
fs.readFile(locale, "utf8", function(error, locale) {
if (error) return void callback(error);
locale = JSON.parse(locale);
test.equal("currency" in locale, true);
test.equal("decimal" in locale, true);
test.equal("grouping" in locale, true);
test.equal("thousands" in locale, true);
locale = d3.formatLocale(locale);
callback(null);
});
}
});
d3-format-1.4.1/test/precisionFixed-test.js 0000664 0000000 0000000 00000000653 13534242567 0020575 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("precisionFixed(number) returns the expected value", function(test) {
test.equal(format.precisionFixed(8.9), 0);
test.equal(format.precisionFixed(1.1), 0);
test.equal(format.precisionFixed(0.89), 1);
test.equal(format.precisionFixed(0.11), 1);
test.equal(format.precisionFixed(0.089), 2);
test.equal(format.precisionFixed(0.011), 2);
test.end();
});
d3-format-1.4.1/test/precisionPrefix-test.js 0000664 0000000 0000000 00000003727 13534242567 0021000 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
// A generalization from µ to all prefixes:
// test.equal(format.precisionPrefix(1e-6, 1e-6), 0); // 1µ
// test.equal(format.precisionPrefix(1e-6, 1e-7), 0); // 10µ
// test.equal(format.precisionPrefix(1e-6, 1e-8), 0); // 100µ
tape("precisionPrefix(step, value) returns zero if step has the same units as value", function(test) {
for (var i = -24; i <= 24; i += 3) {
for (var j = i; j < i + 3; ++j) {
test.equal(format.precisionPrefix(+("1e" + i), +("1e" + j)), 0);
}
}
test.end();
});
// A generalization from µ to all prefixes:
// test.equal(format.precisionPrefix(1e-9, 1e-6), 3); // 0.001µ
// test.equal(format.precisionPrefix(1e-8, 1e-6), 2); // 0.01µ
// test.equal(format.precisionPrefix(1e-7, 1e-6), 1); // 0.1µ
tape("precisionPrefix(step, value) returns greater than zero if fractional digits are needed", function(test) {
for (var i = -24; i <= 24; i += 3) {
for (var j = i - 4; j < i; ++j) {
test.equal(format.precisionPrefix(+("1e" + j), +("1e" + i)), i - j);
}
}
test.end();
});
tape("precisionPrefix(step, value) returns the expected precision when value is less than one yocto", function(test) {
test.equal(format.precisionPrefix(1e-24, 1e-24), 0); // 1y
test.equal(format.precisionPrefix(1e-25, 1e-25), 1); // 0.1y
test.equal(format.precisionPrefix(1e-26, 1e-26), 2); // 0.01y
test.equal(format.precisionPrefix(1e-27, 1e-27), 3); // 0.001y
test.equal(format.precisionPrefix(1e-28, 1e-28), 4); // 0.0001y
test.end();
});
tape("precisionPrefix(step, value) returns the expected precision when value is greater than than one yotta", function(test) {
test.equal(format.precisionPrefix(1e24, 1e24), 0); // 1Y
test.equal(format.precisionPrefix(1e24, 1e25), 0); // 10Y
test.equal(format.precisionPrefix(1e24, 1e26), 0); // 100Y
test.equal(format.precisionPrefix(1e24, 1e27), 0); // 1000Y
test.equal(format.precisionPrefix(1e23, 1e27), 1); // 1000.0Y
test.end();
});
d3-format-1.4.1/test/precisionRound-test.js 0000664 0000000 0000000 00000000655 13534242567 0020627 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
format = require("../");
tape("precisionRound(step, max) returns the expected value", function(test) {
test.equal(format.precisionRound(0.1, 1.1), 2); // "1.0", "1.1"
test.equal(format.precisionRound(0.01, 0.99), 2); // "0.98", "0.99"
test.equal(format.precisionRound(0.01, 1.00), 2); // "0.99", "1.0"
test.equal(format.precisionRound(0.01, 1.01), 3); // "1.00", "1.01"
test.end();
});
d3-format-1.4.1/yarn.lock 0000664 0000000 0000000 00000131623 13534242567 0015155 0 ustar 00root root 0000000 0000000 # 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.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"
d3-queue@3:
version "3.0.7"
resolved "https://registry.yarnpkg.com/d3-queue/-/d3-queue-3.0.7.tgz#c93a2e54b417c0959129d7d73f6cf7d4292e7618"
integrity sha1-yTouVLQXwJWRKdfXP2z31Ckudhg=
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.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.0.tgz#e2c3c8dba768425f897cf0f9e51fe2e241485d4c"
integrity sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ==
dependencies:
eslint-visitor-keys "^1.0.0"
eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==
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.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"
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"