Useful JS polyfills and utilities written from scratch
npm install chetan-js-polyfillA lightweight JavaScript polyfill library to bring modern JS features to older environments. Simple, modular, and dependency-free.
> šÆ Focused on minimalism ā only polyfills you actually need.
---

- ā
Polyfills for modern JavaScript methods (ES6+)
- ā
Zero dependencies
- ā
Works in old browsers (like IE11+)
- ā
Tiny bundle size
---
Install via npm:
``bash`
npm install chetan-js-polyfills
Or using Yarn:
`bash`
yarn add chetan-js-polyfills
---
When you import the package, these polyfills are added to the respective prototypes:
- Function.prototype:
- myCall, myBind, myApplymyMap
- Array.prototype:
- , myFilter, myReduce, mySlice, myFlatmyCreate
- Object:
-
`js`
import 'chetan-js-polyfills';
// Now you can use the polyfilled methods directly on Function, Array, and Object
---
You can also import utility functions as named exports:
- myDeepCloneObjectmyCurrySum
- myDeepCompareObjects
- myAbstractEquality
- myDebounce
- myThrottleBasicUsingDate
- myThrottleBasicUsingTimer
- myThrottleAdvance
- myNew
- mySetTimeout
- myClearTimeout
-
`js`
import {
myDeepCloneObject,
myCurrySum,
myDeepCompareObjects,
myAbstractEquality,
myDebounce,
myThrottleBasicUsingDate,
myThrottleBasicUsingTimer,
myThrottleAdvance,
myNew,
mySetTimeout,
myClearTimeout
} from 'chetan-js-polyfills';
This approach keeps your bundle size small and lets you use only what you need.
Designed to work in environments that support ES5 (like IE11 and above).
Tested in:
- Chrome
- Firefox
- Safari
- Edge
- Internet Explorer 11 ā
---
---
---
Contributions, bug reports, and feature requests are welcome!
1. Fork the repo
2. Create your branch (\git checkout -b feature-name\)
3. Commit your changes
4. Open a Pull Request
---
MIT License
Ā© 2025 Chetan
---
Give it a star ā on GitHub ā it helps others discover it!
;