Listner is a powerful and easy-to-use module designed for creating and managing lists efficiently. Whether you're dealing with simple arrays or complex datasets, Listner provides a set of intuitive operations to help you manage your data effectively.
- Easy list creation and management
- Support for multiple data types
- Efficient search and update operations
- Lighweight and minimal setup
To get started with Listner, install it via npm:
npm install listner
Or if you prefer using Yarn:
yarn add listner
Here's a quick example to get you started:
import { ListManager } from "listner";
// Define the interface for list items (Optional)
interface Person {
name: string;
age: number;
sex?: "male" | "female"
}
// Create a new ListManager instance
const list = new ListManager<Person>();
list.insertMultiple([
{ name: "John", age: 20 },
{ name: "Jane", age: 18, sex: "female" }
])
// Display all items
console.log(list.getAll());
// Update an item
list.searchAndUpdate({ name: "John" }, { age: 35 });
// Display updated list
console.log(list.getAll());
For more detailed documentation, visit Listner Documentation.
Contributions are always welcome! Please read the contribution guidelines
MIT License. See the LICENSE file.