Comparing version 1.3.1 to 1.3.2
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) | ||
} |
{ | ||
"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": { |
151
README.md
@@ -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 <fengmk2@gmail.com> 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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8
92
8946
119
1