@substrate-system/webtorrent-fixtures
v2.0.12
Published
Sample torrent files for the WebTorrent test suite
Downloads
8
Maintainers
Readme
webtorrent-fixtures
Sample torrent files for the WebTorrent test suite
Torrent and content test files. All files are Public Domain or Creative Commons.
install
npm i -S @substrate-system/webtorrent-fixturesUsage
import fixtures from '@substrate-system/webtorrent-fixtures'
console.log(fixtures.leaves)Inline
If you need to bundle your test files, use the inline version. Buffers are exposed as base64 strings.
import fixtures from '@substrate-system/webtorrent-fixtures/inline'revive
To parse the JSON string, use the revive function. This will convert all base64 string to Buffer objects.
import base64Fixtures, {
revive
} from '@substrate-system/webtorrent-fixtures/inline'
const torrent = revive(base64Fixtures.leaves.parsedTorrent)License
MIT. Copyright (c) Feross Aboukhadijeh and WebTorrent, LLC.
