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

@lichens-innovation/ts-common

v1.15.4

Published

Reusable generic typescript utilities, types, constants, helpers

Readme

ts-common

Reusable generic typescript utilities, types, constants, helpers

Note: The default export is pure TypeScript and environment-agnostic—it has no dependency on Node.js, browser, or React Native APIs, so the same code runs in any of these runtimes. Subpath imports such as @lichens-innovation/ts-common/web target a specific environment and rely on its APIs.

npm version npm downloads Build Status License

TypeScript Node.js Yarn

Vitest ESLint Prettier

Semantic Versioning PRs Welcome standard-readme compliant

Table of content

Prerequisites

  • Node.js (LTS or higher)
  • Yarn

Scripts

| Command | Description | |------------------------------|-----------------------------------------------------------------------------| | yarn prepare | Configures Husky (Git hooks). Runs automatically after yarn install. | | yarn build | Compiles the project with tsup (outputs to dist/). | | yarn clean:node | Removes node_modules and yarn.lock. | | yarn clean:dist | Removes the dist directory. | | yarn typecheck | Type-checks TypeScript without emitting files (tsc --noEmit). | | yarn lint | Runs ESLint on the project. | | yarn lint:fix | Runs ESLint and applies automatic fixes. | | yarn test | Runs tests with Vitest and coverage report. | | yarn test:watch | Runs tests in watch mode with Vitest. | | yarn test:coverage | Runs tests with coverage report using Vitest. |

Optional modules

This library provides optional subpath modules with external dependencies. Install only the dependencies you need. For more information regarding the packaging, see the following technical explanation.

Excel (@lichens-innovation/ts-common/excel)

npm install exceljs mime

CSV (@lichens-innovation/ts-common/csv)

npm install papaparse mime

PDF (@lichens-innovation/ts-common/pdf)

npm install jspdf jspdf-autotable

Web (@lichens-innovation/ts-common/web)

No external dependency required.

MIME (@lichens-innovation/ts-common/mime)

npm install mime

Logger (@lichens-innovation/ts-common/logger)

Logger based on pino with formatted console output (timestamp, colored levels). Works in browser and Node.js.

  • Browser: logs are formatted and sent to console with colored level labels.
  • Node.js: logs are formatted with pino-pretty (colorized, readable output). Install pino-pretty when using the logger in Node.

Install the dependencies:

npm install pino

For Node.js (required for pretty output):

npm install pino-pretty

Exports: logger, setLoggerMinimumLevel, type Level.

Usage example:

import { logger, setLoggerMinimumLevel, type Level } from "@lichens-innovation/ts-common/logger";

// Minimum level (optional): "trace" | "debug" | "info" | "warn" | "error" | "fatal"
setLoggerMinimumLevel("debug");

logger.info("Simple message");
logger.debug("Debug", { userId: "123", action: "login" });
logger.error("Error", { code: 500 });

RJSF (@lichens-innovation/ts-common/rjsf)

Utilities and hooks for React JSON Schema Form (RJSF) with i18n (i18next / react-i18next), localized validation (ajv-i18n), and form layout. For React apps using RJSF with translation and validation.

Install the dependencies:

npm install @rjsf/core @rjsf/utils @rjsf/validator-ajv8 ajv-i18n i18next react-i18next

Contributions

Contributions to the project are made by simply improving the current codebase and then creating a Pull Request. If the version field in package.json is incremented, the build will be automatically triggered when the PR is merged into the main branch, and the new version will be published to our enterprise Git repository.

Unit tests

Test coverage must be maintained at 80% or higher. It is therefore important to always attempt to cover new code that is added with appropriate tests.

Library semantic versioning

When there is a breaking change, Semantic Versioning must be used to indicate that a major behavior has changed. Semantic Versioning follows the MAJOR.MINOR.PATCH format:

  • MAJOR version when you make incompatible API changes
  • MINOR version when you add functionality in a backward compatible manner
  • PATCH version when you make backward compatible bug fixes

Project coding guidelines

Adhering to established coding guidelines is essential for developing efficient, maintainable, and scalable software. These guidelines promote consistency across codebases, making it easier for teams to collaborate and for new developers to understand existing code. By following standardized patterns, such as those outlined in the Coding guidelines, developers can reduce errors and enhance code readability.

TODOs

This section list remaining tasks (not yet completed)

  • RJSF-001: find a way to dynamically resolve the rjsf-i18n.utils "%1 Key" pattern

License

This project is licensed under the MIT License - see the LICENSE file for details.