Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

febs

Package Overview
Dependencies
Maintainers
3
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

febs - npm Package Compare versions

Comparing version 0.8.50 to 0.8.51

browser/dist/febs-0.8.51/febs.base.js

25

browser/common/utils.bigint.js

@@ -14,2 +14,21 @@ 'use strict';

/**
* @desc: 进行bigint转换.
*/
exports.bigint =
function(v) {
if (exports.bigint_check(v)) {
if (typeof v === 'string') {
if (v.length >= 15) // 对千亿以上的数值使用bignumber.
return new BigNumber(v);
return Number(v);
} else {
return v;
}
}
else {
return Number.NaN;
}
}
/**
* @desc: 判断是否是bigint.

@@ -24,3 +43,4 @@ */

if (typeof v === 'string')
var typev = typeof v;
if (typev === 'string')
{

@@ -45,2 +65,5 @@ if (v.length > 22 || v.length < 1)

}
else if (typev === 'object') {
return !!v.isBigNumber;
}
else {

@@ -47,0 +70,0 @@ return false;

@@ -0,4 +1,6 @@

// Type definitions for febs
/// <reference types="node" />
/// <reference path="bignumber.js/bignumber.d.ts" />

@@ -207,2 +209,6 @@

/**
* @desc: 进行bigint类型转换.
*/
function bigint(v: any): number|BigNumber;
/**
* @desc: 判断是否是bigint.

@@ -209,0 +215,0 @@ */

2

package.json

@@ -86,3 +86,3 @@ {

"name": "febs",
"version": "0.8.50"
"version": "0.8.51"
}

@@ -5,2 +5,3 @@ // Type definitions for febs

/// <reference path="../browser/types/index.d.ts" />
/// <reference path="bignumber.js/bignumber.d.ts" />

@@ -125,2 +126,6 @@ declare global {

/**
* @desc: 进行bigint类型转换.
*/
function bigint(v: any): number|BigNumber;
/**
* @desc: 判断是否是bigint.

@@ -127,0 +132,0 @@ */

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc