Check if a file is binary or ASCII with Node.js?

前端 未结 3 732
长情又很酷
长情又很酷 2021-01-01 13:50

I\'m wondering what would be the best way to check if a file is binary or ASCII with Node.js?

There appears to be two ways not specific to node.js:

3条回答
  •  醉梦人生
    2021-01-01 14:40

    Thanks to the comments on this question by David Schwartz, I created istextorbinary to solve this problem.

提交回复
热议问题