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

data-masking-customization-lib

v1.0.0

Published

Standard Solution App Customization Hook NPM Lib for Data Masking

Readme

Data Masking Customization Library

This is a standard Solution App Customization Hook NPM library for data masking, built according to the Solution Platform Adoption SOP.

Features

  • Endpoint: /custom/mask (exposed via Solution Platform)
  • Functionality: Masks card numbers showing first 4 and last 4 digits
  • Input: {"cardnumber": "81928371827428127"}
  • Output: {"cardnumber": "8192****8127"}

Structure

data-masking-customization-lib/
├── src/
│   ├── index.ts                    # Exports factory and types
│   ├── SolutionAppFactory.ts       # Factory for creating solution app instances
│   ├── SolutionAppImpl.ts          # Implementation of ISolutionApp interface
│   └── types.ts                    # Type definitions
├── sample-masking-logic.js         # Example implementation (auto-generated by SPMS)
├── package.json                    # NPM package configuration
├── tsconfig.json                   # TypeScript configuration
└── README.md                       # This file

Installation

npm install data-masking-customization-lib

Usage

This library is designed to be used with the Solution Platform Management System (SPMS). The actual masking logic is auto-generated by SPMS based on the customization template.

Example Request

{
  "cardnumber": "81928371827428127"
}

Example Response

{
  "cardnumber": "8192****8127"
}

API Documentation

This library includes comprehensive Swagger/OpenAPI documentation for all endpoints.

POST /custom/mask

Masks sensitive card number data by showing only the first 4 and last 4 digits.

Request Body:

{
  "cardnumber": "string"
}

Response:

{
  "cardnumber": "string"
}

Swagger Documentation Included:

  • Complete OpenAPI 3.0 specification
  • Request/response schemas with examples
  • Error response documentation (400, 500)
  • Interactive API documentation via Solution Platform

Example Swagger Response Codes:

  • 200: Card number masked successfully
  • 400: Invalid request - missing or invalid card number
  • 500: Internal server error

Build

npm run build

This will compile TypeScript files to JavaScript in the lib/ directory.

Compliance

This library follows the Solution Platform Adoption SOP specifications:

  • ✅ Uses @gs/solution-library as peer dependency
  • ✅ Implements ISolutionApp interface
  • ✅ Exports only factory and types as specified
  • ✅ Uses standard customization framework contract
  • ✅ Single endpoint implementation
  • ✅ Health check implementation

License

MIT