2.7.26 • Published 6 years ago

cd-messenger v2.7.26

Weekly downloads
132
License
MIT
Repository
github
Last release
6 years ago

cd-messenger

Node and Browser Messages

Use same API across browser or node and cd-messenger will handle the rest for you!

View on npm

Install with npm

npm i -S cd-messenger

Install with yarn

yarn add cd-messenger

Add as script tag

<script src="lib/messenger.min.js"></script>

Usage

const msg = require('cd-messenger');

// You can use titleCase or lower case for msg methods
// assuming `name` variable has been set to value before calling below

let name = 'Mike Erickson';

=========================================================================================
msg.info    ('Loading...');
msg.log     (`name: ${name}`);  // default color White
msg.info    (`name: ${name}`);  // default color Cyan
msg.success (`name: ${name}`);  // default color Green
msg.warning (`name: ${name}`);  // default color Yellow
msg.error   (`name: ${name}`);  // default color Red
msg.note    (`name: ${name}`);  // default color Orange
msg.debug   (`name: ${name}`);  // default color white
msg.table   (array|object)      // uses console.table (browser) or nice cli table (node)

=========================================================================================
msg.line(...)
msg.line  // displays a colored line (you can define line character, color, and width)
msg.line    ('', 'magenta');    // displays a line with solid magenta (no char)
msg.line    ('•', 'green');     // displays a line with repeating '•' and green
msg.line    ('', 'yellow', 40); // display with repeating (40) box, yellow

=========================================================================================
msg.setOptions(options: object)     // customize default browser appearance
 option.logger (true|false:default) // try it out and see how it looks

License

Copyright © 2016-2017 Mike Erickson Released under the MIT license

Credits

cd-messenger written by Mike Erickson

E-Mail: codedungeon@gmail.com

Twitter: @codedungeon

Webiste: codedungeon.org


2.7.26

6 years ago

2.7.24

7 years ago

2.7.23

7 years ago

2.7.22

7 years ago

2.7.21

7 years ago

2.7.20

7 years ago

2.7.19

7 years ago

2.7.17

7 years ago

2.7.16

7 years ago

2.7.14

7 years ago

2.7.12

7 years ago

2.7.11

7 years ago

2.7.10

7 years ago

2.7.9

7 years ago

2.7.8

7 years ago

2.7.7

7 years ago

2.7.6

7 years ago

2.7.5

7 years ago

2.7.4

7 years ago

2.7.3

7 years ago

2.7.2

7 years ago

2.7.1

7 years ago

2.7.0

7 years ago

2.6.1

7 years ago

2.6.0

7 years ago

2.5.2

7 years ago

2.5.1

7 years ago

2.5.0

7 years ago

2.4.1

7 years ago

2.3.5

7 years ago

2.3.3

7 years ago

2.3.2

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.1-build.24

7 years ago

2.2.1-build.7

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.3

7 years ago

2.0.1

7 years ago

2.0.0-build.219

7 years ago

2.0.0-build.217

7 years ago

2.0.0-build.210

7 years ago

2.0.0-build.209

7 years ago

2.0.0-build.208

7 years ago

2.0.0-build.207

7 years ago

2.0.0-build.204

7 years ago

2.0.0-build.203

7 years ago

2.0.0-build.187

7 years ago

2.0.0-build.181

7 years ago

2.0.0-build.180

7 years ago

2.0.0-build.163

7 years ago

2.0.0-build.161

7 years ago

2.0.0-build.160

7 years ago

2.0.0-build.155

7 years ago

2.0.0

8 years ago