# ts-transform-json

> Inline specific values from a JSON file or the whole JSON blob

Latest version **1.1.1** (published 2019-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install ts-transform-json
pnpm add ts-transform-json
yarn add ts-transform-json
bun add ts-transform-json
```

## 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.1.1 |
| Published | 2019-06-05 |
| First published | 2019-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Long Ho |
| Maintainers | longlho |
| Keywords | typescript, ast, transform, json, compiler |

## Links

- npm: https://www.npmjs.com/package/ts-transform-json
- Repository: https://github.com/longlho/ts-transform-json
- Homepage: https://github.com/longlho/ts-transform-json#readme
- Issues: https://github.com/longlho/ts-transform-json/issues
- npm.io page: https://npm.io/package/ts-transform-json

## Dependencies (1)

- [typescript](https://npm.io/package/typescript.md) ^3.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.1.1 (latest) — 2019-06-05
- 1.1.0 — 2019-06-05
- 1.0.9 — 2019-05-21
- 1.0.8 — 2019-05-20
- 1.0.7 — 2019-05-20
- 1.0.6 — 2019-04-16
- 1.0.5 — 2019-03-17
- 1.0.4 — 2019-03-15
- 1.0.3 — 2019-03-15
- 1.0.2 — 2019-03-13
- 1.0.1 — 2019-03-13
- 1.0.0 — 2019-02-12

## README

# ts-transform-json

![build status](https://travis-ci.org/longlho/ts-transform-json.svg?branch=master)

Inline specific values from a JSON file or the whole JSON blob. For example:

```typescript
import {version} from 'package.json'
// becomes
var version = '1.0.5'

// OR
import * as packageJson from 'package.json'
// becomes
var packageJson = {"version": "1.0.5", dependencies: {}}
```

## Usage

First of all, you need some level of familiarity with the [TypeScript Compiler API](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API).

`compile.ts` & tests should have examples of how this works. The available options are:

### isDeclaration?: boolean
Whether you're running this transformer in declaration files (typically specified in `afterDeclarations` instead of `after` in transformer list). This flag will inline types
instead of actual value.

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