refactor: replaced remaining eval with Function constructor
parent
2ba99f2c9f
commit
acfd035720
|
@ -68,7 +68,7 @@ function setupAsync(opts, required) {
|
|||
function checkGenerators(opts, required) {
|
||||
/* jshint evil: true */
|
||||
try {
|
||||
eval('(function*(){})()');
|
||||
(new Function('(function*(){})()'))();
|
||||
return true;
|
||||
} catch(e) {
|
||||
/* istanbul ignore next */
|
||||
|
@ -80,7 +80,7 @@ function checkGenerators(opts, required) {
|
|||
function checkAsyncFunction(opts, required) {
|
||||
/* jshint evil: true */
|
||||
try {
|
||||
eval('(async function(){})()');
|
||||
(new Function('(async function(){})()'))();
|
||||
/* istanbul ignore next */
|
||||
return true;
|
||||
} catch(e) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ajv",
|
||||
"version": "4.7.1",
|
||||
"version": "4.7.2",
|
||||
"description": "Another JSON Schema Validator",
|
||||
"main": "lib/ajv.js",
|
||||
"webpack": "dist/ajv.bundle.js",
|
||||
|
|
Loading…
Reference in New Issue