@febin52/round-to-fast 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/README.md +24 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
MIT License
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 🔢 @febin52/round-to-fast
|
|
2
|
+
|
|
3
|
+
> Precision rounding utility for floating point numbers.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@febin52/round-to-fast)
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @febin52/round-to-fast
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { roundTo } from '@febin52/round-to-fast';
|
|
17
|
+
|
|
18
|
+
roundTo(1.2345, 2); // 1.23
|
|
19
|
+
roundTo(1.005, 2); // 1.01
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## License
|
|
23
|
+
|
|
24
|
+
MIT © Febin Francis
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.Pkg={}))})(this,function(e){"use strict";function n(t,i=0){const o=Math.pow(10,i);return Math.round((t+Number.EPSILON)*o)/o}e.roundTo=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@febin52/round-to-fast",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Precision decimal rounding utility for floating point numbers.",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc && vite build",
|
|
22
|
+
"test": "vitest run"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"round",
|
|
26
|
+
"precision",
|
|
27
|
+
"decimals",
|
|
28
|
+
"math",
|
|
29
|
+
"float",
|
|
30
|
+
"fixed"
|
|
31
|
+
],
|
|
32
|
+
"author": "Febin Francis",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/febin52/round-to-fast.git"
|
|
37
|
+
},
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/febin52/round-to-fast/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/febin52/round-to-fast#readme"
|
|
42
|
+
}
|