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

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 1.2.0 to 1.3.0

.nvmrc

31

index.js
/**
* @file
* <a href="https://travis-ci.org/Xotic750/math-sign-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/math-sign-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/math-sign-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/math-sign-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/math-sign-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/math-sign-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/math-sign-x" title="npm version">
* <img src="https://badge.fury.io/js/math-sign-x.svg"
* alt="npm version" height="18">
* </a>
*
* ES6-compliant shim for Math.sign.
*
* Requires ES3 or above.
*
* @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 1.2.0
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>

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

(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){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/math-sign-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/math-sign-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/math-sign-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/math-sign-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/math-sign-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/math-sign-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/math-sign-x" title="npm version">
* <img src="https://badge.fury.io/js/math-sign-x.svg"
* alt="npm version" height="18">
* </a>
*
* ES6-compliant shim for Math.sign.
*
* Requires ES3 or above.
*
* @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 1.2.0
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -34,0 +7,0 @@ * @copyright Xotic750

@@ -1,1 +0,10 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=e()}}(function(){return function e(t,r,n){function s(i,c){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!c&&u)return u(i,!0);if(o)return o(i,!0);var f=new Error("Cannot find module '"+i+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[i]={exports:{}};t[i][0].call(l.exports,function(e){var r=t[i][1][e];return s(r||e)},l,l.exports,e,t,r,n)}return r[i].exports}for(var o="function"==typeof require&&require,i=0;i<n.length;i++)s(n[i]);return s}({1:[function(e,t,r){"use strict";var n,o=e("is-nan");if("function"==typeof Math.sign)try{1===Math.sign(10)&&-1===Math.sign(-10)&&0===Math.sign(0)&&(n=Math.sign)}catch(e){}t.exports=n||function sign(e){var t=Number(e);return 0===t||o(t)?t:t>0?1:-1}},{"is-nan":5}],2:[function(e,t,r){"use strict";var n=e("object-keys"),o=e("foreach"),i="function"==typeof Symbol&&"symbol"==typeof Symbol(),c=Object.prototype.toString,u=function(e){return"function"==typeof e&&"[object Function]"===c.call(e)},f=Object.defineProperty&&function(){var e={};try{Object.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(e){return!1}}(),l=function(e,t,r,n){(!(t in e)||u(n)&&n())&&(f?Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},s=function(e,t){var r=arguments.length>2?arguments[2]:{},c=n(t);i&&(c=c.concat(Object.getOwnPropertySymbols(t))),o(c,function(n){l(e,n,t[n],r[n])})};s.supportsDescriptors=!!f,t.exports=s},{foreach:3,"object-keys":8}],3:[function(e,t,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString;t.exports=function forEach(e,t,r){if("[object Function]"!==o.call(t))throw new TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var c=0;c<i;c++)t.call(r,e[c],c,e);else for(var u in e)n.call(e,u)&&t.call(r,e[u],u,e)}},{}],4:[function(e,t,r){"use strict";t.exports=function isNaN(e){return e!==e}},{}],5:[function(e,t,r){"use strict";var n=e("define-properties"),o=e("./implementation");n(o,{getPolyfill:e("./polyfill"),implementation:o,shim:e("./shim")}),t.exports=o},{"./implementation":4,"./polyfill":6,"./shim":7,"define-properties":2}],6:[function(e,t,r){"use strict";var n=e("./implementation");t.exports=function getPolyfill(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},{"./implementation":4}],7:[function(e,t,r){"use strict";var n=e("define-properties"),o=e("./polyfill");t.exports=function shimNumberIsNaN(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},{"./polyfill":6,"define-properties":2}],8:[function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Array.prototype.slice,c=e("./isArguments"),u=Object.prototype.propertyIsEnumerable,f=!u.call({toString:null},"toString"),l=u.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(e){var t=e.constructor;return t&&t.prototype===e},p={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&n.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{a(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),b=function(e){if("undefined"==typeof window||!y)return a(e);try{return a(e)}catch(e){return!1}},m=function keys(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),i=c(e),u=t&&"[object String]"===o.call(e),a=[];if(!t&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var p=l&&r;if(u&&e.length>0&&!n.call(e,0))for(var y=0;y<e.length;++y)a.push(String(y));if(i&&e.length>0)for(var m=0;m<e.length;++m)a.push(String(m));else for(var h in e)p&&"prototype"===h||!n.call(e,h)||a.push(String(h));if(f)for(var g=b(e),d=0;d<s.length;++d)g&&"constructor"===s[d]||!n.call(e,s[d])||a.push(s[d]);return a};m.shim=function shimObjectKeys(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var e=Object.keys;Object.keys=function keys(t){return e(c(t)?i.call(t):t)}}}else Object.keys=m;return Object.keys||m},t.exports=m},{"./isArguments":9}],9:[function(e,t,r){"use strict";var n=Object.prototype.toString;t.exports=function isArguments(e){var t=n.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===n.call(e.callee)),r}},{}]},{},[1])(1)});
!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 1.3.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module math-sign-x
*/
"use strict";var $sign,$isNaN=_dereq_("is-nan");if("function"==typeof Math.sign)try{1===Math.sign(10)&&-1===Math.sign(-10)&&0===Math.sign(0)&&($sign=Math.sign)}catch(ignore){}module.exports=$sign||function sign(x){var n=Number(x);return 0===n||$isNaN(n)?n:n>0?1:-1}},{"is-nan":5}],2:[function(_dereq_,module,exports){"use strict";var keys=_dereq_("object-keys"),foreach=_dereq_("foreach"),hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol(),toStr=Object.prototype.toString,isFunction=function(fn){return"function"==typeof fn&&"[object Function]"===toStr.call(fn)},supportsDescriptors=Object.defineProperty&&function(){var obj={};try{Object.defineProperty(obj,"x",{enumerable:!1,value:obj});for(var _ in obj)return!1;return obj.x===obj}catch(e){return!1}}(),defineProperty=function(object,name,value,predicate){(!(name in object)||isFunction(predicate)&&predicate())&&(supportsDescriptors?Object.defineProperty(object,name,{configurable:!0,enumerable:!1,value:value,writable:!0}):object[name]=value)},defineProperties=function(object,map){var predicates=arguments.length>2?arguments[2]:{},props=keys(map);hasSymbols&&(props=props.concat(Object.getOwnPropertySymbols(map))),foreach(props,function(name){defineProperty(object,name,map[name],predicates[name])})};defineProperties.supportsDescriptors=!!supportsDescriptors,module.exports=defineProperties},{foreach:3,"object-keys":8}],3:[function(_dereq_,module,exports){var hasOwn=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;module.exports=function forEach(obj,fn,ctx){if("[object Function]"!==toString.call(fn))throw new TypeError("iterator must be a function");var l=obj.length;if(l===+l)for(var i=0;i<l;i++)fn.call(ctx,obj[i],i,obj);else for(var k in obj)hasOwn.call(obj,k)&&fn.call(ctx,obj[k],k,obj)}},{}],4:[function(_dereq_,module,exports){"use strict";module.exports=function isNaN(value){return value!==value}},{}],5:[function(_dereq_,module,exports){"use strict";var define=_dereq_("define-properties"),implementation=_dereq_("./implementation");define(implementation,{getPolyfill:_dereq_("./polyfill"),implementation:implementation,shim:_dereq_("./shim")}),module.exports=implementation},{"./implementation":4,"./polyfill":6,"./shim":7,"define-properties":2}],6:[function(_dereq_,module,exports){"use strict";var implementation=_dereq_("./implementation");module.exports=function getPolyfill(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:implementation}},{"./implementation":4}],7:[function(_dereq_,module,exports){"use strict";var define=_dereq_("define-properties"),getPolyfill=_dereq_("./polyfill");module.exports=function shimNumberIsNaN(){var polyfill=getPolyfill();return define(Number,{isNaN:polyfill},{isNaN:function(){return Number.isNaN!==polyfill}}),polyfill}},{"./polyfill":6,"define-properties":2}],8:[function(_dereq_,module,exports){"use strict";var has=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,slice=Array.prototype.slice,isArgs=_dereq_("./isArguments"),isEnumerable=Object.prototype.propertyIsEnumerable,hasDontEnumBug=!isEnumerable.call({toString:null},"toString"),hasProtoEnumBug=isEnumerable.call(function(){},"prototype"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],equalsConstructorPrototype=function(o){var ctor=o.constructor;return ctor&&ctor.prototype===o},excludedKeys={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hasAutomationEqualityBug=function(){if("undefined"==typeof window)return!1;for(var k in window)try{if(!excludedKeys["$"+k]&&has.call(window,k)&&null!==window[k]&&"object"==typeof window[k])try{equalsConstructorPrototype(window[k])}catch(e){return!0}}catch(e){return!0}return!1}(),equalsConstructorPrototypeIfNotBuggy=function(o){if("undefined"==typeof window||!hasAutomationEqualityBug)return equalsConstructorPrototype(o);try{return equalsConstructorPrototype(o)}catch(e){return!1}},keysShim=function keys(object){var isObject=null!==object&&"object"==typeof object,isFunction="[object Function]"===toStr.call(object),isArguments=isArgs(object),isString=isObject&&"[object String]"===toStr.call(object),theKeys=[];if(!isObject&&!isFunction&&!isArguments)throw new TypeError("Object.keys called on a non-object");var skipProto=hasProtoEnumBug&&isFunction;if(isString&&object.length>0&&!has.call(object,0))for(var i=0;i<object.length;++i)theKeys.push(String(i));if(isArguments&&object.length>0)for(var j=0;j<object.length;++j)theKeys.push(String(j));else for(var name in object)skipProto&&"prototype"===name||!has.call(object,name)||theKeys.push(String(name));if(hasDontEnumBug)for(var skipConstructor=equalsConstructorPrototypeIfNotBuggy(object),k=0;k<dontEnums.length;++k)skipConstructor&&"constructor"===dontEnums[k]||!has.call(object,dontEnums[k])||theKeys.push(dontEnums[k]);return theKeys};keysShim.shim=function shimObjectKeys(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var originalKeys=Object.keys;Object.keys=function keys(object){return originalKeys(isArgs(object)?slice.call(object):object)}}}else Object.keys=keysShim;return Object.keys||keysShim},module.exports=keysShim},{"./isArguments":9}],9:[function(_dereq_,module,exports){"use strict";var toStr=Object.prototype.toString;module.exports=function isArguments(value){var str=toStr.call(value),isArgs="[object Arguments]"===str;return isArgs||(isArgs="[object Array]"!==str&&null!==value&&"object"==typeof value&&"number"==typeof value.length&&value.length>=0&&"[object Function]"===toStr.call(value.callee)),isArgs}},{}]},{},[1])(1)});
{
"name": "math-sign-x",
"version": "1.2.0",
"version": "1.3.0",
"description": "ES6-compliant shim for Math.sign.",

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

"devDependencies": {
"@xotic750/eslint-config-standard-x": "^1.4.0",
"@xotic750/eslint-config-standard-x": "^2.2.1",
"browserify": "^14.4.0",

@@ -43,3 +43,3 @@ "browserify-derequire": "^0.9.4",

"es7-shim": "^6.0.0",
"eslint": "^4.1.1",
"eslint": "^4.2.0",
"eslint-plugin-compat": "^1.0.4",

@@ -55,10 +55,11 @@ "eslint-plugin-css-modules": "^2.7.2",

"json3": "^3.3.2",
"make-jasmine-spec-runner-html": "^1.2.0",
"make-jasmine-spec-runner-html": "^1.3.0",
"ncp": "^2.0.0",
"nodemon": "^1.11.0",
"nsp": "^2.6.3",
"parallelshell": "^3.0.1",
"replace-x": "^1.3.1",
"replace-x": "^1.5.0",
"rimraf": "^2.6.1",
"serve": "^6.0.0",
"uglify-js": "^3.0.23"
"serve": "^6.0.2",
"uglify-js": "^3.0.24"
},

@@ -68,15 +69,20 @@ "scripts": {

"clean:jasmine": "rimraf tests/index.html tests/run.js",
"clean:all": "npm run clean:jasmine && npm run clean",
"clean:all": "npm run clean:jasmine && npm run clean",
"build": "npm run clean && npm run lint && npm run browserify && npm run uglify && npm run docs && npm test && npm run security",
"build:jasmine": "npm run clean:jasmine && make-jasmine-spec-runner-html",
"build:setver": "PKG_VER=$(node -p -e \"require('./package.json').version\") && replace-x \" @version .*\" \" @version ${PKG_VER}\" index.js",
"production": "npm run clean:all && npm run build:jasmine && npm run build:setver && npm run build",
"build:setver": "replace-x \" @version .*\" \" @version $(node -p -e \"require('./package.json').version\")\" index.js",
"build:name": "replace-x \" @module .*\" \" @module $(node -p -e \"require('./package.json').name\")\" index.js",
"build:description": "replace-x \" @file .*\" \" @file $(node -p -e \"require('./package.json').description\")\" index.js",
"build:replace": "npm run build:setver && npm run build:name && npm run build:description",
"production": "npm run clean:all && npm run build:jasmine && npm run build:replace && npm run build",
"start": "parallelshell \"serve\" \"nodemon --watch index.js --exec 'npm run build'\"",
"docs": "jsdoc2md --name-format --example-lang js index.js > README.md",
"docs:name": "replace-x \"@{PACKAGE-NAME}\" \"$(node -p -e \"require('./package.json').name\")\" README.md",
"docs:badges": "ncp badges.html README.md && npm run docs:name",
"docs": "npm run docs:badges && jsdoc2md --name-format --example-lang js index.js >> README.md",
"lint": "eslint *.js tests/spec/*.js",
"lint-fix": "eslint --fix *.js tests/spec/*.js",
"lint-fix": "npm run lint -- --fix",
"security": "nsp check",
"test": "jasmine-node --matchall tests/spec/",
"browserify": "browserify -p browserify-derequire -e index.js -o lib/math-sign-x.js -u 'crypto' -s returnExports",
"uglify": "uglifyjs lib/math-sign-x.js -o lib/math-sign-x.min.js --support-ie8 --compress --keep-fnames --mangle --beautify ascii_only=true,beautify=false --source-map filename=lib/math-sign-x.map",
"uglify": "uglifyjs lib/math-sign-x.js -o lib/math-sign-x.min.js --config-file .uglifyjsrc.json",
"precommit": "npm run production",

@@ -83,0 +89,0 @@ "prepush": "npm run production"

@@ -1,32 +0,28 @@

<a name="module_math-sign-x"></a>
## math-sign-x
<a href="https://travis-ci.org/Xotic750/math-sign-x"
title="Travis status">
title="Travis status">
<img
src="https://travis-ci.org/Xotic750/math-sign-x.svg?branch=master"
alt="Travis status" height="18">
src="https://travis-ci.org/Xotic750/math-sign-x.svg?branch=master"
alt="Travis status" height="18"/>
</a>
<a href="https://david-dm.org/Xotic750/math-sign-x"
title="Dependency status">
title="Dependency status">
<img src="https://david-dm.org/Xotic750/math-sign-x.svg"
alt="Dependency status" height="18"/>
alt="Dependency status" height="18"/>
</a>
<a
href="https://david-dm.org/Xotic750/math-sign-x#info=devDependencies"
title="devDependency status">
<a href="https://david-dm.org/Xotic750/math-sign-x#info=devDependencies"
title="devDependency status">
<img src="https://david-dm.org/Xotic750/math-sign-x/dev-status.svg"
alt="devDependency status" height="18"/>
alt="devDependency status" height="18"/>
</a>
<a href="https://badge.fury.io/js/math-sign-x" title="npm version">
<img src="https://badge.fury.io/js/math-sign-x.svg"
alt="npm version" height="18">
alt="npm version" height="18"/>
</a>
<a name="module_math-sign-x"></a>
## math-sign-x
ES6-compliant shim for Math.sign.
Requires ES3 or above.
**See**: [20.2.2.29 Math.sign(x)](http://www.ecma-international.org/ecma-262/6.0/#sec-math.sign)
**Version**: 1.2.0
**Version**: 1.3.0
**Author**: Xotic750 <Xotic750@gmail.com>

@@ -33,0 +29,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