Package Exports
- amtixdev-morse-code
- amtixdev-morse-code/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (amtixdev-morse-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Examples/How Package amtixdev-morse-code Work?
How To Install Package?
npm install amtixdev-morse-codeHow To Use Package
const { textToMorse, morseToText } = require('amtixdev-morse-code');
client.on('messageCreate', (message) => {
if (message.author.bot) return; // Ignore messages from other bots
const args = message.content.split(' ');
const command = args[0].toLowerCase();
if (command === '!morse') {
// Convert text to Morse code
const text = args.slice(1).join(' ');
const morse = textToMorse(text);
message.channel.send(`Morse code: ${morse}`);
}
if (command === '!decode') {
// Decode Morse code to text
const morse = args.slice(1).join(' ');
const text = morseToText(morse);
message.channel.send(`Decoded message: ${text}`);
}
});By AmtiXDev

If You Need Help About How The Npm Package Work? Contant Me HERE
CopyRight ©
All rights reserved to AmtiXDev

