# craydent-class

> Node module implementing addition classes for functionality and 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-class
pnpm add craydent-class
yarn add craydent-class
bun add craydent-class
```

## 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 | 7 |
| Unpacked size | 24.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Clark Inada |
| Maintainers | craydent |
| Keywords | array, benchmark, class, craydent, cursor, es6, jquery, library, ordered list, queue, set, sugar, utilities |

## Links

- npm: https://www.npmjs.com/package/craydent-class
- 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-class

## Dependencies (7)

- [craydent.set](https://npm.io/package/craydent.set.md) 1.0.2
- [craydent.queue](https://npm.io/package/craydent.queue.md) 1.0.2
- [craydent.cursor](https://npm.io/package/craydent.cursor.md) 1.0.2
- [craydent.include](https://npm.io/package/craydent.include.md) 1.0.2
- [craydent.globalize](https://npm.io/package/craydent.globalize.md) 1.0.2
- [craydent.benchmarker](https://npm.io/package/craydent.benchmarker.md) 1.0.2
- [craydent.orderedlist](https://npm.io/package/craydent.orderedlist.md) 1.0.2

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 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-class/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-class');
$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-class/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-class/global');
logit($c.VERSION);
arr.prototypedMethod(args);
```

## Categories

* [Constants](#markdown-header-constants)
* [Class](#markdown-header-class)

<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-class'></a>
## Class

*** 
#### _Benchmarker_ 
***

**Info:** Class used to measure the run time of code

**Return:** (IBenchmarker)

**Parameters:**

>None

**Overloads:**

>None

*** 
#### _CArray_ 
***

**Info:** Class used wrap Array to enable chaining without polluting the the prototypes

**Return:** (CArray)

**Parameters:**

>* arr?: (Array<T>|IndexedArray<T>) Array argument used in the original constructor
>* duplicate?: (Boolean) Flag to copy the array. Defaults to true

**Overloads:**

>None

*** 
#### _CDate_ 
***

**Info:** Class used wrap Date to enable chaining without polluting the the prototypes

**Return:** (CDate)

**Parameters:**

>* date?: (Date) Date argument used in the original constructor

**Overloads:**

>None

*** 
#### _CFunction_ 
***

**Info:** Class used wrap Function to enable chaining without polluting the the prototypes

**Return:** (CFunction)

**Parameters:**

>* fn?: (GeneratorFunction|AsyncGeneratorFunction|AsyncFunction|Function) Function argument used in the original constructor

**Overloads:**

>None

*** 
#### _CNumber_ 
***

**Info:** Class used wrap String to enable chaining without polluting the the prototypes

**Return:** (CNumber)

**Parameters:**

>* number?: (Number) Number argument used in the original constructor

**Overloads:**

>None

*** 
#### _CObject_ 
***

**Info:** Class used wrap Object to enable chaining without polluting the the prototypes

**Return:** (CObject)

**Parameters:**

>* obj?: (Object) Object argument used in the original constructor

**Overloads:**

>None

*** 
#### _CRegExp_ 
***

**Info:** Class used wrap RegExp to enable chaining without polluting the the prototypes

**Return:** (CRegExp)

**Parameters:**

>* pattern: (String|RegExp) RegExp pattern used in the original constructor
>* flags?: (String) RegExp flags used in the original constructor

**Overloads:**

>None

*** 
#### _CString_ 
***

**Info:** Class used wrap String to enable chaining without polluting the the prototypes

**Return:** (CString)

**Parameters:**

>* str: (String) String argument used in the original constructor

**Overloads:**

>None

*** 
#### _Cursor_ 
***

**Info:** Cursor class to facilitate iteration

**Return:** (ICursor<T>)

**Parameters:**

>* records: (Array<T>) Array used to create the iterator to iterate each item

**Overloads:**

>Parameters
>* records: (Object) Object used to create the iterator to iterate each property

*** 
#### _OrderedList_ 
***

**Info:** Collection class that filters out duplicate values and maintains an ordered list

**Return:** (IOrderedList<T>)

**Parameters:**

>None

**Overloads:**

>Parameters
>* records?: (Array<T>) Array used to create the initial items in the ordered list
>* sorter?: (SortIterator<T>) Function for sorting logic

*** 
#### _Queue_ 
***

**Info:** Collection class that follows FIFO

**Return:** (IQueue<T>)

**Parameters:**

>* records: (Array<T>) Array used to create the iterator to iterate each item

**Overloads:**

>None

*** 
#### _ServerManager_ 
***

**Info:** Class used to create a new context for HTTP server

**Return:** (void)

**Parameters:**

>* request: (HTTPRequest) HTTP request object provided by createServer
>* response: (HTTPResponse) HTTP response object provided by createServer

**Overloads:**

>None

*** 
#### _Set_ 
***

**Info:** Collection class that filters out duplicate values

**Return:** (ISet<T, TResult>)

**Parameters:**

>* records: (Array<T>) Array used to create the iterator to iterate each item

**Overloads:**

>None




## Download

 * [GitHub](https://github.com/craydent/node-library/modules/class)
 * [BitBucket](https://bitbucket.org/craydent/node-library/modules/class)
 * [GitLab](https://gitlab.com/craydent/node-library/modules/class)
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-class · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
