Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cd-core

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cd-core

Common utils used by CodeDungeon projects

  • 0.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 18 Feb 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc