This commit is contained in:
2025-04-29 13:26:19 +08:00
parent 6e1ae24845
commit bf88fcb395
73 changed files with 12939 additions and 4637 deletions

View File

@@ -5,6 +5,10 @@
* @fileoverview Global |this| required for resolving indexes in node.
* @suppress {globalThis}
*/
import encodingIndexes from './encoding-indexes';
const encodingGlobal = {
'encoding-indexes' : encodingIndexes
};
(function(global) {
'use strict';
@@ -35,6 +39,7 @@
* @return {boolean} True if the item appears in the array.
*/
function includes(array, item) {
console.log(1);
return array.indexOf(item) !== -1;
}
@@ -834,6 +839,7 @@
* |index|, or null if |code point| is not in |index|.
*/
function indexPointerFor(code_point, index) {
console.log(code_point,index);
var pointer = index.indexOf(code_point);
return pointer === -1 ? null : pointer;
}
@@ -935,6 +941,7 @@
var index_ = shift_jis_index;
// 2. Return the index pointer for code point in index.
console.log(3);
return index_.indexOf(code_point);
}
var shift_jis_index;
@@ -3309,4 +3316,5 @@
// For strict environments where `this` inside the global scope
// is `undefined`, take a pure object instead
}(this || {}));
}(encodingGlobal));
export default encodingGlobal