Skip to content

yowainwright/common-utilities

Repository files navigation

No cruft. No bloat. No dependencies.

Simple, typed, functional, documented, and tested utility functions for JavaScript, TypeScript, Python, Go, and Rust.

~View the docs


Project Structure

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

Utilities

Listed below are currently available utilities. More are on the way!


Up Next

Here are 10 less common but useful utilities planned for implementation:

  1. memoize - Cache function results for expensive computations
  2. chunk - Split arrays into smaller arrays of specified size
  3. clamp - Constrain a number between minimum and maximum values
  4. retry - Retry failed operations with exponential backoff
  5. partition - Split an array into two based on a predicate function
  6. zip - Combine multiple arrays into tuples
  7. flatten - Recursively flatten nested arrays to specified depth
  8. pick - Create object with only specified properties
  9. omit - Create object excluding specified properties
  10. 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

About

Simple typed utilities generally written in a functional style for learning and utility 🧰

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 10