0.1.5 • Published 6 years ago

prototxt-parser v0.1.5

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Build Status

Prototxt-Parser

Parse *.prototxt files to JavaScript objects.

Usage Browser

<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

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

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

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago