User can now inject a fs object into an instance of jsonfile, to do the same operations on anything that follows the fs contract, (such as a Webpack virtual filesystem, for instance).
Default export is now an instance of the new JsonFile constructor, initialized with the default fs object. It should work exactly the same as before!
(Couldn't get today's version of standard to output the exact same indentation as this originally had, so it might be easier to use GitHub's "Hide whitespace changes" to see the actual changeset.)
fs
object into an instance ofjsonfile
, to do the same operations on anything that follows thefs
contract, (such as a Webpack virtual filesystem, for instance).JsonFile
constructor, initialized with the defaultfs
object. It should work exactly the same as before!Made this to support https://github.com/jprichardson/node-fs-extra/pull/733 to enable the same thing.