Détail du package

@substrate-system/webtorrent-fixtures

substrate-system57MIT2.0.12

Sample torrent files for the WebTorrent test suite

sample torrents, test, test fixtures, torrent

readme

webtorrent-fixtures

tests module install size license

<summary>

Contents

</summary>

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-fixtures

Usage

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.