Read file with fs for next.
npm install -S @jswork/next-fs-read
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. 学着说。(听力练习)
*/
name | type | default | description |
---|---|---|---|
charset | string | utf-8 | Content charset. |
responseType | string | string | Results type(string/json/array). |
Code released under the MIT license.