0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-25 08:19:38 +01:00
nodejs/lib/sys.js
James M Snell 15eaba98a1 lib: use emitWarning instead of printDeprecationMessage
The process.emitWarning() API should be used for printing
deprecation warning messages rather than directly using the
internal/util#printDeprecationMessage

PR-URL: https://github.com/nodejs/node/pull/8166
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-09-02 13:15:22 -07:00

10 lines
288 B
JavaScript

'use strict';
// the sys module was renamed to 'util'.
// this shim remains to keep old programs working.
// sys is deprecated and shouldn't be used
module.exports = require('util');
process.emitWarning('sys is deprecated. Use util instead.',
'DeprecationWarning');