# craydent-control-flow

> Node module for control flow and async functionality to simplify code for maintainability and readability

Latest version **1.0.2** (published 2024-09-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install craydent-control-flow
pnpm add craydent-control-flow
yarn add craydent-control-flow
bun add craydent-control-flow
```

## 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.2 |
| Published | 2024-09-20 |
| First published | 2018-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 30.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Clark Inada |
| Maintainers | craydent |
| Keywords | control-flow, craydent, es6, jquery, library, sugar, utilities |

## Links

- npm: https://www.npmjs.com/package/craydent-control-flow
- Repository: https://github.com/craydent/Node-Library
- Homepage: https://github.com/craydent/Node-Library/tree/master/modules/typeof
- Issues: https://github.com/craydent/Node-Library/issues
- npm.io page: https://npm.io/package/craydent-control-flow

## Dependencies (11)

- [craydent.error](https://npm.io/package/craydent.error.md) 1.0.2
- [craydent.strip](https://npm.io/package/craydent.strip.md) 1.0.2
- [craydent.include](https://npm.io/package/craydent.include.md) 1.0.2
- [craydent.isarray](https://npm.io/package/craydent.isarray.md) 1.0.2
- [craydent.condense](https://npm.io/package/craydent.condense.md) 1.0.2
- [craydent.isstring](https://npm.io/package/craydent.isstring.md) 1.0.2
- [craydent.syncroit](https://npm.io/package/craydent.syncroit.md) 1.0.2
- [craydent.awaitable](https://npm.io/package/craydent.awaitable.md) 1.0.2
- [craydent.globalize](https://npm.io/package/craydent.globalize.md) 1.0.2
- [craydent.yieldable](https://npm.io/package/craydent.yieldable.md) 1.0.2
- [craydent.paralleleach](https://npm.io/package/craydent.paralleleach.md) 1.0.2

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2024-09-20
- 1.0.1 — 2024-08-30
- 1.0.0 — 2024-08-23
- 0.15.2 — 2022-08-19
- 0.15.1 — 2022-08-17
- 0.15.0 — 2022-08-16
- 0.14.0 — 2022-08-15
- 0.13.5 — 2021-09-16
- 0.13.4 — 2021-08-09
- 0.13.3 — 2021-08-08
- 0.13.2 — 2021-08-07
- 0.13.1 — 2021-08-04
- 0.13.0 — 2021-07-15
- 0.12.3 — 2021-07-15
- 0.12.2 — 2021-07-15
- … 22 more at https://npm.io/package/craydent-control-flow/versions

## README

<img src="http://craydent.com/JsonObjectEditor/img/svgs/craydent-logo.svg" width=75 height=75/>

# Craydent 1.0.2
**by Clark Inada**

Craydent is all inclusive utility library.  There are several ways to use the library in NodeJS.
More detailed documentation on constants can be found at [Craydent Properties](http://www.craydent.com/JsonObjectEditor/docs.html#/property/CraydentNode).
More detailed documentation on methods can be found at [Craydent Methods](http://www.craydent.com/JsonObjectEditor/docs.html#/method/CraydentNode)

```js
// require with prototypes - this require will add prototypes to extend classes and add two constants ($c, $g) to the global space.
// $g is an alias to global and $c is the constant containing all the utility methods and properties.
require('craydent-control-flow');
$c.logit($c.VERSION);
arr.prototypedMethod(args);
```

```js
// require no conflict - this require is the fully modular version with no global constants, prototypes, or methods.
var $c = require('craydent-control-flow/noConflict');
$c.logit($c.VERSION);
$c.prototypedMethod(arr, args);
```

```js
// require global - this require constants and methods in the global space and add prototypes to extend classes.
// $g is an alias to global and $c is the constant containing all the utility methods and properties.
require('craydent-control-flow/global');
logit($c.VERSION);
arr.prototypedMethod(args);
```

## Categories

* [Constants](#markdown-header-constants)
* [Control Flow](#markdown-header-control-flow)

<a name='markdown-header-constants'></a>
## Constants

| | | |
| ----- | ----- | ----- |
| CONSOLE_COLORS (Object) |LOCAL_IP (String) |TEMPLATE_TAG_CONFIG (Object) |
DEBUG_MODE (Boolean) |MODULES_LOADED (Object) |TEMPLATE_VARS (Array) |
ERROR_TYPES (Array) |PUBLIC_IP (String) |VERSION (String) |
HTTP_STATUS_TEMPLATE (Object) |RESPONSES (Object) |


## Methods

<a name='markdown-header-control-flow'></a>
## Control Flow

*** 
#### _awaitable_ 
***

**Info:** Makes a value awaitable via a Promise.

**Return:** (Promise<any>)

**Parameters:**

>* value: (AwaitableValue) Value to make awaitable

**Overloads:**

>Parameters
>* func: (Function) Function to make awaitable
>* context: (any) Context to use to execute func.

>Parameters
>* func: (Function) Function to make awaitable
>* callbackIndex: (Integer) Index of callback argument.

>Parameters
>* func: (Function) Function to make awaitable
>* context: (any) Context to use to execute func.
>* callbackIndex: (Integer) Index of callback argument.

>Parameters
>* func: (Function) Function to make awaitable
>* context: (any) Context to use to execute func.
>* callbackIndex: (Integer) Index of callback argument.
>* returnIndex: (Integer) Index of callback argument.

*** 
#### _syncroit_ 
***

**Info:** Generator/Async based control flow to allow for more "syncronous" programing structure

**Return:** (Promise<any>)

**Parameters:**

>* func: (GeneratorFunction|AsyncFunction) function to execute

**Overloads:**

>None

*** 
#### _yieldable_ 
***

**Info:** Makes a value yieldable via a Promise.

**Return:** (Promise<any>)

**Parameters:**

>* value: (YieldableValue) Value to make yieldable

**Overloads:**

>Parameters
>* func: (Function) Function to make yieldable
>* context: (any) Context to use to execute func.

>Parameters
>* func: (Function) Function to make yieldable
>* callbackIndex: (Integer) Index of callback argument.

>Parameters
>* func: (Function) Function to make yieldable
>* context: (any) Context to use to execute func.
>* callbackIndex: (Integer) Index of callback argument.

>Parameters
>* func: (Function) Function to make yieldable
>* context: (any) Context to use to execute func.
>* callbackIndex: (Integer) Index of callback argument.
>* returnIndex: (Integer) Index of callback argument.




## Download

 * [GitHub](https://github.com/craydent/node-library/modules/control-flow)
 * [BitBucket](https://bitbucket.org/craydent/node-library/modules/control-flow)
 * [GitLab](https://gitlab.com/craydent/node-library/modules/control-flow)
Craydent is released under the [Dual licensed under the MIT or GPL Version 2 licenses](http://craydent.com/license).<br>

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