Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@jswork/next-fs-read

afeiship6MIT1.0.4

Read file with fs for next.

next, fs, read, read-file-sync, sync, gbk, gb2312, file-get-content, response-type, json, array, string, buffer, gbk2utf8, utf8, utf-8

readme

next-fs-read

Read file with fs for next.

version license size download

installation

npm install -S @jswork/next-fs-read

usage

import '@jswork/next-fs-read';

nx.fsRead('./__tests__/E201.lrc', { charset: 'utf8' });
/*
[00:02.00]Unit 1 Hello 第一单元 你好
[00:04.06]Hi, I'm Mocky. 嗨,我是Mocky。
[00:07.33]Hello, Mocky. 你好,Mocky。
[00:10.84]Learn to say. 学着说。(听力练习)

*/

options

name type default description
charset string utf-8 Content charset.
responseType string string Results type(string/json/array).

license

Code released under the MIT license.