{"_id":"fs-temp","_rev":"1352016","name":"fs-temp","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"linusu","email":""}],"time":{"modified":"2021-11-02T16:26:02.000Z","created":"2014-09-19T13:15:55.539Z","2.0.1":"2021-11-02T13:41:47.231Z","2.0.0":"2021-07-24T12:52:42.161Z","1.2.1":"2020-05-28T10:31:21.313Z","1.2.0":"2020-05-28T10:30:18.681Z","1.1.2":"2016-11-02T08:22:52.570Z","1.1.1":"2016-08-21T23:10:03.969Z","1.1.0":"2016-05-17T12:36:34.145Z","1.0.0":"2015-08-17T20:25:58.451Z","0.2.0":"2015-08-17T20:25:34.117Z","0.1.3":"2015-08-17T18:12:39.721Z","0.1.2":"2015-03-02T12:27:14.193Z","0.1.1":"2014-12-10T22:39:37.383Z","0.1.0":"2014-09-19T13:15:55.539Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/LinusU/fs-temp.git"},"versions":{"2.0.1":{"name":"fs-temp","version":"2.0.1","license":"MIT","repository":{"type":"git","url":"git+https://github.com/LinusU/fs-temp.git"},"type":"module","exports":{".":"./index.js","./promises":"./promises.js"},"scripts":{"test":"standard && mocha"},"dependencies":{"random-path":"^1.0.0"},"devDependencies":{"mocha":"^8.4.0","standard":"^16.0.3"},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"types":"./index.d.ts","gitHead":"cbda7828f686c3c6380bf494a49b974237bf0cd3","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@2.0.1","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"shasum":"07875908f835c1e05714ee4d507d8fd2aeb04a95","size":4426,"noattachment":false,"key":"/fs-temp/-/fs-temp-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-2.0.1.tgz"},"_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"directories":{},"maintainers":[{"name":"linusu","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-temp_2.0.1_1635860507115_0.7158564364617057"},"_hasShrinkwrap":false,"publish_time":1635860507231,"_cnpm_publish_time":1635860507231},"2.0.0":{"name":"fs-temp","version":"2.0.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/LinusU/fs-temp.git"},"type":"module","exports":{".":"./index.js","./promises":"./promises.js"},"scripts":{"test":"standard && mocha"},"dependencies":{"random-path":"^1.0.0"},"devDependencies":{"mocha":"^8.4.0","standard":"^16.0.3"},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"gitHead":"273f21aa4dd6a9667501c7a8235c791d03766906","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@2.0.0","_nodeVersion":"16.5.0","_npmVersion":"7.19.1","dist":{"shasum":"28ff744a88049c5e40012910e52033946b3fb6cc","size":4412,"noattachment":false,"key":"/fs-temp/-/fs-temp-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-2.0.0.tgz"},"_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"directories":{},"maintainers":[{"name":"linusu","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-temp_2.0.0_1627131161760_0.6509495558930796"},"_hasShrinkwrap":false,"publish_time":1627131162161,"_cnpm_publish_time":1627131162161},"1.2.1":{"name":"fs-temp","version":"1.2.1","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","devDependencies":{"mocha":"^2.2.5","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/fs-temp.git"},"dependencies":{"random-path":"^0.1.0"},"gitHead":"c892a4786eb7e6669076649ad9c6e2cb3631a037","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@1.2.1","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"shasum":"ffd136ef468177accc3c267d4510f6ce3b2b9697","size":4559,"noattachment":false,"key":"/fs-temp/-/fs-temp-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-1.2.1.tgz"},"maintainers":[{"name":"linusu","email":""}],"_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-temp_1.2.1_1590661881176_0.0334943268562653"},"_hasShrinkwrap":false,"publish_time":1590661881313,"_cnpm_publish_time":1590661881313},"1.2.0":{"name":"fs-temp","version":"1.2.0","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","devDependencies":{"mocha":"^2.2.5","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/fs-temp.git"},"dependencies":{"random-path":"^0.1.0"},"gitHead":"99f078eed276b3c2ee7e60ac7a06ee7616cbb11e","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@1.2.0","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"shasum":"3499a8cbf4548fb848cabced04b900311546cf61","size":3599,"noattachment":false,"key":"/fs-temp/-/fs-temp-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-1.2.0.tgz"},"maintainers":[{"name":"linusu","email":""}],"_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-temp_1.2.0_1590661818571_0.28701828574124644"},"_hasShrinkwrap":false,"publish_time":1590661818681,"_cnpm_publish_time":1590661818681},"1.1.2":{"name":"fs-temp","version":"1.1.2","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","files":["index.js","promise.js","lib/"],"devDependencies":{"mocha":"^2.2.5","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/fs-temp.git"},"dependencies":{"random-path":"^0.1.0"},"gitHead":"a01fa11f8f30a23f12937e4f3adab5bce0fdc1c9","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@1.1.2","_shasum":"cc52f038bbefe510f6bcd09ec592b79d0f69253f","_from":".","_npmVersion":"2.15.0","_nodeVersion":"0.10.44","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"dist":{"shasum":"cc52f038bbefe510f6bcd09ec592b79d0f69253f","size":3607,"noattachment":false,"key":"/fs-temp/-/fs-temp-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-1.1.2.tgz"},"maintainers":[{"name":"linusu","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/fs-temp-1.1.2.tgz_1478074972040_0.7731479753274471"},"directories":{},"publish_time":1478074972570,"_cnpm_publish_time":1478074972570,"_hasShrinkwrap":false},"1.1.1":{"name":"fs-temp","version":"1.1.1","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","files":["index.js","promise.js","lib/"],"devDependencies":{"mocha":"^2.2.5","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/fs-temp.git"},"dependencies":{"random-path":"^0.1.0"},"gitHead":"abc7db72daa9361a498acb969cdbd893e56bb754","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@1.1.1","_shasum":"ae40ba694b5527aed300a00cd60b095a2128faca","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"dist":{"shasum":"ae40ba694b5527aed300a00cd60b095a2128faca","size":3637,"noattachment":false,"key":"/fs-temp/-/fs-temp-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-1.1.1.tgz"},"maintainers":[{"name":"linusu","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/fs-temp-1.1.1.tgz_1471821002563_0.8457365019712597"},"directories":{},"publish_time":1471821003969,"_cnpm_publish_time":1471821003969,"_hasShrinkwrap":false},"1.1.0":{"name":"fs-temp","version":"1.1.0","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","files":["index.js","promise.js","lib/"],"devDependencies":{"mocha":"^2.2.5","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/fs-temp.git"},"gitHead":"3175bddc71526f933b3967dc0ee06bf45855bd96","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@1.1.0","_shasum":"456f5275f6089c206a440c4e3a92946d826576ef","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"dist":{"shasum":"456f5275f6089c206a440c4e3a92946d826576ef","size":4051,"noattachment":false,"key":"/fs-temp/-/fs-temp-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-1.1.0.tgz"},"maintainers":[{"name":"linusu","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/fs-temp-1.1.0.tgz_1463488591725_0.2596296784467995"},"directories":{},"publish_time":1463488594145,"_cnpm_publish_time":1463488594145,"_hasShrinkwrap":false},"1.0.0":{"name":"fs-temp","version":"1.0.0","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","files":["index.js","lib/"],"devDependencies":{"mocha":"^2.2.5","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/fs-temp.git"},"gitHead":"53d5b75c543e8064bef19a3e28d5d01c53a41797","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@1.0.0","_shasum":"6f2a8c48942da06c714f9e3d9786e15e0f923ef3","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"maintainers":[{"name":"linusu","email":""}],"dist":{"shasum":"6f2a8c48942da06c714f9e3d9786e15e0f923ef3","size":3702,"noattachment":false,"key":"/fs-temp/-/fs-temp-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-1.0.0.tgz"},"directories":{},"publish_time":1439843158451,"_cnpm_publish_time":1439843158451,"_hasShrinkwrap":false},"0.2.0":{"name":"fs-temp","version":"0.2.0","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","files":["index.js","lib/"],"devDependencies":{"mocha":"^2.2.5","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/fs-temp.git"},"gitHead":"15e4bd1c1689f80d20ed22edc10a8de49ee5bb18","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@0.2.0","_shasum":"a978f1fcb9f4b15a55b974ced498056fd02d78cd","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"maintainers":[{"name":"linusu","email":""}],"dist":{"shasum":"a978f1fcb9f4b15a55b974ced498056fd02d78cd","size":3704,"noattachment":false,"key":"/fs-temp/-/fs-temp-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-0.2.0.tgz"},"directories":{},"publish_time":1439843134117,"_cnpm_publish_time":1439843134117,"_hasShrinkwrap":false},"0.1.3":{"name":"fs-temp","version":"0.1.3","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","devDependencies":{"mocha":"^2.2.5","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/fs-temp.git"},"gitHead":"ec46c318e9089736fdac30255bf4032b25555fc9","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp#readme","_id":"fs-temp@0.1.3","_shasum":"a1374a6cc9b13d8fbfba7d037aa490e1de07f6b8","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"maintainers":[{"name":"linusu","email":""}],"dist":{"shasum":"a1374a6cc9b13d8fbfba7d037aa490e1de07f6b8","size":4685,"noattachment":false,"key":"/fs-temp/-/fs-temp-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-0.1.3.tgz"},"directories":{},"publish_time":1439835159721,"_cnpm_publish_time":1439835159721,"_hasShrinkwrap":false},"0.1.2":{"name":"fs-temp","version":"0.1.2","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","devDependencies":{"mocha":"^1.21.4"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/LinusU/fs-temp.git"},"gitHead":"921a64fd53395bc9b92516cc7914268667612474","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp","_id":"fs-temp@0.1.2","_shasum":"7adbfffb66c5f67f29d43ca8ca28e3d919c855bf","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.12.0","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"maintainers":[{"name":"linusu","email":""}],"dist":{"shasum":"7adbfffb66c5f67f29d43ca8ca28e3d919c855bf","size":4693,"noattachment":false,"key":"/fs-temp/-/fs-temp-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-0.1.2.tgz"},"directories":{},"publish_time":1425299234193,"_cnpm_publish_time":1425299234193,"_hasShrinkwrap":false},"0.1.1":{"name":"fs-temp","version":"0.1.1","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","devDependencies":{"mocha":"^1.21.4"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/LinusU/fs-temp.git"},"gitHead":"9354c57bdbf3f94a9f87b5ff1d0c4776398ede29","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp","_id":"fs-temp@0.1.1","_shasum":"b5f763d3b40ed5fe1674727a3b2c58032859582a","_from":".","_npmVersion":"2.1.10","_nodeVersion":"0.10.33","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"maintainers":[{"name":"linusu","email":""}],"dist":{"shasum":"b5f763d3b40ed5fe1674727a3b2c58032859582a","size":4108,"noattachment":false,"key":"/fs-temp/-/fs-temp-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-0.1.1.tgz"},"directories":{},"publish_time":1418251177383,"_cnpm_publish_time":1418251177383,"_hasShrinkwrap":false},"0.1.0":{"name":"fs-temp","version":"0.1.0","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","devDependencies":{"mocha":"^1.21.4"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"http://github.com/LinusU/fs-temp.git"},"gitHead":"9e074bc3e4735e169ae5966b3600283075f1e4a9","description":"`fs-temp` is a quick and simple way to create temporary files and directories.","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"homepage":"https://github.com/LinusU/fs-temp","_id":"fs-temp@0.1.0","_shasum":"713eb270ad3ce2b1fd4099d41ec26ed0a126f187","_from":".","_npmVersion":"2.0.0-beta.1","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"maintainers":[{"name":"linusu","email":""}],"dist":{"shasum":"713eb270ad3ce2b1fd4099d41ec26ed0a126f187","size":3482,"noattachment":false,"key":"/fs-temp/-/fs-temp-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-temp/download/fs-temp-0.1.0.tgz"},"directories":{},"publish_time":1411132555539,"_cnpm_publish_time":1411132555539,"_hasShrinkwrap":false}},"readme":"\n# fs-temp\n\n`fs-temp` is a quick and simple way to create temporary files and directories.\n\nWhy another one? I know that there are already libraries doing similar things,\nbut I felt that their implementation was unnecessary complicated. I also wanted\na quick way to turn a buffer into a file.\n\n## Installation\n\n```sh\nnpm install --save fs-temp\n```\n\n## Usage\n\n```js\nimport temp from 'fs-temp'\n\nconst data = Buffer.from('testing 1 2 3')\nconst path = temp.writeFileSync(data)\n\n// `path` now holds the path to a file with the specified `data`\n```\n\n```js\nimport temp from 'fs-temp'\n\nconst path = temp.template('linusu-%s').mkdirSync()\n\n// `path` now holds the path to a directory with the prefix 'linusu-'\n```\n\n## Promise support\n\nIf you import `fs-temp/promises` you'll receive an alternative API where all\nfunctions that takes callbacks are replaced by `Promise`-returning functions.\n\n```js\nimport temp from 'fs-temp/promises'\n\nconst data = Buffer.from('testing 1 2 3')\nconst path = await temp.writeFile(data)\n\n// `path` now holds the path to a file with the specified `data`\n```\n\n## API\n\nThe api mimics the one provided by `fs` very closely.\n\n### `open(flags[, mode], callback)`\n\nAsynchronous file open.\n\n`flags` is either `'w'` (only writing) or `'w+'` (writing and reading).\n\nThe callback gets two arguments `(err, obj)`. `obj` has `fd` and `path`.\n\n### `openSync(flags[, mode])`\n\nSynchronous version of `.open()`, returns `obj` with `fd` and `path`.\n\n### `mkdir([mode, ]callback)`\n\nCreates an empty directory.\n\nThe callback gets two arguments `(err, path)`.\n\n### `mkdirSync([mode])`\n\nSynchronous version of `.mkdir()`, returns `path`.\n\n### `writeFile(data[, encoding], callback)`\n\nAsynchronously writes data to a file. `data` can be a string or a buffer. The\n`encoding` argument is ignored if `data` is a buffer. It defaults to `'utf8'`.\n\nThe callback gets two arguments `(err, path)`.\n\n### `writeFileSync(data[, encoding])`\n\nSynchronous version of `.writeFileSync()`, returns `path`.\n\n### `createWriteStream([options])`\n\nCreates and returns a `fs.WriteStream` that will write it's content to a\ntemporary file. This functions performs a little bit of blocking IO in order to\nopen the file initially.\n\n### `template(template)`\n\nReturns a copy of the module that uses the specified `template` when generating\nfile names. `template` should be a string where `%s` will be replaced with some\nrandom characters (e.g. `'linusu-%s'`).\n\nThe string should contain `%s` exactly once. If you want to include a literal\npercent sign, escape it with another one, e.g. `'%%string'` becomes `'%string'`.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Linus Unnebäck\n","_attachments":{},"homepage":"https://github.com/LinusU/fs-temp#readme","bugs":{"url":"https://github.com/LinusU/fs-temp/issues"},"license":"MIT"}