# cd-core

> Common utils used by CodeDungeon projects

Latest version **0.0.11** (published 2017-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install cd-core
pnpm add cd-core
yarn add cd-core
bun add cd-core
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.11 |
| Published | 2017-02-18 |
| First published | 2017-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mike Erickson |
| Maintainers | codedungeon |
| Keywords | core, codedungeon, utils, notifier, messenger |

## Links

- npm: https://www.npmjs.com/package/cd-core
- Repository: https://github.com/mikeerickson/cd-core
- Homepage: https://github.com/mikeerickson/cd-core#readme
- Issues: https://github.com/mikeerickson/cd-core/issues
- npm.io page: https://npm.io/package/cd-core

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) 1.1.3
- [cd-messenger](https://npm.io/package/cd-messenger.md) 2.7.12
- [node-notifier](https://npm.io/package/node-notifier.md) 5.0.2

## 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

- 0.0.11 (latest) — 2017-02-18
- 0.0.0-dev.7 (next) — 2017-01-31
- 0.0.10 — 2017-02-18
- 0.0.9 — 2017-02-06
- 0.0.8 — 2017-02-01
- 0.0.7 — 2017-02-01
- 0.0.6 — 2017-02-01
- 0.0.5 — 2017-02-01
- 0.0.4 — 2017-02-01
- 0.0.3 — 2017-02-01
- 0.0.2 — 2017-01-31
- 0.0.0-dev.8 — 2017-01-31
- 0.0.0-dev.6 — 2017-01-31
- 0.0.0-dev.5 — 2017-01-31
- 0.0.0-dev.4 — 2017-01-31
- … 3 more at https://npm.io/package/cd-core/versions

## README

# cd-core

Common utility and resources (assets)

### API

```javascript
const core = require('cd-core');
```

### core.name (type: string property)

Param     | Description
----------|--------------
ret ==>   | Module Name

```javascript
const name = core.name; // returns module name
```

### core.version (type: string property)

Param     | Description
----------|--------------
ret ==>   | Version Number

```javascript
const vers = core.version; // returns module version
```

### core.isWindows (type: function)

Param     | Description
----------|--------------
ret ==>   | `true` or `false`

```javascript
const isWindows = core.isWindows(); // returns true if running on windows
```

### core.isOSX (type: function)

Param     | Description
----------|--------------
ret ==>   | `true` or `false`

```javascript
const isOSX = core.isOSX(); // returns true if running on osx
```

### core.isLinux (type: function)

Param     | Description
----------|--------------
ret ==>   | `true` or `false`

```javascript
const isLinux = core.isLinux(); // returns true if running on linux
```

### core.getAssetPath (type: function)

Param     | Description
----------|--------------
ret ==>   | Returns full path to asset path (icons, etc.)

```javascript
const assetPath = core.getAssetPath(); // returns core asset path
```

### core.getModuleIcon (type: function)

Param     | Description
----------|--------------
ret ==>   | Returns path to module icon

```javascript
const moduleIconPath = core.getModuleIcon(); // returns path to module icon
```

### core.getFailIcon (type: function)

Param     | Description
----------|--------------
ret ==>   | Returns path to fail icon

```javascript
const failIconPath = core.getFailIcon(); // returns path to fail icon
```

### core.getPassIcon (type: function)

Param     | Description
----------|--------------
ret ==>   | Returns path to pass icon

```javascript
const passIconPath = core.getPassIcon(); // returns path to pass icon
```

### core.notify (type: function)

Param     | Description
----------|--------------
message   | Notification Messasge
options   | Notification Options
 | `showConsole: true or false`
 | `icon: path to override icon`
 | `title: title override`

```javascript
core.notify('Hello', {showConsole: false});  // display default message and no console output
```

### core.notifyPass (type: function)

Param     | Description
----------|--------------
message   | Notification Message
options   | Notification Options
 | `showConsole: true or false`
 | `icon: path to override icon`
 | `title: title override`

```javascript
core.notifyPass('Process Completed Successfully'); // display default message
```

### core.notifyFail (type: function)

Param     | Description
----------|--------------
message   | Notification Message
options   | Notification Options
 | `showConsole: true or false`
 | `icon: path to override icon`
 | `title: title override`

```javascript
core.notifyFail('Process Failed To Complete'); // display default message
```


***


### License

Copyright &copy; 2017 Mike Erickson
Released under the MIT license


### Credits

cd-core written by Mike Erickson

E-Mail: [codedungeon@gmail.com](mailto:codedungeon@gmail.com)

Twitter: [@codedungeon](http://twitter.com/codedungeon)

Webiste: [codedungeon.org](http://codedungeon.org)

***

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