# rebrandly-cleanup

> Cleanup old rebrandly links

Latest version **1.0.3** (published 2020-12-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install rebrandly-cleanup
pnpm add rebrandly-cleanup
yarn add rebrandly-cleanup
bun add rebrandly-cleanup
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-12-07 |
| First published | 2020-12-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jake Maldonado |
| Maintainers | jakemaldo |
| Keywords | rebrandly |

## Links

- npm: https://www.npmjs.com/package/rebrandly-cleanup
- Repository: https://github.com/JakeMaldonado/rebrandly-cleanup
- Homepage: https://github.com/JakeMaldonado/rebrandly-cleanup#readme
- Issues: https://github.com/JakeMaldonado/rebrandly-cleanup/issues
- npm.io page: https://npm.io/package/rebrandly-cleanup

## Dependencies (1)

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

## Recent versions

- 1.0.3 (latest) — 2020-12-07
- 1.0.2 — 2020-12-07
- 1.0.1 — 2020-12-07
- 1.0.0 — 2020-12-07

## README

# Rebrandly cleanup

### Install

Install using this command

```bash
npm i rebrandly-cleanup
```

### Usage

cleanupOldLinks accepts a rebrandly api key and either daysAgo or a custom filter as params.

daysAgo: If this is provided, any links created before X days ago will be deleted. This will delete daysAgo at the current time it is run, not the beginning of the day.

customFilter: a custom filter function for links to delete (this function can be asynchronous).

```js
const { cleanupOldLinks } = require("rebrandly-cleanup");

(async function() {
  // Delete links made before 2 days ago
  const linksOlderThanTwoDays = await cleanupOldLinks(REBRANDLY_API_KEY, 2); // returns links that were deleted

  // Use a custom filter (can be async)
  const customFilteredLinks = await cleanupOldLinks(REBRANDLY_API_KEY, null, customFilterFunction); // returns links that were deleted
})()
```

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