isomorphic-git / lightning-fs

A lean and fast 'fs' for the browser
MIT License
476 stars 47 forks source link

interpolation for `readFile` with `utf8` #97

Closed tachibana-shin closed 2 years ago

jcubic commented 2 years ago

I'm afraid this doesn't work like this right now:

  async readFile(filepath, opts) {
    const { encoding } = opts;
    ...
  }
tachibana-shin commented 2 years ago

I'm afraid this doesn't work like this right now:

  async readFile(filepath, opts) {
    const { encoding } = opts;
    ...
  }

fixed

jcubic commented 2 years ago

This is standard of nodeJS readFile to accept a string, can you maybe update the code in: https://github.com/isomorphic-git/lightning-fs/blob/main/src/DefaultBackend.js#L97 to match your first TypeScript definition?

tachibana-shin commented 2 years ago

This is standard of nodeJS readFile to accept a string, can you maybe update the code in: https://github.com/isomorphic-git/lightning-fs/blob/main/src/DefaultBackend.js#L97 to match your first TypeScript definition?

All right, I'll update it.

tachibana-shin commented 2 years ago

This is standard of nodeJS readFile to accept a string, can you maybe update the code in: https://github.com/isomorphic-git/lightning-fs/blob/main/src/DefaultBackend.js#L97 to match your first TypeScript definition?

updated

jcubic commented 2 years ago

Thanks for the changes. It looks good.