You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

sourcebin

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sourcebin

Fast and simple package to get and create bins from https://sourceb.in/

4.0.2
Source
npmnpm
Version published
Weekly downloads
511
-21.26%
Maintainers
1
Weekly downloads
 
Created
Source

Sourcebin

Fast and simple package to get and create bins from sourcebin

Requirements

NodeJS >= 10.x

Install

npm install sourcebin

Setup

Node JS

const sourcebin = require('sourcebin');

TypeScript

import { get, create, url } from 'sourcebin';

For es imports such as the TypeScript import it's recommened you only import the methods you need

Get a bin

sourcebin.get(key or url, options)

const bin = await sourcebin.get('qXO2NVhRc6');

Options:

fetchContent - whether to fetch bin content or not (default true)

Create a bin

sourcebin.create([ files ], options)

const bin = await sourcebin.create(
    [
        {
            content: 'Hello World',
            language: 'text',
        },
    ],
    {
        title: 'bin name',
        description: 'test bin',
    },
);

Files

name - file name
content - file content (required)
language - language or language id (default text)

Options

title - bin title
description - bin description

Other Methods

  • Url

    sourcebin.url(key or url)

    const { url, short } = await url('qXO2NVhRc6');
    

FAQ

  • Multiple files in one bin

    This is not currently possible with this wrapper as sourcebin doesn't have a token system for authentication, only pro users are able to have multiple files in one bin. This may come in the future

Support

  • Message me on discord: GHOST#7524
  • Join the discord
  • Create a issue on the github

Keywords

sourcebin

FAQs

Package last updated on 04 Feb 2021

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