Registry / web-framework / yummies

yummies

JSON →
library7.19.4jsnpmunverified

yummies is a collection of frontend utilities for JavaScript/TypeScript projects, currently at v7.19.4. It provides a wide range of functions for common tasks including DOM manipulation, data structures, type guards, React hooks, MobX integrations, and more. The library is actively maintained with frequent releases (multiple patches/minors per month). Its key differentiator is the breadth of utilities under a single package, covering areas like async templates (asyncTemplate), class variance authority (cva), and MobX annotations (annotation), all with TypeScript support. The package requires MobX and React as peer dependencies.

npm install yummies
INSTALL
IMPORT
SIG · YUMMIES
Y
yummies
web-frameworkjavascriptv7.19.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

asyncTemplate
import { asyncTemplate } from 'yummies'
const { asyncTemplate } = require('yummies')
ESM-only package; CommonJS require may fail or require specific import syntax. Use ESM imports.
cva
import { cva } from 'yummies'
import cva from 'yummies'
cva is a named export, not a default export.
annotation
import { annotation } from 'yummies'
import { annotation } from 'yummies/mobx'
annotation is exported from the main entry point, not a subpath. No need for 'yummies/mobx'.
hasEnumerableKeys
import { hasEnumerableKeys } from 'yummies/data'
import { hasEnumerableKeys } from 'yummies'
hasEnumerableKeys is exported from the 'yummies/data' subpath, not the main entry.
assert
import { assert } from 'yummies'
import assert from 'yummies'
assert is a named export, not a default export. ES module syntax required.

Demonstrates importing and using asyncTemplate, cva, annotation, hasEnumerableKeys, and assert from yummies.

import { asyncTemplate, cva, annotation, hasEnumerableKeys, assert } from 'yummies'; import { observable } from 'mobx'; // asyncTemplate: interpolate promises and functions const result = await asyncTemplate`Hello ${async () => 'world'}!`; console.log(result); // 'Hello world!' // cva: class variance authority const button = cva(['base', 'btn'], { variants: { size: { small: ['text-sm'], large: ['text-lg'] }, intent: { primary: ['bg-blue-500'], secondary: ['bg-gray-500'] } } }); const classes = button({ size: 'small', intent: 'primary' }); console.log(classes); // 'base btn text-sm bg-blue-500' // annotation: MobX annotation helper const annotate = annotation({ prop1: observable, prop2: observable }); console.log(annotate); // object with MobX decorators // hasEnumerableKeys: check own enumerable keys const obj = { a: 1, b: 2 }; console.log(hasEnumerableKeys(obj, ['a', 'b'])); // true // assert: type guard with error assert.array([1, 2, 3], 'Must be array'); // passes assert.object(42, 'Must be object'); // throws 'Must be object'
Debug
Known issues
breakingImports from 'yummies/utility-types' and 'yummies/utils/types' are removed in v6. Use 'yummies/types.global' and 'yummies/types' respectively.
fix
Replace imports: 'yummies/utility-types' -> 'yummies/types.global', 'yummies/utils/types' -> 'yummies/types'.
affects: >=6.0.0 <6.0.0
gotchaSome utilities like hasEnumerableKeys are exported from subpaths (e.g., 'yummies/data'), not the main entry. Importing from 'yummies' will not include them.
fix
Use correct subpath import: import { hasEnumerableKeys } from 'yummies/data'.
affects: >=7.18.0
gotchaThe package is ESM-only. Using require() may fail entirely or require specific bundler configuration.
fix
Use ES module imports (import/export syntax) or configure your environment for ESM (e.g., "type": "module" in package.json).
affects: >=7.0.0
deprecatedThe 'yummies/utility-types' and 'yummies/utils/types' subpaths are deprecated and removed in v6.
fix
See breaking change for v6 migration.
affects: >=5.0.0 <6.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module not supported
Trying to use require() to import yummies, which is ESM-only.
fix
Use dynamic import: const { asyncTemplate } = await import('yummies'); or switch to ESM imports.
Module 'yummies' does not export 'hasEnumerableKeys'
Importing from 'yummies' instead of the subpath 'yummies/data'.
fix
Change import to: import { hasEnumerableKeys } from 'yummies/data'.
Cannot find module 'yummies/utility-types' or 'yummies/utils/types'
Imports from removed paths after v6 migration.
fix
Replace with 'yummies/types.global' and 'yummies/types' respectively.
Upgrade
Version history
7.19.4latest on npm
Audit
Dependencies
mobxrequiredRequired for MobX-related utilities such as annotation.
reactrequiredRequired for React-related utilities (hooks, etc.).
Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
yummies — npm install yummies · libregistry