{"name":"path-extra","version":"4.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":"^8.0.0"},"main":"./lib/path.js","scripts":{"test":"standard && mocha"},"dependencies":{"replace-ext":"^1.0.0","escape-string-regexp":"^1.0.5"},"gitHead":"6fbab5167453986581f2a3a4dd579dc0c8c5c0a3","bugs":{"url":"https://github.com/jprichardson/node-path-extra/issues"},"_id":"path-extra@4.0.0","_shasum":"f02e296f38daad3328f8fec3b5c62b7b23d37627","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"jprichardson","email":"jprichardson@gmail.com"},"maintainers":[{"name":"jprichardson","email":"jprichardson@gmail.com"}],"dist":{"shasum":"f02e296f38daad3328f8fec3b5c62b7b23d37627","tarball":"http://registry-npm.ywwl.com/path-extra/download/path-extra-4.0.0.tgz","integrity":"sha512-fcEWjdHj7jSRBi9cEveJKEKTDfTvT28/BVenPZdvzTUF/GtKR60ndwggl/eeYO2lwviUn3t/Oc8NIJ9/9mELfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGcrniiccS4PNQWMYHa/svQVELgif79YCOWSEB1DHOrJAiAyrPyP4TPvAD668491a8HRJnuwR+ouiCFhy4RUipbvMg=="}],"size":2920,"noattachment":false,"key":"/path-extra/-/path-extra-4.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/path-extra-4.0.0.tgz_1473830822735_0.28694726387038827"},"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":1473830823564,"_cnpm_publish_time":1473830823564,"dist-tags":{"latest":"4.3.0"}}