Socket
Socket
Sign inDemoInstall

cd-core

Package Overview
Dependencies
18
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cd-core

Common utils used by CodeDungeon projects


Version published
Weekly downloads
18
increased by1700%
Maintainers
1
Install size
2.38 MB
Created
Weekly downloads
 

Readme

Source

cd-core

Common utility and resources (assets)

API

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

core.name (type: string property)

ParamDescription
ret ==>Module Name
const name = core.name; // returns module name

core.version (type: string property)

ParamDescription
ret ==>Version Number
const vers = core.version; // returns module version

core.isWindows (type: function)

ParamDescription
ret ==>true or false
const isWindows = core.isWindows(); // returns true if running on windows

core.isOSX (type: function)

ParamDescription
ret ==>true or false
const isOSX = core.isOSX(); // returns true if running on osx

core.isLinux (type: function)

ParamDescription
ret ==>true or false
const isLinux = core.isLinux(); // returns true if running on linux

core.getAssetPath (type: function)

ParamDescription
ret ==>Returns full path to asset path (icons, etc.)
const assetPath = core.getAssetPath(); // returns core asset path

core.getModuleIcon (type: function)

ParamDescription
ret ==>Returns path to module icon
const moduleIconPath = core.getModuleIcon(); // returns path to module icon

core.getFailIcon (type: function)

ParamDescription
ret ==>Returns path to fail icon
const failIconPath = core.getFailIcon(); // returns path to fail icon

core.getPassIcon (type: function)

ParamDescription
ret ==>Returns path to pass icon
const passIconPath = core.getPassIcon(); // returns path to pass icon

core.notify (type: function)

ParamDescription
messageNotification Messasge
optionsNotification Options
showConsole: true or false
icon: path to override icon
title: title override
core.notify('Hello', {showConsole: false});  // display default message and no console output

core.notifyPass (type: function)

ParamDescription
messageNotification Message
optionsNotification Options
showConsole: true or false
icon: path to override icon
title: title override
core.notifyPass('Process Completed Successfully'); // display default message

core.notifyFail (type: function)

ParamDescription
messageNotification Message
optionsNotification Options
showConsole: true or false
icon: path to override icon
title: title override
core.notifyFail('Process Failed To Complete'); // display default message

License

Copyright © 2017 Mike Erickson Released under the MIT license

Credits

cd-core written by Mike Erickson

E-Mail: codedungeon@gmail.com

Twitter: @codedungeon

Webiste: codedungeon.org


Keywords

FAQs

Last updated on 18 Feb 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc