Files
ai-course/node_modules/es-iterator-helpers/aos/GetIteratorFlattenable.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

51 lines
1.5 KiB
JavaScript

'use strict';
var $TypeError = require('es-errors/type');
var AdvanceStringIndex = require('es-abstract/2024/AdvanceStringIndex');
var Call = require('es-abstract/2024/Call');
var GetIteratorDirect = require('./GetIteratorDirect');
var GetMethod = require('es-abstract/2024/GetMethod');
var IsArray = require('es-abstract/2024/IsArray');
var Type = require('es-abstract/2024/Type');
var getIteratorMethod = require('es-abstract/helpers/getIteratorMethod');
// https://tc39.es/proposal-iterator-helpers/#sec-getiteratorflattenable
module.exports = function GetIteratorFlattenable(obj, stringHandling) {
if (stringHandling !== 'REJECT-STRINGS' && stringHandling !== 'ITERATE-STRINGS') {
throw new $TypeError('Assertion failed: `stringHandling` must be "REJECT-STRINGS" or "ITERATE-STRINGS"');
}
if (Type(obj) !== 'Object') {
if (stringHandling === 'REJECT-STRINGS' || typeof obj !== 'string') {
throw new $TypeError('obj must be an Object'); // step 1.a
}
}
var method = void undefined; // step 2
// method = GetMethod(obj, Symbol.iterator); // step 5.a
method = getIteratorMethod(
{
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod,
IsArray: IsArray
},
obj
);
var iterator;
if (typeof method === 'undefined') { // step 3
iterator = obj; // step 3.a
} else { // step 4
iterator = Call(method, obj); // step 4.a
}
if (Type(iterator) !== 'Object') {
throw new $TypeError('iterator must be an Object'); // step 5
}
return GetIteratorDirect(iterator); // step 6
};