Socket
Socket
Sign inDemoInstall

same-value-zero-x

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

same-value-zero-x

ES6-compliant shim for SameValueZero.


Version published
Weekly downloads
580
decreased by-28.75%
Maintainers
1
Weekly downloads
 
Created
Source

Travis status Dependency status devDependency status npm version

same-value-zero-x

ES6-compliant shim for SameValueZero.

See: 7.2.10 SameValueZero(x, y)
Version: 1.3.2
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750

module.exports(x, y)boolean

This method determines whether two values are the same value. SameValueZero differs from SameValue (Object.is) only in its treatment of +0 and -0.

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

ParamTypeDescription
x*The first value to compare.
y*The second value to compare.

Example

var sameValueZero = require('same-value-zero-x');
sameValueZero(0, 0); // true
sameValueZero(-0, -0); // true
sameValueZero(0, -0); // true
sameValueZero(NaN, NaN); //true
sameValueZero(Infinity, Infinity); // true
sameValueZero(-Infinity, -Infinity); // true

Keywords

FAQs

Package last updated on 24 Feb 2018

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