Files
omni-tools/src/pages/tools/string/to-morse/service.ts

10 lines
215 B
TypeScript
Raw Normal View History

2024-06-25 02:07:57 +01:00
import { encode } from 'morsee';
export const compute = (
input: string,
dotSymbol: string,
dashSymbol: string
): string => {
return encode(input).replaceAll('.', dotSymbol).replaceAll('-', dashSymbol);
};