{"library":"min-dash","title":"Min-dash: Minimal Utility Toolbelt","description":"Min-dash is a lean, battle-tested utility belt providing a curated selection of essential functions for JavaScript and TypeScript development, particularly within the bpmn.io ecosystem. It differentiates itself by its minimal bundle footprint (under 2 kB gzipped), ES2015 compatibility, and performance-optimized utilities for common operations like sorting and unions. The library ships with comprehensive TypeScript type definitions, ensuring a robust development experience. The current stable version is `5.0.0`, published in February 2024. The project maintains an active release cadence, addressing bug fixes and improvements in minor versions, with major releases introducing significant architectural shifts, such as the transition to an ESM-only distribution. It encourages the use of modern module bundlers for optimal tree-shaking.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install min-dash"],"cli":null},"imports":["import { find } from 'min-dash';","import * as minDash from 'min-dash';","import { assign } from 'min-dash';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { find, sortBy, assign } from 'min-dash';\n\nconst users = [\n  { id: 1, name: 'Alice', age: 30 },\n  { id: 2, name: 'Bob', age: 25 },\n  { id: 3, name: 'Charlie', age: 35 }\n];\n\n// Find a user based on a condition\nconst oldestUser = find(users, user => user.age > 30);\nconsole.log('Oldest user:', oldestUser); // Output: Oldest user: { id: 3, name: 'Charlie', age: 35 }\n\n// Sort users by a property\nconst sortedUsers = sortBy(users, 'age');\nconsole.log('Sorted users:', sortedUsers); // Output: Sorted users: [ { id: 2, name: 'Bob', age: 25 }, { id: 1, name: 'Alice', age: 30 }, { id: 3, name: 'Charlie', age: 35 } ]\n\n// Assign properties from source objects to a target object\nconst defaultOptions = { theme: 'dark', logging: true };\nconst userOptions = { logging: false, debug: true };\nconst mergedOptions = assign({}, defaultOptions, userOptions);\nconsole.log('Merged options:', mergedOptions); // Output: Merged options: { theme: 'dark', logging: false, debug: true }","lang":"typescript","description":"Demonstrates importing and using `find`, `sortBy`, and `assign` utilities for common data manipulation tasks with an emphasis on ESM syntax.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}