# prototxt-parser

> a prototxt parser for js based on parsimmon

Latest version **0.1.5** (published 2017-12-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install prototxt-parser
pnpm add prototxt-parser
yarn add prototxt-parser
bun add prototxt-parser
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2017-12-26 |
| First published | 2017-12-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Christoph Koerner |
| Maintainers | chaosmail |
| Keywords | caffe, prototxt, parser |

## Links

- npm: https://www.npmjs.com/package/prototxt-parser
- Repository: https://github.com/chaosmail/prototxt-parser
- Homepage: https://github.com/chaosmail/prototxt-parser#readme
- Issues: https://github.com/chaosmail/prototxt-parser/issues
- npm.io page: https://npm.io/package/prototxt-parser

## Dependencies (1)

- [parsimmon](https://npm.io/package/parsimmon.md) ^1.6.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.1.5 (latest) — 2017-12-26
- 0.1.4 — 2017-12-05
- 0.1.3 — 2017-12-02
- 0.1.2 — 2017-12-02
- 0.1.1 — 2017-12-02
- 0.1.0 — 2017-12-02

## README

[![Build Status](https://travis-ci.org/chaosmail/prototxt-parser.svg?branch=master)](https://travis-ci.org/chaosmail/prototxt-parser)

# Prototxt-Parser

Parse `*.prototxt` files to JavaScript objects.

## Usage Browser

```html
<script src="https://unpkg.com/prototxt-parser"></script>
<script>

  function fetchText(uri) {
    return fetch(new Request(uri)).then(function(res){
      return res.text();
    });
  }

  var uri = "https://rawgit.com/DeepScale/SqueezeNet/master/SqueezeNet_v1.1/deploy.prototxt";
  var proto;
  fetchText(uri).then(function(str){
    proto = prototxtParser.parse(str);
    console.log(proto);
  });

</script>
```

## Usage Typescript

```typescript
import * as prototxtParser from 'prototxt-parser';

function fetchText(uri: string) : Promise<string> {
  return fetch(new Request(uri)).then((res) => res.text());
}

let uri = "https://rawgit.com/DeepScale/SqueezeNet/master/SqueezeNet_v1.1/deploy.prototxt";
let proto: Object;

fetchText(uri).then(function(str){
  proto = prototxtParser.parse(str);
  console.log(proto);
});

```

## Development

```sh
# Install dependencies
npm install

# Build the JS file and TS declaration
npm run build

# Run the tests
npm run test
```


## License

The software is provided under MIT license.

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