s101-lodash
v1.0.3
Published
A lightweight lodash-like utility library
Readme
s101-lodash
A lightweight, Lodash-inspired utility library for JavaScript.
It provides helpful functions for common programming tasks such as array manipulation, data chunking, and other functional utilities — designed to be simple, fast, and beginner-friendly.
📦 Installation
Install via npm:
npm install s101-lodash
🚀 Usage
This package is written as an ES Module.
Use import syntax in modern Node.js projects.
Array Utilities
import { chunk } from "s101-lodash";
const numbers = [1, 2, 3, 4, 5];
const size = 2;
console.log(chunk(numbers, size));
// Output: [[1, 2], [3, 4], [5]]
🧩 Available Functions
chunk(array, size)
Splits an array into smaller arrays of a given size.
Parameters:
array (Array): The array to process
size (number): The length of each chunk
Returns:
(Array): A new array of chunks
Example:
chunk([1, 2, 3, 4, 5], 2);
// [[1, 2], [3, 4], [5]]
🛠 CLI (Optional)
If installed globally, you can also run:
npx s101-lodash
This is mainly for demonstration/testing purposes.
🤝 Contributing
Contributions are welcome and appreciated!
Fork the repository
Create a new branch
git checkout -b feature/your-feature-name
Add or improve functionality
Write or update tests
Commit your changes
git commit -m "Add: meaningful commit message"
Push to your fork and submit a Pull Request
Please ensure all tests pass before submitting.
📄 License
ISC License © AK Shuvo
⭐ About
s101-lodash is a learning-focused, real-world practice project inspired by Lodash.
It aims to help developers understand how popular utility libraries are structured and published on npm.