{"_id":"memoize-path","_rev":"227784","name":"memoize-path","description":"Easily create reusable, stackable file paths from memoized path segments.","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T15:43:53.000Z","created":"2016-03-28T02:54:14.123Z","0.1.2":"2016-03-28T03:30:51.728Z","0.1.1":"2016-03-28T03:04:34.911Z","0.1.0":"2016-03-28T02:54:14.123Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/memoize-path.git"},"versions":{"0.1.2":{"name":"memoize-path","description":"Easily create reusable, stackable file paths from memoized path segments.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/memoize-path","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/memoize-path.git"},"bugs":{"url":"https://github.com/jonschlinkert/memoize-path/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","mocha":"^2.4.5"},"keywords":["memoize","path"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["parse-filepath","is-absolute","is-relative","micromatch","relative"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"4f25c45aabf4fef528680890882e8053e3bc832d","_id":"memoize-path@0.1.2","_shasum":"45afd4de60a32b0bc8842982dce5206e6a8a315a","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"45afd4de60a32b0bc8842982dce5206e6a8a315a","size":2894,"noattachment":false,"key":"/memoize-path/-/memoize-path-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoize-path/download/memoize-path-0.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/memoize-path-0.1.2.tgz_1459135850748_0.1707131965085864"},"directories":{},"publish_time":1459135851728,"_cnpm_publish_time":1459135851728,"_hasShrinkwrap":false},"0.1.1":{"name":"memoize-path","description":"Easily create reusable, stackable file paths from memoized path segments.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/memoize-path","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/memoize-path.git"},"bugs":{"url":"https://github.com/jonschlinkert/memoize-path/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","mocha":"^2.4.5"},"keywords":["memoize","path"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["is-absolute","is-relative","micromatch","relative"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"558f8620e56f870864f7a7d7bb5d8050fac9f5a2","_id":"memoize-path@0.1.1","_shasum":"4dc63e94dc8afc11b42eca83cb73db65c918ce9f","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"4dc63e94dc8afc11b42eca83cb73db65c918ce9f","size":2682,"noattachment":false,"key":"/memoize-path/-/memoize-path-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoize-path/download/memoize-path-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/memoize-path-0.1.1.tgz_1459134272612_0.9920286508277059"},"directories":{},"publish_time":1459134274911,"_cnpm_publish_time":1459134274911,"_hasShrinkwrap":false},"0.1.0":{"name":"memoize-path","description":"Easily create reusable, stackable file paths from memoized path segments.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/memoize-path","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/memoize-path.git"},"bugs":{"url":"https://github.com/jonschlinkert/memoize-path/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","mocha":"^2.4.5","through2":"^2.0.1"},"keywords":["memoize","path"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["is-absolute","is-relative","micromatch","relative"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"558f8620e56f870864f7a7d7bb5d8050fac9f5a2","_id":"memoize-path@0.1.0","_shasum":"821fca32d8dc011fdafa0ff624cd868bb07deb5c","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"821fca32d8dc011fdafa0ff624cd868bb07deb5c","size":2696,"noattachment":false,"key":"/memoize-path/-/memoize-path-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoize-path/download/memoize-path-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/memoize-path-0.1.0.tgz_1459133653153_0.29977123998105526"},"directories":{},"publish_time":1459133654123,"_cnpm_publish_time":1459133654123,"_hasShrinkwrap":false}},"readme":"# memoize-path [![NPM version](https://img.shields.io/npm/v/memoize-path.svg?style=flat)](https://www.npmjs.com/package/memoize-path) [![NPM downloads](https://img.shields.io/npm/dm/memoize-path.svg?style=flat)](https://npmjs.org/package/memoize-path) [![Build Status](https://img.shields.io/travis/jonschlinkert/memoize-path.svg?style=flat)](https://travis-ci.org/jonschlinkert/memoize-path)\n\n> Easily create reusable, stackable file paths from memoized path segments.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install memoize-path --save\n```\n\n## Usage\n\nA function is returned when a string is passed on the arguments. Otherwise the memoized value is returned either when the function is called (the memoized value is also exposed on the function's `.path` property);\n\n**Example**\n\n```js\nvar memo = require('memoize-path');\n\n/**\n * When a string is passed, a function is returned\n */\n\nvar cwd = memo(process.cwd()); \n\n// use `cwd`\nvar foo = cwd('foo');\nvar bar = cwd('bar');\nvar baz = cwd('baz');\n\n// use `foo`\nvar qux = foo('a/b/c');\n// use `qux`\nvar fez = qux('x/y/z');\n\n/**\n * Get a memoized path by calling the function\n */\n\nconsole.log(cwd());\n//=> /User/dev/memo-path\nconsole.log(foo());\n//=> /User/dev/memo-path/foo\nconsole.log(bar());\n//=> /User/dev/memo-path/bar\nconsole.log(baz());\n//=> /User/dev/memo-path/baz\nconsole.log(qux());\n//=> /User/dev/memo-path/foo/a/b/c\nconsole.log(fez());\n//=> /User/dev/memo-path/foo/a/b/c/x/y/z\n\n/**\n * The memoized path is also exposed on the function's `.path` property\n */\n\nconsole.log(cwd.path);\n//=> /User/dev/memo-path\nconsole.log(foo.path);\n//=> /User/dev/memo-path/foo\nconsole.log(bar.path);\n//=> /User/dev/memo-path/bar\nconsole.log(baz.path);\n//=> /User/dev/memo-path/baz\nconsole.log(qux.path);\n//=> /User/dev/memo-path/foo/a/b/c\nconsole.log(fez.path);\n//=> /User/dev/memo-path/foo/a/b/c/x/y/z\n\n/**\n * The parent directory is exposed as `.parent`\n */\n\nconsole.log(cwd.path);\n//=> /User/dev\nconsole.log(foo.path);\n//=> /User/dev/memo-path\nconsole.log(bar.path);\n//=> /User/dev/memo-path\nconsole.log(baz.path);\n//=> /User/dev/memo-path\nconsole.log(qux.path);\n//=> /User/dev/memo-path/foo/a/b/c\nconsole.log(fez.path);\n//=> /User/dev/memo-path/foo/a/b/c/x/y/z\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute)\n* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative)\n* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch)\n* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath)\n* [relative](https://www.npmjs.com/package/relative): Get the relative filepath from path A to path B. Calculates from file-to-directory, file-to-file, directory-to-file,… [more](https://www.npmjs.com/package/relative) | [homepage](https://github.com/jonschlinkert/relative)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/memoize-path/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/memoize-path/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/memoize-path","bugs":{"url":"https://github.com/jonschlinkert/memoize-path/issues"},"license":"MIT"}