roberto-butti / some-drops-of-javascript

This book collects some useful, unknown, underrated JavaScript functions discovered and learned while using JavaScript daily.
https://drops-of-javascript.hi-folks.dev/
Other
137 stars 40 forks source link

Added property description for path.sep #7 #15

Closed mahesha1150 closed 11 months ago

mahesha1150 commented 11 months ago

Hi @roberto-butti, Please review the PR for #7. Let me know if there is anything I am missing. Thanks.

vercel[bot] commented 11 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
some-drops-of-javascript ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2023 10:50am
roberto-butti commented 11 months ago

Hi @roberto-butti, Please review the PR for #7. Let me know if there is anything I am missing. Thanks.

Thank you @mahesha1150 for your contribution. Your PR is great. You provided context and explained why the path.sep is important. Also, the example you provided is good.If you want, you can add an additional example in the article combining the join function like:

const path = require('path');

const folderName = 'documents';
const fileName = 'file.txt';
console.log(['user', folderName, fileName].join(path.sep))
mahesha1150 commented 11 months ago

Thanks for the feedback. Please check if below lines are fine. I can create another PR with below changes.

//Another example of creating filePath using path.sep along with join function console.log(['user', folderName, fileName].join(path.sep))

mahesha1150 commented 11 months ago

Have added the example as suggested @roberto-butti.

roberto-butti commented 11 months ago

This is amazing , I'm going to merge your PR for "Some drops of JavaScript" :) Thank you for the support and the high quality of the contribution.

roberto-butti commented 11 months ago

@mahesha1150 your creation: https://drops-of-javascript.hi-folks.dev/03-var/02_path-sep/