JSPM

passive-voice

0.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 47844
    • Score
      100M100P100Q222753F
    • License MIT

    detect passive voice

    Package Exports

    • passive-voice

    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 (passive-voice) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    passive voice Build Status

    npm module for detecting passive voice.

    Based on this shell script.

    Install

    npm install passive-voice

    Use

    var passive = require('passive-voice');
    
    var problems = passive('He was judged.');
    // problems -> [{ index: 3, offset: 10 }]

    The Preposition "By"

    In scientific writing, it's sometimes more reasonable to use passive voice:

    The mixture was heated to 300°C.

    Still, it's easy to restate with an active voice passive constructions followed by the preposition "by."

    For example:

    The mixture was heated by the apparatus to 300°C.

    Versus:

    The apparatus headed the mixture to 300°C.

    For this case, you can pass { by: true } as a second argument to passive to only flag such constructions as problematic:

    var passive = require('passive-voice');
    
    var problems = passive('The mixture was heated to 300°C.');
    // problems -> []
    
    var problems = passive('The mixture was heated by the apparatus to 300°C.');
    // problems -> [{ index: 12, offset: 13 }]

    See Also

    License

    MIT