Skip to content

Commit da7728f

Browse files
fixup! fs: move getValidMode to c++ for better performance
Co-authored-by: Yagiz Nizipli <[email protected]>
1 parent 9cb7941 commit da7728f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_file.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ void FromNamespacedPath(std::string* path) {
875875

876876

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

0 commit comments

Comments
 (0)