New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

passive-voice

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passive-voice

detect passive voice

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
39K
decreased by-7.93%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • write-good - a module for linting English

License

MIT

Keywords

FAQs

Package last updated on 19 Jun 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

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