Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
decimal-separator
Advanced tools
Find the decimal and group separators used in any given locale.
Find the decimal and group separators used in any given locale.
npm install decimal-separator --save
Import the script:
<script src="https://joker876.github.io/decimal-separator/decimal-separator.min.js">
import * from 'decimal-separator';
// or
import { /* function names here */ } from 'decimal-separator';
DecimalSep.decimalSep();
// or
const { decimalSep, groupSep, ... } = DecimalSep;
function decimalSep(): string;
function decimalSep(locale: string): string;
Get the decimal separator for the given locale.
locale
- The locale to get the decimal separator from. Optional. If not given, uses the current user's locale.Returns a string containing the decimal separator.
function groupSep(): string;
function groupSep(locale: string): string;
Get the group separator for the given locale.
locale
- The locale to get the group separator from. Optional. If not given, uses the current user's locale.Returns a string containing the group separator.
function formatUsing(num: number, decimal: string): string;
function formatUsing(num: number, decimal: string, group: string): string;
Formats a number using the given decimal and group separators.
num
- The number to format.decimal
- The decimal separator to use.group
- The group separator to use. Optional, defaults to ".
".Returns a string containing the number, formatted using the given separators.
function formatWithLocale(num: number): string;
function formatWithLocale(num: number, locale: string): string;
Formats a number using the given locale.
num
- The number to format.locale
- The locale to use to format the number. Optional. If not given, uses the current user's locale.Returns the number formatted using the given locale.
Initial release.
FAQs
Find the decimal and group separators used in any given locale.
We found that decimal-separator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.