JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q51023F

Utilies for parser-cache and compatible parsers.

Package Exports

  • parser-utils

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parser-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

parser-utils NPM version

Utilies for parser-cache and compatible parsers.

Install

Install with npm:

npm i parser-utils --save-dev

Usage

var utils = require('parser-utils');

API

.mergeData

  • obj {Object}: The object with properties to merge.
  • props {Object}: You may pass an array of additional properties to merge.
  • returns {Object}: Merged object

Return a single object from locals and data properties on the given object.

.extendFile

Extend and normalize a file object, to ensure that it has the properties expected by the next parser.

  • file {Object}: The file object or string to normalize.
  • options {Object}: Options with additional properties to extend to the file object.
  • returns {Object}: Normalized file object.

Example:

var file = {content: 'foo'};
utils.extendFile(file);
//=> {content: 'foo', data: {}, original: 'foo', options: {}}

Author

Jon Schlinkert

License

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


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