Empty Object/Function Utilities
JSON →The `empty` utility library, currently at version 0.10.1 (last published over 7 years ago), provides a collection of pre-defined empty objects, arrays, and no-operation functions. Its primary feature is enforcing immutability by applying `Object.freeze` to all returned entities by default. This behavior can be overridden if the `NODE_ENV` environment variable is set to `'production'`. The library was designed primarily for CommonJS environments, explicitly supporting Node.js and older browser bundling workflows via tools like Browserify. Due to its age and lack of recent updates, it does not support modern JavaScript module systems (ESM) or TypeScript natively, requiring manual declarations for type safety. Its key differentiator remains providing a consistent, immutable set of primitive empty values and noop functions.
Traffic · last 30 days ↑150% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France