Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
swap-v2-sdk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
swap-v2-sdk
Commits
bbd22469
Unverified
Commit
bbd22469
authored
Jan 21, 2020
by
Noah Zinsmeister
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formatting tweaks
parent
4d0f43f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
formatOutputs.ts
src/utils/formatOutputs.ts
+3
-2
index.ts
src/utils/index.ts
+1
-1
No files found.
src/utils/formatOutputs.ts
View file @
bbd22469
...
...
@@ -4,6 +4,7 @@ import _Big, { RoundingMode } from 'big.js'
import
toFormat
from
'
toformat
'
import
{
BigintIsh
}
from
'
../types
'
import
{
ONE
}
from
'
../constants
'
import
{
parseBigintIsh
}
from
'
./parseInputs
'
const
Decimal
=
toFormat
(
_Decimal
)
...
...
@@ -11,7 +12,7 @@ const Big = toFormat(_Big)
export
function
formatSignificant
(
numerator
:
BigintIsh
,
denominator
:
BigintIsh
,
denominator
:
BigintIsh
=
ONE
,
significantDigits
:
number
,
format
:
object
=
{
groupSeparator
:
''
},
roundingMode
:
number
=
Decimal
.
ROUND_HALF_UP
,
...
...
@@ -34,7 +35,7 @@ export function formatSignificant(
export
function
formatFixed
(
numerator
:
BigintIsh
,
denominator
:
BigintIsh
,
denominator
:
BigintIsh
=
ONE
,
decimalPlaces
:
number
,
format
:
object
=
{
groupSeparator
:
''
},
roundingMode
:
RoundingMode
=
RoundingMode
.
RoundHalfUp
...
...
src/utils/index.ts
View file @
bbd22469
export
{
formatSignificant
,
formatFixed
}
from
'
./formatOutputs
'
export
*
from
'
./formatOutputs
'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment