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

@types/parse-decimal-number

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/parse-decimal-number

TypeScript definitions for parse-decimal-number

  • 1.0.2
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/parse-decimal-number

Summary

This package contains type definitions for parse-decimal-number (https://github.com/AndreasPizsa/parse-decimal-number).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-decimal-number.

index.d.ts

declare namespace parseDecimalNumber {
    type ArrayOptions = [thousands: string, decimal: string];

    interface HashOptions {
        /**
         * Decimal point character.
         * Default: ".".
         */
        decimal: string;
        /**
         * Thousands separator character.
         * Default: ",".
         */
        thousands: string;
    }

    type Options = ArrayOptions | HashOptions | string;

    /**
     * Has the same effect as `parseDecimalNumber.setOptions({ thousands: ",", decimal: "." })`.
     */
    function factoryReset(): void;
    /**
     * Set the default thousands and decimal characters that are used when no options are passed to
     * {@link parseDecimalNumber}.
     */
    function setOptions(hash: HashOptions): void;
    /**
     * Returns a function that will take a string as an argument and return a float or `NaN`,
     * just like {@link parseDecimalNumber}.
     */
    function withOptions(options: Options, enforceGroupSize?: boolean): (string: string) => number;
}

declare function parseDecimalNumber(
    /**
     * A string that is supposed to contain a number.
     */
    string: string,
    /**
     * A string, array or hash with thousands and decimal separators.
     */
    options?: parseDecimalNumber.Options,
    /**
     * A boolean indicating whether to support that individual groups between the thousands
     * character are exactly 3 digits.
     */
    enforceGroupSize?: boolean,
): number;

export = parseDecimalNumber;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Ciarán Ingle.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

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.

Install

Related posts

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