ModApp Utilities (modapp-utils) provides a collection of generic utility functions intended for use across the broader ModApp ecosystem of JavaScript packages. These utilities typically cover common programming patterns such as object manipulation (e.g., deep merging, cloning), array helpers, string transformations, event debouncing/throttling, and unique ID generation. As of version 1.8.0, it serves as a foundational library, abstracting common logic to ensure consistency and reduce boilerplate in related ModApp projects. The package does not explicitly detail its release cadence, but incremental updates can be expected to support the evolving ModApp framework. Its key differentiator is its tailored integration and consistency within the ModApp architecture, rather than offering novel utility functions compared to broader libraries like Lodash or Ramda.
npm install modapp-utilsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates importing and using a `debounce` function for event handling, a `mergeDeep` function for recursively combining objects, and a `generateUUID` function for creating unique identifiers. It sets up a simple debounced search input in the browser and logs merged configuration and a new UUID to the console.
Always refer to the official documentation or source code for exact export names and types. Use named imports (`import { funcName } from 'modapp-utils';`) unless a default export is explicitly provided.Ensure your project is configured for ESM (e.g., `"type": "module"` in `package.json` or `.mjs` file extension). If using CommonJS, consider transpiling your code or using a bundler that handles ESM imports correctly. Check if a CommonJS build is provided or a legacy version is available if ESM migration is not an option.
Use a modern bundler like Webpack, Rollup, or Vite. Verify bundle size with tools like `webpack-bundle-analyzer` and ensure your bundler is configured for production mode to enable tree-shaking and minification. If bundle size remains an issue, consider selectively importing only the specific utilities you need if the library supports subpath imports (which is not guaranteed for generic utility packages).
Verify the exact name of the exported function from `modapp-utils`. Ensure you are using named imports: `import { debounce } from 'modapp-utils';`.Either convert your consuming file to an ES Module (by using `import` statements and ensuring your `package.json` has `"type": "module"` or your file ends in `.mjs`), or use dynamic `import('modapp-utils')` if you must remain in CommonJS.Double-check the `modapp-utils` documentation or its source code to confirm the correct export name for the deep merge utility. It might be named `deepMerge`, `assignDeep`, or similar. Adjust your import statement accordingly.
No dependency data recorded yet.