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

@vsirotin/keeper-master-data

v3.1.1

Published

This TypeScript library supports the use and management of master data in web applications.

Readme

Keeper for Master Data

GitHub license

npm npm type definitions

npm npm

Description

This TypeScript library supports the use and management of master data in web applications.

Master Data vs. Business Data

Master data, contrary to business data, will rarely change.

Master Data includes the fundamental entities and attributes that remain relatively stable over time.

Business Data encompasses the dynamic information related to business activities and transactions.

Introduction

Upon request for a specific part of the master data, the library tries to find it in local storage. If not found, it will be requested from a given web resource, saved locally, and then returned to the caller.

This means that the expensive call of external resources is saved because the data is stored locally. The application can decide or learn via detours that the new data must be retrieved from external resources. In this case, the data should be deleted locally.

Synchronous and asynchronous resources can be used as external resources.

Using

The library allows you to develop your own tools.

It contains also some predefined readers, writers, adapters (combination of reader and writer) and keepers (a chain of adapters):

Readers:

  • Http - Reader
  • Browser language detector
  • Default reader (return always the same value)

Adaptors:

  • LocalStorage Adapter for simple data
  • LocalStorage Adapter for hierarchical data

Keepers for master data:

  • Keeper for external HTTP resource
  • Keeper for user language

Let's look at a typical web application situation. For our components, master data is assigned that changes relatively rarely. This cause, as well as a possibly bad connection, is the reason why it is worthwhile to store the master data locally (in the browser's LocalStorage). For this we can use an existing class from our library:

    keeper = new KeeperMasterDataBrowserLocalStoreHtppForComponentWithVersion(componentCoordinate, componentVersion);

 ...
    let result = await keeper.findAsync(key);           

Let's look at how this class is built internally:

  
    export class KeeperMasterDataBrowserLocalStoreHtppForComponentWithVersion<T> extends KeeperMasterDataKeyValueAsync<T> {

    
    constructor(componentCoordinate: string, componentVersion: number) {
        super(new LocalStorageAdapterWithVersionsAndCategories(componentVersion, componentCoordinate), 
        [new HTTPKeyValueRepositoryReader(componentCoordinate + "/" + componentVersion + "/")]);
    }

}

It is the chain of an adapter and a “half-adapter” (reader).

You can build your own keepers based on this model.


Other code examples please see in GitHub repository of project.


Relese Notes

2.0.1

Major change

  1. The Specification of LocalStorageAdapter has been changed. This has been made less error-prone.
  2. Documentation improvement.

2.0.2

Correction of deployment unit.

3.0.1

  1. Signatur by constructors KeeperMasterDataKeyValueAsync and KeeperMasterDataKeyValueSync changed.
  2. Internal refactoring
  3. Documentation improvenment.
  4. Dependency updating.

3.0.2

  1. Dependency updating.

3.1.0

  1. Class KeeperCurrentUserLanguage extended with a method isCurrentLangSaved(): boolean that checks if the current language of the user is saved in local storage and returns true if the current language is saved, false otherwise.

3.1.1

  1. Correction in build units.