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

@dismissible/nestjs-item

v3.1.1

Published

Dismissible item library

Readme

Dismissible manages the state of your UI elements across sessions, so your users see what matters, once! No more onboarding messages reappearing on every tab, no more notifications haunting users across devices. Dismissible syncs dismissal state everywhere, so every message is intentional, never repetitive.

@dismissible/nestjs-item

Core data models and factory for dismissible items in NestJS applications.

Part of the Dismissible API - This library is part of the Dismissible API ecosystem. Visit dismissible.io for more information and documentation.

Overview

This library provides the foundational data structures for the Dismissible system:

  • DismissibleItemDto - The core data transfer object representing a dismissible item
  • DismissibleItemFactory - Factory for creating and manipulating dismissible items

Installation

npm install @dismissible/nestjs-item

Getting Started

Basic Usage

The DismissibleItemDto class represents a dismissible item with the following properties:

  • id - Unique identifier for the item
  • userId - User identifier who owns the item
  • createdAt - Timestamp when the item was created
  • dismissedAt - Optional timestamp when the item was dismissed
import { DismissibleItemDto } from '@dismissible/nestjs-item';

const item: DismissibleItemDto = {
  id: 'welcome-banner',
  userId: 'user-123',
  createdAt: new Date(),
};

Using the Factory

The DismissibleItemFactory provides methods for creating and manipulating items:

import { Module } from '@nestjs/common';
import { DismissibleItemModule, DismissibleItemFactory } from '@dismissible/nestjs-item';

@Module({
  imports: [DismissibleItemModule],
})
export class AppModule {}

// In your service
import { Injectable } from '@nestjs/common';
import { DismissibleItemFactory, DismissibleItemDto } from '@dismissible/nestjs-item';

@Injectable()
export class MyService {
  constructor(private readonly itemFactory: DismissibleItemFactory) {}

  createItem(): DismissibleItemDto {
    return this.itemFactory.create({
      id: 'welcome-banner',
      userId: 'user-123',
      createdAt: new Date(),
    });
  }

  dismissItem(item: DismissibleItemDto): DismissibleItemDto {
    return this.itemFactory.createDismissed(item, new Date());
  }

  restoreItem(item: DismissibleItemDto): DismissibleItemDto {
    return this.itemFactory.createRestored(item);
  }
}

API Reference

DismissibleItemDto

The main data transfer object for dismissible items.

class DismissibleItemDto {
  id: string;
  userId: string;
  createdAt: Date;
  dismissedAt?: Date;
}

DismissibleItemFactory

Factory for creating and manipulating dismissible items.

Methods

  • create(options) - Create a new item from options
  • clone(item) - Create a clone of an existing item
  • createDismissed(item, dismissedAt) - Create a dismissed version of an item
  • createRestored(item) - Create a restored (non-dismissed) version of an item

Related Packages

This library is typically used alongside other Dismissible packages:

  • @dismissible/nestjs-core - Main dismissible service and module
  • @dismissible/nestjs-storage - Storage interface and adapters
  • @dismissible/nestjs-postgres-storage - PostgreSQL storage adapter

License

MIT