Skip to content

Documentation for strip.parse is an incorrect copy-paste of strip.block #56

@papb

Description

@papb

The documentation for strip.parse is an incorrect copy-paste of strip.block:

strip-comments/index.js

Lines 100 to 116 in 8b26809

/**
* Parses a string and returns a basic CST (Concrete Syntax Tree).
*
* ```js
* const strip = require('..');
* const str = strip.block('const foo = "bar";// this is a comment\n /* me too *\/');
* console.log(str);
* // => 'const foo = "bar";// this is a comment'
* ```
* @name .block
* @param {String} `input` string from which to strip comments
* @param {Object} `options` pass `opts.keepProtected: true` to keep ignored comments (e.g. `/*!`)
* @return {String} modified string
* @api public
*/
strip.parse = parse;

Apparently only the summary is correct:

Parses a string and returns a basic CST (Concrete Syntax Tree).

See it in readme

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions