8000 Allow the module to be used in any CommonJS environment · npm/ini@872b7ad · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 872b7ad

Browse files
committed
Allow the module to be used in any CommonJS environment
I.e. browserify, by not accessing the global process variable unless it is defined.
1 parent 5992138 commit 872b7ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ini.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports.stringify = exports.encode = encode
44
exports.safe = safe
55
exports.unsafe = unsafe
66

7-
var eol = process.platform === 'win32' ? '\r\n' : '\n'
7+
var eol = typeof process !== 'undefined' && process.platform === 'win32' ? '\r\n' : '\n'
88

99
function encode (obj, opt) {
1010
var children = []

0 commit comments

Comments
 (0)
0