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

emicc

v1.0.29

Published

Backend for front-end code generation library based on Emi definition files. Define http actions, dtos, entities, and many more details, and get the code boilerplate, http requests, in different languages.

Readme

Emi compiler

Backend for front-end code generation library based on Emi definition files. Define http actions, dtos, entities, and many more details, and get the code boilerplate, http requests, in different languages.

Emi generated code aims to be framework agnostic on different targets, but in the same time would provide extra helpers based on popularity of a library.

Live playground: https://torabian.github.io/emi

You can try to compile Emi live here: https://torabian.github.io/emi Emi is written in Golang, and wasm file exported to be used in javascript environment (only for generation, no runtime needed.)

Javascript/TypeScript generation

Emi javascript generator can be used for both typescript or javascript without need of recompiling to javascript via external tools. It would cover:

  • Pure vanilla javascript, with classes, and fetch api. (always enabled, not tags needed)
  • Nest.js extra decorators (--tags nestjs)
  • React query tools (--tags react) generates mutations and useQuery tools.

Emi compiler generates code which is compatible with javascript standard library, such as UrlSearchParams, Headers, and would convert res/req into very typesafe matter by creating classes, and introducing getters and setters.

Example fetch created via emi compiler, which is 100% compatible with fetch:


export class FetchGetSinglePostAction {
  static URL = 'https://jsonplaceholder.typicode.com/posts/:id';
  static NewUrl = (
    params: FetchGetSinglePostActionPathParameter,
    qs?: GetSinglePostQueryParams,
  ) => buildUrl(FetchGetSinglePostAction.URL, params, qs);
  static Method = 'get';
  static Fetch = async (
    params: FetchGetSinglePostActionPathParameter,
    qs?: GetSinglePostQueryParams,
    init?: TypedRequestInit<GetSinglePostRes, GetSinglePostReqHeaders>,
    overrideUrl?: string,
  ) => {
    const res = await fetchx<
      GetSinglePostRes,
      unknown,
      GetSinglePostReqHeaders
    >(overrideUrl ?? FetchGetSinglePostAction.NewUrl(params, qs), {
      method: FetchGetSinglePostAction.Method,
      ...(init || {}),
    });
    const result = await res.json();
    res.result = new GetSinglePostRes(result);
    return res;
  };
}

Javascript features

Here is a list of features which will be generated via js/ts compiler:

  • [x] Type of action options, to determine the values as query
  • [x] Url parameters type-safety
  • [x] FetchMeta data class, containing the method, url, url generator and fetchx
  • [x] Generate the object into typescript type only
  • [x] Generate Request, and Response classes
  • [x] Generate type-safe query strings (?param=1) and support deep nested
  • [x] Nest.js decorators to use query, req, and headers directly in actions
  • [x] React.js useQuery
  • [x] React.js useMutation
  • [x] Package.json generation
  • [x] Playground eslint
  • [x] Constructor for javascript needs to use it’s own functions
  • [x] Make the partial compiler functions public
  • [x] Module3 complete documentation to write.
  • [x] Typesafe reactive methods, for WebSocket access.
  • [ ] Determine on the path selector, so in the options user can select details needed to be generated
  • [ ] Publish on npm and make available on npx
  • [ ] Publish on brew to install.
  • [ ] Static fields for the common object to access fields via json path
  • [ ] Generate the DTO and Entities standalone in emi

Emi Golang

Emi for golang will be based on Fireback module3 files, it's a goal to use only emi for generating golang placeholder code.

Emi Swift

Emi for swift and swiftui will be a similar structure to javascript compiler, to make writing swift features easier.

Emi Kotlin

Emi kotlin wil be a generated client tools (and some shared, to be used in springboot) for writing mostly on Android environment.

Emi syntax

Emi is a yaml file, and here you can find the complete schema:

  • https://github.com/torabian/emi/blob/main/playground/public/emi-module-spec.json

You can use the definition with Redhat yaml plugin in the vscode.