Socket
Socket
Sign inDemoInstall

magnetizer

Package Overview
Dependencies
1
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    magnetizer

Library for decoding and encoding magnet links


Version published
Weekly downloads
4
Maintainers
1
Install size
49.5 kB
Created
Weekly downloads
 

Readme

Source

Magnetizer

ci Coverage Status NPM Downloads NPM License

Library for decoding and encoding magnet links

Fast and easy to use
Written in TypeScript
Fully tested with 100% code coverage


Installation

npm install --save magnetizer

Getting Started

import magnetizer from 'magnetizer';

const magnetUri = magnetizer.decode(magnetLink);
import magnetizer from 'magnetizer';

const magnetLink = magnetizer.encode({
    displayName: 'test-name_for_magnet-link.tar.gz',
    length: 100500,
    infoHashes: [ 'c12fe1c06bba254a9dc9f519b335aa7c1367a88a' ],
    webSeeds: [ 'http://example.com/test-name_for_magnet-link.tar.gz' ],
    acceptableSources: [ 'http://example.com/test-name_for_magnet-link.tar.gz' ],
    sources: [ 'http://cache.example.com/c12fe1c06bba254a9dc9f519b335aa7c1367a88a' ],
    keywords: [ 'test-name_for_magnet-link', 'tar', 'gz' ],
    manifest: 'http://example.com/manifest',
    trackers: [
        'http://tracker.example.com/announce.php?ua=1111111111',
        'wss://tracker.webtorrent.io',
    ],
  });

Tests

npm test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

FAQs

Last updated on 04 Dec 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc