0.15.0 • Published 8 months ago

churi v0.15.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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.
0.12.0

10 months ago

0.13.0

10 months ago

0.14.0

10 months ago

0.15.0

8 months ago

0.11.0

10 months ago

0.10.0

11 months ago

0.10.1

11 months ago

0.9.0

11 months ago

0.6.3

1 year ago

0.8.0

1 year ago

0.6.2

1 year ago

0.7.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago