A 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:
npm install chetan-js-polyfills
Or using Yarn:
yarn add chetan-js-polyfills
When you import the package, these polyfills are added to the respective prototypes:
-
Function.prototype:
-
myCall
,myBind
,myApply
-
-
Array.prototype:
-
myMap
,myFilter
,myReduce
,mySlice
,myFlat
-
-
Object:
myCreate
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:
myDeepCloneObject
myCurrySum
myDeepCompareObjects
myAbstractEquality
myDebounce
myThrottleBasicUsingDate
myThrottleBasicUsingTimer
myThrottleAdvance
myNew
mySetTimeout
myClearTimeout
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!
- Fork the repo
- Create your branch (`git checkout -b feature-name`)
- Commit your changes
- Open a Pull Request
MIT License
© 2025 Chetan
Give it a star ⭐ on GitHub — it helps others discover it! `;