Contributor License Agreement All In One
Contributor License Agreement All In One
CLA
https://cla.js.foundation/lodash/lodash?pullRequest=4756
lodash isBigInt.js
https://github.com/learning-js-by-reading-source-codes/lodash/blob/master/isBigInt.js
/**
* Checks if `value` is classified as a `BigInt` primitive.
*
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a BigInt, else `false`.
* @example
*
* isBigInt(1n)
* // => true
*
* isBigInt(BigInt('1'))
* // => true
*
* isBigInt(123)
* // => false
*/
function isBigInt(value) {
const type = typeof value
return type === 'bigint' ;
}
export default isBigInt
refs
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12840237.html
未经授权禁止转载,违者必究!