Files
ai-course/node_modules/is-string/index.js
KQL ce6aa207e9 fix: 修复图片路径以适配GitHub Pages base path
- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL
- 修复 HomePage.tsx 中所有图片引用
- 修复 CoursePage.tsx 中所有图片引用
- 确保图片在 GitHub Pages 上正确加载

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 09:24:45 +08:00

32 lines
1.0 KiB
JavaScript

'use strict';
var callBound = require('call-bound');
/** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
var $strValueOf = callBound('String.prototype.valueOf');
/** @type {import('.')} */
var tryStringObject = function tryStringObject(value) {
try {
$strValueOf(value);
return true;
} catch (e) {
return false;
}
};
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
var $toString = callBound('Object.prototype.toString');
var strClass = '[object String]';
var hasToStringTag = require('has-tostringtag/shams')();
/** @type {import('.')} */
module.exports = function isString(value) {
if (typeof value === 'string') {
return true;
}
if (!value || typeof value !== 'object') {
return false;
}
return hasToStringTag ? tryStringObject(value) : $toString(value) === strClass;
};