# spook-utils

> A collection of utilities I use in every Node project.

Latest version **1.0.3** (published 2017-06-21) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install spook-utils
pnpm add spook-utils
yarn add spook-utils
bun add spook-utils
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-06-21 |
| First published | 2017-02-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | eatyrghost |
| Maintainers | eatyrghost |
| Keywords | utilities, helpers, validate, tools, toolkit |

## Links

- npm: https://www.npmjs.com/package/spook-utils
- Repository: https://github.com/eatyrghost/spook-utils
- Homepage: https://github.com/eatyrghost/spook-utils#readme
- Issues: https://github.com/eatyrghost/spook-utils/issues
- npm.io page: https://npm.io/package/spook-utils

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-06-21
- 1.0.2 — 2017-06-02
- 1.0.1 — 2017-06-02
- 1.0.0 — 2017-02-01

## README

<a name="spookUtils"></a>

## spookUtils : <code>object</code>
<p>A collection of reusable utilities for creating Node modules or web experiences.</p>
 <p>To install:</p>
 <pre>npm install spook-utils</pre>
 <p>To use in your project:</p>
 <pre>var spookUtils = require('spook-utils');</pre>
 <p>Alternatively, include <samp>./dist/spook-utils.min.js</samp> and <samp>./dist/spook-utils.min.js.map</samp> in your project.</p>

**Kind**: global namespace  

* [spookUtils](#spookUtils) : <code>object</code>
    * [.cloneObject(inputObject, targetObj)](#spookUtils.cloneObject) ⇒ <code>object</code>
    * [.combineObjects(objArray)](#spookUtils.combineObjects) ⇒ <code>object</code>
    * [.isValidObject(inputObject)](#spookUtils.isValidObject) ⇒ <code>boolean</code>
    * [.validBoolean(inputObject, returnValue)](#spookUtils.validBoolean) ⇒ <code>boolean</code>
    * [.validNumber(inputObject, returnValue)](#spookUtils.validNumber) ⇒ <code>number</code>
    * [.validObject(inputObject, returnValue)](#spookUtils.validObject) ⇒ <code>object</code>
    * [.validString(inputObject, returnValue)](#spookUtils.validString) ⇒ <code>string</code>

<a name="spookUtils.cloneObject"></a>

### spookUtils.cloneObject(inputObject, targetObj) ⇒ <code>object</code>
Creates a new object that shares the same property values as an original object

**Kind**: static method of <code>[spookUtils](#spookUtils)</code>  
**Returns**: <code>object</code> - The object result of the cloning operation  

| Param | Type | Description |
| --- | --- | --- |
| inputObject | <code>object</code> | The object to clone |
| targetObj | <code>object</code> | An optional target object to clone to |

<a name="spookUtils.combineObjects"></a>

### spookUtils.combineObjects(objArray) ⇒ <code>object</code>
Combines a collection of objects and returns the resulting object

**Kind**: static method of <code>[spookUtils](#spookUtils)</code>  
**Returns**: <code>object</code> - The result of combining the objects  

| Param | Type | Description |
| --- | --- | --- |
| objArray | <code>array</code> | An array of objects to combine |

<a name="spookUtils.isValidObject"></a>

### spookUtils.isValidObject(inputObject) ⇒ <code>boolean</code>
Determines if an object is a valid, non-null object

**Kind**: static method of <code>[spookUtils](#spookUtils)</code>  
**Returns**: <code>boolean</code> - The boolean result of evaluating inputObject  

| Param | Type | Description |
| --- | --- | --- |
| inputObject | <code>object</code> | The object to validate |

<a name="spookUtils.validBoolean"></a>

### spookUtils.validBoolean(inputObject, returnValue) ⇒ <code>boolean</code>
Attempts to parse an object as a valid boolean

**Kind**: static method of <code>[spookUtils](#spookUtils)</code>  
**Returns**: <code>boolean</code> - The boolean result of evaluating inputObject  

| Param | Type | Description |
| --- | --- | --- |
| inputObject | <code>object</code> | The object to validate as a boolean |
| returnValue | <code>boolean</code> | The default value to return, defaults to `false` |

<a name="spookUtils.validNumber"></a>

### spookUtils.validNumber(inputObject, returnValue) ⇒ <code>number</code>
Attempts to parse an object as a valid base-10 number

**Kind**: static method of <code>[spookUtils](#spookUtils)</code>  
**Returns**: <code>number</code> - The numerical result of evaluating inputObject  

| Param | Type | Description |
| --- | --- | --- |
| inputObject | <code>object</code> | The object to validate as a number |
| returnValue | <code>number</code> | The default value to return, defaults to `0` |

<a name="spookUtils.validObject"></a>

### spookUtils.validObject(inputObject, returnValue) ⇒ <code>object</code>
Attempts to parse an object as a valid object

**Kind**: static method of <code>[spookUtils](#spookUtils)</code>  
**Returns**: <code>object</code> - The object result of evaluating inputObject  

| Param | Type | Description |
| --- | --- | --- |
| inputObject | <code>object</code> | The object to validate as an object |
| returnValue | <code>object</code> | The default value to return, defaults to `null` |

<a name="spookUtils.validString"></a>

### spookUtils.validString(inputObject, returnValue) ⇒ <code>string</code>
Attempts to parse an object as a valid string

**Kind**: static method of <code>[spookUtils](#spookUtils)</code>  
**Returns**: <code>string</code> - The string result of evaluating inputObject  

| Param | Type | Description |
| --- | --- | --- |
| inputObject | <code>object</code> | The object to validate as an object |
| returnValue | <code>string</code> | The default value to return, defaults to `''` |

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