projecte_ionic/node_modules/stylus/lib/functions/dirname.js
2022-02-09 18:30:03 +01:00

18 lines
322 B
JavaScript
Executable file

var utils = require('../utils')
, path = require('path');
/**
* Return the dirname of `path`.
*
* @param {String} path
* @return {String}
* @api public
*/
function dirname(p){
utils.assertString(p, 'path');
return path.dirname(p.val).replace(/\\/g, '/');
};
dirname.params = ['p'];
module.exports = dirname;