LGTM & code review
LGTM is an acronym meaning
looks good to me
, frequently used when reviewing documents.
https://github.com/lodash/lodash/pull/4756
https://github.com/learning-js-by-reading-source-codes/lodash/blob/master/.internal/getTag.js
js data types checker
Object.prototype.toString.call();
function getTag(value) {
if (value == null) {
return value === undefined ? '[object Undefined]' : '[object Null]'
}
return toString.call(value)
}
const value = 1n;
getTag(value) === '[object BigInt]'
// true
getTag(value)
// "[object BigInt]"
toString.call(value)
// "[object BigInt]"
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!