Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyp3rflow/keyring
Deno porting of go-keyring library.
https://github.com/hyp3rflow/keyring
Last synced: 21 days ago
JSON representation
Deno porting of go-keyring library.
- Host: GitHub
- URL: https://github.com/hyp3rflow/keyring
- Owner: hyp3rflow
- License: mit
- Created: 2024-08-22T10:15:53.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-23T11:38:30.000Z (5 months ago)
- Last Synced: 2024-12-22T03:58:55.123Z (27 days ago)
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno Keyring library
Deno porting of [`go-keyring` library](https://github.com/zalando/go-keyring). `keyring` is an OS-agnostic library for setting, getting, and deleting secrets from the system keyring.## Example Usage
```typescript
import keyring, {KeyringError} from 'keyring';const service = "my-app"
const user = "anon"
const password = "secret"try {
keyring.set(service, user, password);
} catch (e) {
if (e instanceof KeyringError) {
console.error(e);
}
}let secret;
try {
secret = keyring.get(service, user);
} catch (e) {
if (e instanceof KeyringError) {
console.error(e);
}
}console.log(secret);
```## License
See [LICENSE](./LICENSE) file.