Node: Is vm.createScript() deprecated?

Created on 26 Oct 2017  ·  1Comment  ·  Source: nodejs/node

Node >0.12, all platforms.

From node 0.12 vm.createScript has been removed from the docs, but its currently still supported due to this wrapper: https://github.com/nodejs/node/blob/master/lib/vm.js#L79

Since it's missing from the docs, implementations are also missing them, for example TypeScript typings like @types/node are missing createScript. So is it deprecated or just missing from the docs?

doc question vm

Most helpful comment

It was removed from the documentation in 02fde585b15f0dd117a297a6c4d35b181b530c63, motivation in the commit log.

I'd call it "deprecated-ish" - it's pointless because it just calls new vm.Script() but since it also doesn't cost anything to maintain, we won't remove it.

>All comments

It was removed from the documentation in 02fde585b15f0dd117a297a6c4d35b181b530c63, motivation in the commit log.

I'd call it "deprecated-ish" - it's pointless because it just calls new vm.Script() but since it also doesn't cost anything to maintain, we won't remove it.

Was this page helpful?
0 / 5 - 0 ratings