Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
eyeglass-math
Advanced tools
This eyeglass plugin exposes Javascript's Math API to Sass.
To use it:
$ npm install --save eyeglass-math
Then in your Sass file(s):
@import "math";
The following constants are available when you import the math
module.
$PI
- The ratio of a circle's circumference to its diameter.$TAU
- Because Pi is wrong.$E
- The natural base (2.718…).The following functions are available when you import the math
module.
math/numeric
sign($number)
- Returns the sign of the x, indicating whether
$number
is positive (1
), negative (-1
) or zero (0
).math/exponentiation
cbrt($number)
- Returns the cube root of a number.exp($number)
- Returns E^x, where x is the argument, and E
is Euler's constant (2.718…), the base of the natural logarithm.log($number)
- Returns the natural logarithm of a number.log10($number)
- Returns the base 10 logarithm of a number.log2($number)
- Returns the base 2 logarithm of a number.pow(base, exponent)
- Returns $base
to the $exponent
power.sqrt($number)
- Returns the positive square root of a number.math/trigonometry
acos($number)
- Returns the arccosine of a number.asin($number)
- Returns the arcsine of a number.atan($number)
- Returns the arctangent of a number.cos($number)
- Returns the cosine of a number.hypot($numbers...)
- Returns the square root of the sum of
squares of its arguments.sin($number)
- Returns the sine of a number.tan($number)
- Returns the tangent of a number.math/hyperbolic
acosh($number)
- Returns the hyperbolic arccosine of a number.asinh($number)
- Returns the hyperbolic arcsine of a number.atanh($number)
- Returns the hyperbolic arctangent of a number.cosh($number)
- Returns the hyperbolic cosine of a number.sinh($number)
- Returns the hyperbolic sine of a number.tanh($number)
- Returns the hyperbolic tangent of a number.Note: The functions above are available as globals with the prefix math-
.
FAQs
Math. For Sass.
The npm package eyeglass-math receives a total of 794 weekly downloads. As such, eyeglass-math popularity was classified as not popular.
We found that eyeglass-math demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.