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

transfer.js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transfer.js

Fork of transfer-sh, a CLI tool for easy file sharing with https://transfer.sh

  • 0.5.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

transfer.js

Version Build Status License Coverage

Node.js CLI tool for easy file sharing with transfer.sh

Install

The easiest way to get transfer.js is with npm or yarn:

$ npm install -g transfer.js
$ yarn global add transfer.js

CLI Usage

Example

$ transfer-js hello.txt --copy

Will return a link to the resource and copy it to your clipboard.

Options

OptionDescription
-m, --max-daysMaximum number of days the file will stay on transfer.sh.
-M, --max-downloadsMaximum number of downloads allowed.
-D, --downloadDownload the file from the given URL.
-n, --file-nameName to use for the upload.
-c, --copyCopy the file URL or path to the clipboard.
-N, --no-progressDon't show the progress bar.
-o, --outputOutput path of the downloaded file.

Module usage

Example

const Transfer = require('transfer.js');

// Upload
new Transfer('./Hello.txt')
  .upload().progress((prog) => {
    console.log((prog.current / prog.total * 100).toFixed(1) + '%');
  }).then(console.log).catch(console.error);

// Download
new Transfer('https://transfer.sh/4bcD3/Hello.txt')
  .download().progress((prog) => {
    console.log((prog.current / prog.total * 100).toFixed(1) + '%');
  }).then(console.log).catch(console.error);

Documentation

The documentation is available here.

Dependencies Dependencies

  • cli-progress: Easy to use Progress-Bar for Command-Line/Terminal Applications
  • clipboardy: Access the system clipboard (copy/paste)
  • got: Simplified HTTP requests
  • mime-types: The ultimate javascript content-type utility.
  • minimist: parse argument options
  • progress-promise: Promise subclass with mechanism to report progress before resolving

Dev Dependencies Dev Dependencies

  • @reconbot/jsdoc-theme: A JSDoc Theme / Template
  • chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
  • chai-as-promised: Extends Chai with assertions about promises.
  • codecov: Uploading report to Codecov: https://codecov.io
  • eslint: An AST-based pattern checker for JavaScript.
  • jsdoc: An API documentation generator for JavaScript.
  • mocha: simple, flexible, fun test framework
  • nyc: the Istanbul command line interface

TODO

  • Add more options to the executable
  • Use a better argument parser
  • Allow custom transfer domains
  • Add more download tests
  • Add executable tests

Credits

Based on transfer-sh by roccomuso.

Keywords

FAQs

Package last updated on 01 Feb 2019

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