Common Utilities π§°
Simple, typed, functional, documented, and tested utility functions for JavaScript, TypeScript, Python, Go, and Rust.
This monorepo contains utilities implemented in multiple languages. Each utility is organized as:
utilities/
βββ [utility-name]/
β βββ ts/ # TypeScript implementation
β βββ py/ # Python implementation
β βββ go/ # Go implementation
β βββ rust/ # Rust implementation
Listed below are currently available utilities. More are on the way!
Here are 10 less common but useful utilities planned for implementation:
- memoize - Cache function results for expensive computations
- chunk - Split arrays into smaller arrays of specified size
- clamp - Constrain a number between minimum and maximum values
- retry - Retry failed operations with exponential backoff
- partition - Split an array into two based on a predicate function
- zip - Combine multiple arrays into tuples
- flatten - Recursively flatten nested arrays to specified depth
- pick - Create object with only specified properties
- omit - Create object excluding specified properties
- sleep - Promise-based delay utility for async operations
Each utility will be implemented in TypeScript, Python, Go, and Rust following the same patterns as existing utilities.
License, MIT