Closed sam-github closed 9 years ago
The docs are wrong:
https://github.com/jprichardson/node-jsonfile#writefilefilename-options-callback
they don't describe the data argument, I assume it should be writeFile(filename, obj, [options], callback)
writeFile(filename, obj, [options], callback)
Also, documented behaviour is
Pass in any fs.writeFile options
That includes the string, 'utf-8', but passing in a string was broken by:
https://github.com/jprichardson/node-jsonfile/commit/e4d8e67a0c4c3630fd53c4d5bd22e3fec4c30a06
Fixed in https://github.com/jprichardson/node-jsonfile/commit/44cf5625cea25ca98462ed5411e43b46b9913439 with more tests. Published in 2.2.1. Sorry about the trouble.
2.2.1
Thanks for fixing.
The docs are wrong:
https://github.com/jprichardson/node-jsonfile#writefilefilename-options-callback
they don't describe the data argument, I assume it should be
writeFile(filename, obj, [options], callback)
Also, documented behaviour is
That includes the string, 'utf-8', but passing in a string was broken by:
https://github.com/jprichardson/node-jsonfile/commit/e4d8e67a0c4c3630fd53c4d5bd22e3fec4c30a06