node_modules: update
This commit is contained in:
parent
4a21c51f2f
commit
b91baffed3
107 changed files with 3886 additions and 2943 deletions
2
node_modules/luxon/src/impl/english.js
generated
vendored
2
node_modules/luxon/src/impl/english.js
generated
vendored
|
@ -187,6 +187,8 @@ export function formatString(knownFormat) {
|
|||
return "M/d/yyyy";
|
||||
case stringify(Formats.DATE_MED):
|
||||
return "LLL d, yyyy";
|
||||
case stringify(Formats.DATE_MED_WITH_WEEKDAY):
|
||||
return "EEE, LLL d, yyyy";
|
||||
case stringify(Formats.DATE_FULL):
|
||||
return "LLLL d, yyyy";
|
||||
case stringify(Formats.DATE_HUGE):
|
||||
|
|
7
node_modules/luxon/src/impl/formats.js
generated
vendored
7
node_modules/luxon/src/impl/formats.js
generated
vendored
|
@ -18,6 +18,13 @@ export const DATE_MED = {
|
|||
day: n
|
||||
};
|
||||
|
||||
export const DATE_MED_WITH_WEEKDAY = {
|
||||
year: n,
|
||||
month: s,
|
||||
day: n,
|
||||
weekday: s
|
||||
};
|
||||
|
||||
export const DATE_FULL = {
|
||||
year: n,
|
||||
month: l,
|
||||
|
|
4
node_modules/luxon/src/impl/regexParser.js
generated
vendored
4
node_modules/luxon/src/impl/regexParser.js
generated
vendored
|
@ -66,7 +66,7 @@ function simpleParse(...keys) {
|
|||
|
||||
// ISO and SQL parsing
|
||||
const offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,
|
||||
isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/,
|
||||
isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,
|
||||
isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${offsetRegex.source}?`),
|
||||
isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`),
|
||||
isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,
|
||||
|
@ -120,7 +120,7 @@ function extractIANAZone(match, cursor) {
|
|||
|
||||
// ISO duration parsing
|
||||
|
||||
const isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})(?:[.,](-?\d{1,9}))?S)?)?)$/;
|
||||
const isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
|
||||
|
||||
function extractISODuration(match) {
|
||||
const [
|
||||
|
|
12
node_modules/luxon/src/impl/tokenParser.js
generated
vendored
12
node_modules/luxon/src/impl/tokenParser.js
generated
vendored
|
@ -12,13 +12,21 @@ function intUnit(regex, post = i => i) {
|
|||
return { regex, deser: ([s]) => post(parseDigits(s)) };
|
||||
}
|
||||
|
||||
const NBSP = String.fromCharCode(160);
|
||||
const spaceOrNBSP = `( |${NBSP})`;
|
||||
const spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g");
|
||||
|
||||
function fixListRegex(s) {
|
||||
// make dots optional and also make them literal
|
||||
return s.replace(/\./, "\\.?");
|
||||
// make space and non breakable space characters interchangeable
|
||||
return s.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP);
|
||||
}
|
||||
|
||||
function stripInsensitivities(s) {
|
||||
return s.replace(/\./, "").toLowerCase();
|
||||
return s
|
||||
.replace(/\./g, "") // ignore dots that were made optional
|
||||
.replace(spaceOrNBSPRegExp, " ") // interchange space and nbsp
|
||||
.toLowerCase();
|
||||
}
|
||||
|
||||
function oneOf(strings, startIndex) {
|
||||
|
|
13
node_modules/luxon/src/impl/util.js
generated
vendored
13
node_modules/luxon/src/impl/util.js
generated
vendored
|
@ -263,18 +263,17 @@ export function normalizeObject(obj, normalizer, nonUnitKeys) {
|
|||
}
|
||||
|
||||
export function formatOffset(offset, format) {
|
||||
const hours = Math.trunc(offset / 60),
|
||||
minutes = Math.abs(offset % 60),
|
||||
sign = hours >= 0 && !Object.is(hours, -0) ? "+" : "-",
|
||||
base = `${sign}${Math.abs(hours)}`;
|
||||
const hours = Math.trunc(Math.abs(offset / 60)),
|
||||
minutes = Math.trunc(Math.abs(offset % 60)),
|
||||
sign = offset >= 0 ? "+" : "-";
|
||||
|
||||
switch (format) {
|
||||
case "short":
|
||||
return `${sign}${padStart(Math.abs(hours), 2)}:${padStart(minutes, 2)}`;
|
||||
return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;
|
||||
case "narrow":
|
||||
return minutes > 0 ? `${base}:${minutes}` : base;
|
||||
return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`;
|
||||
case "techie":
|
||||
return `${sign}${padStart(Math.abs(hours), 2)}${padStart(minutes, 2)}`;
|
||||
return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;
|
||||
default:
|
||||
throw new RangeError(`Value format ${format} is out of range for property format`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue