refactor: replaced remaining eval with Function constructor

master
Evgeny Poberezkin 2016-09-19 20:16:27 +01:00
parent 2ba99f2c9f
commit acfd035720
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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",