cs
provides a minimalistic wrapper around the standard console
object in JavaScript, enabling you to use shorthand notation to output logs, errors, and more. Perfect for developers who want to save keystrokes and time without reinventing the wheel.
- Ultra shorthand syntax:
cs.log
instead ofconsole.log
- Supports all common
console
methods:log
,error
,warn
,info
,debug
, etc. - Easy to install and use in both Node.js and Bun environments
To install cs
with npm, run the following command in your project directory:
npm install cs-shorthand
Or with Yarn:
yarn add @cs-shorthand
To install cs
with Bun, run:
bun add cs-shorthand
Firstly, require cs
in your JavaScript file:
// For Bun or ES Modules
import cs from 'cs-shorthand';
Now you can use cs
just like you would use console
:
cs.log('Hello, world!'); // Regular log
cs.error('Oops, something went wrong.'); // Error log
cs.warn('This is a warning.'); // Warning log
cs.info('FYI: Here is some info.'); // Info log
cs.debug('Debugging time.'); // Debug log
Contributions, issues, and feature requests are welcome! Feel free to check issues page. Make sure to follow the contribution guidelines when you submit pull requests.
Distributed under the MIT License. See LICENSE
for more information.
Happy coding! ✨