doc: add fspromises mkdir example#40843
Conversation
Signed-off-by: Tierney Cyren <hello@bnb.im>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Tierney Cyren <hello@bnb.im>
Signed-off-by: Tierney Cyren <hello@bnb.im>
|
@aduh95 PTAL. Should be good now. Worth noting that I also added a slash at the end of the CJS example, again to be consistent. |
|
Added
author ready
|
|
(also apologies for the delay, ngl I forgot this was open) |
aduh95
left a comment
There was a problem hiding this comment.
All the docs are now using node: prefix.
doc/api/fs.md
Outdated
|
|
||
| } | ||
|
|
||
| makeDirectory(); |
There was a problem hiding this comment.
nit: instead of a try/catch, I would put a .catch(console.error): calling an async function without awaiting it or having a catch handler should be frowned upon imho.
There was a problem hiding this comment.
would you want me to move the MJS example to be a function and do the same, or should that continue using top-level await in a try/catch?
Signed-off-by: Tierney Cyren <hello@bnb.im>
Signed-off-by: Tierney Cyren <hello@bnb.im>
Signed-off-by: Tierney Cyren <hello@bnb.im>
Signed-off-by: Tierney Cyren <hello@bnb.im>
Signed-off-by: Tierney Cyren <hello@bnb.im>
|
Landed in fab676e |
Signed-off-by: Tierney Cyren <hello@bnb.im> PR-URL: nodejs#40843 Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Tierney Cyren <hello@bnb.im> PR-URL: #40843 Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Tierney Cyren <hello@bnb.im> PR-URL: #40843 Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Tierney Cyren <hello@bnb.im> PR-URL: #40843 Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Tierney Cyren <hello@bnb.im> PR-URL: #40843 Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Tierney Cyren <hello@bnb.im> PR-URL: nodejs/node#40843 Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Adds an example to the fsPromises
mkdirdoc. Includes both cjs and mjs versions, because we should support both imo.