Download Fore_End/cpcn2/node_modules/bl/test/convert.js from zxy0307/JavaWeb: direct link, hf CLI and curl.
- Browser
- Download file 609 Bytes
-
https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/cpcn2/node_modules/bl/test/convert.js
- Command line
-
hf download hf://zxy0307/JavaWeb/Fore_End/cpcn2/node_modules/bl/test/convert.js
-
curl -L -o convert.js https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/cpcn2/node_modules/bl/test/convert.js
609 Bytes
| const tape = require('tape') | |
| const { BufferList, BufferListStream } = require('../') | |
| const { Buffer } = require('buffer') | |
| tape('convert from BufferList to BufferListStream', (t) => { | |
| const data = Buffer.from(`TEST-${Date.now()}`) | |
| const bl = new BufferList(data) | |
| const bls = new BufferListStream(bl) | |
| t.ok(bl.slice().equals(bls.slice())) | |
| t.end() | |
| }) | |
| tape('convert from BufferListStream to BufferList', (t) => { | |
| const data = Buffer.from(`TEST-${Date.now()}`) | |
| const bls = new BufferListStream(data) | |
| const bl = new BufferList(bls) | |
| t.ok(bl.slice().equals(bls.slice())) | |
| t.end() | |
| }) | |