New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

textfile

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textfile

Read and write files(xml,json,string)

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-70%
Maintainers
1
Weekly downloads
 
Created
Source

textfile

引用

var textfile = require('textfile')

读取文件

textfile.read(path,type,cb)

textfile.read(path,type).then(cb)
  • path 必选 文件路径
  • type 可选 文件类型(xml/json/string)
  • cb 可选 回调函数,传入读取到的数据,xml/json类型会转为对象,xml对象操作请参考:https://www.npmjs.com/package/xmldom

写入文件

textfile.write(path,data,type,cb)

textfile.write(path,data,type).then(cb)
  • path 必选 文件路径
  • data 必选 要写入的数据
  • type 可选 文件类型(xml/json/string)
  • cb 可选 回调函数,失败会传入err对象

Keywords

FAQs

Package last updated on 16 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc