xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

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, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2020-05-07 01:28  xgqfrms  阅读(290)  评论(3编辑  收藏  举报