danwrong / restler

REST client library for node.js
MIT License
1.99k stars 389 forks source link

modify argument of mode for es2015 strict compatibility, fixes #234 #235

Open crashuniverse opened 8 years ago

crashuniverse commented 8 years ago

This fixes #234 SyntaxError: Octal literals are not allowed in strict mode.

The fix uses an option of supplying mode in a valid data type - string. This can be referred in source code for fs.open(). Keeping the argument as string makes the script pass es2015 strict validations and hence can be used by dependent packages like sendwithus in wider environments like node with es2015 strict mode.