|
3 | 3 | <img src="https://cdn.croct.io/brand/logo/repo-icon-green.svg" alt="Croct" height="80"/> |
4 | 4 | </a> |
5 | 5 | <br /> |
6 | | - <strong>TypeScript Project Title</strong> |
| 6 | + <strong>JSON Pointer</strong> |
7 | 7 | <br /> |
8 | | - A brief description about the project. |
| 8 | + A <a href="https://datatracker.ietf.org/doc/html/rfc6901">RFC 6901</a> compliant JSON pointer library to handle arbitrary structured data. |
9 | 9 | </p> |
10 | 10 | <p align="center"> |
11 | | - <img alt="Build" src="https://img.shields.io/badge/build-passing-green" /> |
12 | | - <img alt="Coverage" src="https://img.shields.io/badge/coverage-100%25-green" /> |
13 | | - <img alt="Maintainability" src="https://img.shields.io/badge/maintainability-100-green" /> |
| 11 | + <a href="https://github.com/croct-tech/json-pointer-js/actions/workflows/validate-branch.yaml"><img alt="Build" src="https://github.com/croct-tech/json-pointer-js/actions/workflows/validate-branch.yaml/badge.svg" /></a> |
| 12 | + <a href="https://codeclimate.com/repos/6224bc798bc258016500056f/test_coverage"><img src="https://api.codeclimate.com/v1/badges/692b087d6472a80bb509/test_coverage" /></a> |
| 13 | + <a href="https://codeclimate.com/repos/6224bc798bc258016500056f/maintainability"><img src="https://api.codeclimate.com/v1/badges/692b087d6472a80bb509/maintainability" /></a> |
14 | 14 | <br /> |
15 | 15 | <br /> |
16 | | - <a href="https://github.com/croct-tech/repository-template-typescript/releases">📦Releases</a> |
17 | | - · |
18 | | - <a href="https://github.com/croct-tech/repository-template-typescript/issues/new?labels=bug&template=bug-report.md">🐞Report Bug</a> |
19 | | - · |
20 | | - <a href="https://github.com/croct-tech/repository-template-typescript/issues/new?labels=enhancement&template=feature-request.md">✨Request Feature</a> |
| 16 | + <a href="https://github.com/croct-tech/json-pointer-js/releases">📦Releases</a> |
| 17 | + · |
| 18 | + <a href="https://github.com/croct-tech/json-pointer-js/issues/new?labels=bug&template=bug-report.md">🐞Report Bug</a> |
| 19 | + · |
| 20 | + <a href="https://github.com/croct-tech/json-pointer-js/issues/new?labels=enhancement&template=feature-request.md">✨Request Feature</a> |
21 | 21 | </p> |
22 | 22 |
|
23 | | -# Instructions |
24 | | -Follow the steps below to create a new repository: |
25 | | - |
26 | | -1. Customize the repository |
27 | | - 1. Click on the _Use this template_ button at the top of this page |
28 | | - 2. Clone the repository locally |
29 | | - 3. Update the `README.md` and `package.json` with the new package information |
30 | | -2. Setup Code Climate |
31 | | - 1. Add the project to [Croct's code climate organization](https://codeclimate.com/accounts/5e714648faaa9c00fb000081/dashboard) |
32 | | - 2. Go to **Repo Settings > Test coverage** and copy the "_TEST REPORTER ID_" |
33 | | - 3. Go to **Repo Settings > Badges** and copy the maintainability and coverage badges to the `README.md` |
34 | | - 4. On the Github repository page, go to **Settings > Secrets** and add a secret with name `CC_TEST_REPORTER_ID` and the ID from the previous step as value. |
35 | | - |
| 23 | +## Introduction |
| 24 | + |
| 25 | +This library provides an [RFC 6901](https://tools.ietf.org/html/rfc6901) compliant JSON pointer implementation |
| 26 | +to handle and manipulate arbitrary JSON values with type-safety. |
| 27 | + |
36 | 28 | ## Installation |
37 | | -Use the package manage [NPM](https://www.npmjs.com) to install the package: |
| 29 | + |
| 30 | +We recommend using [NPM](https://www.npmjs.com) to install the package: |
38 | 31 |
|
39 | 32 | ```sh |
40 | | -npm install @croct/project-ts |
| 33 | +npm install @croct-tech/json-pointer |
41 | 34 | ``` |
42 | 35 |
|
43 | | -## Basic usage |
| 36 | +## Overview |
44 | 37 |
|
45 | | -```typescript |
46 | | -import {Example} from '@croct/project-ts'; |
| 38 | +This library ships with a fast implementation of the JSON Pointer specification, as described in |
| 39 | +[RFC 6901](https://tools.ietf.org/html/rfc6901). |
47 | 40 |
|
48 | | -const example = new Example(); |
49 | | -example.displayBasicUsage(); |
50 | | -``` |
| 41 | +These are the main highlight that distinguishes it from similar libraries: |
| 42 | + |
| 43 | +- Fast and lightweight, zero dependencies |
| 44 | +- Fully compliant with the specification, including validation, serialization, and deserialization |
| 45 | +- Provide methods for reading and writing structures |
| 46 | +- Restricts operations such that no array becomes sparse |
| 47 | +- Ensures that a valid `JsonStructure` modified by a `JsonPointer` results in a still valid `JsonStructure` |
51 | 48 |
|
52 | 49 | ## Contributing |
| 50 | + |
53 | 51 | Contributions to the package are always welcome! |
54 | 52 |
|
55 | | -- Report any bugs or issues on the [issue tracker](https://github.com/croct-tech/project-ts/issues). |
56 | | -- For major changes, please [open an issue](https://github.com/croct-tech/project-ts/issues) first to discuss what you would like to change. |
| 53 | +- Report any bugs or issues on the [issue tracker](https://github.com/croct-tech/json-pointer-js/issues). |
| 54 | +- For major changes, please [open an issue](https://github.com/croct-tech/json-pointer-js/issues) first to discuss what you would like to change. |
57 | 55 | - Please make sure to update tests as appropriate. |
58 | 56 |
|
59 | 57 | ## Testing |
@@ -84,16 +82,10 @@ Before building the project, the dependencies must be installed: |
84 | 82 | npm install |
85 | 83 | ``` |
86 | 84 |
|
87 | | -Then, to build the CommonJS module: |
88 | | - |
89 | | -```sh |
90 | | -npm run rollup |
91 | | -``` |
92 | | - |
93 | | -The following command bundles a minified IIFE module for browsers: |
| 85 | +The following command builds the library: |
94 | 86 |
|
95 | 87 | ``` |
96 | | -npm run rollup-min |
| 88 | +npm run build |
97 | 89 | ``` |
98 | 90 |
|
99 | 91 | ## License |
|
0 commit comments