hw_print_package v2.1.1
hw_print_package š
A simple and customizable Node.js utility function to print messages and optionally log the function itself. Perfect for testing or creating lightweight debugging tools. š»š§
Installation š¦
To install the package, run:
npm install hw_print_package
Usage š ļø
Importing the Package š
You can use the package by importing it into your project:
const testing = require('hw_print_package');
Basic Usage š
By default, the function logs itself and returns the message 'hello world'
š:
const result = testing();
console.log(result); // Output: 'hello world'
Customization āØ
Want to change the message? No problem! You can provide a custom message instead of the default 'hello world'
š£ļø:
function testing(customMessage) {
console.log(testing);
return customMessage || 'hello world'; // Custom message if provided
}
module.exports = testing;
Function Documentation š
testing()
š”
Description:
The testing()
function logs the function definition itself (console.log(testing)
) and returns either a custom message or the default message 'hello world'
. It's a fun and simple tool to play around with logging and testing. š®
Parameters:
customMessage
(optional): A string to return instead of the default'hello world'
. If not provided, it defaults to'hello world'
.
Example:
const result = testing('Custom message');
console.log(result); // Output: "Custom message"
License š”ļø
ISC License
Author šļø
King Grey š„
Changelog š
v2.0.0
- Refactored the function to support custom messages. š
- Added detailed function documentation. š
- Improved logging for better debugging and fun! š®
⨠Thanks for using hw_print_package! Have fun testing and coding! š