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 🙏

© 2025 – Pkg Stats / Ryan Hefner

asamap

v1.0.14

Published

This is a standardized dictionary data management plugin designed specifically for Asa projects or technology stacks, aimed at solving the maintenance and usage issues of mapping relationships such as enumeration values, status codes, and type options tha

Readme

Asa Map

This is a standardized dictionary data management plugin designed specifically for Asa projects or technology stacks, aimed at solving the maintenance and usage issues of mapping relationships such as enumeration values, status codes, and type options that frequently occur during the development process. It pre integrates about 80% of commonly used static dictionaries in the Asa system (such as status, type, classification, region, etc.) and provides a consistent and convenient way to call them, significantly reducing duplicate definitions and improving development efficiency and code consistency.

core functionality

📚 High coverage dictionary set

Carefully selected and built-in with over 80% of commonly used mapping relationships in Asa business scenarios, covering user status, order type, business classification, universal identification, etc., eliminating the need for manual maintenance from scratch.

🔄 Dual mode output, suitable for different scenarios

Each dictionary provides two data structures, Array and Object:

Array mode: suitable for scenes that directly consume arrays, such as drop-down selection boxes, single selection groups, list rendering, etc., with formats such as [{label: 'enable', value: 1},...].

Object mode: suitable for quick key value lookup, mapping echo, logical judgment, etc., with formats such as {1: 'enable', 0: 'disable'}, supporting quick tag retrieval through values.

🎯 Ready to use, unified management

Dictionary dataset maintenance, decoupled from the project but easy to call. There is no need to repeatedly define the same state mapping in multiple business modules, ensuring that dictionary values with the same meaning are completely consistent throughout the entire system.

⚙️ Lightweight and type friendly

Provide good type hints for TypeScript, which can obtain complete value type and tag type inference when called, improving development experience and code security.

Typical usage scenarios

Form dropdown options: directly obtain the Array format dictionary and bind it to components such as el select and a-select.

Table status display: Based on the values in the data, quickly map the corresponding display labels using Object format.

Logical judgment and filtering: Directly reference dictionary constants in the code to avoid magic numbers or strings.

Unified data format: Ensure that the meaning and display of fields such as status and type remain consistent during front-end and back-end interaction.

Why do we need it?

In the development of the Asa project, different modules often use the same state enumeration (such as "0=not enabled, 1=enabled"). If each developer or module defines themselves, it will result in:

Distributed definition, difficult maintenance

Easy to generate duplicate definitions with inconsistent meanings

Repetitive writing of echo logic

This plugin standardizes and centralizes these dictionaries, providing a set of call schemes that are superior to configuration. You no longer need to manually maintain these mapping arrays, nor do you have to worry about inconsistent state labels between different pages.

Precautions

This plugin is highly customized for Asa technology stack or business system, and the dictionary content is based on its conventional business abstraction, which may not be fully applicable to other projects with completely different architectures.

The remaining 20% are very business specific dictionaries, and it is recommended that they be managed by the project itself in the same way to maintain consistency in usage habits.

The plugin itself does not provide asynchronous dictionary retrieval or dynamic update functions, but focuses on the management and use of static dictionaries.

By using this plugin, Asa project developers can bid farewell to trivial dictionary definitions and focus more on business logic implementation, while ensuring that the dictionary data of the entire system is clear, consistent, and easy to maintain.