New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hastebin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hastebin

CLI tool that uploads text to hastebin

latest
Source
npmnpm
Version
0.2.1
Version published
Weekly downloads
97
-17.09%
Maintainers
1
Weekly downloads
 
Created
Source

hastebin

CLI tool that uploads text to hastebin. (Basically a Node.js version of haste-client)

Installation

To install this package globally using NPM, run: npm install -g hastebin

To try this package out before you install, try npx hastebin.

To install this package locally, try npm i hastebin. You can then access the hastebin client via NPM scripts.

Usage

Via the Shell

$ hastebin --help
Usage: <other-command> | hastebin
or:    hastebin [file]

Examples:
  echo "Hello" | hastebin    upload text from stdin
  hastebin text.txt          upload text from a file


Options:
  -r, --raw   Output the link to the raw text
  -h, --help  Show help                      

Example

$ echo "hi" | hastebin
http://hastebin.com/ilitixevat

Via the JavaScript API

var hastebin = require('hastebin')

hastebin.createPaste('content for your paste', {
  raw: true,
  contentType: 'text/plain',
  server: 'https://hastebin.com'
}, /* options for the 'got' module here */ {})
  .then(function (urlToPaste) {})
  .catch(function (requestError) {})

Custom server

By default, hastebin will point to http://hastebin.com. You can set the HASTE_SERVER environment variable to configure this.

alias work_haste="HASTE_SERVER=http://something.com haste"

Building

To compile the source just run npm run build.

License

This module is licensed under the MIT license.

FAQs

Package last updated on 12 Nov 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