unundefined

v1.0.79
Proxies an object so that non of the properties will be undefined.

👻 Unundefined

NPM Version of Unundefined Quality of package Unundefined lint test Known Vulnerabilities Issues Socket

Proxies an object so that non of the properties will be undefined.

Wallpaper of 👻 Unundefined

Usage

npm i unundefined
import { unundefined } from 'unundefined';

const fakeWindow = unundefined(window);

console.log(fakeWindow.contains.everything.you.want);
console.log(fakeWindow.alert /* ... but also existing stuff as usual */);

See more examples in simple tests.

🖋️ Contributing

I am open to pull requests, feedback, and suggestions. Or if you like this utility, you can ☕ buy me a coffee or donate via cryptocurrencies.

You can also ⭐ star the unundefined package, follow me on GitHub or various other social networks.

✨ Partners

Collboard       WebGPT       Promptbook

Become a partner

npm i unundefined

Metadata

Downloads

Maintainers