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:
Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By:
Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By:
Anna Henningsen <anna@addaleax.net>
Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com>
parent
ea9eed56
Please register or sign in to comment