JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q9572F
  • License ISC

format numbers with dot, comma and decimals for ts project

Package Exports

  • math-lib-ts-sb
  • math-lib-ts-sb/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (math-lib-ts-sb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

math-lib-ts-sb

math-lib-ts-sb is a typescript library for formating numbers.

Installation

Use the package manager to install math-lib-ts-sb.

npm install math-lib-ts-sb

Usage

import * as mathLibSb from 'math-lib-ts-sb';

# returns '10.2'
mathLibSb.getFloatNumberWithDot('10,2')

# returns '10,2'
mathLibSb.getFloatNumberWithComma('10.2')

# returns '10.26'
mathLibSb.truncateNumberWithoutRounding('10.263')

# returns '10.263'
mathLibSb.truncateNumberWithoutRounding('10.2634', 3)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT