108 lines
12 KiB
JSON
108 lines
12 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "tmp@^0.0.33",
|
||
|
"scope": null,
|
||
|
"escapedName": "tmp",
|
||
|
"name": "tmp",
|
||
|
"rawSpec": "^0.0.33",
|
||
|
"spec": ">=0.0.33 <0.0.34",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/external-editor"
|
||
|
]
|
||
|
],
|
||
|
"_from": "tmp@>=0.0.33 <0.0.34",
|
||
|
"_id": "tmp@0.0.33",
|
||
|
"_inCache": true,
|
||
|
"_location": "/tmp",
|
||
|
"_nodeVersion": "8.3.0",
|
||
|
"_npmOperationalInternal": {
|
||
|
"host": "s3://npm-registry-packages",
|
||
|
"tmp": "tmp/tmp-0.0.33.tgz_1502530218606_0.07867415226064622"
|
||
|
},
|
||
|
"_npmUser": {
|
||
|
"name": "raszi",
|
||
|
"email": "npm@spam.raszi.hu"
|
||
|
},
|
||
|
"_npmVersion": "5.3.0",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "tmp@^0.0.33",
|
||
|
"scope": null,
|
||
|
"escapedName": "tmp",
|
||
|
"name": "tmp",
|
||
|
"rawSpec": "^0.0.33",
|
||
|
"spec": ">=0.0.33 <0.0.34",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/external-editor"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
||
|
"_shasum": "6d34335889768d21b2bcda0aa277ced3b1bfadf9",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "tmp@^0.0.33",
|
||
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/external-editor",
|
||
|
"author": {
|
||
|
"name": "KARASZI István",
|
||
|
"email": "github@spam.raszi.hu",
|
||
|
"url": "http://raszi.hu/"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "http://github.com/raszi/node-tmp/issues"
|
||
|
},
|
||
|
"dependencies": {
|
||
|
"os-tmpdir": "~1.0.2"
|
||
|
},
|
||
|
"description": "Temporary file and directory creator",
|
||
|
"devDependencies": {
|
||
|
"vows": "~0.7.0"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
|
||
|
"shasum": "6d34335889768d21b2bcda0aa277ced3b1bfadf9",
|
||
|
"tarball": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz"
|
||
|
},
|
||
|
"engines": {
|
||
|
"node": ">=0.6.0"
|
||
|
},
|
||
|
"files": [
|
||
|
"lib/"
|
||
|
],
|
||
|
"gitHead": "0900dd5b112ac7a482e4bdf3cb002bfe1b3acf77",
|
||
|
"homepage": "http://github.com/raszi/node-tmp",
|
||
|
"keywords": [
|
||
|
"temporary",
|
||
|
"tmp",
|
||
|
"temp",
|
||
|
"tempdir",
|
||
|
"tempfile",
|
||
|
"tmpdir",
|
||
|
"tmpfile"
|
||
|
],
|
||
|
"license": "MIT",
|
||
|
"main": "lib/tmp.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "raszi",
|
||
|
"email": "npm@spam.raszi.hu"
|
||
|
}
|
||
|
],
|
||
|
"name": "tmp",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# Tmp\n\nA simple temporary file and directory creator for [node.js.][1]\n\n[![Build Status](https://travis-ci.org/raszi/node-tmp.svg?branch=master)](https://travis-ci.org/raszi/node-tmp)\n[![Dependencies](https://david-dm.org/raszi/node-tmp.svg)](https://david-dm.org/raszi/node-tmp)\n[![npm version](https://badge.fury.io/js/tmp.svg)](https://badge.fury.io/js/tmp)\n[![API documented](https://img.shields.io/badge/API-documented-brightgreen.svg)](https://raszi.github.io/node-tmp/)\n[![Known Vulnerabilities](https://snyk.io/test/npm/tmp/badge.svg)](https://snyk.io/test/npm/tmp)\n\n## About\n\nThis is a [widely used library][2] to create temporary files and directories\nin a [node.js][1] environment.\n\nTmp offers both an asynchronous and a synchronous API. For all API calls, all\nthe parameters are optional. There also exists a promisified version of the\nAPI, see (5) under references below.\n\nTmp uses crypto for determining random file names, or, when using templates,\na six letter random identifier. And just in case that you do not have that much\nentropy left on your system, Tmp will fall back to pseudo random numbers.\n\nYou can set whether you want to remove the temporary file on process exit or\nnot, and the destination directory can also be set.\n\n## How to install\n\n```bash\nnpm install tmp\n```\n\n## Usage\n\nPlease also check [API docs][4].\n\n### Asynchronous file creation\n\nSimple temporary file creation, the file will be closed and unlinked on process exit.\n\n```javascript\nvar tmp = require('tmp');\n\ntmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) {\n if (err) throw err;\n\n console.log('File: ', path);\n console.log('Filedescriptor: ', fd);\n \n // If we don't need the file anymore we could manually call the cleanupCallback\n // But that is not necessary if we didn't pass the keep option because the library\n // will clean after itself.\n cleanupCallback();\n});\n```\n\n### Synchronous file creation\n\nA synchronous version of the above.\n\n```javascript\nvar tmp = require('tmp');\n\nvar tmpobj = tmp.fileSync();\nconsole.log('File: ', tmpobj.name);\nconsole.log('Filedescriptor: ', tmpobj.fd);\n \n// If we don't need the file anymore we could manually call the removeCallback\n// But that is not necessary if we didn't pass the keep option because the library\n// will clean after itself.\ntmpobj.removeCallback();\n```\n\nNote that this might throw an exception if either the maximum limit of retries\nfor creating a temporary name fails, or, in case that you do not have the permission\nto write to the directory where the temporary file should be created in.\n\n### Asynchronous directory creation\n\nSimple temporary directory creation, it will be removed on process exit.\n\nIf the directory still contains items on process exit, then it won't be removed.\n\n```javascript\nvar tmp = require('tmp');\n\ntmp.dir(function _tempDirCreated(err, path, cleanupCallback) {\n if (err) throw err;\n\n console.log('Dir: ', path);\n \n // Manual cleanup\n cleanupCallback();\n});\n```\n\nIf you want to cleanup the directory even when there are entries in it, then\nyou can pass the `unsafeCleanup` option when creating it.\n\n### Synchronous directory creation\n\nA synchronous version of the above.\n\n```javascript\nvar tmp = require('tmp');\n\nvar tmpobj = tmp.dirSync();\nconsole.log('Dir: ', tmpobj.name);\n// Manual cleanup\ntmpobj.removeCallback();\n```\n\nNote that this might throw an exception if either the maximum limit of retries\nfor creating a temporary name fails, or, in case that you do not have the permission\nto write to the directory where the temporary directory should be created in.\n\n### Asynchronous filename generation\n\nIt is possible with this library to generate a unique filename in the specified\ndirectory.\n\n```javascript\nvar tmp = require('tmp');\n\ntmp.tmpName(function _tempNameGenerated(err, path) {\n if (err) throw err;\n\n console.log('Created temporary filename: ', path);\n});\n```\n\n### Synchronous filename generation\n\nA synchronous version
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git+https://github.com/raszi/node-tmp.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"doc": "jsdoc -c .jsdoc.json",
|
||
|
"test": "vows test/*-test.js"
|
||
|
},
|
||
|
"version": "0.0.33"
|
||
|
}
|