Fix bin/publish: use correct .env path for rspade_system Fix bin/publish script: prevent grep exit code 1 from terminating script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
585 B
JavaScript
Executable File
25 lines
585 B
JavaScript
Executable File
'use strict';
|
|
|
|
var numToStr = Number.prototype.toString;
|
|
var tryNumberObject = function tryNumberObject(value) {
|
|
try {
|
|
numToStr.call(value);
|
|
return true;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
};
|
|
var toStr = Object.prototype.toString;
|
|
var numClass = '[object Number]';
|
|
var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag;
|
|
|
|
module.exports = function isNumberObject(value) {
|
|
if (typeof value === 'number') {
|
|
return true;
|
|
}
|
|
if (typeof value !== 'object') {
|
|
return false;
|
|
}
|
|
return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass;
|
|
};
|