# clortho-lite

> Abstraction layer over the OS appropriate keychain or password manager.

Latest version **2.0.6** (published 2018-12-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install clortho-lite
pnpm add clortho-lite
yarn add clortho-lite
bun add clortho-lite
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.6 |
| Published | 2018-12-05 |
| First published | 2018-12-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 3 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | jasonflo |
| Keywords | keychain, password |

## Links

- npm: https://www.npmjs.com/package/clortho-lite
- Repository: https://github.com/jasonbyrne/clortho-lite
- Homepage: https://github.com/jasonbyrne/clortho-lite#readme
- Issues: https://github.com/jasonbyrne/clortho-lite/issues
- npm.io page: https://npm.io/package/clortho-lite

## Dependencies (3)

- [which](https://npm.io/package/which.md) ^1.3.1
- [keychain](https://npm.io/package/keychain.md) ^1.3.0
- [js-string-escape](https://npm.io/package/js-string-escape.md) ^1.0.0

## Recent versions

- 2.0.6 (latest) — 2018-12-05
- 2.0.5 — 2018-12-05
- 2.0.4 — 2018-12-05
- 2.0.2 — 2018-12-05
- 2.0.1 — 2018-12-05
- 2.0.0 — 2018-12-05

## README

![alt Vinz Clortho](https://github.com/jasonbyrne/clortho-lite/blob/master/vinz-clortho.png?raw=true)

# Clortho-Lite

Let's give credit where it is due. This package is derived from: https://github.com/zetlen/clortho

The reason that I rewrote it was because it came shipped with some UX elements that I didn't want. It hadn't been updated in a while. And I like dealing with TypeScript better, so I decided to convert it.

## Basic Usage

```typescript
import { ClorthoService, iCredentials, clortho } from 'clortho-lite';

let service: ClorthoService = clortho('Whatever Name of Your Service');
// or
let service: ClorthoService = new ClorthoService('Whatever Name of Your Service');

service.set('some-user-name', 'some-password')
    .then(function (credentials: iCredentials) {
        console.log(credentials);
    })
    .catch(function (err) {
        console.log(err);
    });

service.get('some-user-name')
    .then(function (credentials: iCredentials) {
        console.log(credentials);
    })
    .catch(function (err) {
        console.log(err);
    });

service.remove('some-user-name')
    .then(function () {
        console.log('Removed item');
    })
    .catch(function (err) {
        console.log(err);
    });

```

That's about it.

In theory, this should be compatible with Windows and Linux... but I've only tested on OSX so far.

Here's a secret. You don't have to just store passwords here. It's really a key-value store for anything that is helpful for your application to store.

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