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

enum-sync

v1.0.1

Published

A cross-platform enum generator that let you sync enums between different languages.

Readme

Enum Synchronizer

Enum Synchronizer is a powerful, cross-platform command-line tool designed to generate synced enums in various programming languages. It's easy to use and highly configurable, making it a go-to solution for all your enum synchronization needs.

Installation

To install Enum Synchronizer, you need to ensure that you have the Node.js version 14.X.X or higher installed on your machine. Once you have this, you can install Enum Synchronizer globally with the following command:

npm install -g enum-sync

Usage

List all supported languages

To see a list of all the programming languages that Enum Synchronizer supports, use the lang command:

enum-sync lang

Currently supported languages:

| Language | Source | Target | | --------------- | ------ | ------ | | CSharp (cs) | Yes | No | | JavaScript (js) | Yes | No | | TypeScript (ts) | Yes | No | | Dart (dart) | No | Yes |

Manage configurations

Enum Synchronizer allows you to manage your configurations easily. To list all configurations, use the config list command:

enum-sync config list

You can also set configurations for the generator. To set specific configurations as key-value pairs, use the config set command:

enum-sync config set key1=value1 key2=value2 ...

List of configuration property:

| Property | Type | Description | Default | | ------------------------- | ---------- | ------------------------------------------------------------- | ------- | | separateFileForEachType | boolean | Determines whether to generate a separate file for each type. | true | | defaultSourceLanguage | Language | The default language of the source files. | null | | defaultTargetLanguage | Language | The default language of the target files. | null |

Generate enums

To generate enums, you need to provide a source file and a target file. Use the gen command followed by the -src and -tgt flags:

enum-sync gen -src sourceDirectory -tgt targetDirectory

If defaultSourceLanguage and/or defaultTargetLanguage not configured using config command, you need to provide -src-lang and -tgt-lang flags:

enum-sync gen -src sourceDirectory -src-lang sourceLanguage -tgt targetDirectory -tgt-lang targetLanguage

Command paramterers:

| Parameter | Type | Description | Required | | ----------------------------- | ---------- | ----------------------------------------------------------------- | ------------------------------------------------------ | | source, src | string | The source directory where the files to be processed are located. | Yes | | source-language, src-lang | Language | The language of the source files. | No. Required if defaultSourceLanguage not configured | | target, tgt | string | The target directory where the generated files will be written. | Yes | | target-language, tgt-lang | Language | The language of the generated files. | No. Required if defaultTargetLanguage not configured |

Changelog

See CHANGELOG.md.

Contributing

See CONTRIBUTING.md.

License

This project is licensed under the Apache License. See LICENSE for more details.