UNPKG

tough-rational

Version:

Rational class using BigInt with fallback to bignumber.js

6 lines (3 loc) 186 B
'use strict'; const emptyObject = {}; module.exports = (v) => typeof v === 'object' && typeof v.writeUint8 === 'function' && typeof (v.constructor || emptyObject).from === 'function';