module.exports = {
  join: (...args) => {
    console.log('join', args);
    return args.join('/');
  },
  resolve: (...args) => {
    console.log('resolve', args);
    return args.join('/');
  },
  dirname: (p) => {
    console.log('dirname', p);
    return p.split('/').slice(0, -1).join('/');
  },
  basename: (p) => {
    console.log('basename', p);
    return p.split('/').pop();
  },
  extname: (p) => {
    console.log('extname', p);
    const base = p.split('/').pop();
    const idx = base.lastIndexOf('.');
    return idx < 0 ? '' : base.slice(idx);
  },
};
