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

formula-acos

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formula-acos - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

20

ACOS.js
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module', 'formula-isnumber'], factory);
define(['exports', 'module', 'formula-isnumber', 'formula-errors'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('formula-isnumber'));
factory(exports, module, require('formula-isnumber'), require('formula-errors'));
} else {

@@ -10,6 +10,6 @@ var mod = {

};
factory(mod.exports, mod, global.isnumber);
factory(mod.exports, mod, global.ISNUMBER, global.error);
global.ACOS = mod.exports;
}
})(this, function (exports, module, _formulaIsnumber) {
})(this, function (exports, module, _formulaIsnumber, _formulaErrors) {
'use strict';

@@ -21,8 +21,14 @@

var _isnumber = _interopRequireDefault(_formulaIsnumber);
var _ISNUMBER = _interopRequireDefault(_formulaIsnumber);
function ACOS(number) {
var _error = _interopRequireDefault(_formulaErrors);
return Math.acos(number);
function ACOS(value) {
if (!(0, _ISNUMBER['default'])(value)) {
return _error['default'].value;
}
return Math.acos(value);
}
});
{
"name": "formula-acos",
"version": "1.0.0",
"version": "1.0.1",
"description": "ACOS function",

@@ -5,0 +5,0 @@ "main": "ACOS.js",

@@ -23,4 +23,3 @@ # acos

var acos = require('formula-pmt');
// 100K at 5% for 360 periods
acos( 1 )
```

@@ -5,4 +5,4 @@ var acos = require('./ACOS');

describe('n', function() {
it('should convert value to number', function() {
describe('acos', function() {
it('should calculate the inverse cosine', function() {
assert( acos(1) === 0 );

@@ -9,0 +9,0 @@ assert( acos(NaN) === error.value );

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