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.2 to 2.0.0

5

History.md
2.0.0 / 2014-11-16
==================
* Regex realted methods.
* Major revamp (@hemanth)
1.3.2 / 2014-11-11

@@ -3,0 +8,0 @@ ==================

89

index.js

@@ -57,52 +57,47 @@ /**!

// Object.{is,assign,getOwnPropertySymbols,setPrototypeOf}
exports.Object = {
is: isFunction(Object.is),
assign: isFunction(Object.assign),
getOwnPropertySymbols: isFunction(Object.getOwnPropertySymbols),
setPrototypeOf: isFunction(Object.setPrototypeOf)
};
// Object methods.
var obj = {};
['is','assign','getOwnPropertySymbols','setPrototypeOf'].forEach(function(attr){
obj[attr] = isFunction(Object[attr]);
});
// String methods.
exports.String = {
raw: isFunction(String.raw),
fromCodePoint: isFunction(String.fromCodePoint),
prototype:{
codePointAt: isFunction(String.prototype.codePointAt),
normalize: isFunction(String.prototype.normalize),
repeat: isFunction(String.prototype.repeat),
startsWith: isFunction(String.prototype.startsWith),
endsWith: isFunction(String.prototype.endsWith),
contains: isFunction(String.prototype.contains)
}
};
var str = { prototype: {} };
['raw','fromCodePoint'].forEach(function(attr){
str[attr] = isFunction(String[attr]);
});
['codePointAt','normalize','repeat','startsWith','endsWith','contains'].forEach(function(attr){
str.prototype[attr] = isFunction(String.prototype[attr]);
});
exports.Number = {
isFinite: isFunction(Number.isFinite),
isInteger: isFunction(Number.isInteger),
isSafeInteger: isFunction(Number.isSafeInteger),
isNaN: isFunction(Number.isNaN),
EPSILON: isNumber(Number.EPSILON),
MIN_SAFE_INTEGER: isNumber(Number.MIN_SAFE_INTEGER),
MAX_SAFE_INTEGER: isNumber(Number.MAX_SAFE_INTEGER)
};
// Number methods.
var num = {};
[
'isFinite','isInteger','isSafeInteger','isNaN',
'EPSILON','MIN_SAFE_INTEGER','MAX_SAFE_INTEGER'
].forEach(function(attr){
num[attr] = isFunction(Number[attr]);
});
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)
}
// Math methods.
var math = {}
"clz32,imul,sign,log10,log2,log1p,expm1,cosh,sinh,tanh,acosh,sinh,tanh,acosh,asinh,atanh,hypot,trunc,fround,cbrt"
.split(",")
.forEach(function(attr){
math[attr] = isFunction(Math[attr]);
});
// RegExp methods.
var regex = {'prototype' : {} };
['match', 'replace', 'split', 'search'].forEach(function(attr){
regex.prototype[attr] = isFunction(RegExp[attr]);
});
// Export them all
exports.Object = obj;
exports.String = str;
exports.Number = num;
exports.Math = math;
exports.RegExp = regex;
exports.Promise = typeof Promise !== 'undefined' && isFunction(Promise.all);
{
"name": "enable",
"version": "1.3.2",
"version": "2.0.0",
"description": "Detect es6 features enable or not.",

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

@@ -103,5 +103,6 @@ enable

* generator
* let
* const
* generator.
* let.
* const.
* Promise.

@@ -108,0 +109,0 @@ ## Test

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