{"name":"path-extra","version":"2.0.0","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":"git+https://github.com/jprichardson/node-path-extra.git"},"keywords":["fs","file","file system","path"],"author":{"name":"JP Richardson","email":"jprichardson@gmail.com"},"license":"MIT","devDependencies":{"mocha":"*","standard":"^2.10.0"},"main":"./lib/path.js","scripts":{"test":"standard && mocha"},"gitHead":"07260c7caf5cc2908b7b41ce246d9b94c2ce3eb5","bugs":{"url":"https://github.com/jprichardson/node-path-extra/issues"},"_id":"path-extra@2.0.0","_shasum":"b53639397880b6047bbf36141a78ab4ac2ce8565","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"jprichardson","email":"jprichardson@gmail.com"},"maintainers":[{"name":"jprichardson","email":"jprichardson@gmail.com"}],"dist":{"shasum":"b53639397880b6047bbf36141a78ab4ac2ce8565","tarball":"http://registry-npm.ywwl.com/path-extra/download/path-extra-2.0.0.tgz","integrity":"sha512-8StHzFDuW82rBKyvgBi7TmXg2U6SJ4PHwu29l8XcEQsNY4LmE1deOSvhZku2Icp5oi1UK26OOxmQlG+gxPkCWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGnzOfss1O6JKb4lHXTcU8JUlkEoHunVBR4uY25euGgwIgPOGevUMKOzePn+2OkjRvtTTM+rIYY3yFyUyU+o3/J3s="}],"size":2792,"noattachment":false,"key":"/path-extra/-/path-extra-2.0.0.tgz"},"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":1444076594523,"_cnpm_publish_time":1444076594523,"dist-tags":{"latest":"4.3.0"}}