UNPKG
big-rat
Version:
latest (1.0.4)
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.0.0
A big integer rational number
github.com/rat-nest/big-rat
rat-nest/big-rat
big-rat
/
lib
/
is-bn.js
12 lines
(8 loc)
•
218 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
'use strict'
var
BN
=
require
(
'bn.js'
)
module
.
exports
= isBN
//Test if x is a bignumber
//
FIXME:
obviously this is the wrong way to do it
function
isBN
(
x
) {
return
x &&
typeof
x ===
'object'
&&
Boolean
(x.
words
) }