1.0.0 • Published 8 years ago

istextfile v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

isTextFile

The function judge whether a file is text-file or not
这个函数判断一个文件是不是文本文件

var isTextFile = require('istextfile');
if(isTextFile("a.jpg")){
  console.log('The file is text-file')
}else{
  console.log('The file is binary-file')
}

#install npm install istextfile