Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brocan/brocanfile

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brocan/brocanfile

Brocanfile parser and validator.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

brocanfile

Brocanfile parser and validator for Node.

Please see brocanfile.md for the brocanfile reference.

Usage

const brocanfile = require('brocanfile');

brocanfile.read('brocan.hjson')
    .then(contents => console.log(contents));

API

read(filename: string): Promise<any>

Reads the specified file and then parses and validates its contents. Throws an Error if

  • the file cannot be opened or read,
  • the contents of the file are not valid HJSON,
  • the contents of the file violate the brocanfile specification.

In the latter case, the thrown Error instance has a validationErrors field containing the array of constraint violations.

FAQs

Package last updated on 11 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc