# plexidev-paste

> An API wrapper for paste.plexidev.org

Latest version **1.0.4** (published 2022-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install plexidev-paste
pnpm add plexidev-paste
yarn add plexidev-paste
bun add plexidev-paste
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-04-15 |
| First published | 2022-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | truexpixels |
| Keywords | paste, plexidev, pastebin, hastebin |

## Links

- npm: https://www.npmjs.com/package/plexidev-paste
- Homepage: https://paste.plexidev.org
- npm.io page: https://npm.io/package/plexidev-paste

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.26.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-04-15
- 1.0.3 — 2022-04-15
- 1.0.2 — 2022-03-26
- 1.0.1 — 2022-03-26
- 1.0.0 — 2022-03-26

## README

# plexidev-paste

An API wrapper for https://paste.plexidev.org

### Basic Example

```js
const paste = require("plexidev-paste");

// Create paste
const post = await paste.post("console.log('Hello World')", {
    language: "js",
    title: "Example Paste",
});

console.log(post);
/* -> {
  id: 'dHhCc8Vn8D',
  key: 'bYC2C11dNt7WRDC',
  raw: 'https://paste-api.plexidev.org/paste/dHhCc8Vn8D',
  url: 'https://paste.plexidev.org/dHhCc8Vn8D.js'
} */

// Get paste
const get = await paste.get(post.id);

console.log(get);
/* -> {
  id: 'dHhCc8Vn8D',
  createdAt: '2022-03-26T19:30:27.112Z',
  updatedAt: '2022-03-26T19:30:27.113Z',
  title: 'Example Paste',
  content: 'console.log('Hello World')',
  views: 1,
  size: 12
} */
```

### Usage

**.post(content, options)**
| Property | Required? | Default |
| ------------- | ------------- | --- |
| content | Yes | null |
| options | No | {} |
| options.title | No | "Untitled Paste" |
| options.language | No | "js" |

**.get(id)**
| Property | Required? | Default |
| ------------- | ------------- | --- |
| id | Yes | null |

---
_Source: https://npm.io/package/plexidev-paste · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
