open-index/open-npm huggingface dataset:
npm package: @leonardvandriel/troth
Description: A simple Promise wrapper for Node.
Author: Leo Vandriel
Latest version: 0.0.2

<img src="icon.jpg" alt="Troth Icon" width="72"/>


Troth
======

*A simple Promise wrapper for Node.*


## Installation

    npm install @leonardvandriel/Troth


## Usage

    const Troth = require('@leonardvandriel/Troth')

    // Replacement of Promise
    Troth.resolve(true)
    Troth.reject(new Error())
    Troth.all([..])

    // Convenient helpers
    Troth.new((resolve, reject) => ..)
    Troth.then(_ => console.log('works'))

    // Halt all promises and throw error
    Troth.halt()

    // Sleep for second
    ..then(_ => Troth.sleep(1.0)).then(..)

    // Retry operation 3 times
    Troth.retry(_ => request(), 3)
    Troth.retry(_ => request(), 3, 1.0)

    // Run operations in 3 parallel sequences
    Troth.serial([..], 3)

    // Observe output of promise
    Troth.observe(_ => .., _ => console.log('done'), _ => console.log('fail'))

    // Lots more

## Tests

    npm test


## License

Troth is licensed under the terms of the MIT License, see the included LICENSE file.


## Authors

- Leo Vandriel
npm package: @leonardwoo/pika-js
Description: A javascript toolkit
Author: Leonard Woo
Latest version: 0.1.6

<p align="center">
  <a href="https://github.com/leonardwoo/pika-js" target="_blank">
    <img alt="PikaJS" src="https://projects.l6d.me/images/pika2.svg" width="150" />
  </a>
</p>

<p align="center">
A javascript toolkit that includes DOM processing, string validation, etc.
</p>

<p align="center">
  <a href="https://github.com/leonardwoo/pika-js/blob/main/LICENSE">
    <img src="https://img.shields.io/github/license/leonardwoo/pika-js?style=flat-square" alt="License">
  </a>
  <a class="text-decoration-none" href="https://srl.cx/fZlMml7f">
    <img src="https://img.shields.io/npm/v/@leonardwoo/pika-js?style=flat-square" alt="Latest Release">
  </a>
  <a class="text-decoration-none" href="https://srl.cx/fZlMml7f">
    <img src="https://img.shields.io/npm/dt/@leonardwoo/pika-js?style=flat-square" alt="Total Downloads">
  </a>
</p>

## Used

### Release Version

```html
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
<script async src="https://cdn.jsdelivr.net/npm/@leonardwoo/pika-js/dist/pika.min.js"></script>
```

### Development Version

```html
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
<script async src="https://cdn.jsdelivr.net/gh/leonardwoo/pika-js@dev/dist/pika.min.js"></script>
```

## Document

See [Document](DOCUMENT.md)

## Sponsors

<a href="https://www.jetbrains.com/" target="_blank"><img src="https://seppiko.org/images/jetbrains.png" alt="JetBrians" width="100px" /></a>