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

enable

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enable - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

.editorconfig

6

History.md
1.3.2 / 2014-11-11
==================
* Math realted methods.
* Better readme.
1.3.1 / 2014-11-10

@@ -3,0 +9,0 @@ ==================

22

index.js

@@ -87,2 +87,22 @@ /**!

MAX_SAFE_INTEGER: isNumber(Number.MAX_SAFE_INTEGER)
};
};
exports.Math = {
clz32: isFunction(Math.clz32),
imul: isFunction(Math.imul),
sign: isFunction(Math.sign),
log10: isFunction(Math.log10),
log2: isFunction(Math.log2),
log1p: isFunction(Math.log1p),
expm1: isFunction(Math.expm1),
cosh: isFunction(Math.cosh),
sinh: isFunction(Math.sinh),
tanh: isFunction(Math.tanh),
acosh: isFunction(Math.acosh),
asinh: isFunction(Math.asinh),
atanh: isFunction(Math.atanh),
hypot: isFunction(Math.hypot),
trunc: isFunction(Math.trunc),
fround: isFunction(Math.fround),
cbrt: isFunction(Math.cbrt)
}

10

package.json
{
"name": "enable",
"version": "1.3.1",
"version": "1.3.2",
"description": "Detect es6 features enable or not.",

@@ -15,5 +15,3 @@ "main": "index.js",

},
"dependencies": {
},
"dependencies": {},
"devDependencies": {

@@ -38,3 +36,5 @@ "autod": "*",

"keywords": [
"enable", "es6", "generator"
"enable",
"es6",
"generator"
],

@@ -41,0 +41,0 @@ "engines": {

@@ -41,92 +41,68 @@ enable

if (enable.<feature>) {
console.log(<feature> is supported);
}
/* Example:
if (enable.generator) {
console.log('supports generator: `function* a() {}`');
}
*/
```
if (enable.let) {
console.log('supports `let a = 1;`');
}
## List of features:
if (enable.const) {
console.log('supports `const salary = 0;`')
}
__Object related:__
if (enable.Object.is) {
console.log('supports `Object.is();`');
}
* Object.is
* Object.assign
* Object.getOwnPropertySymbols
* Object.setPrototypeOf
if (enable.Object.assign) {
console.log('supports `Object.assign();`');
}
__String realted:__
if (enable.Object.getOwnPropertySymbols) {
console.log('supports `Object.getOwnPropertySymbols();`');
}
* String.raw
* String.fromCodePoint
* String.prototype.codePointAt
* String.prototype.normalize
* String.prototype.repeat
* String.prototype.startsWith
* String.prototype.endsWith
* String.prototype.contains
if (enable.Object.setPrototypeOf) {
console.log('supports `Object.setPrototypeOf();`');
}
__Number realted:__
if (enable.String.raw) {
console.log('supports `String.raw();`');
}
* Number.isFinite
* Number.isInteger
* Number.isSafeInteger
* Number.isNaN
* Number.EPSILON
* Number.MIN_SAFE_INTEGER
if (enable.String.fromCodePoint) {
console.log('supports `String.fromCodePoint`');
}
__Math realted:__
if (enable.String.prototype.codePointAt) {
console.log('supports `String.prototype.codePointAt`');
}
* Math.clz32
* Math.imul
* Math.sign
* Math.log10
* Math.log2
* Math.log1p
* Math.expm1
* Math.cosh
* Math.sinh
* Math.tanh
* Math.acosh
* Math.asinh
* Math.atanh
* Math.hypot
* Math.trunc
* Math.fround
* Math.cbrt
if (enable.String.prototype.normalize) {
console.log('supports `String.prototype.normalize`');
}
__Others:__
if (enable.String.prototype.repeat) {
console.log('supports `String.prototype.repeat`');
}
* generator
* let
* const
if (enable.String.prototype.startsWith) {
console.log('supports `String.prototype.startsWith`');
}
if (enable.String.prototype.endsWith) {
console.log('supports `String.prototype.endsWith`');
}
if (enable.String.prototype.contains) {
console.log('supports `String.prototype.contains`');
}
if (Number.isFinite) {
console.log('supports `Number.isFinite`');
}
if (Number.isInteger) {
console.log('supports `Number.isInteger`');
}
if (Number.isSafeInteger) {
console.log('supports `Number.isSafeInteger`');
}
if (Number.isNaN) {
console.log('supports `Number.isNaN`');
}
if (Number.EPSILON) {
console.log('supports `Number.EPSILON`');
}
if (Number.MIN_SAFE_INTEGER) {
console.log('supports `Number.MIN_SAFE_INTEGER`');
}
if (Number.MAX_SAFE_INTEGER) {
console.log('supports `Number.MAX_SAFE_INTEGER`');
}
```
## Test

@@ -144,26 +120,1 @@

```
## License
(The MIT License)
Copyright (c) 2014 fengmk2 &lt;fengmk2@gmail.com&gt; and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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