Commit 473572ea authored by James M Snell's avatar James M Snell
Browse files

os: refactor os structure, add Symbol.toPrimitive

Refactor the structure of the os module to use more efficient
module.exports = {} pattern.

Add Symbol.toPrimitive support to os methods that return simple
primitives. This is a minor tweak that makes using these slightly
more friendly when doing things like:

```js
var m = `${os.tmpdir}/foo`
```

PR-URL: https://github.com/nodejs/node/pull/12654


Reviewed-By: default avatarDaijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: default avatarAlexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
parent ea9eed56
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment