Installation
Import the package once for side effects. It patches the built-in prototypes at runtime and exposes TypeScript augmentations for Array, String, and Number.
Install
sh
bun add @almighty-shogun/prototype-extensionssh
npm install @almighty-shogun/prototype-extensionssh
pnpm add @almighty-shogun/prototype-extensionssh
yarn add @almighty-shogun/prototype-extensionsImporting
Import this package once in your application entry file, before application code calls any prototype methods. In most Vue/Vite projects that means main.ts.
ts
import App from './App.vue'
import { createApp } from 'vue'
import '@almighty-shogun/prototype-extensions'
createApp(App).mount('#app');Requirements
- A JavaScript runtime with
Array.prototype.toSplicedsupport forArray.delete. - A bundler that keeps side-effect imports.