# @bastou/jsontotsinterface

> Get json from url and export it to a typescript interface file with specified root name.

Latest version **1.0.1** (published 2021-09-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install @bastou/jsontotsinterface
pnpm add @bastou/jsontotsinterface
yarn add @bastou/jsontotsinterface
bun add @bastou/jsontotsinterface
```

Provides the command `jsontotsinterface`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-09-03 |
| First published | 2021-09-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 41 |
| Unpacked size | 174.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bastien Cornier |
| Maintainers | bastiencornier |
| Keywords | json, typescript, generator, type |

## Links

- npm: https://www.npmjs.com/package/@bastou/jsontotsinterface
- Repository: https://github.com/Bastou/json-to-typescript-interface
- Homepage: https://github.com/Bastou/json-to-typescript-interface#readme
- Issues: https://github.com/Bastou/json-to-typescript-interface/issues
- npm.io page: https://npm.io/package/@bastou/jsontotsinterface

## Dependencies (41)

- [has](https://npm.io/package/has.md) ^1.0.3
- [hash.js](https://npm.io/package/hash.js.md) ^1.1.7
- [es7-shim](https://npm.io/package/es7-shim.md) ^6.0.0
- [inherits](https://npm.io/package/inherits.md) ^2.0.4
- [is-regex](https://npm.io/package/is-regex.md) ^1.1.3
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [call-bind](https://npm.io/package/call-bind.md) ^1.0.2
- [is-bigint](https://npm.io/package/is-bigint.md) ^1.0.2
- [is-string](https://npm.io/package/is-string.md) ^1.0.6
- [is-symbol](https://npm.io/package/is-symbol.md) ^1.0.4
- [pluralize](https://npm.io/package/pluralize.md) ^3.1.0
- [string-at](https://npm.io/package/string-at.md) ^1.1.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [es-abstract](https://npm.io/package/es-abstract.md) ^1.18.3
- [has-bigints](https://npm.io/package/has-bigints.md) ^1.0.1
- [has-symbols](https://npm.io/package/has-symbols.md) ^1.0.2
- [is-callable](https://npm.io/package/is-callable.md) ^1.2.3
- [object-keys](https://npm.io/package/object-keys.md) ^1.1.1
- [function-bind](https://npm.io/package/function-bind.md) ^1.1.1
- [get-intrinsic](https://npm.io/package/get-intrinsic.md) ^1.1.1
- [object.assign](https://npm.io/package/object.assign.md) ^4.1.2
- [object.values](https://npm.io/package/object.values.md) ^1.1.4
- [array-includes](https://npm.io/package/array-includes.md) ^3.1.3
- [is-date-object](https://npm.io/package/is-date-object.md) ^1.0.4
- [object-inspect](https://npm.io/package/object-inspect.md) ^1.11.0
- [object.entries](https://npm.io/package/object.entries.md) ^1.1.4
- [es-to-primitive](https://npm.io/package/es-to-primitive.md) ^1.2.1
- [unbox-primitive](https://npm.io/package/unbox-primitive.md) ^1.0.1
- [is-negative-zero](https://npm.io/package/is-negative-zero.md) ^2.0.1
- [is-number-object](https://npm.io/package/is-number-object.md) ^1.0.5
- [define-properties](https://npm.io/package/define-properties.md) ^1.1.3
- [is-boolean-object](https://npm.io/package/is-boolean-object.md) ^1.1.1
- [minimalistic-assert](https://npm.io/package/minimalistic-assert.md) ^1.0.1
- [which-boxed-primitive](https://npm.io/package/which-boxed-primitive.md) ^1.0.2
- [string.prototype.padend](https://npm.io/package/string.prototype.padend.md) ^3.1.2
- [string.prototype.trimend](https://npm.io/package/string.prototype.trimend.md) ^1.0.4
- [string.prototype.padstart](https://npm.io/package/string.prototype.padstart.md) ^3.1.2
- [string.prototype.trimleft](https://npm.io/package/string.prototype.trimleft.md) ^2.1.3
- [string.prototype.trimright](https://npm.io/package/string.prototype.trimright.md) ^2.1.3
- [string.prototype.trimstart](https://npm.io/package/string.prototype.trimstart.md) ^1.0.4
- [object.getownpropertydescriptors](https://npm.io/package/object.getownpropertydescriptors.md) ^2.1.2

## 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

- 1.0.1 (latest) — 2021-09-03
- 1.0.0 — 2021-09-03

## README

# Json to typescript interface generator

Get json from url and export it to a typescript interface file with specified root name.


## How to use

- `-n` : (Optional) Interface name (default: RootObject)
- `-i` : Input url or path to json
- `-o` : Output path for generated Typescript interface file

Example :
```shell
node index.js -n=redditPopular -i=https://www.reddit.com/r/popular.json -o=./types/redditPopularInterface.ts  
```

## Credits 

[@mariusalsh](https://github.com/mariusalch)

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