htc 7ca38fdcbb 善行少年PC端首次提交(基础版) 10 tháng trước cách đây
..
node_modules 7ca38fdcbb 善行少年PC端首次提交(基础版) 10 tháng trước cách đây
index.js 7ca38fdcbb 善行少年PC端首次提交(基础版) 10 tháng trước cách đây
package.json 7ca38fdcbb 善行少年PC端首次提交(基础版) 10 tháng trước cách đây
readme.md 7ca38fdcbb 善行少年PC端首次提交(基础版) 10 tháng trước cách đây

readme.md

temp-write Build Status

Write String/Buffer to a random temp file

Install

Install with npm

npm install --save temp-write

Example

var fs = require('fs');
var tempWrite = require('temp-write');

var filePath = tempWrite.sync('unicorn');
//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b

fs.readFileSync(filePath, 'utf8');
//=> unicorn

API

tempWrite(input, callback)

input

Type: String|Buffer

callback(err, filePath)

Type: Function

tempWrite.sync(input)

Type: String|Buffer
Returns: the file path

License

MIT © Sindre Sorhus