-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
The documentations says:
The first three arguments are the same as to JSON.stringify.
But when I try to pass an array of strings as the second parameter, the module raises an error:
> var object = { a: 'b', c: 'd' }
undefined
> stringify(object, ['a'])
TypeError: undefined is not a function
at Object.<anonymous> (/node_modules/json-stringify-safe/stringify.js:25:48)
at Object.stringify (native)
at stringify (/node_modules/json-stringify-safe/stringify.js:5:15)
at repl:1:11
at REPLServer.defaultEval (repl.js:132:27)
at bound (domain.js:254:14)
at REPLServer.runBound [as eval] (domain.js:267:12)
at REPLServer.<anonymous> (repl.js:279:12)
at REPLServer.emit (events.js:107:17)
at REPLServer.Interface._onLine (readline.js:214:10)
The same argument works with JSON.stringify
:
> JSON.stringify(object, ['a'])
'{"a":"b"}'
Metadata
Metadata
Assignees
Labels
No labels