Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

magnetizer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magnetizer

Library for decoding and encoding magnet links

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-42.86%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 04 Dec 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc