Skip to content

Conversation

GabrielCastro
Copy link

Solves #20

This drops the use of eval on versions of node that support setting function arity

@GabrielCastro GabrielCastro force-pushed the fix/remove-use-of-eval branch from 4bdd29d to f49d77d Compare March 27, 2019 22:24
@GabrielCastro GabrielCastro force-pushed the fix/remove-use-of-eval branch from f49d77d to afa7eaa Compare March 27, 2019 22:27
@dougwilson
Copy link
Owner

Nice, I didn't realize you can set the length of a function now. Looks like it's support on all "modern" Node.js runtimes (4+). I feel it would be weird to have this different of a behavior between the runtimes, as it seems with the issues opened here that not using eval is desired in a general stance, and I don't disagree. I will queue up a 3.0 release that will use the function length setting (your PR) and just only support Node.js 4+ 👍

@vicb
Copy link

vicb commented Jul 10, 2020

It would be super nice to release this.

The current release generates an error with rollup:

node_modules/depd/index.js
408: 
409:    // eslint-disable-next-line no-eval
410:   var deprecatedfn = eval('(function (' + args + ') {\n' +
                          ^
411:     '"use strict"\n' +
412:     'log.call(deprecate, message, site)\n' +
created run/index.js in 25.4s

Thanks for this module !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants