# jsonc-register

> A require hook to load JSON files with comments

Latest version **0.2.0** (published 2021-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsonc-register
pnpm add jsonc-register
yarn add jsonc-register
bun add jsonc-register
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2021-11-09 |
| First published | 2021-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 80 |
| Author | Nate Moore |
| Maintainers | natemoo-re |
| Keywords | json, comments, jsonc, register, pirates |

## Links

- npm: https://www.npmjs.com/package/jsonc-register
- Repository: https://github.com/natemoo-re/proload
- Homepage: https://github.com/natemoo-re/proload#readme
- Issues: https://github.com/natemoo-re/proload/issues
- npm.io page: https://npm.io/package/jsonc-register

## Dependencies (2)

- [pirates](https://npm.io/package/pirates.md) ^4.0.1
- [strip-json-comments](https://npm.io/package/strip-json-comments.md) 3.1.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.2.0 (latest) — 2021-11-09

## README

# `jsonc-register`

`json-register` hooks into Node's `require` function to load `.json` or `.jsonc` files that support comments.

```js
const { register } = require('jsonc-register');

register();
const a = require('/path/to/my-file.json');
const b = require('/path/to/my-file.jsonc');
```

---
_Source: https://npm.io/package/jsonc-register · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
