1. Home
  2. Node
  3. Parse path
#node#module#path

Parse a method belonging to the Path native Node module. A parsed path returns an object containing directory, module base name, extension and the file name.

const path = require('path');
var pathData = path.parse(__filename);
console.log(pathData);
copy
Full Node cheatsheet
Sitemap Git repository