// TODO(petamoriken): enable prefer-primordials for node polyfills
// deno-lint-ignore-file prefer-primordials
tools/lint.js to get the list of symbols that need to be replaced with primordials.import { primordials } from "ext:core/mod.js";
const { StringPrototypeSlice, StringPrototypeCharCodeAt, TypeError } = primordials;
String.prototype.charCodeAt, search for while using regex:
(\w+).charCodeAt\(
Replace it with:
StringPrototypeCharCodeAt($1,
Use https://github.com/denoland/deno_core/blob/main/core/core.d.ts for list of available primordials.