Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

operator-compare

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

operator-compare

[ABANDONED] Comparing two variables with operator as argument

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

operator-compare

NPM version Dependency Status Build Status

Donate

Abandoned

Unfortunately I don't have any more time to maintain this repository :-(

sad cat

Comparing two variables with operator as argument.

Usage

var compare = require('compare');

compare(5, '<', 10);			// result: true

As you can see, this is just simple function, which compare two variables by operator as second argument. List of available operators is bellow.

Operators

There are just classic operators with some others.

   Operator   |   Equivalent
--------------+----------------
      >       |          >
      >=      |          >=
      <       |          <
      <=      |          <=
     =, ==    |         ===
   !, !=, <>  |         !==

Last two lines are sets of operators, so operator <> is the same one as !=.

If you will try to set some unknown operator, exception will be thrown.

Changelog

  • 1.0.3

    • Abandon project
  • 1.0.2

    • Move under Carrooi organization
    • Abandon repository
    • Rewrite to pure javascript
    • Fix typos
    • Add to travis
    • Update dependencies
  • 1.0.1

    • Typo in readme
  • 1.0.0

    • Initial commit

Keywords

FAQs

Package last updated on 15 Jul 2015

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