{"id":18881,"library":"ubelt","title":"ubelt","description":"A small utility belt library by Dominic Tarr providing common functional helpers (e.g., map, filter, reduce, pipe, compose) for Node.js and browsers. Current stable version 3.2.2, released infrequently as a maintenance package. Designed for small projects where lightweight dependencies are preferred. Key differentiator vs. Lodash/Ramda: minimal API surface, no dependencies, zero-config.","status":"maintenance","version":"3.2.2","language":"javascript","source_language":"en","source_url":"git://github.com/dominictarr/ubelt","tags":["javascript"],"install":[{"cmd":"npm install ubelt","lang":"bash","label":"npm"},{"cmd":"yarn add ubelt","lang":"bash","label":"yarn"},{"cmd":"pnpm add ubelt","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export is an object with all functions; named exports are preferred.","wrong":"import map from 'ubelt'","symbol":"map","correct":"import { map } from 'ubelt'"},{"note":"Package uses CommonJS; ESM import requires a bundler that handles CJS interop.","wrong":"import { pipe } from 'ubelt'","symbol":"pipe","correct":"const { pipe } = require('ubelt')"},{"note":"Default import is an object containing all utilities. Also works with require.","wrong":"const ubelt = require('ubelt')","symbol":"ubelt","correct":"import ubelt from 'ubelt'"}],"quickstart":{"code":"import { map, filter, pipe } from 'ubelt';\n\nconst result = pipe(\n  [1, 2, 3, 4],\n  filter(x => x % 2 === 0),\n  map(x => x * 2)\n);\nconsole.log(result); // [4, 8]","lang":"javascript","description":"Demonstrates pipe, filter, and map functions to process an array."},"warnings":[{"fix":"Update package.json dependency to 'ubelt' and change import paths.","message":"In v2, the package was renamed from 'dominictarr-ubelt' to 'ubelt'. Requires updating imports.","severity":"breaking","affected_versions":">=1.0.0 <2.0.0"},{"fix":"Replace with native Promise or async/await patterns.","message":"Some functions like 'toAsync' have been removed as they were experimental.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Use Object.keys/values/entries or a library like Lodash for objects.","message":"The 'map' function does not support object iteration; only arrays.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install ubelt' to install the latest version.","cause":"Package not installed or incorrect version.","error":"Cannot find module 'ubelt'"},{"fix":"Use named import: import { map } from 'ubelt'; or use default: const ubelt = require('ubelt'); then ubelt.map().","cause":"Importing default export but trying to use named property incorrectly.","error":"TypeError: ubelt.map is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}