{"_id":"random-path","_rev":"7-a2a4bb581f233c60c1c123381382fc97","name":"random-path","description":"Generate a random path name.","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"random-path","version":"0.1.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/linusu/node-random-path.git"},"scripts":{"test":"standard && node test"},"dependencies":{"base32-encode":"^0.1.0","murmur-32":"^0.1.0"},"devDependencies":{"standard":"^8.0.0-beta.5"},"gitHead":"085a04f741be9ae76a1a3a433eed5c76426d2c7f","description":"Generate a random path name.","bugs":{"url":"https://github.com/linusu/node-random-path/issues"},"homepage":"https://github.com/linusu/node-random-path#readme","_id":"random-path@0.1.0","_shasum":"df2639d3467facf767f6d849cc4933a10417c946","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"dist":{"shasum":"df2639d3467facf767f6d849cc4933a10417c946","tarball":"https://registry.npmjs.org/random-path/-/random-path-0.1.0.tgz","integrity":"sha512-CJR/Q/uz97NUa9idc2kfTx5nyXBE4XHZy41wVL4In2lzfyUBdbQ67+qq04OU+uY95p1NqgSPIin2QgTYNFjqfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkQr7vHtT7zdw8Dw2ODAMqVdsRmKIz/MIvt99PEPkFJQIgHKrYoGo+SB4AbldQhJQGr523xZ1H+elbDW8kmeEdbEM="}]},"maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-path-0.1.0.tgz_1471818867076_0.6363853418733925"},"directories":{}},"0.1.1":{"name":"random-path","version":"0.1.1","license":"MIT","repository":{"type":"git","url":"git+https://github.com/linusu/node-random-path.git"},"scripts":{"test":"standard && node test"},"dependencies":{"base32-encode":"^0.1.0","murmur-32":"^0.1.0"},"devDependencies":{"standard":"^8.0.0-beta.5"},"gitHead":"f546d2482bf9256ab939587890414d5b16ed7ab4","description":"Generate a random path name.","bugs":{"url":"https://github.com/linusu/node-random-path/issues"},"homepage":"https://github.com/linusu/node-random-path#readme","_id":"random-path@0.1.1","_shasum":"f8f4d36f75a134ca15fd39c7d7505fbf163b634c","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"dist":{"shasum":"f8f4d36f75a134ca15fd39c7d7505fbf163b634c","tarball":"https://registry.npmjs.org/random-path/-/random-path-0.1.1.tgz","integrity":"sha512-nJlfe0JavSCD2se00usaNHIn9aFJvV1E250lI1CHz81eUKO0+2DGsn7KHVi2/WlSPaPWOZNujuFUN+HwfS3L7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDODgSQ0q0XD1DBy4sC4J+0fRx2BPXz7WmxjnBKMf6WegIhALd+DlEpNP1UjLkqIa3CRl4OM91uTsy6W93rvzw71jZy"}]},"maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-path-0.1.1.tgz_1478610097164_0.19807775504887104"},"directories":{}},"0.1.2":{"name":"random-path","version":"0.1.2","license":"MIT","repository":{"type":"git","url":"git+https://github.com/LinusU/node-random-path.git"},"scripts":{"test":"standard && node test"},"dependencies":{"base32-encode":"^0.1.0 || ^1.0.0","murmur-32":"^0.1.0 || ^0.2.0"},"devDependencies":{"standard":"^14.3.4"},"gitHead":"de6e1e1e76f4e853e30e620b0d35d0b33f53d15d","description":"Generate a random path name.","bugs":{"url":"https://github.com/LinusU/node-random-path/issues"},"homepage":"https://github.com/LinusU/node-random-path#readme","_id":"random-path@0.1.2","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-4jY0yoEaQ5v9StCl5kZbNIQlg1QheIDBrdkDn53EynpPb9FgO6//p3X/tgMnrC45XN6QZCzU1Xz/+pSSsJBpRw==","shasum":"78b7f1570e2a09f66a4e2e0113a98ed588e85da9","tarball":"https://registry.npmjs.org/random-path/-/random-path-0.1.2.tgz","fileCount":4,"unpackedSize":3899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewtucCRA9TVsSAnZWagAA+YMQAJAYoKusCC3Acyt2B78+\nbe46aibEd8ui1XD+t/TXPsYuBmj98HUBANZ1tVyfxQtQ9AEUGwhylO8IOxx6\nvRDHa41mBiNzyKUUcXf+h++LKZ2QZkNif14y8ihW8yRgD/YvkkIdi16uSW1Q\nYloL3whsXFvmT7gta3LXTBnM7zwxGC14Jot02Hjobtu0Mv8PNzd7tim6jAfz\nwUGf++KxHla62BqXiRFcTczoPH9sAlDtJi9iMgJOHBPxeI74SVENf6b18J/G\n1o/IXin7YU1CgX/S4RbZQGjSY78Vv/keclhyhGaR3MoB4GhLAuO7Gfrs122t\nYoLlCvzHaqg3LCGeWbFBU+KVZoWqdXFSU2GU1KJDhrXb0Sx26+Q3tO860Ixl\nd5u05wqjdmXnVqtqpb3xp2NKhj8BIXGG8uzfihC7muyA1szkMw80bCDvriWY\nFJ2nQy8S/fWnDXqQr1d2Ljj6sbN4h3PO6jhqC3Vv/xWpHWo/pnR752zPnGt2\neczgU+vGa5s38EumH1r5Fm0TFrDalEqt6B0ouPhjMYXXnwkeEhOApZcxSR8t\nOAa80BXfr236glYC3X3rnF2FuQF0zmV+YHgH0wq/SR9Gu/j0XgOEwpY6kxjz\niB0qFYrLGDyIuL+aG1SLcm3iHNhVDAPS8phvdyaEacA0Em0Rah8mw63BlRXU\nSpvP\r\n=b/+b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAX7tomOjvVxNw3G4MoCyooiXUUesEz/RhHc9hW+GMhOAiEAqkHrMmYJKRcYngxPGy+YCMhREO+D2aLaCg+U1J1p5rQ="}]},"maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/random-path_0.1.2_1589828508467_0.44532207779165334"},"_hasShrinkwrap":false},"1.0.0":{"name":"random-path","version":"1.0.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/LinusU/node-random-path.git"},"type":"module","exports":"./index.js","scripts":{"test":"standard && node test && ts-readme-generator --check"},"dependencies":{"base32-encode":"^2.0.0","murmur-32":"^1.0.0"},"devDependencies":{"standard":"^16.0.3","ts-readme-generator":"^0.5.1"},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"gitHead":"9c8f58ef03a17545f1937444017031232b325887","description":"Generate a random path name.","bugs":{"url":"https://github.com/LinusU/node-random-path/issues"},"homepage":"https://github.com/LinusU/node-random-path#readme","_id":"random-path@1.0.0","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-I6FGG7uFR3tZqHP7TzcP3Ikt5IyVEG59u7KTjIIjizcdPY6MDjD9CbbKqE+znIv4mrDF6HMlBshoemk0oRRwsQ==","shasum":"4e544014b2d434bee73d0266782711258a196726","tarball":"https://registry.npmjs.org/random-path/-/random-path-1.0.0.tgz","fileCount":6,"unpackedSize":5440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/ApaCRA9TVsSAnZWagAAgzAP/iA9ZOLUBlSwSsx8le1d\nkBqhhqKm6TrC1BkpLWV8POOUKmekBkRs1dlM5Sdqgz4F6Riu8UTVwXAnvRzK\nsJEWpCgpgWryWbaCDOT8PC3gd9Q4YpSmYzK13wDpBe8kdmbsH73QK68MdRbH\nTsHroOdP41azkpoydGVU5Vq1+GDwDo1vI+VCi5dXd1tiRpWdowTtzk4XoR/r\n1cLTaIMgjc9SD9JdXCNHI1ZR7a4IHTCS+28ZW/VXKaJARwddgj7ZjZbxoQZD\nukamEkN0gavcmRzdysoa6oYzdrWZQXLFq4kc8InlB/NMYubL0ytlRN1Cv/TU\njLqTL2c+73w/3loiODk9g2hkHQKnGpw2CkgxfsRhOft+D4fLl8fv0CNi6KL7\nzhrfZAZl3m8fKbMjUwkSdzWMOZyxkrcBxi1C/bP//4+yKmhBWl7Quj1PeWNN\nOe2sczSQQVYAH3yW3RtqsXHQ2pOrFQuf7GMFNNSjnunMpnQtdl2EttcyNNM8\ndAzhTIiV+QArfagDYpSIbe5bSC3+piQvj04h9VvqLLassLxbR3FBdX0Jo613\nRPzoC7Dfwo5d/whgs77OMVhobwXMlU3Zj5f1oYOKZsZM5cCZbrdfF1O1eayE\n0Pbspvia6/cnhgyMEzjMfULGD3N8Zb5yJgekM2+z5SUug4tGpggu+yVuXmsc\nTxli\r\n=zcGe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMFw+LxwqxQ5MxZIetj42ZgQyY0KU60oLVBGkE1V87EAIgQBFgfuhRAXrcOsCuTW4xD2HkscHsn8RDS1UCfr7bkgo="}]},"_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"directories":{},"maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/random-path_1.0.0_1627130458760_0.5701327413374477"},"_hasShrinkwrap":false}},"readme":"# Random Path\n\nGenerate a random path name.\n\n## Installation\n\n```sh\nnpm install --save random-path\n```\n\n## Usage\n\n```js\nimport os from 'node:os'\nimport randomPath from 'random-path'\n\nconst path = randomPath(os.tmpDir(), '%s.txt')\n\nconsole.log(path)\n//=> /tmp/Y374CW8.txt\n```\n\n## API\n\n### `randomPath(directory, template)`\n\n- `directory` (`string`, required)\n- `template` (`string`, required)\n- returns `string` - the generated path\n\nGenerates a random path name with the specified `directory` and `template`.\n\n`template` should be a string where `%s` will be replaced with some random characters (e.g. `'linusu-%s'`). The string should contain `%s` exactly once. If you want to include a literal percent sign, escape it with another one, e.g. `'%%string'` becomes `'%string'`.\n\n**Important:** This module makes no guarantees on wether there exists a file at the returned path or not. Do not simply write data to the returned path. If you want a random file, use the higher level module [fs-temp](https://github.com/LinusU/fs-temp).\n\n### `validateTemplate(template)`\n\n- `template` (`string`, required)\n\nCheck to see if the template is a valid template accepted by `randomPath`. Throws an error if the template is invalid.\n\n## See also\n\n- [fs-temp](https://github.com/LinusU/fs-temp) - A quick and simple way to create temporary files and directories.\n","maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"time":{"modified":"2022-06-25T11:39:28.149Z","created":"2016-08-21T22:34:28.511Z","0.1.0":"2016-08-21T22:34:28.511Z","0.1.1":"2016-11-08T13:01:39.195Z","0.1.2":"2020-05-18T19:01:48.606Z","1.0.0":"2021-07-24T12:40:58.909Z"},"homepage":"https://github.com/LinusU/node-random-path#readme","repository":{"type":"git","url":"git+https://github.com/LinusU/node-random-path.git"},"bugs":{"url":"https://github.com/LinusU/node-random-path/issues"},"license":"MIT","readmeFilename":"readme.md"}