# ts-file-parser

> This repository provides a parser for `*.ts` files. It parses the structure of a file and provides JSON object that contains its declaration.

Latest version **0.0.21** (published 2021-04-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install ts-file-parser
pnpm add ts-file-parser
yarn add ts-file-parser
bun add ts-file-parser
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.21 |
| Published | 2021-04-22 |
| First published | 2017-10-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 132.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Maintainers | softmedialab |
| Keywords | typescript, content, parser |

## Links

- npm: https://www.npmjs.com/package/ts-file-parser
- Repository: https://github.com/AbatapCompany/ts-structure-parser
- Issues: https://github.com/AbatapCompany/ts-structure-parser/issues
- npm.io page: https://npm.io/package/ts-file-parser

## Dependencies (1)

- [typescript](https://npm.io/package/typescript.md) 2.7.2

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.0.21 (latest) — 2021-04-22
- 0.0.20 — 2021-04-13
- 0.0.19 — 2021-03-30
- 0.0.18 — 2021-03-02
- 0.0.17 — 2021-03-01
- 0.0.16 — 2020-03-24
- 0.0.15 — 2020-03-23
- 0.0.14 — 2020-03-23
- 0.0.13 — 2020-03-23
- 0.0.12 — 2018-03-21
- 0.0.11 — 2018-03-19
- 0.0.10 — 2018-03-19
- 0.0.8 — 2018-03-16
- 0.0.7 — 2018-03-14
- 0.0.6 — 2018-03-14
- … 5 more at https://npm.io/package/ts-file-parser/versions

## README

# TypeScript File Parser

[![Build Status](https://travis-ci.org/AbatapCompany/ts-structure-parser.svg?branch=master)](https://travis-ci.org/AbatapCompany/ts-structure-parser)

This repository provides a parser for `*.ts` files. It parses the structure of a file and provides JSON object that contains its declaration.

## Usage

```js
import tsFileStruct = require("ts-file-parser")

var filePath = "./src/typescript-file.ts";
var decls = fs.readFileSync(filePath).toString();
var jsonStructure = tsFileStruct.parseStruct(decls, {}, filePath);
```

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