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

is-affirmative

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-affirmative

Returns true if a value is an `affirmative` value (from the affirmative lib). Useful for CLI prompts.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.4K
decreased by-3.86%
Maintainers
1
Weekly downloads
 
Created
Source

is-affirmative NPM version Build Status

Returns true if a value is an affirmative value (from the affirmative lib). Useful for CLI prompts.

Install

Install with npm:

$ npm i is-affirmative --save

Usage

var isAffirmative = require('is-affirmative');

isAffirmative('yes');
//=> true

isAffirmative('no');
//=> false

See the [affirmative][] library for all supported values.

Examples

Returns true if the value is affirmative:

isAffirmative('yes');
isAffirmative('yeah');
isAffirmative('ok');
isAffirmative('okay');
isAffirmative('sure');
//=> true

Returns false if the value is not (anything but) an affirmative value:

isAffirmative('nope');
//=> false

affirmative: Array of 'yes' words and phrases that express the user's agreement with a statement or… more | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2016 Jon Schlinkert Released under the MIT license.


This file was generated by verb on January 19, 2016.

Keywords

FAQs

Package last updated on 19 Jan 2016

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