mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 13:11:36 +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>
13 lines
285 B
JavaScript
13 lines
285 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const constants = process.binding('constants');
|
|
const assert = require('assert');
|
|
|
|
assert.ok(constants);
|
|
assert.ok(constants.os);
|
|
assert.ok(constants.os.signals);
|
|
assert.ok(constants.os.errno);
|
|
assert.ok(constants.fs);
|
|
assert.ok(constants.crypto);
|