New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@omnicar/sam-format

Package Overview
Dependencies
Maintainers
5
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@omnicar/sam-format - npm Package Compare versions

Comparing version 0.0.28 to 0.0.29

38

dist/formatDate/formatDate.js

@@ -6,11 +6,12 @@ "use strict";

var date_fns_1 = require("date-fns");
var locale_1 = require("date-fns/locale");
/*
const LOCALES = {
'da-DK': require('date-fns/locale/da'),
'sv-SE': require('date-fns/locale/sv'),
'fi-FI': require('date-fns/locale/fi'),
'en-GB': require('date-fns/locale/en-GB'),
}
Ref: https://date-fns.org/v2.10.0/docs/I18n
"
It might seem complicated to require and pass locales as options,
but unlike Moment.js which bloats your build with all the locales
by default date-fns forces developer to manually require
locales when needed.
"
*/
var locale_1 = require("date-fns/locale");
/**

@@ -70,23 +71,2 @@ * Get formatted date in current locale.

* @param isoLocale A locale code in the form 'xx-yy'.
* @returns A two letter language code (short locale) from the provided locale.
*/
/*
// Delete this function if it's not needed anymore!
function localeToLanguage(isoLocale: IsoLocale): string {
if (!isoLocale) {
return ''
} else {
return isoLocale.substr(0, 2)
}
}
*/
/**
* Note:
* Locale is a string in the form 'xx-yy', where:
* xx = two letter language code
* yy = two letter country/region code
* Language/short-locale is only the two letter language code.
*
* @param isoLocale A locale code in the form 'xx-yy'.
* @returns A locale structure with functions from the provided iso-locale.

@@ -105,3 +85,3 @@ */

default:
throw Error('Locale not found for that IsoLocale: ' + isoLocale);
throw Error('Locale not found for this IsoLocale: ' + isoLocale);
}

@@ -108,0 +88,0 @@ }

@@ -50,3 +50,3 @@ {

},
"version": "0.0.28"
"version": "0.0.29"
}
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