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 🙏

© 2024 – Pkg Stats / Ryan Hefner

churi

v0.15.0

Published

Multi-format schema-based serializer, deserializer and validator. Charged URI syntax. URI Charge Notation

Downloads

24

Readme

ChURI

ChURI is a polyglot serializer, deserializer and validator supporting various data formats.

The data processing is based on data schemas. Schemas are written in TypeScript. ChURI compiles such schemas into efficient code implementing serializers, deserializers, and validators for the data conforming to those schemas.

The main data format supported is URI Charge Notation, which is used to encode data included into URI. Such URI is called Charged URI, or ChURI.

Other data formats supported out of the box:

  • JSON
  • application/x-www-form-urlencoded (URI query parameters)
  • URL-encoded
  • plain text

Some formats support insets containing data in another formats. For example, the application/x-www-form-urlencoded format allows query parameter values to be encoded as URL-encoded ones, as plain text, or as URI Charge. The choice is made by data schema.

NPM Build Status Code Quality Coverage GitHub Project API Documentation

Charged URI and URI Charge

Charged URI (ChURI) may include arbitrary structured data. The data is encoded with URI Charge Notation.

It is like JSON for GET requests, but may include even more:

https://example.com/!v(3)api/user;id=0n302875106592253/article;slug=hello-world/comments?date=since(!date'1970-01-01)till(!now)&range=from(10)to(20)

See the explanation >>>

Read more about URI Charge Notation >>>

This Package

This package provides:

  • ChURI class, which is a read-only URL class that grants access to charges.
  • URI charging utilities.
  • Schema-based parser, serializer, and validator.
  • URI Charge Notation support
  • JSON support.
  • application/x-www-form-urlencoded format support.
  • Other formats support, such as plain text and URI-encoded values.