Skip to content

Commit

Permalink
fixup! fs: move getValidMode to c++ for better performance
Browse files Browse the repository at this point in the history
Co-authored-by: Yagiz Nizipli <[email protected]>
  • Loading branch information
andremralves and anonrig authored Sep 30, 2023
1 parent 9cb7941 commit da7728f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ void FromNamespacedPath(std::string* path) {


static inline int GetValidMode(Environment* env,
Local<Value> mode_v, std::string type) {
Local<Value> mode_v, std::string_view type) {
if (!mode_v->IsInt32() && !mode_v->IsNullOrUndefined()) {
THROW_ERR_INVALID_ARG_TYPE(env, "mode must be int32 or null/undefined");
return -1;
Expand Down

0 comments on commit da7728f

Please sign in to comment.