npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

todolibformobileapp

v1.0.8

Published

A comprehensive ToDo library for managing categories and tasks with priority, recurring schedules, and automatic cleanup

Downloads

12

Readme

ToDoLib

A comprehensive JavaScript library for managing todo categories and tasks with advanced features like priority management, recurring schedules, and automatic cleanup.

Features

  • Category Management: Create, update, delete, and prioritize categories
  • Task Management: Add, update, delete, and prioritize tasks within categories
  • Priority System: Automatic priority management for both categories and tasks
  • Recurring Tasks: Support for repeatable tasks with flexible scheduling
  • Automatic Cleanup: Clean up completed non-repeatable tasks and empty categories
  • Data Sorting: Built-in sorting functionality for organized data
  • Immutable Operations: All operations return new data without mutating the original

Installation

npm install todolibformobileapp

Quick Start

// ES6 Modules
import ToDoLib from "todolibformobileapp";
// or import specific functions
import { addCategory, addTask, sortToDos } from "todolibformobileapp";

// Create a new category
let data = [];
data = ToDoLib.addCategory(data, "cat_001", "Work", "#FF5733");

// Add a task to the category
data = ToDoLib.addTask(data, "cat_001", {
  name: "Complete project",
  notes: "Finish the final implementation",
  canBeRepeated: false,
});

// Sort the data
data = ToDoLib.sortToDos(data);

API Reference

Category Operations

addCategory(data, _id, name, color)

Adds a new category to the data.

  • data: Array of category objects
  • _id: Unique identifier for the category
  • name: Category name
  • color: Category color (hex code)

deleteCategoryById(data, _id)

Deletes a category by its ID.

updateCategoryPriority(data, _id, newPriority)

Updates the priority of a category.

toggleCategoryDone(data, _id, status?)

Toggles the done status of a category and all its tasks.

Task Operations

addTask(data, _id, taskDetails)

Adds a task to a specific category.

const taskDetails = {
  name: "Task name",
  notes: "Task description",
  canBeRepeated: true,
  when: "Monday,Wednesday,Friday",
};

addOrUpdateTask(data, _id, name, notes?, canBeRepeated?, when?)

Adds a new task or updates an existing one.

updateTask(data, _id, taskName, updateDetails)

Updates an existing task's properties.

deleteTask(data, _id, name)

Deletes a task from a category.

updateTaskPriority(data, _id, name, newPriority)

Updates the priority of a specific task.

toggleTaskDone(data, _id, name, status)

Toggles the done status of a task.

Utility Functions

sortToDos(data)

Sorts categories and tasks by priority.

getModifiedCategories(data)

Returns categories that have been modified.

chron(data)

Processes recurring tasks and cleans up completed tasks.

Returns an object with:

  • update: Modified categories
  • delete: Array of deleted category IDs

Data Structure

Category Object

{
  _id: "cat_001",
  name: "Work",
  color: "#FF5733",
  priority: 1,
  done: 2,
  notDone: 3,
  total: 5,
  isMarkedDone: false,
  tasks: [...]
}

Task Object

{
  name: "Complete project",
  notes: "Finish the implementation",
  priority: 1,
  done: false,
  canBeRepeated: true,
  when: "Monday,Wednesday,Friday"
}

Recurring Tasks

The library supports flexible recurring task scheduling:

  • Days of week: "Monday,Wednesday,Friday"
  • Specific dates: "2025-08-22"
  • Date numbers: "15" (15th of each month)

Use the chron() function to process recurring tasks automatically.

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

For issues and questions, please use the GitHub Issues page.