Socket
Book a DemoInstallSign in
Socket

parse-files

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

parse-files

Complimentary lib to parser-cache. Extends the `Parsers` prototype with additional methods for reading files from the file system.

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
65
10.17%
Maintainers
1
Weekly downloads
 
Created
Source

parse-files NPM version

Complimentary lib to parser-cache. Extends the Parsers prototype with additional methods for reading files from the file system.

Install

Install with npm:

npm i parse-files --save-dev

Usage

var Parsers = require('parse-files');
var parsers = new Parsers();

API

.parseFile

Asynchronously read and parse a file at the given filepath and callback next(err, str).

  • filepath {String}: The file to parse.
  • options {Object|Function}: or next function.
  • next {Function}: Callback function.

Example:

parsers.parseFile('docs/abc.md', function (err, file) {
  console.log(file);
});

.parseFiles

Synchronously read and parse a glob of files from the given patterns and callback next(err, str). Options are passed to globby and .parseFile().

  • glob {String}: Glob patterns to use for files to parse.
  • options {Object|Function}: or next function.
  • next {Function}: Callback function.

Example:

parsers.parseFiles('docs/*.md', function (err, files) {
  console.log(files);
});

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license

This file was generated by verb-cli on August 27, 2014.

Keywords

docs

FAQs

Package last updated on 27 Aug 2014

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