pax_global_header 0000666 0000000 0000000 00000000064 13720467670 0014526 g ustar 00root root 0000000 0000000 52 comment=614d25a39136ce06708cfeb132682760ff25617c
d3-time-format-2.3.0/ 0000775 0000000 0000000 00000000000 13720467670 0014260 5 ustar 00root root 0000000 0000000 d3-time-format-2.3.0/.eslintrc.json 0000664 0000000 0000000 00000000342 13720467670 0017053 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-time-format-2.3.0/.gitignore 0000664 0000000 0000000 00000000077 13720467670 0016254 0 ustar 00root root 0000000 0000000 *.sublime-workspace
.DS_Store
dist/
node_modules
npm-debug.log
d3-time-format-2.3.0/LICENSE 0000664 0000000 0000000 00000002703 13720467670 0015267 0 ustar 00root root 0000000 0000000 Copyright 2010-2017 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-time-format-2.3.0/README.md 0000664 0000000 0000000 00000032032 13720467670 0015537 0 ustar 00root root 0000000 0000000 # d3-time-format
This module provides a JavaScript implementation of the venerable [strptime](http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html) and [strftime](http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html) functions from the C standard library, and can be used to parse or format [dates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) in a variety of locale-specific representations. To format a date, create a [formatter](#locale_format) from a specifier (a string with the desired format *directives*, indicated by `%`); then pass a date to the formatter, which returns a string. For example, to convert the current date to a human-readable string:
```js
var formatTime = d3.timeFormat("%B %d, %Y");
formatTime(new Date); // "June 30, 2015"
```
Likewise, to convert a string back to a date, create a [parser](#locale_parse):
```js
var parseTime = d3.timeParse("%B %d, %Y");
parseTime("June 30, 2015"); // Tue Jun 30 2015 00:00:00 GMT-0700 (PDT)
```
You can implement more elaborate conditional time formats, too. For example, here’s a [multi-scale time format](http://bl.ocks.org/mbostock/4149176) using [time intervals](https://github.com/d3/d3-time):
```js
var formatMillisecond = d3.timeFormat(".%L"),
formatSecond = d3.timeFormat(":%S"),
formatMinute = d3.timeFormat("%I:%M"),
formatHour = d3.timeFormat("%I %p"),
formatDay = d3.timeFormat("%a %d"),
formatWeek = d3.timeFormat("%b %d"),
formatMonth = d3.timeFormat("%B"),
formatYear = d3.timeFormat("%Y");
function multiFormat(date) {
return (d3.timeSecond(date) < date ? formatMillisecond
: d3.timeMinute(date) < date ? formatSecond
: d3.timeHour(date) < date ? formatMinute
: d3.timeDay(date) < date ? formatHour
: d3.timeMonth(date) < date ? (d3.timeWeek(date) < date ? formatDay : formatWeek)
: d3.timeYear(date) < date ? formatMonth
: formatYear)(date);
}
```
This module is used by D3 [time scales](https://github.com/d3/d3-scale/blob/master/README.md#time-scales) to generate human-readable ticks.
## Installing
If you use NPM, `npm install d3-time-format`. Otherwise, download the [latest release](https://github.com/d3/d3-time-format/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-time-format.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:
```html
```
Locale files are published to npm 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://cdn.jsdelivr.net/npm/d3-time-format@2/locale/ru-RU.json", function(error, locale) {
if (error) throw error;
d3.timeFormatDefaultLocale(locale);
var format = d3.timeFormat("%c");
console.log(format(new Date)); // понедельник, 5 декабря 2016 г. 10:31:59
});
```
## API Reference
# d3.timeFormat(specifier) [<>](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js#L4 "Source")
An alias for [*locale*.format](#locale_format) on the [default locale](#timeFormatDefaultLocale).
# d3.timeParse(specifier) [<>](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js#L5 "Source")
An alias for [*locale*.parse](#locale_parse) on the [default locale](#timeFormatDefaultLocale).
# d3.utcFormat(specifier) [<>](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js#L6 "Source")
An alias for [*locale*.utcFormat](#locale_utcFormat) on the [default locale](#timeFormatDefaultLocale).
# d3.utcParse(specifier) [<>](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js#L7 "Source")
An alias for [*locale*.utcParse](#locale_utcParse) on the [default locale](#timeFormatDefaultLocale).
# d3.isoFormat [<>](https://github.com/d3/d3-time-format/blob/master/src/isoFormat.js "Source")
The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time formatter. Where available, this method will use [Date.toISOString](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toISOString) to format.
# d3.isoParse [<>](https://github.com/d3/d3-time-format/blob/master/src/isoParse.js "Source")
The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time parser. Where available, this method will use the [Date constructor](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date) to parse strings. If you depend on strict validation of the input format according to ISO 8601, you should construct a [UTC parser function](#utcParse):
```js
var strictIsoParse = d3.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");
```
# locale.format(specifier) [<>](https://github.com/d3/d3-time-format/blob/master/src/locale.js#L293 "Source")
Returns a new formatter for the given string *specifier*. The specifier string may contain the following directives:
* `%a` - abbreviated weekday name.*
* `%A` - full weekday name.*
* `%b` - abbreviated month name.*
* `%B` - full month name.*
* `%c` - the locale’s date and time, such as `%x, %X`.*
* `%d` - zero-padded day of the month as a decimal number [01,31].
* `%e` - space-padded day of the month as a decimal number [ 1,31]; equivalent to `%_d`.
* `%f` - microseconds as a decimal number [000000, 999999].
* `%g` - ISO 8601 week-based year without century as a decimal number [00,99].
* `%G` - ISO 8601 week-based year with century as a decimal number.
* `%H` - hour (24-hour clock) as a decimal number [00,23].
* `%I` - hour (12-hour clock) as a decimal number [01,12].
* `%j` - day of the year as a decimal number [001,366].
* `%m` - month as a decimal number [01,12].
* `%M` - minute as a decimal number [00,59].
* `%L` - milliseconds as a decimal number [000, 999].
* `%p` - either AM or PM.*
* `%q` - quarter of the year as a decimal number [1,4].
* `%Q` - milliseconds since UNIX epoch.
* `%s` - seconds since UNIX epoch.
* `%S` - second as a decimal number [00,61].
* `%u` - Monday-based (ISO 8601) weekday as a decimal number [1,7].
* `%U` - Sunday-based week of the year as a decimal number [00,53].
* `%V` - ISO 8601 week of the year as a decimal number [01, 53].
* `%w` - Sunday-based weekday as a decimal number [0,6].
* `%W` - Monday-based week of the year as a decimal number [00,53].
* `%x` - the locale’s date, such as `%-m/%-d/%Y`.*
* `%X` - the locale’s time, such as `%-I:%M:%S %p`.*
* `%y` - year without century as a decimal number [00,99].
* `%Y` - year with century as a decimal number, such as `1999`.
* `%Z` - time zone offset, such as `-0700`, `-07:00`, `-07`, or `Z`.
* `%%` - a literal percent sign (`%`).
Directives marked with an asterisk (\*) may be affected by the [locale definition](#locales).
For `%U`, all days in a new year preceding the first Sunday are considered to be in week 0. For `%W`, all days in a new year preceding the first Monday are considered to be in week 0. Week numbers are computed using [*interval*.count](https://github.com/d3/d3-time/blob/master/README.md#interval_count). For example, 2015-52 and 2016-00 represent Monday, December 28, 2015, while 2015-53 and 2016-01 represent Monday, January 4, 2016. This differs from the [ISO week date](https://en.wikipedia.org/wiki/ISO_week_date) specification (`%V`), which uses a more complicated definition!
For `%V`,`%g` and `%G`, per the [strftime man page](http://man7.org/linux/man-pages/man3/strftime.3.html):
> In this system, weeks start on a Monday, and are numbered from 01, for the first week, up to 52 or 53, for the last week. Week 1 is the first week where four or more days fall within the new year (or, synonymously, week 01 is: the first week of the year that contains a Thursday; or, the week that has 4 January in it). If the ISO week number belongs to the previous or next year, that year is used instead.
The `%` sign indicating a directive may be immediately followed by a padding modifier:
* `0` - zero-padding
* `_` - space-padding
* `-` - disable padding
If no padding modifier is specified, the default is `0` for all directives except `%e`, which defaults to `_`. (In some implementations of strftime and strptime, a directive may include an optional field width or precision; this feature is not yet implemented.)
The returned function formats a specified *[date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date)*, returning the corresponding string.
```js
var formatMonth = d3.timeFormat("%B"),
formatDay = d3.timeFormat("%A"),
date = new Date(2014, 4, 1); // Thu May 01 2014 00:00:00 GMT-0700 (PDT)
formatMonth(date); // "May"
formatDay(date); // "Thursday"
```
# locale.parse(specifier) [<>](https://github.com/d3/d3-time-format/blob/master/src/locale.js#L298 "Source")
Returns a new parser for the given string *specifier*. The specifier string may contain the same directives as [*locale*.format](#locale_format). The `%d` and `%e` directives are considered equivalent for parsing.
The returned function parses a specified *string*, returning the corresponding [date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date) or null if the string could not be parsed according to this format’s specifier. Parsing is strict: if the specified string does not exactly match the associated specifier, this method returns null. For example, if the associated specifier is `%Y-%m-%dT%H:%M:%SZ`, then the string `"2011-07-01T19:15:28Z"` will be parsed as expected, but `"2011-07-01T19:15:28"`, `"2011-07-01 19:15:28"` and `"2011-07-01"` will return null. (Note that the literal `Z` here is different from the time zone offset directive `%Z`.) If a more flexible parser is desired, try multiple formats sequentially until one returns non-null.
# locale.utcFormat(specifier) [<>](https://github.com/d3/d3-time-format/blob/master/src/locale.js#L303 "Source")
Equivalent to [*locale*.format](#locale_format), except all directives are interpreted as [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) rather than local time.
# locale.utcParse(specifier) [<>](https://github.com/d3/d3-time-format/blob/master/src/locale.js#L308 "Source")
Equivalent to [*locale*.parse](#locale_parse), except all directives are interpreted as [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) rather than local time.
### Locales
# d3.timeFormatLocale(definition) [<>](https://github.com/d3/d3-time-format/blob/master/src/locale.js "Source")
Returns a *locale* object for the specified *definition* with [*locale*.format](#locale_format), [*locale*.parse](#locale_parse), [*locale*.utcFormat](#locale_utcFormat), [*locale*.utcParse](#locale_utcParse) methods. The *definition* must include the following properties:
* `dateTime` - the date and time (`%c`) format specifier (e.g., `"%a %b %e %X %Y"`).
* `date` - the date (`%x`) format specifier (e.g., `"%m/%d/%Y"`).
* `time` - the time (`%X`) format specifier (e.g., `"%H:%M:%S"`).
* `periods` - the A.M. and P.M. equivalents (e.g., `["AM", "PM"]`).
* `days` - the full names of the weekdays, starting with Sunday.
* `shortDays` - the abbreviated names of the weekdays, starting with Sunday.
* `months` - the full names of the months (starting with January).
* `shortMonths` - the abbreviated names of the months (starting with January).
For an example, see [Localized Time Axis II](https://bl.ocks.org/mbostock/805115ebaa574e771db1875a6d828949).
# d3.timeFormatDefaultLocale(definition) [<>](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js "Source")
Equivalent to [d3.timeFormatLocale](#timeFormatLocale), except it also redefines [d3.timeFormat](#timeFormat), [d3.timeParse](#timeParse), [d3.utcFormat](#utcFormat) and [d3.utcParse](#utcParse) to the new locale’s [*locale*.format](#locale_format), [*locale*.parse](#locale_parse), [*locale*.utcFormat](#locale_utcFormat) and [*locale*.utcParse](#locale_utcParse). If you do not set a default locale, it defaults to [U.S. English](https://github.com/d3/d3-time-format/blob/master/locale/en-US.json).
For an example, see [Localized Time Axis](https://bl.ocks.org/mbostock/6f1cc065d4d172bcaf322e399aa8d62f).
d3-time-format-2.3.0/d3-time-format.sublime-project 0000664 0000000 0000000 00000000524 13720467670 0022037 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-time-format-2.3.0/locale/ 0000775 0000000 0000000 00000000000 13720467670 0015517 5 ustar 00root root 0000000 0000000 d3-time-format-2.3.0/locale/ar-EG.json 0000664 0000000 0000000 00000001322 13720467670 0017303 0 ustar 00root root 0000000 0000000 {
"dateTime": "%x, %X",
"date": "%-d/%-m/%Y",
"time": "%-I:%M:%S %p",
"periods": ["ص", "م"],
"days": ["الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"],
"shortDays": ["أحد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
"months": ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"],
"shortMonths": ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"]
}
d3-time-format-2.3.0/locale/ca-ES.json 0000664 0000000 0000000 00000001012 13720467670 0017274 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %e de %B de %Y, %X",
"date": "%d/%m/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"],
"shortDays": ["dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."],
"months": ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"],
"shortMonths": ["gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des."]
}
d3-time-format-2.3.0/locale/cs-CZ.json 0000664 0000000 0000000 00000001015 13720467670 0017326 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A,%e.%B %Y, %X",
"date": "%-d.%-m.%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["neděle", "pondělí", "úterý", "středa", "čvrtek", "pátek", "sobota"],
"shortDays": ["ne.", "po.", "út.", "st.", "čt.", "pá.", "so."],
"months": ["leden", "únor", "březen", "duben", "květen", "červen", "červenec", "srpen", "září", "říjen", "listopad", "prosinec"],
"shortMonths": ["led", "úno", "břez", "dub", "kvě", "čer", "červ", "srp", "zář", "říj", "list", "pros"]
}
d3-time-format-2.3.0/locale/da-DK.json 0000664 0000000 0000000 00000000765 13720467670 0017302 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A den %d %B %Y %X",
"date": "%d-%m-%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"],
"shortDays": ["søn", "man", "tir", "ons", "tor", "fre", "lør"],
"months": ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"],
"shortMonths": ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"]
}
d3-time-format-2.3.0/locale/de-CH.json 0000664 0000000 0000000 00000000766 13720467670 0017303 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, der %e. %B %Y, %X",
"date": "%d.%m.%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
"shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
"months": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
"shortMonths": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
}
d3-time-format-2.3.0/locale/de-DE.json 0000664 0000000 0000000 00000000766 13720467670 0017301 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, der %e. %B %Y, %X",
"date": "%d.%m.%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
"shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
"months": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
"shortMonths": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
}
d3-time-format-2.3.0/locale/en-CA.json 0000664 0000000 0000000 00000000765 13720467670 0017305 0 ustar 00root root 0000000 0000000 {
"dateTime": "%a %b %e %X %Y",
"date": "%Y-%m-%d",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
"shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
"months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
"shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
}
d3-time-format-2.3.0/locale/en-GB.json 0000664 0000000 0000000 00000000765 13720467670 0017312 0 ustar 00root root 0000000 0000000 {
"dateTime": "%a %e %b %X %Y",
"date": "%d/%m/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
"shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
"months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
"shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
}
d3-time-format-2.3.0/locale/en-US.json 0000664 0000000 0000000 00000000763 13720467670 0017347 0 ustar 00root root 0000000 0000000 {
"dateTime": "%x, %X",
"date": "%-m/%-d/%Y",
"time": "%-I:%M:%S %p",
"periods": ["AM", "PM"],
"days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
"shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
"months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
"shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
}
d3-time-format-2.3.0/locale/es-ES.json 0000664 0000000 0000000 00000001000 13720467670 0017315 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %e de %B de %Y, %X",
"date": "%d/%m/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"],
"shortDays": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
"months": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
"shortMonths": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"]
}
d3-time-format-2.3.0/locale/es-MX.json 0000664 0000000 0000000 00000000764 13720467670 0017352 0 ustar 00root root 0000000 0000000 {
"dateTime": "%x, %X",
"date": "%d/%m/%Y",
"time": "%-I:%M:%S %p",
"periods": ["AM", "PM"],
"days": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"],
"shortDays": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
"months": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
"shortMonths": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"]
}
d3-time-format-2.3.0/locale/fa-IR.json 0000664 0000000 0000000 00000001324 13720467670 0017310 0 ustar 00root root 0000000 0000000 {
"dateTime": "%x, %X",
"date": "%-d/%-m/%Y",
"time": "%-I:%M:%S %p",
"periods": ["صبح", "عصر"],
"days": ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"],
"shortDays": ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"],
"months": ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"],
"shortMonths": ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"]
}
d3-time-format-2.3.0/locale/fi-FI.json 0000664 0000000 0000000 00000001063 13720467670 0017304 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %-d. %Bta %Y klo %X",
"date": "%-d.%-m.%Y",
"time": "%H:%M:%S",
"periods": ["a.m.", "p.m."],
"days": ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"],
"shortDays": ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"],
"months": ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"],
"shortMonths": ["Tammi", "Helmi", "Maalis", "Huhti", "Touko", "Kesä", "Heinä", "Elo", "Syys", "Loka", "Marras", "Joulu"]
}
d3-time-format-2.3.0/locale/fr-CA.json 0000664 0000000 0000000 00000000761 13720467670 0017306 0 ustar 00root root 0000000 0000000 {
"dateTime": "%a %e %b %Y %X",
"date": "%Y-%m-%d",
"time": "%H:%M:%S",
"periods": ["", ""],
"days": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
"shortDays": ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"],
"months": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
"shortMonths": ["jan", "fév", "mar", "avr", "mai", "jui", "jul", "aoû", "sep", "oct", "nov", "déc"]
}
d3-time-format-2.3.0/locale/fr-FR.json 0000664 0000000 0000000 00000001016 13720467670 0017324 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A %e %B %Y à %X",
"date": "%d/%m/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
"shortDays": ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
"months": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
"shortMonths": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."]
}
d3-time-format-2.3.0/locale/he-IL.json 0000664 0000000 0000000 00000001157 13720467670 0017314 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %e ב%B %Y %X",
"date": "%d.%m.%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"],
"shortDays": ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"],
"months": ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"],
"shortMonths": ["ינו׳", "פבר׳", "מרץ", "אפר׳", "מאי", "יוני", "יולי", "אוג׳", "ספט׳", "אוק׳", "נוב׳", "דצמ׳"]
}
d3-time-format-2.3.0/locale/hu-HU.json 0000664 0000000 0000000 00000001036 13720467670 0017340 0 ustar 00root root 0000000 0000000 {
"dateTime": "%Y. %B %-e., %A %X",
"date": "%Y. %m. %d.",
"time": "%H:%M:%S",
"periods": ["de.", "du."],
"days": ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"],
"shortDays": ["V", "H", "K", "Sze", "Cs", "P", "Szo"],
"months": ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"],
"shortMonths": ["jan.", "feb.", "már.", "ápr.", "máj.", "jún.", "júl.", "aug.", "szept.", "okt.", "nov.", "dec."]
}
d3-time-format-2.3.0/locale/it-IT.json 0000664 0000000 0000000 00000001003 13720467670 0017332 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A %e %B %Y, %X",
"date": "%d/%m/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"],
"shortDays": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"],
"months": ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
"shortMonths": ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"]
}
d3-time-format-2.3.0/locale/ja-JP.json 0000664 0000000 0000000 00000000764 13720467670 0017322 0 ustar 00root root 0000000 0000000 {
"dateTime": "%x %a %X",
"date": "%Y/%m/%d",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"],
"shortDays": ["日", "月", "火", "水", "木", "金", "土"],
"months": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
"shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]
}
d3-time-format-2.3.0/locale/ko-KR.json 0000664 0000000 0000000 00000001002 13720467670 0017326 0 ustar 00root root 0000000 0000000 {
"dateTime": "%Y/%m/%d %a %X",
"date": "%Y/%m/%d",
"time": "%H:%M:%S",
"periods": ["오전", "오후"],
"days": ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"],
"shortDays": ["일", "월", "화", "수", "목", "금", "토"],
"months": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
"shortMonths": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
}
d3-time-format-2.3.0/locale/mk-MK.json 0000664 0000000 0000000 00000001247 13720467670 0017332 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %e %B %Y г. %X",
"date": "%d.%m.%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["недела", "понеделник", "вторник", "среда", "четврток", "петок", "сабота"],
"shortDays": ["нед", "пон", "вто", "сре", "чет", "пет", "саб"],
"months": ["јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"],
"shortMonths": ["јан", "фев", "мар", "апр", "мај", "јун", "јул", "авг", "сеп", "окт", "ное", "дек"]
}
d3-time-format-2.3.0/locale/nb-NO.json 0000664 0000000 0000000 00000000770 13720467670 0017327 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A den %d. %B %Y %X",
"date": "%d.%m.%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"],
"shortDays": ["søn", "man", "tir", "ons", "tor", "fre", "lør"],
"months": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"],
"shortMonths": ["jan", "feb", "mars", "apr", "mai", "juni", "juli", "aug", "sep", "okt", "nov", "des"]
}
d3-time-format-2.3.0/locale/nl-NL.json 0000664 0000000 0000000 00000000762 13720467670 0017337 0 ustar 00root root 0000000 0000000 {
"dateTime": "%a %e %B %Y %X",
"date": "%d-%m-%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"],
"shortDays": ["zo", "ma", "di", "wo", "do", "vr", "za"],
"months": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
"shortMonths": ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"]
}
d3-time-format-2.3.0/locale/pl-PL.json 0000664 0000000 0000000 00000001060 13720467670 0017333 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %e %B %Y, %X",
"date": "%d/%m/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"],
"shortDays": ["Niedz.", "Pon.", "Wt.", "Śr.", "Czw.", "Pt.", "Sob."],
"months": ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"],
"shortMonths": ["Stycz.", "Luty", "Marz.", "Kwie.", "Maj", "Czerw.", "Lipc.", "Sierp.", "Wrz.", "Paźdz.", "Listop.", "Grudz."]
}
d3-time-format-2.3.0/locale/pt-BR.json 0000664 0000000 0000000 00000000774 13720467670 0017346 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %e de %B de %Y. %X",
"date": "%d/%m/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"],
"shortDays": ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
"months": ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
"shortMonths": ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"]
}
d3-time-format-2.3.0/locale/ru-RU.json 0000664 0000000 0000000 00000001243 13720467670 0017364 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %e %B %Y г. %X",
"date": "%d.%m.%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"],
"shortDays": ["вс", "пн", "вт", "ср", "чт", "пт", "сб"],
"months": ["января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"],
"shortMonths": ["янв", "фев", "мар", "апр", "май", "июн", "июл", "авг", "сен", "окт", "ноя", "дек"]
}
d3-time-format-2.3.0/locale/sv-SE.json 0000664 0000000 0000000 00000000770 13720467670 0017353 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A den %d %B %Y %X",
"date": "%Y-%m-%d",
"time": "%H:%M:%S",
"periods": ["fm", "em"],
"days": ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"],
"shortDays": ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"],
"months": ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"],
"shortMonths": ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"]
}
d3-time-format-2.3.0/locale/tr-TR.json 0000664 0000000 0000000 00000000764 13720467670 0017371 0 ustar 00root root 0000000 0000000 {
"dateTime": "%a %e %b %X %Y",
"date": "%d/%m/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"],
"shortDays": ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"],
"months": ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"],
"shortMonths": ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"]
}
d3-time-format-2.3.0/locale/uk-UA.json 0000664 0000000 0000000 00000001276 13720467670 0017342 0 ustar 00root root 0000000 0000000 {
"dateTime": "%A, %e %B %Y р. %X",
"date": "%d.%m.%Y",
"time": "%H:%M:%S",
"periods": ["дп", "пп"],
"days": ["неділя", "понеділок", "вівторок", "середа", "четвер", "п'ятниця", "субота"],
"shortDays": ["нд", "пн", "вт", "ср", "чт", "пт", "сб"],
"months": ["січня", "лютого", "березня", "квітня", "травня", "червня", "липня", "серпня", "вересня", "жовтня", "листопада", "грудня"],
"shortMonths": ["січ.", "лют.", "бер.", "квіт.", "трав.", "черв.", "лип.", "серп.", "вер.", "жовт.", "лист.", "груд."]
}
d3-time-format-2.3.0/locale/zh-CN.json 0000664 0000000 0000000 00000001120 13720467670 0017323 0 ustar 00root root 0000000 0000000 {
"dateTime": "%x %A %X",
"date": "%Y年%-m月%-d日",
"time": "%H:%M:%S",
"periods": ["上午", "下午"],
"days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
"shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
"months": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
"shortMonths": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
}
d3-time-format-2.3.0/locale/zh-TW.json 0000664 0000000 0000000 00000001040 13720467670 0017356 0 ustar 00root root 0000000 0000000 {
"dateTime": "%x %A %X",
"date": "%Y年%-m月%-d日",
"time": "%H:%M:%S",
"periods": ["上午", "下午"],
"days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
"shortDays": ["日", "一", "二", "三", "四", "五", "六"],
"months": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
"shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]
}
d3-time-format-2.3.0/package.json 0000664 0000000 0000000 00000003360 13720467670 0016550 0 ustar 00root root 0000000 0000000 {
"name": "d3-time-format",
"version": "2.3.0",
"description": "A JavaScript time formatter and parser inspired by strftime and strptime.",
"keywords": [
"d3",
"d3-module",
"time",
"format",
"strftime",
"strptime"
],
"homepage": "https://d3js.org/d3-time-format/",
"license": "BSD-3-Clause",
"author": {
"name": "Mike Bostock",
"url": "http://bost.ocks.org/mike"
},
"main": "dist/d3-time-format.js",
"unpkg": "dist/d3-time-format.min.js",
"jsdelivr": "dist/d3-time-format.min.js",
"module": "src/index.js",
"repository": {
"type": "git",
"url": "https://github.com/d3/d3-time-format.git"
},
"files": [
"dist/**/*.js",
"src/**/*.js",
"locale/*.json"
],
"scripts": {
"pretest": "rollup -c",
"test": "TZ=America/Los_Angeles tape 'test/**/*-test.js' && eslint src",
"prepublishOnly": "rm -rf dist && yarn test",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js"
},
"dependencies": {
"d3-time": "1"
},
"sideEffects": [
"./src/defaultLocale.js"
],
"devDependencies": {
"d3-queue": "3",
"eslint": "6",
"rollup": "1",
"rollup-plugin-terser": "5",
"tape": "4"
}
}
d3-time-format-2.3.0/rollup.config.js 0000664 0000000 0000000 00000001545 13720467670 0017404 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-time-format-2.3.0/src/ 0000775 0000000 0000000 00000000000 13720467670 0015047 5 ustar 00root root 0000000 0000000 d3-time-format-2.3.0/src/defaultLocale.js 0000664 0000000 0000000 00000001546 13720467670 0020157 0 ustar 00root root 0000000 0000000 import formatLocale from "./locale.js";
var locale;
export var timeFormat;
export var timeParse;
export var utcFormat;
export var utcParse;
defaultLocale({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
periods: ["AM", "PM"],
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
export default function defaultLocale(definition) {
locale = formatLocale(definition);
timeFormat = locale.format;
timeParse = locale.parse;
utcFormat = locale.utcFormat;
utcParse = locale.utcParse;
return locale;
}
d3-time-format-2.3.0/src/index.js 0000664 0000000 0000000 00000000424 13720467670 0016514 0 ustar 00root root 0000000 0000000 export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from "./defaultLocale.js";
export {default as timeFormatLocale} from "./locale.js";
export {default as isoFormat} from "./isoFormat.js";
export {default as isoParse} from "./isoParse.js";
d3-time-format-2.3.0/src/isoFormat.js 0000664 0000000 0000000 00000000437 13720467670 0017354 0 ustar 00root root 0000000 0000000 import {utcFormat} from "./defaultLocale.js";
export var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
function formatIsoNative(date) {
return date.toISOString();
}
var formatIso = Date.prototype.toISOString
? formatIsoNative
: utcFormat(isoSpecifier);
export default formatIso;
d3-time-format-2.3.0/src/isoParse.js 0000664 0000000 0000000 00000000505 13720467670 0017172 0 ustar 00root root 0000000 0000000 import {isoSpecifier} from "./isoFormat.js";
import {utcParse} from "./defaultLocale.js";
function parseIsoNative(string) {
var date = new Date(string);
return isNaN(date) ? null : date;
}
var parseIso = +new Date("2000-01-01T00:00:00.000Z")
? parseIsoNative
: utcParse(isoSpecifier);
export default parseIso;
d3-time-format-2.3.0/src/locale.js 0000664 0000000 0000000 00000044245 13720467670 0016655 0 ustar 00root root 0000000 0000000 import {
timeDay,
timeSunday,
timeMonday,
timeThursday,
timeYear,
utcDay,
utcSunday,
utcMonday,
utcThursday,
utcYear
} from "d3-time";
function localDate(d) {
if (0 <= d.y && d.y < 100) {
var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
date.setFullYear(d.y);
return date;
}
return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
}
function utcDate(d) {
if (0 <= d.y && d.y < 100) {
var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
date.setUTCFullYear(d.y);
return date;
}
return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
}
function newDate(y, m, d) {
return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};
}
export default function formatLocale(locale) {
var locale_dateTime = locale.dateTime,
locale_date = locale.date,
locale_time = locale.time,
locale_periods = locale.periods,
locale_weekdays = locale.days,
locale_shortWeekdays = locale.shortDays,
locale_months = locale.months,
locale_shortMonths = locale.shortMonths;
var periodRe = formatRe(locale_periods),
periodLookup = formatLookup(locale_periods),
weekdayRe = formatRe(locale_weekdays),
weekdayLookup = formatLookup(locale_weekdays),
shortWeekdayRe = formatRe(locale_shortWeekdays),
shortWeekdayLookup = formatLookup(locale_shortWeekdays),
monthRe = formatRe(locale_months),
monthLookup = formatLookup(locale_months),
shortMonthRe = formatRe(locale_shortMonths),
shortMonthLookup = formatLookup(locale_shortMonths);
var formats = {
"a": formatShortWeekday,
"A": formatWeekday,
"b": formatShortMonth,
"B": formatMonth,
"c": null,
"d": formatDayOfMonth,
"e": formatDayOfMonth,
"f": formatMicroseconds,
"g": formatYearISO,
"G": formatFullYearISO,
"H": formatHour24,
"I": formatHour12,
"j": formatDayOfYear,
"L": formatMilliseconds,
"m": formatMonthNumber,
"M": formatMinutes,
"p": formatPeriod,
"q": formatQuarter,
"Q": formatUnixTimestamp,
"s": formatUnixTimestampSeconds,
"S": formatSeconds,
"u": formatWeekdayNumberMonday,
"U": formatWeekNumberSunday,
"V": formatWeekNumberISO,
"w": formatWeekdayNumberSunday,
"W": formatWeekNumberMonday,
"x": null,
"X": null,
"y": formatYear,
"Y": formatFullYear,
"Z": formatZone,
"%": formatLiteralPercent
};
var utcFormats = {
"a": formatUTCShortWeekday,
"A": formatUTCWeekday,
"b": formatUTCShortMonth,
"B": formatUTCMonth,
"c": null,
"d": formatUTCDayOfMonth,
"e": formatUTCDayOfMonth,
"f": formatUTCMicroseconds,
"g": formatUTCYearISO,
"G": formatUTCFullYearISO,
"H": formatUTCHour24,
"I": formatUTCHour12,
"j": formatUTCDayOfYear,
"L": formatUTCMilliseconds,
"m": formatUTCMonthNumber,
"M": formatUTCMinutes,
"p": formatUTCPeriod,
"q": formatUTCQuarter,
"Q": formatUnixTimestamp,
"s": formatUnixTimestampSeconds,
"S": formatUTCSeconds,
"u": formatUTCWeekdayNumberMonday,
"U": formatUTCWeekNumberSunday,
"V": formatUTCWeekNumberISO,
"w": formatUTCWeekdayNumberSunday,
"W": formatUTCWeekNumberMonday,
"x": null,
"X": null,
"y": formatUTCYear,
"Y": formatUTCFullYear,
"Z": formatUTCZone,
"%": formatLiteralPercent
};
var parses = {
"a": parseShortWeekday,
"A": parseWeekday,
"b": parseShortMonth,
"B": parseMonth,
"c": parseLocaleDateTime,
"d": parseDayOfMonth,
"e": parseDayOfMonth,
"f": parseMicroseconds,
"g": parseYear,
"G": parseFullYear,
"H": parseHour24,
"I": parseHour24,
"j": parseDayOfYear,
"L": parseMilliseconds,
"m": parseMonthNumber,
"M": parseMinutes,
"p": parsePeriod,
"q": parseQuarter,
"Q": parseUnixTimestamp,
"s": parseUnixTimestampSeconds,
"S": parseSeconds,
"u": parseWeekdayNumberMonday,
"U": parseWeekNumberSunday,
"V": parseWeekNumberISO,
"w": parseWeekdayNumberSunday,
"W": parseWeekNumberMonday,
"x": parseLocaleDate,
"X": parseLocaleTime,
"y": parseYear,
"Y": parseFullYear,
"Z": parseZone,
"%": parseLiteralPercent
};
// These recursive directive definitions must be deferred.
formats.x = newFormat(locale_date, formats);
formats.X = newFormat(locale_time, formats);
formats.c = newFormat(locale_dateTime, formats);
utcFormats.x = newFormat(locale_date, utcFormats);
utcFormats.X = newFormat(locale_time, utcFormats);
utcFormats.c = newFormat(locale_dateTime, utcFormats);
function newFormat(specifier, formats) {
return function(date) {
var string = [],
i = -1,
j = 0,
n = specifier.length,
c,
pad,
format;
if (!(date instanceof Date)) date = new Date(+date);
while (++i < n) {
if (specifier.charCodeAt(i) === 37) {
string.push(specifier.slice(j, i));
if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
else pad = c === "e" ? " " : "0";
if (format = formats[c]) c = format(date, pad);
string.push(c);
j = i + 1;
}
}
string.push(specifier.slice(j, i));
return string.join("");
};
}
function newParse(specifier, Z) {
return function(string) {
var d = newDate(1900, undefined, 1),
i = parseSpecifier(d, specifier, string += "", 0),
week, day;
if (i != string.length) return null;
// If a UNIX timestamp is specified, return it.
if ("Q" in d) return new Date(d.Q);
if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0));
// If this is utcParse, never use the local timezone.
if (Z && !("Z" in d)) d.Z = 0;
// The am-pm flag is 0 for AM, and 1 for PM.
if ("p" in d) d.H = d.H % 12 + d.p * 12;
// If the month was not specified, inherit from the quarter.
if (d.m === undefined) d.m = "q" in d ? d.q : 0;
// Convert day-of-week and week-of-year to day-of-year.
if ("V" in d) {
if (d.V < 1 || d.V > 53) return null;
if (!("w" in d)) d.w = 1;
if ("Z" in d) {
week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
week = utcDay.offset(week, (d.V - 1) * 7);
d.y = week.getUTCFullYear();
d.m = week.getUTCMonth();
d.d = week.getUTCDate() + (d.w + 6) % 7;
} else {
week = localDate(newDate(d.y, 0, 1)), day = week.getDay();
week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);
week = timeDay.offset(week, (d.V - 1) * 7);
d.y = week.getFullYear();
d.m = week.getMonth();
d.d = week.getDate() + (d.w + 6) % 7;
}
} else if ("W" in d || "U" in d) {
if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
d.m = 0;
d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
}
// If a time zone is specified, all fields are interpreted as UTC and then
// offset according to the specified time zone.
if ("Z" in d) {
d.H += d.Z / 100 | 0;
d.M += d.Z % 100;
return utcDate(d);
}
// Otherwise, all fields are in local time.
return localDate(d);
};
}
function parseSpecifier(d, specifier, string, j) {
var i = 0,
n = specifier.length,
m = string.length,
c,
parse;
while (i < n) {
if (j >= m) return -1;
c = specifier.charCodeAt(i++);
if (c === 37) {
c = specifier.charAt(i++);
parse = parses[c in pads ? specifier.charAt(i++) : c];
if (!parse || ((j = parse(d, string, j)) < 0)) return -1;
} else if (c != string.charCodeAt(j++)) {
return -1;
}
}
return j;
}
function parsePeriod(d, string, i) {
var n = periodRe.exec(string.slice(i));
return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseShortWeekday(d, string, i) {
var n = shortWeekdayRe.exec(string.slice(i));
return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseWeekday(d, string, i) {
var n = weekdayRe.exec(string.slice(i));
return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseShortMonth(d, string, i) {
var n = shortMonthRe.exec(string.slice(i));
return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseMonth(d, string, i) {
var n = monthRe.exec(string.slice(i));
return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
}
function parseLocaleDateTime(d, string, i) {
return parseSpecifier(d, locale_dateTime, string, i);
}
function parseLocaleDate(d, string, i) {
return parseSpecifier(d, locale_date, string, i);
}
function parseLocaleTime(d, string, i) {
return parseSpecifier(d, locale_time, string, i);
}
function formatShortWeekday(d) {
return locale_shortWeekdays[d.getDay()];
}
function formatWeekday(d) {
return locale_weekdays[d.getDay()];
}
function formatShortMonth(d) {
return locale_shortMonths[d.getMonth()];
}
function formatMonth(d) {
return locale_months[d.getMonth()];
}
function formatPeriod(d) {
return locale_periods[+(d.getHours() >= 12)];
}
function formatQuarter(d) {
return 1 + ~~(d.getMonth() / 3);
}
function formatUTCShortWeekday(d) {
return locale_shortWeekdays[d.getUTCDay()];
}
function formatUTCWeekday(d) {
return locale_weekdays[d.getUTCDay()];
}
function formatUTCShortMonth(d) {
return locale_shortMonths[d.getUTCMonth()];
}
function formatUTCMonth(d) {
return locale_months[d.getUTCMonth()];
}
function formatUTCPeriod(d) {
return locale_periods[+(d.getUTCHours() >= 12)];
}
function formatUTCQuarter(d) {
return 1 + ~~(d.getUTCMonth() / 3);
}
return {
format: function(specifier) {
var f = newFormat(specifier += "", formats);
f.toString = function() { return specifier; };
return f;
},
parse: function(specifier) {
var p = newParse(specifier += "", false);
p.toString = function() { return specifier; };
return p;
},
utcFormat: function(specifier) {
var f = newFormat(specifier += "", utcFormats);
f.toString = function() { return specifier; };
return f;
},
utcParse: function(specifier) {
var p = newParse(specifier += "", true);
p.toString = function() { return specifier; };
return p;
}
};
}
var pads = {"-": "", "_": " ", "0": "0"},
numberRe = /^\s*\d+/, // note: ignores next directive
percentRe = /^%/,
requoteRe = /[\\^$*+?|[\]().{}]/g;
function pad(value, fill, width) {
var sign = value < 0 ? "-" : "",
string = (sign ? -value : value) + "",
length = string.length;
return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
}
function requote(s) {
return s.replace(requoteRe, "\\$&");
}
function formatRe(names) {
return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
}
function formatLookup(names) {
var map = {}, i = -1, n = names.length;
while (++i < n) map[names[i].toLowerCase()] = i;
return map;
}
function parseWeekdayNumberSunday(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 1));
return n ? (d.w = +n[0], i + n[0].length) : -1;
}
function parseWeekdayNumberMonday(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 1));
return n ? (d.u = +n[0], i + n[0].length) : -1;
}
function parseWeekNumberSunday(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.U = +n[0], i + n[0].length) : -1;
}
function parseWeekNumberISO(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.V = +n[0], i + n[0].length) : -1;
}
function parseWeekNumberMonday(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.W = +n[0], i + n[0].length) : -1;
}
function parseFullYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 4));
return n ? (d.y = +n[0], i + n[0].length) : -1;
}
function parseYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;
}
function parseZone(d, string, i) {
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
}
function parseQuarter(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 1));
return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
}
function parseMonthNumber(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
}
function parseDayOfMonth(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.d = +n[0], i + n[0].length) : -1;
}
function parseDayOfYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 3));
return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
}
function parseHour24(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.H = +n[0], i + n[0].length) : -1;
}
function parseMinutes(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.M = +n[0], i + n[0].length) : -1;
}
function parseSeconds(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.S = +n[0], i + n[0].length) : -1;
}
function parseMilliseconds(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 3));
return n ? (d.L = +n[0], i + n[0].length) : -1;
}
function parseMicroseconds(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 6));
return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;
}
function parseLiteralPercent(d, string, i) {
var n = percentRe.exec(string.slice(i, i + 1));
return n ? i + n[0].length : -1;
}
function parseUnixTimestamp(d, string, i) {
var n = numberRe.exec(string.slice(i));
return n ? (d.Q = +n[0], i + n[0].length) : -1;
}
function parseUnixTimestampSeconds(d, string, i) {
var n = numberRe.exec(string.slice(i));
return n ? (d.s = +n[0], i + n[0].length) : -1;
}
function formatDayOfMonth(d, p) {
return pad(d.getDate(), p, 2);
}
function formatHour24(d, p) {
return pad(d.getHours(), p, 2);
}
function formatHour12(d, p) {
return pad(d.getHours() % 12 || 12, p, 2);
}
function formatDayOfYear(d, p) {
return pad(1 + timeDay.count(timeYear(d), d), p, 3);
}
function formatMilliseconds(d, p) {
return pad(d.getMilliseconds(), p, 3);
}
function formatMicroseconds(d, p) {
return formatMilliseconds(d, p) + "000";
}
function formatMonthNumber(d, p) {
return pad(d.getMonth() + 1, p, 2);
}
function formatMinutes(d, p) {
return pad(d.getMinutes(), p, 2);
}
function formatSeconds(d, p) {
return pad(d.getSeconds(), p, 2);
}
function formatWeekdayNumberMonday(d) {
var day = d.getDay();
return day === 0 ? 7 : day;
}
function formatWeekNumberSunday(d, p) {
return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);
}
function dISO(d) {
var day = d.getDay();
return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);
}
function formatWeekNumberISO(d, p) {
d = dISO(d);
return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);
}
function formatWeekdayNumberSunday(d) {
return d.getDay();
}
function formatWeekNumberMonday(d, p) {
return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);
}
function formatYear(d, p) {
return pad(d.getFullYear() % 100, p, 2);
}
function formatYearISO(d, p) {
d = dISO(d);
return pad(d.getFullYear() % 100, p, 2);
}
function formatFullYear(d, p) {
return pad(d.getFullYear() % 10000, p, 4);
}
function formatFullYearISO(d, p) {
var day = d.getDay();
d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);
return pad(d.getFullYear() % 10000, p, 4);
}
function formatZone(d) {
var z = d.getTimezoneOffset();
return (z > 0 ? "-" : (z *= -1, "+"))
+ pad(z / 60 | 0, "0", 2)
+ pad(z % 60, "0", 2);
}
function formatUTCDayOfMonth(d, p) {
return pad(d.getUTCDate(), p, 2);
}
function formatUTCHour24(d, p) {
return pad(d.getUTCHours(), p, 2);
}
function formatUTCHour12(d, p) {
return pad(d.getUTCHours() % 12 || 12, p, 2);
}
function formatUTCDayOfYear(d, p) {
return pad(1 + utcDay.count(utcYear(d), d), p, 3);
}
function formatUTCMilliseconds(d, p) {
return pad(d.getUTCMilliseconds(), p, 3);
}
function formatUTCMicroseconds(d, p) {
return formatUTCMilliseconds(d, p) + "000";
}
function formatUTCMonthNumber(d, p) {
return pad(d.getUTCMonth() + 1, p, 2);
}
function formatUTCMinutes(d, p) {
return pad(d.getUTCMinutes(), p, 2);
}
function formatUTCSeconds(d, p) {
return pad(d.getUTCSeconds(), p, 2);
}
function formatUTCWeekdayNumberMonday(d) {
var dow = d.getUTCDay();
return dow === 0 ? 7 : dow;
}
function formatUTCWeekNumberSunday(d, p) {
return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);
}
function UTCdISO(d) {
var day = d.getUTCDay();
return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);
}
function formatUTCWeekNumberISO(d, p) {
d = UTCdISO(d);
return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
}
function formatUTCWeekdayNumberSunday(d) {
return d.getUTCDay();
}
function formatUTCWeekNumberMonday(d, p) {
return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);
}
function formatUTCYear(d, p) {
return pad(d.getUTCFullYear() % 100, p, 2);
}
function formatUTCYearISO(d, p) {
d = UTCdISO(d);
return pad(d.getUTCFullYear() % 100, p, 2);
}
function formatUTCFullYear(d, p) {
return pad(d.getUTCFullYear() % 10000, p, 4);
}
function formatUTCFullYearISO(d, p) {
var day = d.getUTCDay();
d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);
return pad(d.getUTCFullYear() % 10000, p, 4);
}
function formatUTCZone() {
return "+0000";
}
function formatLiteralPercent() {
return "%";
}
function formatUnixTimestamp(d) {
return +d;
}
function formatUnixTimestampSeconds(d) {
return Math.floor(+d / 1000);
}
d3-time-format-2.3.0/test/ 0000775 0000000 0000000 00000000000 13720467670 0015237 5 ustar 00root root 0000000 0000000 d3-time-format-2.3.0/test/date.js 0000664 0000000 0000000 00000002200 13720467670 0016504 0 ustar 00root root 0000000 0000000 exports.local = function(year, month, day, hours, minutes, seconds, milliseconds) {
if (year == null) year = 0;
if (month == null) month = 0;
if (day == null) day = 1;
if (hours == null) hours = 0;
if (minutes == null) minutes = 0;
if (seconds == null) seconds = 0;
if (milliseconds == null) milliseconds = 0;
if (0 <= year && year < 100) {
var date = new Date(-1, month, day, hours, minutes, seconds, milliseconds);
date.setFullYear(year);
return date;
}
return new Date(year, month, day, hours, minutes, seconds, milliseconds);
};
exports.utc = function(year, month, day, hours, minutes, seconds, milliseconds) {
if (year == null) year = 0;
if (month == null) month = 0;
if (day == null) day = 1;
if (hours == null) hours = 0;
if (minutes == null) minutes = 0;
if (seconds == null) seconds = 0;
if (milliseconds == null) milliseconds = 0;
if (0 <= year && year < 100) {
var date = new Date(Date.UTC(-1, month, day, hours, minutes, seconds, milliseconds));
date.setUTCFullYear(year);
return date;
}
return new Date(Date.UTC(year, month, day, hours, minutes, seconds, milliseconds));
};
d3-time-format-2.3.0/test/defaultLocale-test.js 0000664 0000000 0000000 00000005071 13720467670 0021321 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
d3 = require("../"),
enUs = require("../locale/en-US"),
frFr = require("../locale/fr-FR");
tape("d3.timeFormat(specifier) defaults to en-US", function(test) {
test.equal(d3.timeFormat("%c")(new Date(2000, 0, 1)), "1/1/2000, 12:00:00 AM");
test.end();
});
tape("d3.timeParse(specifier) defaults to en-US", function(test) {
test.equal(+d3.timeParse("%c")("1/1/2000, 12:00:00 AM"), +new Date(2000, 0, 1));
test.end();
});
tape("d3.utcFormat(specifier) defaults to en-US", function(test) {
test.equal(d3.utcFormat("%c")(new Date(Date.UTC(2000, 0, 1))), "1/1/2000, 12:00:00 AM");
test.end();
});
tape("d3.utcParse(specifier) defaults to en-US", function(test) {
test.equal(+d3.utcParse("%c")("1/1/2000, 12:00:00 AM"), +new Date(Date.UTC(2000, 0, 1)));
test.end();
});
tape("d3.timeFormatDefaultLocale(definition) returns the new default locale", function(test) {
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(locale.format("%c")(new Date(2000, 0, 1)), "samedi 1 janvier 2000 à 00:00:00");
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
}
});
tape("d3.timeFormatDefaultLocale(definition) affects d3.timeFormat", function(test) {
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(d3.timeFormat, locale.format);
test.equal(d3.timeFormat("%c")(new Date(2000, 0, 1)), "samedi 1 janvier 2000 à 00:00:00");
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
}
});
tape("d3.timeFormatDefaultLocale(definition) affects d3.timeParse", function(test) {
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(d3.timeParse, locale.parse);
test.equal(+d3.timeParse("%c")("samedi 1 janvier 2000 à 00:00:00"), +new Date(2000, 0, 1));
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
}
});
tape("d3.timeFormatDefaultLocale(definition) affects d3.utcFormat", function(test) {
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(d3.utcFormat, locale.utcFormat);
test.equal(d3.utcFormat("%c")(new Date(Date.UTC(2000, 0, 1))), "samedi 1 janvier 2000 à 00:00:00");
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
}
});
tape("d3.timeFormatDefaultLocale(definition) affects d3.utcParse", function(test) {
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(d3.utcParse, locale.utcParse);
test.equal(+d3.utcParse("%c")("samedi 1 janvier 2000 à 00:00:00"), +new Date(Date.UTC(2000, 0, 1)));
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
}
});
d3-time-format-2.3.0/test/format-test.js 0000664 0000000 0000000 00000031153 13720467670 0020045 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
time = require("d3-time"),
timeFormat = require("../"),
date = require("./date");
var formatMillisecond = timeFormat.timeFormat(".%L"),
formatSecond = timeFormat.timeFormat(":%S"),
formatMinute = timeFormat.timeFormat("%I:%M"),
formatHour = timeFormat.timeFormat("%I %p"),
formatDay = timeFormat.timeFormat("%a %d"),
formatWeek = timeFormat.timeFormat("%b %d"),
formatMonth = timeFormat.timeFormat("%B"),
formatYear = timeFormat.timeFormat("%Y");
function multi(d) {
return (time.timeSecond(d) < d ? formatMillisecond
: time.timeMinute(d) < d ? formatSecond
: time.timeHour(d) < d ? formatMinute
: time.timeDay(d) < d ? formatHour
: time.timeMonth(d) < d ? (time.timeWeek(d) < d ? formatDay : formatWeek)
: time.timeYear(d) < d ? formatMonth
: formatYear)(d);
}
tape("timeFormat(date) coerces the specified date to a Date", function(test) {
var f = timeFormat.timeFormat("%c");
test.equal(f(+date.local(1990, 0, 1)), "1/1/1990, 12:00:00 AM");
test.equal(f(+date.local(1990, 0, 2)), "1/2/1990, 12:00:00 AM");
test.equal(f(+date.local(1990, 0, 3)), "1/3/1990, 12:00:00 AM");
test.equal(f(+date.local(1990, 0, 4)), "1/4/1990, 12:00:00 AM");
test.equal(f(+date.local(1990, 0, 5)), "1/5/1990, 12:00:00 AM");
test.equal(f(+date.local(1990, 0, 6)), "1/6/1990, 12:00:00 AM");
test.equal(f(+date.local(1990, 0, 7)), "1/7/1990, 12:00:00 AM");
test.end();
});
tape("timeFormat(\"%a\")(date) formats abbreviated weekdays", function(test) {
var f = timeFormat.timeFormat("%a");
test.equal(f(date.local(1990, 0, 1)), "Mon");
test.equal(f(date.local(1990, 0, 2)), "Tue");
test.equal(f(date.local(1990, 0, 3)), "Wed");
test.equal(f(date.local(1990, 0, 4)), "Thu");
test.equal(f(date.local(1990, 0, 5)), "Fri");
test.equal(f(date.local(1990, 0, 6)), "Sat");
test.equal(f(date.local(1990, 0, 7)), "Sun");
test.end();
});
tape("timeFormat(\"%A\")(date) formats weekdays", function(test) {
var f = timeFormat.timeFormat("%A");
test.equal(f(date.local(1990, 0, 1)), "Monday");
test.equal(f(date.local(1990, 0, 2)), "Tuesday");
test.equal(f(date.local(1990, 0, 3)), "Wednesday");
test.equal(f(date.local(1990, 0, 4)), "Thursday");
test.equal(f(date.local(1990, 0, 5)), "Friday");
test.equal(f(date.local(1990, 0, 6)), "Saturday");
test.equal(f(date.local(1990, 0, 7)), "Sunday");
test.end();
});
tape("timeFormat(\"%b\")(date) formats abbreviated months", function(test) {
var f = timeFormat.timeFormat("%b");
test.equal(f(date.local(1990, 0, 1)), "Jan");
test.equal(f(date.local(1990, 1, 1)), "Feb");
test.equal(f(date.local(1990, 2, 1)), "Mar");
test.equal(f(date.local(1990, 3, 1)), "Apr");
test.equal(f(date.local(1990, 4, 1)), "May");
test.equal(f(date.local(1990, 5, 1)), "Jun");
test.equal(f(date.local(1990, 6, 1)), "Jul");
test.equal(f(date.local(1990, 7, 1)), "Aug");
test.equal(f(date.local(1990, 8, 1)), "Sep");
test.equal(f(date.local(1990, 9, 1)), "Oct");
test.equal(f(date.local(1990, 10, 1)), "Nov");
test.equal(f(date.local(1990, 11, 1)), "Dec");
test.end();
});
tape("timeFormat(\"%B\")(date) formats months", function(test) {
var f = timeFormat.timeFormat("%B");
test.equal(f(date.local(1990, 0, 1)), "January");
test.equal(f(date.local(1990, 1, 1)), "February");
test.equal(f(date.local(1990, 2, 1)), "March");
test.equal(f(date.local(1990, 3, 1)), "April");
test.equal(f(date.local(1990, 4, 1)), "May");
test.equal(f(date.local(1990, 5, 1)), "June");
test.equal(f(date.local(1990, 6, 1)), "July");
test.equal(f(date.local(1990, 7, 1)), "August");
test.equal(f(date.local(1990, 8, 1)), "September");
test.equal(f(date.local(1990, 9, 1)), "October");
test.equal(f(date.local(1990, 10, 1)), "November");
test.equal(f(date.local(1990, 11, 1)), "December");
test.end();
});
tape("timeFormat(\"%c\")(date) formats localized dates and times", function(test) {
var f = timeFormat.timeFormat("%c");
test.equal(f(date.local(1990, 0, 1)), "1/1/1990, 12:00:00 AM");
test.end();
});
tape("timeFormat(\"%d\")(date) formats zero-padded dates", function(test) {
var f = timeFormat.timeFormat("%d");
test.equal(f(date.local(1990, 0, 1)), "01");
test.end();
});
tape("timeFormat(\"%e\")(date) formats space-padded dates", function(test) {
var f = timeFormat.timeFormat("%e");
test.equal(f(date.local(1990, 0, 1)), " 1");
test.end();
});
tape("timeFormat(\"%g\")(date) formats zero-padded two-digit ISO 8601 years", function (test) {
var f = timeFormat.timeFormat("%g");
test.equal(f(date.local(2018, 11, 30, 0)), "18"); // Sunday
test.equal(f(date.local(2018, 11, 31, 0)), "19"); // Monday
test.equal(f(date.local(2019, 0, 1, 0)), "19");
test.end();
});
tape("timeFormat(\"%G\")(date) formats zero-padded four-digit ISO 8601 years", function (test) {
var f = timeFormat.timeFormat("%G");
test.equal(f(date.local(2018, 11, 30, 0)), "2018"); // Sunday
test.equal(f(date.local(2018, 11, 31, 0)), "2019"); // Monday
test.equal(f(date.local(2019, 0, 1, 0)), "2019");
test.end();
});
tape("timeFormat(\"%H\")(date) formats zero-padded hours (24)", function(test) {
var f = timeFormat.timeFormat("%H");
test.equal(f(date.local(1990, 0, 1, 0)), "00");
test.equal(f(date.local(1990, 0, 1, 13)), "13");
test.end();
});
tape("timeFormat(\"%I\")(date) formats zero-padded hours (12)", function(test) {
var f = timeFormat.timeFormat("%I");
test.equal(f(date.local(1990, 0, 1, 0)), "12");
test.equal(f(date.local(1990, 0, 1, 13)), "01");
test.end();
});
tape("timeFormat(\"%j\")(date) formats zero-padded day of year numbers", function(test) {
var f = timeFormat.timeFormat("%j");
test.equal(f(date.local(1990, 0, 1)), "001");
test.equal(f(date.local(1990, 5, 1)), "152");
test.equal(f(date.local(2010, 2, 13)), "072");
test.equal(f(date.local(2010, 2, 14)), "073"); // DST begins
test.equal(f(date.local(2010, 2, 15)), "074");
test.equal(f(date.local(2010, 10, 6)), "310");
test.equal(f(date.local(2010, 10, 7)), "311"); // DST ends
test.equal(f(date.local(2010, 10, 8)), "312");
test.end();
});
tape("timeFormat(\"%m\")(date) formats zero-padded months", function(test) {
var f = timeFormat.timeFormat("%m");
test.equal(f(date.local(1990, 0, 1)), "01");
test.equal(f(date.local(1990, 9, 1)), "10");
test.end();
});
tape("timeFormat(\"%M\")(date) formats zero-padded minutes", function(test) {
var f = timeFormat.timeFormat("%M");
test.equal(f(date.local(1990, 0, 1, 0, 0)), "00");
test.equal(f(date.local(1990, 0, 1, 0, 32)), "32");
test.end();
});
tape("timeFormat(\"%p\")(date) formats AM or PM", function(test) {
var f = timeFormat.timeFormat("%p");
test.equal(f(date.local(1990, 0, 1, 0)), "AM");
test.equal(f(date.local(1990, 0, 1, 13)), "PM");
test.end();
});
tape("timeFormat(\"%q\")(date) formats quarters", function(test) {
var f = timeFormat.timeFormat("%q");
test.equal(f(date.local(1990, 0, 1)), "1");
test.equal(f(date.local(1990, 3, 1)), "2");
test.equal(f(date.local(1990, 6, 1)), "3");
test.equal(f(date.local(1990, 9, 1)), "4");
test.end();
});
tape("timeFormat(\"%S\")(date) formats zero-padded seconds", function(test) {
var f = timeFormat.timeFormat("%S");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0)), "00");
test.equal(f(date.local(1990, 0, 1, 0, 0, 32)), "32");
var f = timeFormat.timeFormat("%0S");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0)), "00");
test.equal(f(date.local(1990, 0, 1, 0, 0, 32)), "32");
test.end();
});
tape("timeFormat(\"%_S\")(date) formats space-padded seconds", function(test) {
var f = timeFormat.timeFormat("%_S");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0)), " 0");
test.equal(f(date.local(1990, 0, 1, 0, 0, 3)), " 3");
test.equal(f(date.local(1990, 0, 1, 0, 0, 32)), "32");
test.end();
});
tape("timeFormat(\"-S\")(date) formats no-padded seconds", function(test) {
var f = timeFormat.timeFormat("%-S");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0)), "0");
test.equal(f(date.local(1990, 0, 1, 0, 0, 3)), "3");
test.equal(f(date.local(1990, 0, 1, 0, 0, 32)), "32");
test.end();
});
tape("timeFormat(\"%L\")(date) formats zero-padded milliseconds", function(test) {
var f = timeFormat.timeFormat("%L");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0, 0)), "000");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0, 432)), "432");
test.end();
});
tape("timeFormat(\"%u\")(date) formats week day numbers", function(test) {
var f = timeFormat.timeFormat("%u");
test.equal(f(date.local(1990, 0, 1, 0)), "1");
test.equal(f(date.local(1990, 0, 7, 0)), "7");
test.equal(f(date.local(2010, 2, 13, 23)), "6");
test.end();
});
tape("timeFormat(\"%f\")(date) formats zero-padded microseconds", function(test) {
var f = timeFormat.timeFormat("%f");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0, 0)), "000000");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0, 432)), "432000");
test.end();
});
tape("timeFormat(\"%U\")(date) formats zero-padded week numbers", function(test) {
var f = timeFormat.timeFormat("%U");
test.equal(f(date.local(1990, 0, 1, 0)), "00");
test.equal(f(date.local(1990, 5, 1, 0)), "21");
test.equal(f(date.local(2010, 2, 13, 23)), "10");
test.equal(f(date.local(2010, 2, 14, 0)), "11"); // DST begins
test.equal(f(date.local(2010, 2, 15, 0)), "11");
test.equal(f(date.local(2010, 10, 6, 23)), "44");
test.equal(f(date.local(2010, 10, 7, 0)), "45"); // DST ends
test.equal(f(date.local(2010, 10, 8, 0)), "45");
test.equal(f(date.local(2012, 0, 1, 0)), "01"); // Sunday!
test.end();
});
tape("timeFormat(\"%W\")(date) formats zero-padded week numbers", function(test) {
var f = timeFormat.timeFormat("%W");
test.equal(f(date.local(1990, 0, 1, 0)), "01"); // Monday!
test.equal(f(date.local(1990, 5, 1, 0)), "22");
test.equal(f(date.local(2010, 2, 15, 0)), "11");
test.equal(f(date.local(2010, 10, 8, 0)), "45");
test.end();
});
tape("timeFormat(\"%V\")(date) formats zero-padded ISO 8601 week numbers", function(test) {
var f = timeFormat.timeFormat("%V");
test.equal(f(date.local(1990, 0, 1, 0)), "01");
test.equal(f(date.local(1990, 5, 1, 0)), "22");
test.equal(f(date.local(2010, 2, 13, 23)), "10");
test.equal(f(date.local(2010, 2, 14, 0)), "10"); // DST begins
test.equal(f(date.local(2010, 2, 15, 0)), "11");
test.equal(f(date.local(2010, 10, 6, 23)), "44");
test.equal(f(date.local(2010, 10, 7, 0)), "44"); // DST ends
test.equal(f(date.local(2010, 10, 8, 0)), "45");
test.equal(f(date.local(2015, 11, 31, 0)), "53");
test.equal(f(date.local(2016, 0, 1, 0)), "53");
test.end();
});
tape("timeFormat(\"%x\")(date) formats localized dates", function(test) {
var f = timeFormat.timeFormat("%x");
test.equal(f(date.local(1990, 0, 1)), "1/1/1990");
test.equal(f(date.local(2010, 5, 1)), "6/1/2010");
test.end();
});
tape("timeFormat(\"%X\")(date) formats localized times", function(test) {
var f = timeFormat.timeFormat("%X");
test.equal(f(date.local(1990, 0, 1, 0, 0, 0)), "12:00:00 AM");
test.equal(f(date.local(1990, 0, 1, 13, 34, 59)), "1:34:59 PM");
test.end();
});
tape("timeFormat(\"%y\")(date) formats zero-padded two-digit years", function(test) {
var f = timeFormat.timeFormat("%y");
test.equal(f(date.local(+1990, 0, 1)), "90");
test.equal(f(date.local(+2002, 0, 1)), "02");
test.equal(f(date.local(-0002, 0, 1)), "-02");
test.end();
});
tape("timeFormat(\"%Y\")(date) formats zero-padded four-digit years", function(test) {
var f = timeFormat.timeFormat("%Y");
test.equal(f(date.local( 123, 0, 1)), "0123");
test.equal(f(date.local( 1990, 0, 1)), "1990");
test.equal(f(date.local( 2002, 0, 1)), "2002");
test.equal(f(date.local(10002, 0, 1)), "0002");
test.equal(f(date.local( -2, 0, 1)), "-0002");
test.end();
});
tape("timeFormat(\"%Z\")(date) formats time zones", function(test) {
var f = timeFormat.timeFormat("%Z");
test.equal(f(date.local(1990, 0, 1)), "-0800");
test.end();
});
tape("timeFormat(\"%%\")(date) formats literal percent signs", function(test) {
var f = timeFormat.timeFormat("%%");
test.equal(f(date.local(1990, 0, 1)), "%");
test.end();
});
tape("timeFormat(…) can be used to create a conditional multi-format", function(test) {
test.equal(multi(date.local(1990, 0, 1, 0, 0, 0, 12)), ".012");
test.equal(multi(date.local(1990, 0, 1, 0, 0, 1, 0)), ":01");
test.equal(multi(date.local(1990, 0, 1, 0, 1, 0, 0)), "12:01");
test.equal(multi(date.local(1990, 0, 1, 1, 0, 0, 0)), "01 AM");
test.equal(multi(date.local(1990, 0, 2, 0, 0, 0, 0)), "Tue 02");
test.equal(multi(date.local(1990, 1, 1, 0, 0, 0, 0)), "February");
test.equal(multi(date.local(1990, 0, 1, 0, 0, 0, 0)), "1990");
test.end();
});
d3-time-format-2.3.0/test/isoFormat-test.js 0000664 0000000 0000000 00000000571 13720467670 0020520 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
timeFormat = require("../"),
date = require("./date");
tape("isoFormat(date) returns an ISO 8601 UTC string", function(test) {
test.equal(timeFormat.isoFormat(date.utc(1990, 0, 1, 0, 0, 0)), "1990-01-01T00:00:00.000Z");
test.equal(timeFormat.isoFormat(date.utc(2011, 11, 31, 23, 59, 59)), "2011-12-31T23:59:59.000Z");
test.end();
});
d3-time-format-2.3.0/test/isoParse-test.js 0000664 0000000 0000000 00000000652 13720467670 0020342 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
timeFormat = require("../"),
date = require("./date");
tape("isoParse as ISO 8601", function(test) {
test.deepEqual(timeFormat.isoParse("1990-01-01T00:00:00.000Z"), date.utc(1990, 0, 1, 0, 0, 0));
test.deepEqual(timeFormat.isoParse("2011-12-31T23:59:59.000Z"), date.utc(2011, 11, 31, 23, 59, 59));
test.equal(timeFormat.isoParse("1990-01-01T00:00:00.000X"), null);
test.end();
});
d3-time-format-2.3.0/test/locale-test.js 0000664 0000000 0000000 00000001646 13720467670 0020020 0 ustar 00root root 0000000 0000000 var fs = require("fs"),
path = require("path"),
tape = require("tape"),
queue = require("d3-queue"),
d3 = require("../");
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.deepEqual(Object.keys(locale).sort(), ["date", "dateTime", "days", "months", "periods", "shortDays", "shortMonths", "time"]);
locale = d3.timeFormatLocale(locale);
callback(null);
});
}
});
d3-time-format-2.3.0/test/parse-test.js 0000664 0000000 0000000 00000035015 13720467670 0017670 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
timeFormat = require("../"),
date = require("./date"),
FiFi = require("../locale/fi-FI");
tape("parse(string) coerces the specified string to a string", function(test) {
var p = timeFormat.timeParse("%c");
test.deepEqual(p({toString: function() { return "1/1/1990, 12:00:00 AM"; }}), date.local(1990, 0, 1));
test.deepEqual(p({toString: function() { return "1/2/1990, 12:00:00 AM"; }}), date.local(1990, 0, 2));
test.deepEqual(p({toString: function() { return "1/3/1990, 12:00:00 AM"; }}), date.local(1990, 0, 3));
test.deepEqual(p({toString: function() { return "1/4/1990, 12:00:00 AM"; }}), date.local(1990, 0, 4));
test.deepEqual(p({toString: function() { return "1/5/1990, 12:00:00 AM"; }}), date.local(1990, 0, 5));
test.deepEqual(p({toString: function() { return "1/6/1990, 12:00:00 AM"; }}), date.local(1990, 0, 6));
test.deepEqual(p({toString: function() { return "1/7/1990, 12:00:00 AM"; }}), date.local(1990, 0, 7));
test.end();
});
tape("timeParse(specifier) coerces the specified specifier to a string", function(test) {
var p = timeFormat.timeParse({toString: function() { return "%c"; }});
test.deepEqual(p("1/1/1990, 12:00:00 AM"), date.local(1990, 0, 1));
test.end();
});
tape("timeParse(\"%a %m/%d/%Y\")(date) parses abbreviated weekday and date", function(test) {
var p = timeFormat.timeParse("%a %m/%d/%Y");
test.deepEqual(p("Sun 01/01/1990"), date.local(1990, 0, 1));
test.deepEqual(p("Wed 02/03/1991"), date.local(1991, 1, 3));
test.equal(p("XXX 03/10/2010"), null);
test.end();
});
tape("timeParse(\"%A %m/%d/%Y\")(date) parses weekday and date", function(test) {
var p = timeFormat.timeParse("%A %m/%d/%Y");
test.deepEqual(p("Sunday 01/01/1990"), date.local(1990, 0, 1));
test.deepEqual(p("Wednesday 02/03/1991"), date.local(1991, 1, 3));
test.equal(p("Caturday 03/10/2010"), null);
test.end();
});
tape("timeParse(\"%U %Y\")(date) parses week number (Sunday) and year", function(test) {
var p = timeFormat.timeParse("%U %Y");
test.deepEqual(p("00 1990"), date.local(1989, 11, 31));
test.deepEqual(p("05 1991"), date.local(1991, 1, 3));
test.deepEqual(p("01 1995"), date.local(1995, 0, 1));
test.end();
});
tape("timeParse(\"%a %U %Y\")(date) parses abbreviated weekday, week number (Sunday) and year", function(test) {
var p = timeFormat.timeParse("%a %U %Y");
test.deepEqual(p("Mon 00 1990"), date.local(1990, 0, 1));
test.deepEqual(p("Sun 05 1991"), date.local(1991, 1, 3));
test.deepEqual(p("Sun 01 1995"), date.local(1995, 0, 1));
test.equal(p("XXX 03 2010"), null);
test.end();
});
tape("timeParse(\"%A %U %Y\")(date) parses weekday, week number (Sunday) and year", function(test) {
var p = timeFormat.timeParse("%A %U %Y");
test.deepEqual(p("Monday 00 1990"), date.local(1990, 0, 1));
test.deepEqual(p("Sunday 05 1991"), date.local(1991, 1, 3));
test.deepEqual(p("Sunday 01 1995"), date.local(1995, 0, 1));
test.equal(p("Caturday 03 2010"), null);
test.end();
});
tape("timeParse(\"%w %U %Y\")(date) parses numeric weekday (Sunday), week number (Sunday) and year", function(test) {
var p = timeFormat.timeParse("%w %U %Y");
test.deepEqual(p("1 00 1990"), date.local(1990, 0, 1));
test.deepEqual(p("0 05 1991"), date.local(1991, 1, 3));
test.deepEqual(p("0 01 1995"), date.local(1995, 0, 1));
test.equal(p("X 03 2010"), null);
test.end();
});
tape("timeParse(\"%w %V %G\")(date) parses numeric weekday, week number (ISO) and corresponding year", function(test) {
var p = timeFormat.timeParse("%w %V %G");
test.deepEqual(p("1 01 1990"), date.local(1990, 0, 1));
test.deepEqual(p("0 05 1991"), date.local(1991, 1, 3));
test.deepEqual(p("4 53 1992"), date.local(1992, 11, 31));
test.deepEqual(p("0 52 1994"), date.local(1995, 0, 1));
test.deepEqual(p("0 01 1995"), date.local(1995, 0, 8));
test.deepEqual(p("1 01 2018"), date.local(2018, 0, 1));
test.deepEqual(p("1 01 2019"), date.local(2018, 11, 31));
test.end();
});
tape("timeParse(\"%w %V %g\")(date) parses numeric weekday, week number (ISO) and corresponding two-digits year", function(test) {
var p = timeFormat.timeParse("%w %V %g");
test.deepEqual(p("1 01 90"), date.local(1990, 0, 1));
test.deepEqual(p("0 05 91"), date.local(1991, 1, 3));
test.deepEqual(p("4 53 92"), date.local(1992, 11, 31));
test.deepEqual(p("0 52 94"), date.local(1995, 0, 1));
test.deepEqual(p("0 01 95"), date.local(1995, 0, 8));
test.deepEqual(p("1 01 18"), date.local(2018, 0, 1));
test.deepEqual(p("1 01 19"), date.local(2018, 11, 31));
test.end();
});
tape("timeParse(\"%V %g\")(date) parses week number (ISO) and corresponding two-digits year", function(test) {
var p = timeFormat.timeParse("%V %g");
test.deepEqual(p("01 90"), date.local(1990, 0, 1));
test.deepEqual(p("05 91"), date.local(1991, 0, 28));
test.deepEqual(p("53 92"), date.local(1992, 11, 28));
test.deepEqual(p("52 94"), date.local(1994, 11, 26));
test.deepEqual(p("01 95"), date.local(1995, 0, 2));
test.deepEqual(p("01 18"), date.local(2018, 0, 1));
test.deepEqual(p("01 19"), date.local(2018, 11, 31));
test.end();
});
tape("timeParse(\"%u %U %Y\")(date) parses numeric weekday (Monday), week number (Monday) and year", function(test) {
var p = timeFormat.timeParse("%u %W %Y");
test.deepEqual(p("1 00 1990"), date.local(1989, 11, 25));
test.deepEqual(p("1 01 1990"), date.local(1990, 0, 1));
test.deepEqual(p("1 05 1991"), date.local(1991, 1, 4));
test.deepEqual(p("7 00 1995"), date.local(1995, 0, 1));
test.deepEqual(p("1 01 1995"), date.local(1995, 0, 2));
test.equal(p("X 03 2010"), null);
test.end();
});
tape("timeParse(\"%W %Y\")(date) parses week number (Monday) and year", function(test) {
var p = timeFormat.timeParse("%W %Y");
test.deepEqual(p("01 1990"), date.local(1990, 0, 1));
test.deepEqual(p("04 1991"), date.local(1991, 0, 28));
test.deepEqual(p("00 1995"), date.local(1994, 11, 26));
test.end();
});
tape("timeParse(\"%a %W %Y\")(date) parses abbreviated weekday, week number (Monday) and year", function(test) {
var p = timeFormat.timeParse("%a %W %Y");
test.deepEqual(p("Mon 01 1990"), date.local(1990, 0, 1));
test.deepEqual(p("Sun 04 1991"), date.local(1991, 1, 3));
test.deepEqual(p("Sun 00 1995"), date.local(1995, 0, 1));
test.equal(p("XXX 03 2010"), null);
test.end();
});
tape("timeParse(\"%A %W %Y\")(date) parses weekday, week number (Monday) and year", function(test) {
var p = timeFormat.timeParse("%A %W %Y");
test.deepEqual(p("Monday 01 1990"), date.local(1990, 0, 1));
test.deepEqual(p("Sunday 04 1991"), date.local(1991, 1, 3));
test.deepEqual(p("Sunday 00 1995"), date.local(1995, 0, 1));
test.equal(p("Caturday 03 2010"), null);
test.end();
});
tape("timeParse(\"%w %W %Y\")(date) parses numeric weekday (Sunday), week number (Monday) and year", function(test) {
var p = timeFormat.timeParse("%w %W %Y");
test.deepEqual(p("1 01 1990"), date.local(1990, 0, 1));
test.deepEqual(p("0 04 1991"), date.local(1991, 1, 3));
test.deepEqual(p("0 00 1995"), date.local(1995, 0, 1));
test.equal(p("X 03 2010"), null);
test.end();
});
tape("timeParse(\"%u %W %Y\")(date) parses numeric weekday (Monday), week number (Monday) and year", function(test) {
var p = timeFormat.timeParse("%u %W %Y");
test.deepEqual(p("1 01 1990"), date.local(1990, 0, 1));
test.deepEqual(p("7 04 1991"), date.local(1991, 1, 3));
test.deepEqual(p("7 00 1995"), date.local(1995, 0, 1));
test.equal(p("X 03 2010"), null);
test.end();
});
tape("timeParse(\"%m/%d/%y\")(date) parses month, date and two-digit year", function(test) {
var p = timeFormat.timeParse("%m/%d/%y");
test.deepEqual(p("02/03/69"), date.local(1969, 1, 3));
test.deepEqual(p("01/01/90"), date.local(1990, 0, 1));
test.deepEqual(p("02/03/91"), date.local(1991, 1, 3));
test.deepEqual(p("02/03/68"), date.local(2068, 1, 3));
test.equal(p("03/10/2010"), null);
test.end();
});
tape("timeParse(\"%x\")(date) parses locale date", function(test) {
var p = timeFormat.timeParse("%x");
test.deepEqual(p("1/1/1990"), date.local(1990, 0, 1));
test.deepEqual(p("2/3/1991"), date.local(1991, 1, 3));
test.deepEqual(p("3/10/2010"), date.local(2010, 2, 10));
test.end();
});
tape("timeParse(\"%b %d, %Y\")(date) parses abbreviated month, date and year", function(test) {
var p = timeFormat.timeParse("%b %d, %Y");
test.deepEqual(p("jan 01, 1990"), date.local(1990, 0, 1));
test.deepEqual(p("feb 2, 2010"), date.local(2010, 1, 2));
test.equal(p("jan. 1, 1990"), null);
test.end();
});
tape("timeParse(\"%B %d, %Y\")(date) parses month, date and year", function(test) {
var p = timeFormat.timeParse("%B %d, %Y");
test.deepEqual(p("january 01, 1990"), date.local(1990, 0, 1));
test.deepEqual(p("February 2, 2010"), date.local(2010, 1, 2));
test.equal(p("jan 1, 1990"), null);
test.end();
});
tape("timeParse(\"%j %m/%d/%Y\")(date) parses day of year and date", function(test) {
var p = timeFormat.timeParse("%j %m/%d/%Y");
test.deepEqual(p("001 01/01/1990"), date.local(1990, 0, 1));
test.deepEqual(p("034 02/03/1991"), date.local(1991, 1, 3));
test.equal(p("2012 03/10/2010"), null);
test.end();
});
tape("timeParse(\"%c\")(date) parses locale date and time", function(test) {
var p = timeFormat.timeParse("%c");
test.deepEqual(p("1/1/1990, 12:00:00 AM"), date.local(1990, 0, 1));
test.end();
});
tape("timeParse(\"%H:%M:%S\")(date) parses twenty-four hour, minute and second", function(test) {
var p = timeFormat.timeParse("%H:%M:%S");
test.deepEqual(p("00:00:00"), date.local(1900, 0, 1, 0, 0, 0));
test.deepEqual(p("11:59:59"), date.local(1900, 0, 1, 11, 59, 59));
test.deepEqual(p("12:00:00"), date.local(1900, 0, 1, 12, 0, 0));
test.deepEqual(p("12:00:01"), date.local(1900, 0, 1, 12, 0, 1));
test.deepEqual(p("23:59:59"), date.local(1900, 0, 1, 23, 59, 59));
test.end();
});
tape("timeParse(\"%X\")(date) parses locale time", function(test) {
var p = timeFormat.timeParse("%X");
test.deepEqual(p("12:00:00 AM"), date.local(1900, 0, 1, 0, 0, 0));
test.deepEqual(p("11:59:59 AM"), date.local(1900, 0, 1, 11, 59, 59));
test.deepEqual(p("12:00:00 PM"), date.local(1900, 0, 1, 12, 0, 0));
test.deepEqual(p("12:00:01 PM"), date.local(1900, 0, 1, 12, 0, 1));
test.deepEqual(p("11:59:59 PM"), date.local(1900, 0, 1, 23, 59, 59));
test.end();
});
tape("timeParse(\"%L\")(date) parses milliseconds", function(test) {
var p = timeFormat.timeParse("%L");
test.deepEqual(p("432"), date.local(1900, 0, 1, 0, 0, 0, 432));
test.end();
});
tape("timeParse(\"%f\")(date) parses microseconds", function(test) {
var p = timeFormat.timeParse("%f");
test.deepEqual(p("432000"), date.local(1900, 0, 1, 0, 0, 0, 432));
test.end();
});
tape("timeParse(\"%I:%M:%S %p\")(date) parses twelve hour, minute and second", function(test) {
var p = timeFormat.timeParse("%I:%M:%S %p");
test.deepEqual(p("12:00:00 am"), date.local(1900, 0, 1, 0, 0, 0));
test.deepEqual(p("11:59:59 AM"), date.local(1900, 0, 1, 11, 59, 59));
test.deepEqual(p("12:00:00 pm"), date.local(1900, 0, 1, 12, 0, 0));
test.deepEqual(p("12:00:01 pm"), date.local(1900, 0, 1, 12, 0, 1));
test.deepEqual(p("11:59:59 PM"), date.local(1900, 0, 1, 23, 59, 59));
test.end();
});
tape("timeParse(\"%I %p\")(date) parses period in non-English locales", function(test) {
var p = timeFormat.timeFormatLocale(FiFi).parse("%I:%M:%S %p");
test.deepEqual(p("12:00:00 a.m."), date.local(1900, 0, 1, 0, 0, 0));
test.deepEqual(p("11:59:59 A.M."), date.local(1900, 0, 1, 11, 59, 59));
test.deepEqual(p("12:00:00 p.m."), date.local(1900, 0, 1, 12, 0, 0));
test.deepEqual(p("12:00:01 p.m."), date.local(1900, 0, 1, 12, 0, 1));
test.deepEqual(p("11:59:59 P.M."), date.local(1900, 0, 1, 23, 59, 59));
test.end();
});
tape("timeParse(\"%Y %q\")(date) parses quarters", function(test) {
var p = timeFormat.timeParse("%Y %q");
test.deepEqual(p("1990 1"), date.local(1990, 0, 1));
test.deepEqual(p("1990 2"), date.local(1990, 3, 1));
test.deepEqual(p("1990 3"), date.local(1990, 6, 1));
test.deepEqual(p("1990 4"), date.local(1990, 9, 1));
test.end();
});
tape("timeParse(\"%Y %q %m\")(date) gives the month number priority", function(test) {
var p = timeFormat.timeParse("%Y %q %m");
test.deepEqual(p("1990 1 2"), date.local(1990, 1, 1));
test.deepEqual(p("1990 2 5"), date.local(1990, 4, 1));
test.deepEqual(p("1990 3 8"), date.local(1990, 7, 1));
test.deepEqual(p("1990 4 9"), date.local(1990, 8, 1));
test.end();
});
tape("timeParse(\"%% %m/%d/%Y\")(date) parses literal %", function(test) {
var p = timeFormat.timeParse("%% %m/%d/%Y");
test.deepEqual(p("% 01/01/1990"), date.local(1990, 0, 1));
test.deepEqual(p("% 02/03/1991"), date.local(1991, 1, 3));
test.equal(p("%% 03/10/2010"), null);
test.end();
});
tape("timeParse(\"%m/%d/%Y %Z\")(date) parses timezone offset", function(test) {
var p = timeFormat.timeParse("%m/%d/%Y %Z");
test.deepEqual(p("01/02/1990 +0000"), date.local(1990, 0, 1, 16));
test.deepEqual(p("01/02/1990 +0100"), date.local(1990, 0, 1, 15));
test.deepEqual(p("01/02/1990 +0130"), date.local(1990, 0, 1, 14, 30));
test.deepEqual(p("01/02/1990 -0100"), date.local(1990, 0, 1, 17));
test.deepEqual(p("01/02/1990 -0130"), date.local(1990, 0, 1, 17, 30));
test.deepEqual(p("01/02/1990 -0800"), date.local(1990, 0, 2, 0));
test.end();
});
tape("timeParse(\"%m/%d/%Y %Z\")(date) parses timezone offset in the form '+-hh:mm'", function(test) {
var p = timeFormat.timeParse("%m/%d/%Y %Z");
test.deepEqual(p("01/02/1990 +01:30"), date.local(1990, 0, 1, 14, 30));
test.deepEqual(p("01/02/1990 -01:30"), date.local(1990, 0, 1, 17, 30));
test.end();
});
tape("timeParse(\"%m/%d/%Y %Z\")(date) parses timezone offset in the form '+-hh'", function(test) {
var p = timeFormat.timeParse("%m/%d/%Y %Z");
test.deepEqual(p("01/02/1990 +01"), date.local(1990, 0, 1, 15));
test.deepEqual(p("01/02/1990 -01"), date.local(1990, 0, 1, 17));
test.end();
});
tape("timeParse(\"%m/%d/%Y %Z\")(date) parses timezone offset in the form 'Z'", function(test) {
var p = timeFormat.timeParse("%m/%d/%Y %Z");
test.deepEqual(p("01/02/1990 Z"), date.local(1990, 0, 1, 16));
test.end();
});
tape("timeParse(\"%-m/%0d/%_Y\")(date) ignores optional padding modifier, skipping zeroes and spaces", function(test) {
var p = timeFormat.timeParse("%-m/%0d/%_Y");
test.deepEqual(p("01/ 1/1990"), date.local(1990, 0, 1));
test.end();
});
tape("timeParse(\"%b %d, %Y\")(date) doesn't crash when given weird strings", function(test) {
try {
Object.prototype.foo = 10;
var p = timeFormat.timeParse("%b %d, %Y");
test.equal(p("foo 1, 1990"), null);
} finally {
delete Object.prototype.foo;
}
test.end();
});
d3-time-format-2.3.0/test/utcFormat-test.js 0000664 0000000 0000000 00000031657 13720467670 0020532 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
time = require("d3-time"),
timeFormat = require("../"),
date = require("./date");
var formatMillisecond = timeFormat.utcFormat(".%L"),
formatSecond = timeFormat.utcFormat(":%S"),
formatMinute = timeFormat.utcFormat("%I:%M"),
formatHour = timeFormat.utcFormat("%I %p"),
formatDay = timeFormat.utcFormat("%a %d"),
formatWeek = timeFormat.utcFormat("%b %d"),
formatMonth = timeFormat.utcFormat("%B"),
formatYear = timeFormat.utcFormat("%Y");
function multi(d) {
return (time.utcSecond(d) < d ? formatMillisecond
: time.utcMinute(d) < d ? formatSecond
: time.utcHour(d) < d ? formatMinute
: time.utcDay(d) < d ? formatHour
: time.utcMonth(d) < d ? (time.utcWeek(d) < d ? formatDay : formatWeek)
: time.utcYear(d) < d ? formatMonth
: formatYear)(d);
}
tape("utcFormat(\"%a\")(date) formats abbreviated weekdays", function(test) {
var f = timeFormat.utcFormat("%a");
test.equal(f(date.utc(1990, 0, 1)), "Mon");
test.equal(f(date.utc(1990, 0, 2)), "Tue");
test.equal(f(date.utc(1990, 0, 3)), "Wed");
test.equal(f(date.utc(1990, 0, 4)), "Thu");
test.equal(f(date.utc(1990, 0, 5)), "Fri");
test.equal(f(date.utc(1990, 0, 6)), "Sat");
test.equal(f(date.utc(1990, 0, 7)), "Sun");
test.end();
});
tape("utcFormat(\"%A\")(date) formats weekdays", function(test) {
var f = timeFormat.utcFormat("%A");
test.equal(f(date.utc(1990, 0, 1)), "Monday");
test.equal(f(date.utc(1990, 0, 2)), "Tuesday");
test.equal(f(date.utc(1990, 0, 3)), "Wednesday");
test.equal(f(date.utc(1990, 0, 4)), "Thursday");
test.equal(f(date.utc(1990, 0, 5)), "Friday");
test.equal(f(date.utc(1990, 0, 6)), "Saturday");
test.equal(f(date.utc(1990, 0, 7)), "Sunday");
test.end();
});
tape("utcFormat(\"%b\")(date) formats abbreviated months", function(test) {
var f = timeFormat.utcFormat("%b");
test.equal(f(date.utc(1990, 0, 1)), "Jan");
test.equal(f(date.utc(1990, 1, 1)), "Feb");
test.equal(f(date.utc(1990, 2, 1)), "Mar");
test.equal(f(date.utc(1990, 3, 1)), "Apr");
test.equal(f(date.utc(1990, 4, 1)), "May");
test.equal(f(date.utc(1990, 5, 1)), "Jun");
test.equal(f(date.utc(1990, 6, 1)), "Jul");
test.equal(f(date.utc(1990, 7, 1)), "Aug");
test.equal(f(date.utc(1990, 8, 1)), "Sep");
test.equal(f(date.utc(1990, 9, 1)), "Oct");
test.equal(f(date.utc(1990, 10, 1)), "Nov");
test.equal(f(date.utc(1990, 11, 1)), "Dec");
test.end();
});
tape("utcFormat(\"%B\")(date) formats months", function(test) {
var f = timeFormat.utcFormat("%B");
test.equal(f(date.utc(1990, 0, 1)), "January");
test.equal(f(date.utc(1990, 1, 1)), "February");
test.equal(f(date.utc(1990, 2, 1)), "March");
test.equal(f(date.utc(1990, 3, 1)), "April");
test.equal(f(date.utc(1990, 4, 1)), "May");
test.equal(f(date.utc(1990, 5, 1)), "June");
test.equal(f(date.utc(1990, 6, 1)), "July");
test.equal(f(date.utc(1990, 7, 1)), "August");
test.equal(f(date.utc(1990, 8, 1)), "September");
test.equal(f(date.utc(1990, 9, 1)), "October");
test.equal(f(date.utc(1990, 10, 1)), "November");
test.equal(f(date.utc(1990, 11, 1)), "December");
test.end();
});
tape("utcFormat(\"%c\")(date) formats localized dates and times", function(test) {
var f = timeFormat.utcFormat("%c");
test.equal(f(date.utc(1990, 0, 1)), "1/1/1990, 12:00:00 AM");
test.end();
});
tape("utcFormat(\"%d\")(date) formats zero-padded dates", function(test) {
var f = timeFormat.utcFormat("%d");
test.equal(f(date.utc(1990, 0, 1)), "01");
test.end();
});
tape("utcFormat(\"%e\")(date) formats space-padded dates", function(test) {
var f = timeFormat.utcFormat("%e");
test.equal(f(date.utc(1990, 0, 1)), " 1");
test.end();
});
tape("timeFormat(\"%g\")(date) formats zero-padded two-digit ISO 8601 years", function (test) {
var f = timeFormat.utcFormat("%g");
test.equal(f(date.utc(2018, 11, 30, 0)), "18"); // Sunday
test.equal(f(date.utc(2018, 11, 31, 0)), "19"); // Monday
test.equal(f(date.utc(2019, 0, 1, 0)), "19");
test.end();
});
tape("utcFormat(\"%G\")(date) formats zero-padded four-digit ISO 8601 years", function (test) {
var f = timeFormat.utcFormat("%G");
test.equal(f(date.utc(2018, 11, 30, 0)), "2018"); // Sunday
test.equal(f(date.utc(2018, 11, 31, 0)), "2019"); // Monday
test.equal(f(date.utc(2019, 0, 1, 0)), "2019");
test.end();
});
tape("utcFormat(\"%H\")(date) formats zero-padded hours (24)", function(test) {
var f = timeFormat.utcFormat("%H");
test.equal(f(date.utc(1990, 0, 1, 0)), "00");
test.equal(f(date.utc(1990, 0, 1, 13)), "13");
test.end();
});
tape("utcFormat(\"%I\")(date) formats zero-padded hours (12)", function(test) {
var f = timeFormat.utcFormat("%I");
test.equal(f(date.utc(1990, 0, 1, 0)), "12");
test.equal(f(date.utc(1990, 0, 1, 13)), "01");
test.end();
});
tape("utcFormat(\"%j\")(date) formats zero-padded day of year numbers", function(test) {
var f = timeFormat.utcFormat("%j");
test.equal(f(date.utc(1990, 0, 1)), "001");
test.equal(f(date.utc(1990, 5, 1)), "152");
test.equal(f(date.utc(2010, 2, 13)), "072");
test.equal(f(date.utc(2010, 2, 14)), "073"); // DST begins
test.equal(f(date.utc(2010, 2, 15)), "074");
test.equal(f(date.utc(2010, 10, 6)), "310");
test.equal(f(date.utc(2010, 10, 7)), "311"); // DST ends
test.equal(f(date.utc(2010, 10, 8)), "312");
test.end();
});
tape("utcFormat(\"%m\")(date) formats zero-padded months", function(test) {
var f = timeFormat.utcFormat("%m");
test.equal(f(date.utc(1990, 0, 1)), "01");
test.equal(f(date.utc(1990, 9, 1)), "10");
test.end();
});
tape("utcFormat(\"%M\")(date) formats zero-padded minutes", function(test) {
var f = timeFormat.utcFormat("%M");
test.equal(f(date.utc(1990, 0, 1, 0, 0)), "00");
test.equal(f(date.utc(1990, 0, 1, 0, 32)), "32");
test.end();
});
tape("utcFormat(\"%p\")(date) formats AM or PM", function(test) {
var f = timeFormat.utcFormat("%p");
test.equal(f(date.utc(1990, 0, 1, 0)), "AM");
test.equal(f(date.utc(1990, 0, 1, 13)), "PM");
test.end();
});
tape("utcFormat(\"%q\")(date) formats quarters", function(test) {
var f = timeFormat.utcFormat("%q");
test.equal(f(date.utc(1990, 0, 1)), "1");
test.equal(f(date.utc(1990, 3, 1)), "2");
test.equal(f(date.utc(1990, 6, 1)), "3");
test.equal(f(date.utc(1990, 9, 1)), "4");
test.end();
});
tape("utcFormat(\"%Q\")(date) formats UNIX timestamps", function(test) {
var f = timeFormat.utcFormat("%Q");
test.equal(f(date.utc(1970, 0, 1, 0, 0, 0)), "0");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0)), "631152000000");
test.equal(f(date.utc(1990, 0, 1, 12, 34, 56)), "631197296000");
test.end();
});
tape("utcFormat(\"%s\")(date) formats UNIX timetamps in seconds", function(test) {
var f = timeFormat.utcFormat("%s");
test.equal(f(date.utc(1970, 0, 1, 0, 0, 0)), "0");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0)), "631152000");
test.equal(f(date.utc(1990, 0, 1, 12, 34, 56)), "631197296");
test.end();
});
tape("utcFormat(\"%s.%L\")(date) formats UNIX timetamps in seconds and milliseconds", function(test) {
var f = timeFormat.utcFormat("%s.%L");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0, 123)), "631152000.123");
test.equal(f(date.utc(1990, 0, 1, 12, 34, 56, 789)), "631197296.789");
test.end();
});
tape("utcFormat(\"%s.%f\")(date) formats UNIX timetamps in seconds and microseconds", function(test) {
var f = timeFormat.utcFormat("%s.%f");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0, 123)), "631152000.123000");
test.equal(f(date.utc(1990, 0, 1, 12, 34, 56, 789)), "631197296.789000");
test.end();
});
tape("utcFormat(\"%S\")(date) formats zero-padded seconds", function(test) {
var f = timeFormat.utcFormat("%S");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0)), "00");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 32)), "32");
var f = timeFormat.utcFormat("%0S");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0)), "00");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 32)), "32");
test.end();
});
tape("utcFormat(\"%_S\")(date) formats space-padded seconds", function(test) {
var f = timeFormat.utcFormat("%_S");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0)), " 0");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 3)), " 3");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 32)), "32");
test.end();
});
tape("utcFormat(\"-S\")(date) formats no-padded seconds", function(test) {
var f = timeFormat.utcFormat("%-S");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0)), "0");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 3)), "3");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 32)), "32");
test.end();
});
tape("utcFormat(\"%L\")(date) formats zero-padded milliseconds", function(test) {
var f = timeFormat.utcFormat("%L");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0, 0)), "000");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0, 432)), "432");
test.end();
});
tape("utcFormat(\"%u\")(date) formats week day numbers", function(test) {
var f = timeFormat.utcFormat("%u");
test.equal(f(date.utc(1990, 0, 1, 0)), "1");
test.equal(f(date.utc(1990, 0, 7, 0)), "7");
test.equal(f(date.utc(2010, 2, 13, 23)), "6");
test.end();
});
tape("utcFormat(\"%f\")(date) formats zero-padded microseconds", function(test) {
var f = timeFormat.utcFormat("%f");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0, 0)), "000000");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0, 432)), "432000");
test.end();
});
tape("utcFormat(\"%U\")(date) formats zero-padded week numbers", function(test) {
var f = timeFormat.utcFormat("%U");
test.equal(f(date.utc(1990, 0, 1, 0)), "00");
test.equal(f(date.utc(1990, 5, 1, 0)), "21");
test.equal(f(date.utc(2010, 2, 13, 23)), "10");
test.equal(f(date.utc(2010, 2, 14, 0)), "11"); // DST begins
test.equal(f(date.utc(2010, 2, 15, 0)), "11");
test.equal(f(date.utc(2010, 10, 6, 23)), "44");
test.equal(f(date.utc(2010, 10, 7, 0)), "45"); // DST ends
test.equal(f(date.utc(2010, 10, 8, 0)), "45");
test.equal(f(date.utc(2012, 0, 1, 0)), "01"); // Sunday!
test.end();
});
tape("utcFormat(\"%W\")(date) formats zero-padded week numbers", function(test) {
var f = timeFormat.utcFormat("%W");
test.equal(f(date.utc(1990, 0, 1, 0)), "01"); // Monday!
test.equal(f(date.utc(1990, 5, 1, 0)), "22");
test.equal(f(date.utc(2010, 2, 15, 0)), "11");
test.equal(f(date.utc(2010, 10, 8, 0)), "45");
test.end();
});
tape("utcFormat(\"%V\")(date) formats zero-padded ISO 8601 week numbers", function(test) {
var f = timeFormat.utcFormat("%V");
test.equal(f(date.utc(1990, 0, 1, 0)), "01");
test.equal(f(date.utc(1990, 5, 1, 0)), "22");
test.equal(f(date.utc(2010, 2, 13, 23)), "10");
test.equal(f(date.utc(2010, 2, 14, 0)), "10"); // DST begins
test.equal(f(date.utc(2010, 2, 15, 0)), "11");
test.equal(f(date.utc(2010, 10, 6, 23)), "44");
test.equal(f(date.utc(2010, 10, 7, 0)), "44"); // DST ends
test.equal(f(date.utc(2010, 10, 8, 0)), "45");
test.equal(f(date.utc(2015, 11, 31, 0)), "53");
test.equal(f(date.utc(2016, 0, 1, 0)), "53");
test.end();
});
tape("utcFormat(\"%x\")(date) formats localized dates", function(test) {
var f = timeFormat.utcFormat("%x");
test.equal(f(date.utc(1990, 0, 1)), "1/1/1990");
test.equal(f(date.utc(2010, 5, 1)), "6/1/2010");
test.end();
});
tape("utcFormat(\"%X\")(date) formats localized times", function(test) {
var f = timeFormat.utcFormat("%X");
test.equal(f(date.utc(1990, 0, 1, 0, 0, 0)), "12:00:00 AM");
test.equal(f(date.utc(1990, 0, 1, 13, 34, 59)), "1:34:59 PM");
test.end();
});
tape("utcFormat(\"%y\")(date) formats zero-padded two-digit years", function(test) {
var f = timeFormat.utcFormat("%y");
test.equal(f(date.utc(+1990, 0, 1)), "90");
test.equal(f(date.utc(+2002, 0, 1)), "02");
test.equal(f(date.utc(-0002, 0, 1)), "-02");
test.end();
});
tape("utcFormat(\"%Y\")(date) formats zero-padded four-digit years", function(test) {
var f = timeFormat.utcFormat("%Y");
test.equal(f(date.utc( 123, 0, 1)), "0123");
test.equal(f(date.utc( 1990, 0, 1)), "1990");
test.equal(f(date.utc( 2002, 0, 1)), "2002");
test.equal(f(date.utc(10002, 0, 1)), "0002");
test.equal(f(date.utc( -2, 0, 1)), "-0002");
test.end();
});
tape("utcFormat(\"%Z\")(date) formats time zones", function(test) {
var f = timeFormat.utcFormat("%Z");
test.equal(f(date.utc(1990, 0, 1)), "+0000");
test.end();
});
tape("utcFormat(\"%%\")(date) formats literal percent signs", function(test) {
var f = timeFormat.utcFormat("%%");
test.equal(f(date.utc(1990, 0, 1)), "%");
test.end();
});
tape("utcFormat(…) can be used to create a conditional multi-format", function(test) {
test.equal(multi(date.utc(1990, 0, 1, 0, 0, 0, 12)), ".012");
test.equal(multi(date.utc(1990, 0, 1, 0, 0, 1, 0)), ":01");
test.equal(multi(date.utc(1990, 0, 1, 0, 1, 0, 0)), "12:01");
test.equal(multi(date.utc(1990, 0, 1, 1, 0, 0, 0)), "01 AM");
test.equal(multi(date.utc(1990, 0, 2, 0, 0, 0, 0)), "Tue 02");
test.equal(multi(date.utc(1990, 1, 1, 0, 0, 0, 0)), "February");
test.equal(multi(date.utc(1990, 0, 1, 0, 0, 0, 0)), "1990");
test.end();
});
d3-time-format-2.3.0/test/utcParse-test.js 0000664 0000000 0000000 00000022620 13720467670 0020342 0 ustar 00root root 0000000 0000000 var tape = require("tape"),
timeFormat = require("../"),
date = require("./date");
tape("utcParse(specifier) coerces the specified specifier to a string", function(test) {
var p = timeFormat.utcParse({toString: function() { return "%c"; }});
test.deepEqual(p("1/1/1990, 12:00:00 AM"), date.utc(1990, 0, 1));
test.end();
});
tape("utcParse(\"\")(date) parses abbreviated weekday and numeric date", function(test) {
var p = timeFormat.utcParse("%a %m/%d/%Y");
test.deepEqual(p("Sun 01/01/1990"), date.utc(1990, 0, 1));
test.deepEqual(p("Wed 02/03/1991"), date.utc(1991, 1, 3));
test.equal(p("XXX 03/10/2010"), null);
test.end();
});
tape("utcParse(\"\")(date) parses weekday and numeric date", function(test) {
var p = timeFormat.utcParse("%A %m/%d/%Y");
test.deepEqual(p("Sunday 01/01/1990"), date.utc(1990, 0, 1));
test.deepEqual(p("Wednesday 02/03/1991"), date.utc(1991, 1, 3));
test.equal(p("Caturday 03/10/2010"), null);
test.end();
});
tape("utcParse(\"\")(date) parses numeric date", function(test) {
var p = timeFormat.utcParse("%m/%d/%y");
test.deepEqual(p("01/01/90"), date.utc(1990, 0, 1));
test.deepEqual(p("02/03/91"), date.utc(1991, 1, 3));
test.equal(p("03/10/2010"), null);
test.end();
});
tape("utcParse(\"\")(date) parses locale date", function(test) {
var p = timeFormat.utcParse("%x");
test.deepEqual(p("01/01/1990"), date.utc(1990, 0, 1));
test.deepEqual(p("02/03/1991"), date.utc(1991, 1, 3));
test.deepEqual(p("03/10/2010"), date.utc(2010, 2, 10));
test.end();
});
tape("utcParse(\"\")(date) parses abbreviated month, date and year", function(test) {
var p = timeFormat.utcParse("%b %d, %Y");
test.deepEqual(p("jan 01, 1990"), date.utc(1990, 0, 1));
test.deepEqual(p("feb 2, 2010"), date.utc(2010, 1, 2));
test.equal(p("jan. 1, 1990"), null);
test.end();
});
tape("utcParse(\"\")(date) parses month, date and year", function(test) {
var p = timeFormat.utcParse("%B %d, %Y");
test.deepEqual(p("january 01, 1990"), date.utc(1990, 0, 1));
test.deepEqual(p("February 2, 2010"), date.utc(2010, 1, 2));
test.equal(p("jan 1, 1990"), null);
test.end();
});
tape("utcParse(\"\")(date) parses locale date and time", function(test) {
var p = timeFormat.utcParse("%c");
test.deepEqual(p("1/1/1990, 12:00:00 AM"), date.utc(1990, 0, 1));
test.end();
});
tape("utcParse(\"\")(date) parses twenty-four hour, minute and second", function(test) {
var p = timeFormat.utcParse("%H:%M:%S");
test.deepEqual(p("00:00:00"), date.utc(1900, 0, 1, 0, 0, 0));
test.deepEqual(p("11:59:59"), date.utc(1900, 0, 1, 11, 59, 59));
test.deepEqual(p("12:00:00"), date.utc(1900, 0, 1, 12, 0, 0));
test.deepEqual(p("12:00:01"), date.utc(1900, 0, 1, 12, 0, 1));
test.deepEqual(p("23:59:59"), date.utc(1900, 0, 1, 23, 59, 59));
test.end();
});
tape("utcParse(\"\")(date) parses locale time", function(test) {
var p = timeFormat.utcParse("%X");
test.deepEqual(p("12:00:00 AM"), date.utc(1900, 0, 1, 0, 0, 0));
test.deepEqual(p("11:59:59 AM"), date.utc(1900, 0, 1, 11, 59, 59));
test.deepEqual(p("12:00:00 PM"), date.utc(1900, 0, 1, 12, 0, 0));
test.deepEqual(p("12:00:01 PM"), date.utc(1900, 0, 1, 12, 0, 1));
test.deepEqual(p("11:59:59 PM"), date.utc(1900, 0, 1, 23, 59, 59));
test.end();
});
tape("utcParse(\"%L\")(date) parses milliseconds", function(test) {
var p = timeFormat.utcParse("%L");
test.deepEqual(p("432"), date.utc(1900, 0, 1, 0, 0, 0, 432));
test.end();
});
tape("utcParse(\"%f\")(date) parses microseconds", function(test) {
var p = timeFormat.utcParse("%f");
test.deepEqual(p("432000"), date.utc(1900, 0, 1, 0, 0, 0, 432));
test.end();
});
tape("utcParse(\"\")(date) parses twelve hour, minute and second", function(test) {
var p = timeFormat.utcParse("%I:%M:%S %p");
test.deepEqual(p("12:00:00 am"), date.utc(1900, 0, 1, 0, 0, 0));
test.deepEqual(p("11:59:59 AM"), date.utc(1900, 0, 1, 11, 59, 59));
test.deepEqual(p("12:00:00 pm"), date.utc(1900, 0, 1, 12, 0, 0));
test.deepEqual(p("12:00:01 pm"), date.utc(1900, 0, 1, 12, 0, 1));
test.deepEqual(p("11:59:59 PM"), date.utc(1900, 0, 1, 23, 59, 59));
test.end();
});
tape("utcParse(\"\")(date) parses timezone offset", function(test) {
var p = timeFormat.utcParse("%m/%d/%Y %Z");
test.deepEqual(p("01/02/1990 +0000"), date.utc(1990, 0, 2));
test.deepEqual(p("01/02/1990 +0100"), date.utc(1990, 0, 1, 23));
test.deepEqual(p("01/02/1990 -0100"), date.utc(1990, 0, 2, 1));
test.deepEqual(p("01/02/1990 -0800"), date.local(1990, 0, 2));
test.end();
});
tape("utcParse(\"\")(date) parses timezone offset (in the form '+-hh:mm')", function(test) {
var p = timeFormat.utcParse("%m/%d/%Y %Z");
test.deepEqual(p("01/02/1990 +01:30"), date.utc(1990, 0, 1, 22, 30));
test.deepEqual(p("01/02/1990 -01:30"), date.utc(1990, 0, 2, 1, 30));
test.end();
});
tape("utcParse(\"\")(date) parses timezone offset (in the form '+-hh')", function(test) {
var p = timeFormat.utcParse("%m/%d/%Y %Z");
test.deepEqual(p("01/02/1990 +01"), date.utc(1990, 0, 1, 23));
test.deepEqual(p("01/02/1990 -01"), date.utc(1990, 0, 2, 1));
test.end();
});
tape("utcParse(\"\")(date) parses timezone offset (in the form 'Z')", function(test) {
var p = timeFormat.utcParse("%m/%d/%Y %Z");
test.deepEqual(p("01/02/1990 Z"), date.utc(1990, 0, 2));
test.end();
});
tape("utcParse(\"%Y %U %w\")(date) handles a year that starts on Sunday", function(test) {
var p = timeFormat.utcParse("%Y %U %w");
test.deepEqual(p("2012 01 0"), date.utc(2012, 0, 1));
test.end();
});
tape("utcParse(\"%w %V %Y\")(date) parses numeric weekday, week number (ISO) and year", function(test) {
var p = timeFormat.utcParse("%w %V %Y");
test.deepEqual(p("1 01 1990"), date.utc(1990, 0, 1));
test.deepEqual(p("0 05 1991"), date.utc(1991, 1, 3));
test.deepEqual(p("4 53 1992"), date.utc(1992, 11, 31));
test.deepEqual(p("0 52 1994"), date.utc(1995, 0, 1));
test.deepEqual(p("0 01 1995"), date.utc(1995, 0, 8));
test.equal(p("X 03 2010"), null);
test.end();
});
tape("utcParse(\"%w %V %G\")(date) parses numeric weekday, week number (ISO) and corresponding year", function(test) {
var p = timeFormat.utcParse("%w %V %G");
test.deepEqual(p("1 01 1990"), date.utc(1990, 0, 1));
test.deepEqual(p("0 05 1991"), date.utc(1991, 1, 3));
test.deepEqual(p("4 53 1992"), date.utc(1992, 11, 31));
test.deepEqual(p("0 52 1994"), date.utc(1995, 0, 1));
test.deepEqual(p("0 01 1995"), date.utc(1995, 0, 8));
test.deepEqual(p("1 01 2018"), date.utc(2018, 0, 1));
test.deepEqual(p("1 01 2019"), date.utc(2018, 11, 31));
test.equal(p("X 03 2010"), null);
test.end();
});
tape("utcParse(\"%V %Y\")(date) week number (ISO) and year", function(test) {
var p = timeFormat.utcParse("%V %Y");
test.deepEqual(p("01 1990"), date.utc(1990, 0, 1));
test.deepEqual(p("05 1991"), date.utc(1991, 0, 28));
test.deepEqual(p("53 1992"), date.utc(1992, 11, 28));
test.deepEqual(p("01 1993"), date.utc(1993, 0, 4));
test.deepEqual(p("01 1995"), date.utc(1995, 0, 2));
test.deepEqual(p("00 1995"), null);
test.deepEqual(p("54 1995"), null);
test.deepEqual(p("X 1995"), null);
test.end();
});
tape("utcParse(\"%V %g\")(date) week number (ISO) and corresponding two-digits year", function(test) {
var p = timeFormat.utcParse("%V %g");
test.deepEqual(p("01 90"), date.utc(1990, 0, 1));
test.deepEqual(p("05 91"), date.utc(1991, 0, 28));
test.deepEqual(p("53 92"), date.utc(1992, 11, 28));
test.deepEqual(p("01 93"), date.utc(1993, 0, 4));
test.deepEqual(p("01 95"), date.utc(1995, 0, 2));
test.deepEqual(p("01 18"), date.utc(2018, 0, 1));
test.deepEqual(p("01 19"), date.utc(2018, 11, 31));
test.deepEqual(p("00 95"), null);
test.deepEqual(p("54 95"), null);
test.deepEqual(p("X 95"), null);
test.end();
});
tape("utcParse(\"%V %G\")(date) week number (ISO) and corresponding year", function(test) {
var p = timeFormat.utcParse("%V %G");
test.deepEqual(p("01 1990"), date.utc(1990, 0, 1));
test.deepEqual(p("05 1991"), date.utc(1991, 0, 28));
test.deepEqual(p("53 1992"), date.utc(1992, 11, 28));
test.deepEqual(p("01 1993"), date.utc(1993, 0, 4));
test.deepEqual(p("01 1995"), date.utc(1995, 0, 2));
test.deepEqual(p("01 2018"), date.utc(2018, 0, 1));
test.deepEqual(p("01 2019"), date.utc(2018, 11, 31));
test.deepEqual(p("00 1995"), null);
test.deepEqual(p("54 1995"), null);
test.deepEqual(p("X 1995"), null);
test.end();
});
tape("utcParse(\"%Q\")(date) parses UNIX timestamps", function(test) {
var p = timeFormat.utcParse("%Q");
test.deepEqual(p("0"), date.utc(1970, 0, 1));
test.deepEqual(p("631152000000"), date.utc(1990, 0, 1));
test.end();
});
tape("utcParse(\"%s\")(date) parses UNIX timestamps in seconds", function(test) {
var p = timeFormat.utcParse("%s");
test.deepEqual(p("0"), date.utc(1970, 0, 1));
test.deepEqual(p("631152000"), date.utc(1990, 0, 1));
test.end();
});
tape("utcParse(\"%s.%L\")(date) parses UNIX timetamps in seconds and milliseconds", function(test) {
var p = timeFormat.utcParse("%s.%L");
test.deepEqual(p("631152000.123"), date.utc(1990, 0, 1, 0, 0, 0, 123));
test.deepEqual(p("631197296.789"), date.utc(1990, 0, 1, 12, 34, 56, 789));
test.end();
});
tape("utcParse(\"%s.%f\")(date) parses UNIX timetamps in seconds and microseconds", function(test) {
var p = timeFormat.utcParse("%s.%f");
test.deepEqual(p("631152000.123000"), date.utc(1990, 0, 1, 0, 0, 0, 123));
test.deepEqual(p("631197296.789000"), date.utc(1990, 0, 1, 12, 34, 56, 789));
test.end();
});
d3-time-format-2.3.0/yarn.lock 0000664 0000000 0000000 00000132250 13720467670 0016106 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=
d3-time@1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1"
integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA==
debug@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
dependencies:
ms "^2.1.1"
deep-equal@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=
deep-is@~0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
define-properties@^1.1.2:
version "1.1.3"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
dependencies:
object-keys "^1.0.12"
defined@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=
doctrine@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==
dependencies:
esutils "^2.0.2"
emoji-regex@^7.0.1:
version "7.0.3"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
es-abstract@^1.5.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9"
integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==
dependencies:
es-to-primitive "^1.2.0"
function-bind "^1.1.1"
has "^1.0.3"
is-callable "^1.1.4"
is-regex "^1.0.4"
object-keys "^1.0.12"
es-to-primitive@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377"
integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==
dependencies:
is-callable "^1.1.4"
is-date-object "^1.0.1"
is-symbol "^1.0.2"
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
eslint-scope@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9"
integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==
dependencies:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint-utils@^1.3.1:
version "1.4.3"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
dependencies:
eslint-visitor-keys "^1.1.0"
eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
eslint@6:
version "6.1.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.1.0.tgz#06438a4a278b1d84fb107d24eaaa35471986e646"
integrity sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ==
dependencies:
"@babel/code-frame" "^7.0.0"
ajv "^6.10.0"
chalk "^2.1.0"
cross-spawn "^6.0.5"
debug "^4.0.1"
doctrine "^3.0.0"
eslint-scope "^5.0.0"
eslint-utils "^1.3.1"
eslint-visitor-keys "^1.0.0"
espree "^6.0.0"
esquery "^1.0.1"
esutils "^2.0.2"
file-entry-cache "^5.0.1"
functional-red-black-tree "^1.0.1"
glob-parent "^5.0.0"
globals "^11.7.0"
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
inquirer "^6.4.1"
is-glob "^4.0.0"
js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.3.0"
lodash "^4.17.14"
minimatch "^3.0.4"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
optionator "^0.8.2"
progress "^2.0.0"
regexpp "^2.0.1"
semver "^6.1.2"
strip-ansi "^5.2.0"
strip-json-comments "^3.0.1"
table "^5.2.3"
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
espree@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-6.0.0.tgz#716fc1f5a245ef5b9a7fdb1d7b0d3f02322e75f6"
integrity sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q==
dependencies:
acorn "^6.0.7"
acorn-jsx "^5.0.0"
eslint-visitor-keys "^1.0.0"
esprima@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
esquery@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==
dependencies:
estraverse "^4.0.0"
esrecurse@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==
dependencies:
estraverse "^4.1.0"
estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=
estree-walker@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==
esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=
external-editor@^3.0.3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
dependencies:
chardet "^0.7.0"
iconv-lite "^0.4.24"
tmp "^0.0.33"
fast-deep-equal@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
figures@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=
dependencies:
escape-string-regexp "^1.0.5"
file-entry-cache@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==
dependencies:
flat-cache "^2.0.1"
flat-cache@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==
dependencies:
flatted "^2.0.0"
rimraf "2.6.3"
write "1.0.3"
flatted@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08"
integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==
for-each@~0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==
dependencies:
is-callable "^1.1.3"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
glob-parent@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954"
integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==
dependencies:
is-glob "^4.0.1"
glob@^7.1.3, glob@~7.1.4:
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
globals@^11.7.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
has-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44"
integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=
has@^1.0.1, has@^1.0.3, has@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
dependencies:
function-bind "^1.1.1"
iconv-lite@^0.4.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"