{"_id":"fast-path","_rev":"232096","name":"fast-path","description":"a fast implementation of node's native path","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"time":{"modified":"2021-06-03T15:46:55.000Z","created":"2014-09-09T15:21:16.987Z","1.1.0":"2014-09-17T11:16:07.830Z","1.0.0":"2014-09-11T02:50:27.109Z","0.1.0":"2014-09-10T09:45:05.062Z","0.0.1":"2014-09-09T15:21:16.987Z"},"users":{"schahriar":true,"ahmedelgabri":true},"author":{"name":"dead-horse","email":"dead_horse@qq.com","url":"http://deadhorse.me"},"repository":{"type":"git","url":"git@github.com:node-modules/fast-path"},"versions":{"1.1.0":{"name":"fast-path","version":"1.1.0","description":"a fast implementation of node's native path","main":"index.js","scripts":{"test":"node test/test-path.js"},"keywords":["path"],"author":{"name":"dead-horse","email":"dead_horse@qq.com","url":"http://deadhorse.me"},"repository":{"type":"git","url":"git@github.com:node-modules/fast-path"},"license":"MIT","dependencies":{},"devDependencies":{"autod":"~0.3.2","beautify-benchmark":"~0.2.4","benchmark":"~1.0.0","totoro":"~1.0.2"},"engine":{"node":">=0.8"},"gitHead":"02de88d32b6ad781c442e342f45be38c9d1e7b72","bugs":{"url":"https://github.com/node-modules/fast-path/issues"},"homepage":"https://github.com/node-modules/fast-path","_id":"fast-path@1.1.0","_shasum":"3d6808eff799a387ea504557d74796e598751046","_from":".","_npmVersion":"2.0.0-beta.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"dist":{"shasum":"3d6808eff799a387ea504557d74796e598751046","size":7082,"noattachment":false,"key":"/fast-path/-/fast-path-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-path/download/fast-path-1.1.0.tgz"},"directories":{},"publish_time":1410952567830,"_cnpm_publish_time":1410952567830,"_hasShrinkwrap":false},"1.0.0":{"name":"fast-path","version":"1.0.0","description":"a fast implementation of node's native path","main":"index.js","scripts":{"test":"node test/test-path.js"},"keywords":["path"],"author":{"name":"dead-horse","email":"dead_horse@qq.com","url":"http://deadhorse.me"},"repository":{"type":"git","url":"git@github.com:node-modules/fast-path"},"license":"MIT","dependencies":{},"devDependencies":{"autod":"~0.3.2","beautify-benchmark":"~0.2.4","benchmark":"~1.0.0","totoro":"~1.0.2"},"engine":{"node":">=0.8"},"gitHead":"df993cf1b4ddbd4b74abd1d859ec37faaf8cabcd","bugs":{"url":"https://github.com/node-modules/fast-path/issues"},"homepage":"https://github.com/node-modules/fast-path","_id":"fast-path@1.0.0","_shasum":"725607fd351b679b2ecb3d2f762d9a95c269ea31","_from":".","_npmVersion":"2.0.0-beta.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"dist":{"shasum":"725607fd351b679b2ecb3d2f762d9a95c269ea31","size":7037,"noattachment":false,"key":"/fast-path/-/fast-path-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-path/download/fast-path-1.0.0.tgz"},"directories":{},"publish_time":1410403827109,"_cnpm_publish_time":1410403827109,"_hasShrinkwrap":false},"0.1.0":{"name":"fast-path","version":"0.1.0","description":"a fast implementation of node's native path","main":"index.js","scripts":{"test":"node test/test-path.js"},"keywords":["path"],"author":{"name":"dead-horse","email":"dead_horse@qq.com","url":"http://deadhorse.me"},"repository":{"type":"git","url":"git@github.com:node-modules/fast-path"},"license":"MIT","dependencies":{},"devDependencies":{"autod":"~0.3.2","beautify-benchmark":"~0.2.4","benchmark":"~1.0.0","totoro":"~1.0.2"},"engine":{"node":">=0.8"},"gitHead":"0360fa6119229fca2de260bf6a1aab7456d7dad6","bugs":{"url":"https://github.com/node-modules/fast-path/issues"},"homepage":"https://github.com/node-modules/fast-path","_id":"fast-path@0.1.0","_shasum":"59efa97d4e55e1f029bc3470353300055736803c","_from":".","_npmVersion":"2.0.0-beta.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"dist":{"shasum":"59efa97d4e55e1f029bc3470353300055736803c","size":2806,"noattachment":false,"key":"/fast-path/-/fast-path-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-path/download/fast-path-0.1.0.tgz"},"directories":{},"publish_time":1410342305062,"_cnpm_publish_time":1410342305062,"_hasShrinkwrap":false},"0.0.1":{"name":"fast-path","version":"0.0.1","description":"a fast implementation of node's native path","main":"index.js","scripts":{"test":"node test/index.test.js"},"keywords":["path"],"author":{"name":"dead-horse","email":"dead_horse@qq.com","url":"http://deadhorse.me"},"repository":{"type":"git","url":"git@github.com:node-modules/fast-path"},"license":"MIT","dependencies":{},"devDependencies":{"autod":"~0.3.2","beautify-benchmark":"~0.2.4","benchmark":"~1.0.0","totoro":"~1.0.2"},"engine":{"node":">=0.8"},"gitHead":"c4c42d24968156135d8931e618f50d532c10c61b","bugs":{"url":"https://github.com/node-modules/fast-path/issues"},"homepage":"https://github.com/node-modules/fast-path","_id":"fast-path@0.0.1","_shasum":"0d1be20641431b217527af56de460fd044f993d9","_from":".","_npmVersion":"2.0.0-beta.3","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"dist":{"shasum":"0d1be20641431b217527af56de460fd044f993d9","size":1542,"noattachment":false,"key":"/fast-path/-/fast-path-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-path/download/fast-path-0.0.1.tgz"},"directories":{},"publish_time":1410276076987,"_cnpm_publish_time":1410276076987,"_hasShrinkwrap":false}},"readme":"fast-path\n---------------\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![node version][node-image]][node-url]\n[![Gittip][gittip-image]][gittip-url]\n\n[npm-image]: https://img.shields.io/npm/v/fast-path.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/fast-path\n[travis-image]: https://img.shields.io/travis/node-modules/fast-path.svg?style=flat-square\n[travis-url]: https://travis-ci.org/node-modules/fast-path\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.8-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n[gittip-image]: https://img.shields.io/gittip/dead-horse.svg?style=flat-square\n[gittip-url]: https://www.gittip.com/dead-horse/\n\na fast implementation of node's native path\n\n**node native path is super slow.**\n\n## Installation\n\n```bash\n$ npm install fast-path\n```\n\n## APIs\n\nThe same as [native path APIs](http://nodejs.org/docs/v0.11.13/api/path.html)\n\n## Usage\n\nIf you want to replace these APIs in native path:\n\n```js\nrequire('fast-path').replace();  // replace all\nrequire('fast-path').replace('dirname');  // replace `dirname`\nrequire('fast-path').replace(['dirname', 'extname']); // replace `dirname` and `extname`\n```\n\n## Benchmark\n\n[benchmark code](benchmark)\n\n```bash\n#node version: v0.11.13\n\npath.extname(shortPath)                x  1,854,774 ops/sec ±1.66% (96 runs sampled)\npath.extname(longPath)                 x    625,796 ops/sec ±1.15% (94 runs sampled)\npath.basename(shortPath)               x  1,769,474 ops/sec ±0.98% (96 runs sampled)\npath.basename(longPath)                x    642,424 ops/sec ±0.94% (94 runs sampled)\npath.dirname(shortPath)                x  1,761,185 ops/sec ±0.70% (96 runs sampled)\npath.dirname(longPath)                 x    626,764 ops/sec ±1.52% (90 runs sampled)\npath.join(path1, path2, shortPath)     x 629,403 ops/sec ±2.05% (94 runs sampled)\npath.join(path1, path2, longPath)      x 500,112 ops/sec ±0.83% (96 runs sampled)\npath.normalize(shortPath)              x 1,291,875 ops/sec ±2.17% (91 runs sampled)\npath.normalize(longPath)               x   969,211 ops/sec ±2.45% (93 runs sampled)\npath.resolve(shortPath)                x 123,724 ops/sec ±1.29% (94 runs sampled)\npath.resolve(longPath)                 x 105,019 ops/sec ±1.34% (92 runs sampled)\n\nfastPath.extname(shortPath)            x  9,971,307 ops/sec ±1.39% (88 runs sampled)\nfastPath.extname(longPath)             x  9,620,105 ops/sec ±1.17% (92 runs sampled)\nfastPath.basename(shortPath)           x 10,432,870 ops/sec ±1.41% (90 runs sampled)\nfastPath.basename(longPath)            x 10,742,695 ops/sec ±0.78% (96 runs sampled)\nfastPath.dirname(shortPath)            x 10,489,132 ops/sec ±1.19% (95 runs sampled)\nfastPath.dirname(longPath)             x 10,443,216 ops/sec ±2.36% (94 runs sampled)\nfastPath.join(path1, path2, shortPath) x 822,540 ops/sec ±1.06% (95 runs sampled)\nfastPath.join(path1, path2, longPath)  x 599,279 ops/sec ±1.13% (93 runs sampled)\nfastPath.normalize(shortPath)          x 2,037,040 ops/sec ±2.18% (94 runs sampled)\nfastPath.normalize(longPath)           x 1,612,871 ops/sec ±0.70% (92 runs sampled)\nfastPath.resolve(shortPath)            x 168,584 ops/sec ±1.61% (97 runs sampled)\nfastPath.resolve(longPath)             x 150,743 ops/sec ±0.88% (95 runs sampled)\n\n#node version: v0.10.31\n\npath.extname(shortPath)                x  2,005,761 ops/sec ±0.80% (95 runs sampled)\npath.extname(longPath)                 x    644,765 ops/sec ±1.02% (97 runs sampled)\npath.basename(shortPath)               x  1,930,931 ops/sec ±1.37% (93 runs sampled)\npath.basename(longPath)                x    642,663 ops/sec ±1.63% (95 runs sampled)\npath.dirname(shortPath)                x  1,849,624 ops/sec ±1.47% (92 runs sampled)\npath.dirname(longPath)                 x    635,535 ops/sec ±1.39% (94 runs sampled)\npath.join(path1, path2, shortPath)     x 308,499 ops/sec ±2.18% (85 runs sampled)\npath.join(path1, path2, longPath)      x 247,989 ops/sec ±2.17% (87 runs sampled)\npath.normalize(shortPath)              x   624,777 ops/sec ±3.60% (79 runs sampled)\npath.normalize(longPath)               x   472,721 ops/sec ±2.01% (88 runs sampled)\npath.resolve(shortPath)                x 121,911 ops/sec ±1.94% (90 runs sampled)\npath.resolve(longPath)                 x 110,468 ops/sec ±1.21% (91 runs sampled)\n\nfastPath.extname(shortPath)            x  9,372,443 ops/sec ±0.62% (94 runs sampled)\nfastPath.extname(longPath)             x  9,056,037 ops/sec ±1.00% (94 runs sampled)\nfastPath.basename(shortPath)           x 10,008,164 ops/sec ±0.76% (94 runs sampled)\nfastPath.basename(longPath)            x  9,266,497 ops/sec ±1.42% (95 runs sampled)\nfastPath.dirname(shortPath)            x  9,472,159 ops/sec ±1.69% (92 runs sampled)\nfastPath.dirname(longPath)             x  9,394,304 ops/sec ±2.75% (91 runs sampled)\nfastPath.join(path1, path2, shortPath) x 825,965 ops/sec ±2.76% (87 runs sampled)\nfastPath.join(path1, path2, longPath)  x 617,719 ops/sec ±0.77% (97 runs sampled)\nfastPath.normalize(shortPath)          x 2,379,009 ops/sec ±1.76% (89 runs sampled)\nfastPath.normalize(longPath)           x 1,642,025 ops/sec ±1.11% (95 runs sampled)\nfastPath.resolve(shortPath)            x 174,006 ops/sec ±1.18% (95 runs sampled)\nfastPath.resolve(longPath)             x 158,383 ops/sec ±0.53% (98 runs sampled)\n```\n\n### License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/node-modules/fast-path","bugs":{"url":"https://github.com/node-modules/fast-path/issues"},"license":"MIT"}