pencil-box 0.1.7

A versatile Rust utility library, inspired by JavaScript's Lodash, providing common helper functions for collections, strings, numbers, and more, with no external dependencies.
Documentation

Pencil-Box

A high-performance, idiomatic Rust utility crate offering Lodash-style collection and value manipulation functions.

📚 Documentation

👉 Full API docs / Reference


📦 Installation

Add this to your Cargo.toml:

[dependencies]
pencil-box = "0.1.6"

Replace "0.1.6" with the latest version from crates.io.


🚀 Usage & Available Methods

Each function is currently part of the array module. Full documentation with examples is available via the official docs.rs documentation.

Component Function Description Full API docs / API Reference
array chunk Split slices into fixed-size chunks Full API Docs
array uniq Remove duplicate elements using HashSet Full API Docs
array uniq_performant Faster deduplication using AHashSet Full API Docs
array difference Compute list difference using HashSet Full API Docs
array difference_performant Faster list difference using AHashSet Full API Docs
array compact Remove "empty" values using the IsEmpty trait Full API Docs
array drop_start Remove N elements from the beginning of a vector Full API Docs
array drop_end Remove N elements from the end of a vector Full API Docs

🥪✅ Running Tests

To run all unit tests, use:

cargo test --tests

💯📂 Code Coverage

To generate a code coverage report, run:

cargo tarpaulin --out html --output-dir code_coverage

🔒 Safety

  • ✅ 100% safe Rust (#![forbid(unsafe_code)])
  • ✅ No unsafe blocks
  • ✅ Panic-free under all valid inputs

📄 License

Licensed under MIT.


🤝 Contributing

Contributions, bug reports, and feature requests are welcome! Open an issue or submit a pull request anytime.


🌐 Links