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

same-value-x

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

same-value-x

Determines whether two values are the same value.

  • 2.0.21
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
551
decreased by-16.52%
Maintainers
1
Weekly downloads
 
Created
Source

Travis status Dependency status devDependency status npm version

same-value-x

Determines whether two values are the same value.

module.exports(value1, value2)boolean

This method is the comparison abstract operation SameValue(x, y), where x and y are ECMAScript language values, produces true or false.

Kind: Exported function
Returns: boolean - A Boolean indicating whether or not the two arguments are the same value.

ParamTypeDescription
value1*The first value to compare.
value2*The second value to compare.

Example

import sameValue from 'same-value-x';

console.log(sameValue(1, 1)); // true
console.log(sameValue(true, true)); // true
console.log(sameValue(NaN, NaN)); // true
console.log(sameValue(true, false)); // false
console.log(sameValue(0, -0)); // false

Keywords

FAQs

Package last updated on 22 Jul 2019

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