Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

luxon

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luxon - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

2

package.json
{
"name": "luxon",
"version": "3.2.0",
"version": "3.2.1",
"description": "Immutable date wrapper",

@@ -5,0 +5,0 @@ "author": "Isaac Cambron",

@@ -73,2 +73,10 @@ import { padStart, roundTo, hasRelative } from "./util.js";

// private subtags and unicode subtags have ordering requirements,
// and we're not properly parsing this, so just strip out the
// private ones if they exist.
const xIndex = localeStr.indexOf("-x-");
if (xIndex !== -1) {
localeStr = localeStr.substring(0, xIndex);
}
const uIndex = localeStr.indexOf("-u-");

@@ -79,12 +87,14 @@ if (uIndex === -1) {

let options;
const smaller = localeStr.substring(0, uIndex);
let selectedStr;
try {
options = getCachedDTF(localeStr).resolvedOptions();
selectedStr = localeStr;
} catch (e) {
const smaller = localeStr.substring(0, uIndex);
options = getCachedDTF(smaller).resolvedOptions();
selectedStr = smaller;
}
const { numberingSystem, calendar } = options;
// return the smaller one so that we can append the calendar and numbering overrides to it
return [smaller, numberingSystem, calendar];
return [selectedStr, numberingSystem, calendar];
}

@@ -95,3 +105,5 @@ }

if (outputCalendar || numberingSystem) {
localeStr += "-u";
if (!localeStr.includes("-u-")) {
localeStr += "-u";
}

@@ -98,0 +110,0 @@ if (outputCalendar) {

@@ -228,3 +228,3 @@ import {

return s
.replace(/\([^)]*\)|[\n\t]/g, " ")
.replace(/\([^()]*\)|[\n\t]/g, " ")
.replace(/(\s\s+)/g, " ")

@@ -231,0 +231,0 @@ .trim();

@@ -12,3 +12,3 @@ import DateTime from "./datetime.js";

const VERSION = "3.2.0";
const VERSION = "3.2.1";

@@ -15,0 +15,0 @@ export {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc