7. Individual Values to Object
path.parse(__filename)
01
Use path.parse() to get values in an object
This gives same info from previous part Common Core Module, but makes it easier to work with
in an
Object
pass in __filename
const path = require('path')
const parsed = path.parse(__filename)
console.log(parsed)