{"name":"path-extra","version":"0.0.3","description":"path-extra contains methods that aren't included in the vanilla Node.js path package.","homepage":["https://github.com/jprichardson/node-path-extra"],"repository":{"type":"git","url":"https://github.com/jprichardson/node-path-extra"},"keywords":["fs","file","file system","path"],"author":{"name":"JP Richardson","email":"jprichardson@gmail.com"},"licenses":[{"type":"MIT","url":"http://github.com/jprichardson/node-path-extra/raw/master/LICENSE"}],"devDependencies":{"mocha":"1.3.x"},"main":"./lib/path.js","_id":"path-extra@0.0.3","dist":{"shasum":"34295bf0595167cc5f817131473390a9fae35f28","tarball":"http://registry-npm.ywwl.com/path-extra/download/path-extra-0.0.3.tgz","integrity":"sha512-ot8xDa5yxNlXFqlwLyD8JClMzTC5geMWeOD2ZoxUJIZsX9qzYMjr0fGtIRZ+bNHyGpqpLnUfciQVE6gM46tUog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHSP5UVgh/qgvrn0HAg4x9h+BiEKn+IDnsAC+HDqSetZAiBSOvOKIF8RS6jk4l56qoeBMLLlCixIFW7RRwrM8GR4gg=="}],"size":2195,"noattachment":false,"key":"/path-extra/-/path-extra-0.0.3.tgz"},"maintainers":[{"name":"jp","email":"jprichardson@gmail.com"}],"directories":{},"readme":"Node.js: path-extra\n===================\n\nThis module simply modifies the Node.js 'path' object with extra methods. It is a drop in replacement for the `path` module.\n\n\n\nInstallation\n------------\n\n    $ npm install path-extra\n\n\n\nUsage\n-----\n\n```javascript\nvar path = require('path-extra');\n```\n\nYou can still use all of the vanilla Node.js path methods.\n\n## Methods:\n\n### `replaceExt(filePath, extension)`\n\nReplaces the extension from path with extension and returns the updated path string.\n\nFrom the module [`replace-ext`](https://github.com/gulpjs/replace-ext).\n\nExample:\n\n```js\npath.replaceExt('dir/file.md', '.html')\n// => 'dir/file.html'\n```\n\n### `normalizeTrim(filePath)`\n\nA `path.normalize()` that trims trailing slashes. Useful for comparing file paths.\n\nExample:\n\n```js\npath.normalize('/foo/bar//baz/asdf/quux/../')\n// => /foo/bar/baz/asdf/\npath.normalizeTrim('/foo/bar//baz/asdf/quux/../')\n// => /foo/bar/baz/asdf\n```\n\n### `base(filePath, [includeExt])`\n\nA smart wrapper for `path.basename()`.\n\n- When `includeExt` is `false`, returns the basename without an extension (`path.basename(filePath, path.extname(filePath))`).\n- When `includeExt` is `true`, works like `path.basename(filePath)`.\n- `includeExt` is `false` by default.\n\nExample:\n\n```js\npath.base('path/to/file.md')\n// => file\npath.base('path/to/file.md', false)\n// => file\npath.base('path/to/file.md', true)\n// => file.md\n```\n\n### `removeExt(filepath)`\n\nRemove a path's extension.\n\nExample:\n\n```js\npath.removeExt('some/dir/file.ext')\n// => some/dir/file\n```\n\n### `fileNameWithPostfix(filePath, postfix)`\n\nAppend string to the end of the filename.\n\nExample:\n\n```js\npath.fileNameWithPostfix('path/to/file-name.ext', '-old')\n// => path/to/file-name-old.ext\n```\n\n### `fileNameWithPrefix(filePath, prefix)`\n\nAppend string to the beginning of the filename.\n\nExample:\n\n```js\npath.fileNameWithPrefix('path/to/file-name.ext', 'new-')\n// => path/to/new-file-name.ext\n```\n\n---\n\n`homedir()`, `tempdir()`, and `datadir()` have been removed in version 4.0.0. Please use the [ospath](https://github.com/jprichardson/ospath) module instead.\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2011-2015 JP Richardson\n","publish_time":1344374568841,"_cnpm_publish_time":1344374568841,"dist-tags":{"latest":"4.3.0"}}