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

sling-web-helpers

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sling-web-helpers - npm Package Compare versions

Comparing version 0.2.31 to 0.2.32

18

dist/cjs/global/globalFormatters.js

@@ -7,2 +7,3 @@ 'use strict';

var defaultSdkCallDateFormat = exports.defaultSdkCallDateFormat = 'YYYY-MM-DD';
var dateTimeDigitFormat = '2-digit';
var locale = 'pt-BR';

@@ -17,3 +18,18 @@

var formtatCurrencyWithoutSymbol = exports.formtatCurrencyWithoutSymbol = function formtatCurrencyWithoutSymbol(value) {
return value.toLocaleString(locale, { minimumFractionDigits: 2 });
return value.toLocaleString(locale, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
};
var formatDate = exports.formatDate = function formatDate(item) {
return new Date(item).toLocaleDateString(locale);
};
var formatTime = exports.formatTime = function formatTime(item) {
return new Date(item).toLocaleTimeString(locale, {
hour: dateTimeDigitFormat, minute: dateTimeDigitFormat
});
};
var setPaginateRequestRange = exports.setPaginateRequestRange = function setPaginateRequestRange(pageEvent, occurrenciesPerPage) {
var rangeEnd = pageEvent.detail.index * occurrenciesPerPage - 1;
var rangeInit = rangeEnd - (occurrenciesPerPage - 1);
return rangeInit + '-' + rangeEnd;
};
export const defaultSdkCallDateFormat = 'YYYY-MM-DD';
const dateTimeDigitFormat = '2-digit';
const locale = 'pt-BR';

@@ -8,2 +9,13 @@

export const formtatCurrencyWithoutSymbol = value => value.toLocaleString(locale, { minimumFractionDigits: 2 });
export const formtatCurrencyWithoutSymbol = value => value.toLocaleString(locale, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
export const formatDate = item => new Date(item).toLocaleDateString(locale);
export const formatTime = item => new Date(item).toLocaleTimeString(locale, {
hour: dateTimeDigitFormat, minute: dateTimeDigitFormat
});
export const setPaginateRequestRange = (pageEvent, occurrenciesPerPage) => {
const rangeEnd = pageEvent.detail.index * occurrenciesPerPage - 1;
const rangeInit = rangeEnd - (occurrenciesPerPage - 1);
return `${rangeInit}-${rangeEnd}`;
};

2

package.json
{
"name": "sling-web-helpers",
"version": "0.2.31",
"version": "0.2.32",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js",

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