You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that this package is intended for browser/react-native environments.
By adding a new parameter for extractFiles, e.g. isFileValue: (value: unknown) => boolean, other higher level implementations that are not browser-specific could also leverage the logic of this package.
This is how I would imagine a Node.js implementation that uses fs.ReadStream.
@jaydenseric What is your opinion on this? Are there any concerns? Would the impact on the bundle size be too huge? Could you imagine such a feature becoming part of this package and would you accept a pull request that implements this feature?
The text was updated successfully, but these errors were encountered:
Consideration: If a consumer wants to just extend the default set with one more type of "file", they will have to copy and paste the defaults across into their own function, and both sets will appear in their bundle. Maybe if the default isFileValue() was exported, they could use it inside their custom function 🤔
I know that this package is intended for browser/react-native environments.
By adding a new parameter for
extractFiles
, e.g.isFileValue: (value: unknown) => boolean
, other higher level implementations that are not browser-specific could also leverage the logic of this package.This is how I would imagine a Node.js implementation that uses
fs.ReadStream
.The isFileValue function would then (if defined) used instead of the code block here:
extract-files/src/extractFiles.mjs
Lines 69 to 73 in 30292c4
The default value stays the same.
@jaydenseric What is your opinion on this? Are there any concerns? Would the impact on the bundle size be too huge? Could you imagine such a feature becoming part of this package and would you accept a pull request that implements this feature?
The text was updated successfully, but these errors were encountered: