mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
The require('constants') module is currently undocumented and mashes
together unrelated constants. This refactors the require('constants')
in favor of distinct os.constants, fs.constants, and crypto.constants
that are specific to the modules for which they are relevant. The
next step is to document those within the specific modules.
PR-URL: https://github.com/nodejs/node/pull/6534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
12 lines
388 B
JavaScript
12 lines
388 B
JavaScript
'use strict';
|
|
|
|
// This module is soft-deprecated. Users should be directed towards using
|
|
// the specific constants exposed by the individual modules on which they
|
|
// are most relevant.
|
|
const constants = process.binding('constants');
|
|
Object.assign(exports,
|
|
constants.os.errors,
|
|
constants.os.signals,
|
|
constants.fs,
|
|
constants.crypto);
|