{"library":"my-easy-fp","title":"my-easy-fp Utility Functions","description":"my-easy-fp is a JavaScript and TypeScript utility library providing a collection of focused, single-purpose functions for common programming tasks. It covers categories such as boolean logic, array manipulation (e.g., `chunk`, `populate`, `last`), comprehensive empty/null/undefined checks, miscellaneous helpers like `getRandomRange`, and an asynchronous `sleep` function. The library also ships with several custom TypeScript utility types to enhance type safety. Currently at version `0.23.0`, `my-easy-fp` is actively developed under a `0.x` versioning scheme, indicating that its API is subject to change as it approaches a stable 1.0 release. It is designed to be compatible with both browser and Node.js environments (requiring Node.js >=20), offering a lightweight alternative to larger utility frameworks. Its key differentiators include built-in TypeScript support and a modular design, making it suitable for projects needing specific utilities without extensive bundle size.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install my-easy-fp"],"cli":null},"imports":["import { chunk } from 'my-easy-fp';","import { isComplexEmpty } from 'my-easy-fp';","import { sleep } from 'my-easy-fp';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { chunk, sleep, isComplexEmpty, populate, getRandomRangeInt } from 'my-easy-fp';\n\nasync function main() {\n  console.log('--- Array Utilities ---');\n  const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n  const chunked = chunk(numbers, 3);\n  console.log('Chunked array:', chunked); // [[1,2,3], [4,5,6], [7,8,9], [10]]\n\n  const populated = populate(5);\n  console.log('Populated array (0-based):', populated); // [0, 1, 2, 3, 4]\n  const populatedOneBased = populate(3, true);\n  console.log('Populated array (1-based):', populatedOneBased); // [1, 2, 3]\n\n  console.log('\\n--- Empty Checks ---');\n  console.log('Is null complex empty?', isComplexEmpty(null)); // true\n  console.log('Is empty string complex empty?', isComplexEmpty('')); // true\n  console.log('Is [] complex empty?', isComplexEmpty([])); // true\n  console.log('Is {} complex empty?', isComplexEmpty({})); // true\n  console.log('Is 0 complex empty?', isComplexEmpty(0)); // true (due to isNaN check)\n  console.log('Is \"hello\" complex empty?', isComplexEmpty('hello')); // false\n\n  console.log('\\n--- Async Utility ---');\n  console.log('Starting sleep for 1 second...');\n  await sleep(1000);\n  console.log('...Finished sleeping.');\n\n  console.log('\\n--- Misc Utility ---');\n  const randomNumber = getRandomRangeInt(1, 100);\n  console.log('Random integer between 1 and 100:', randomNumber);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Demonstrates basic usage of `my-easy-fp` utilities for array manipulation, comprehensive empty/null/undefined checks, asynchronous delays, and random number generation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}