0.1.5 • Published 10 years ago

pasteall v0.1.5

Weekly downloads
25
License
-
Repository
github
Last release
10 years ago

Pasteall (for node.js)

A little interface to pasteall.org -- the world's best pastebin.

Installation

Just install with NPM, it's that easy.

npm install pasteall

Example

It'll (hopefully) be the simplest thing you use today. You pass in the code/text you want to paste, and optionally, a language.

var pasteall = require("pasteall");
var code = "function(foo,bar,quux){\n  console.log('foothousandthree');\n}";
var language = "javascript";
pasteall.paste(code,language,function(err,url){
    if (!err) {
        console.log("resulting url of paste:",url);
    } else {
        console.log("pasteall errored: ",err);
    }
});

Or, without a language specified.

var pasteall = require("pasteall");
var code = "function(foo,bar,quux){\n  console.log('foothousandthree');\n}";
pasteall.paste(code,function(err,url){
    if (!err) {
        console.log("resulting url of paste:",url);
    } else {
        console.log("pasteall errored: ",err);
    }
});

Detailed Usage

pasteall.paste(code_or_text, language, callback(err,resulting_url))

  • code_or_text is the code or text you'd like to paste
  • language Is the language you'd like this highlighted as optional
  • callback when finished returns error as first argument, or resulting URL as second when successful.

Regarding the list of languages, here's some common ones:

  • javascript
  • php
  • mysql
  • ruby
  • haskell
  • cpp

You can check out pasteall.org and view the drop-down for a long list. Or, checkout pasteall.js herein.

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago