Socket
Socket
Sign inDemoInstall

math-sign-x

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

math-sign-x - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

2

index.js
/**
* @file ES6-compliant shim for Math.sign.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-math.sign|20.2.2.29 Math.sign(x)}
* @version 2.0.1
* @version 2.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -6,0 +6,0 @@ * @copyright Xotic750

@@ -5,3 +5,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){

* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-math.sign|20.2.2.29 Math.sign(x)}
* @version 2.0.1
* @version 2.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -494,3 +494,3 @@ * @copyright Xotic750

* @file Converts argument to a value of type Number.
* @version 1.0.1
* @version 1.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -537,3 +537,3 @@ * @copyright Xotic750

var $toNumber = function toNumber(argument) {
var value = toPrimitive(argument, 'number');
var value = toPrimitive(argument, Number);
if (typeof value === 'symbol') {

@@ -540,0 +540,0 @@ throw new TypeError('Cannot convert a Symbol value to a number');

!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for Math.sign.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-math.sign|20.2.2.29 Math.sign(x)}
* @version 2.0.1
* @version 2.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -78,3 +78,3 @@ * @copyright Xotic750

* @file Converts argument to a value of type Number.
* @version 1.0.1
* @version 1.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -85,3 +85,3 @@ * @copyright Xotic750

*/
"use strict";var toPrimitive=_dereq_("to-primitive-x"),trim=_dereq_("trim-x"),pStrSlice=String.prototype.slice,binaryRegex=/^0b[01]+$/i,test=binaryRegex.test,isBinary=function _isBinary(value){return test.call(binaryRegex,value)},octalRegex=/^0o[0-7]+$/i,isOctal=function _isOctal(value){return test.call(octalRegex,value)},nonWS=["\x85","\u200b","\ufffe"].join(""),nonWSregex=new RegExp("["+nonWS+"]","g"),hasNonWS=function _hasNonWS(value){return test.call(nonWSregex,value)},invalidHexLiteral=/^[-+]0x[0-9a-f]+$/i,isInvalidHexLiteral=function _isInvalidHexLiteral(value){return test.call(invalidHexLiteral,value)},$toNumber=function toNumber(argument){var value=toPrimitive(argument,"number");if("symbol"==typeof value)throw new TypeError("Cannot convert a Symbol value to a number");if("string"==typeof value){if(isBinary(value))return $toNumber(parseInt(pStrSlice.call(value,2),2));if(isOctal(value))return $toNumber(parseInt(pStrSlice.call(value,2),8));if(hasNonWS(value)||isInvalidHexLiteral(value))return NaN;var trimmed=trim(value);if(trimmed!==value)return $toNumber(trimmed)}return Number(value)};module.exports=$toNumber},{"to-primitive-x":16,"trim-x":21}],16:[function(_dereq_,module,exports){/**
"use strict";var toPrimitive=_dereq_("to-primitive-x"),trim=_dereq_("trim-x"),pStrSlice=String.prototype.slice,binaryRegex=/^0b[01]+$/i,test=binaryRegex.test,isBinary=function _isBinary(value){return test.call(binaryRegex,value)},octalRegex=/^0o[0-7]+$/i,isOctal=function _isOctal(value){return test.call(octalRegex,value)},nonWS=["\x85","\u200b","\ufffe"].join(""),nonWSregex=new RegExp("["+nonWS+"]","g"),hasNonWS=function _hasNonWS(value){return test.call(nonWSregex,value)},invalidHexLiteral=/^[-+]0x[0-9a-f]+$/i,isInvalidHexLiteral=function _isInvalidHexLiteral(value){return test.call(invalidHexLiteral,value)},$toNumber=function toNumber(argument){var value=toPrimitive(argument,Number);if("symbol"==typeof value)throw new TypeError("Cannot convert a Symbol value to a number");if("string"==typeof value){if(isBinary(value))return $toNumber(parseInt(pStrSlice.call(value,2),2));if(isOctal(value))return $toNumber(parseInt(pStrSlice.call(value,2),8));if(hasNonWS(value)||isInvalidHexLiteral(value))return NaN;var trimmed=trim(value);if(trimmed!==value)return $toNumber(trimmed)}return Number(value)};module.exports=$toNumber},{"to-primitive-x":16,"trim-x":21}],16:[function(_dereq_,module,exports){/**
* @file Converts a JavaScript object to a primitive value.

@@ -88,0 +88,0 @@ * @version 1.0.1

{
"name": "math-sign-x",
"version": "2.0.1",
"version": "2.1.0",
"description": "ES6-compliant shim for Math.sign.",

@@ -33,3 +33,3 @@ "homepage": "https://github.com/Xotic750/math-sign-x",

"is-nan-x": "^1.0.1",
"to-number-x": "^1.0.1"
"to-number-x": "^1.1.0"
},

@@ -36,0 +36,0 @@ "devDependencies": {

@@ -27,3 +27,3 @@ <a href="https://travis-ci.org/Xotic750/math-sign-x"

**See**: [20.2.2.29 Math.sign(x)](http://www.ecma-international.org/ecma-262/6.0/#sec-math.sign)
**Version**: 2.0.1
**Version**: 2.1.0
**Author**: Xotic750 <Xotic750@gmail.com>

@@ -30,0 +30,0 @@ **License**: [MIT](&lt;https://opensource.org/licenses/MIT&gt;)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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