Comparing version 12.12.12 to 12.12.13
{ | ||
"name": "azel", | ||
"version": "12.12.12", | ||
"version": "12.12.13", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
async function style(args) { | ||
async function style(str) { | ||
var lines = ['', '', '', '', '', '']; | ||
@@ -33,13 +33,10 @@ var starter = '➳'; | ||
if (!args[0]) { | ||
throw new Error("Stupid, specify a message") | ||
} else { | ||
console.log(args.join(" ").length); | ||
console.log(starter + args.slice(0).join(' ')); | ||
// console.log(str.length); | ||
// console.log(starter + str); | ||
for (var i = 0; i < args.join(' ').length; i++) { | ||
var letter = args.join(' ')[i].toLowerCase(); | ||
for (var j = 0; j < 6; j++) { | ||
lines[j] += letters[letter][j] + ' '; | ||
} | ||
for (var i = 0; i < str.length; i++) { | ||
var letter = str[i].toLowerCase(); | ||
for (var j = 0; j < 6; j++) { | ||
lines[j] += letters[letter] + ' '; | ||
} | ||
} | ||
@@ -49,4 +46,3 @@ console.log(lines); | ||
} | ||
} | ||
module.exports = style |
/** | ||
* | ||
* @param {String[]} args | ||
* @param {String} String | ||
* @returns | ||
*/ | ||
async function vaporwave(args) { | ||
const vaporwavefied = args.toString().split('').map(char => { | ||
async function vaporwave() { | ||
const vaporwavefied = String.toString().split('').map(char => { | ||
const code = char.charCodeAt(0) | ||
return code >= 33 && code <= 126 ? args.fromCharCode((code - 33) + 65281) : char | ||
return code >= 33 && code <= 126 ? String.fromCharCode((code - 33) + 65281) : char | ||
}).join('').replace(/,/g, ' ') | ||
@@ -12,0 +12,0 @@ return vaporwavefied; |
@@ -82,6 +82,6 @@ import { Message, User } from "discord.js"; | ||
* @description style some text | ||
* @param args | ||
* @param str | ||
*/ | ||
export function style( | ||
args: String[] | ||
str: String | ||
) | ||
@@ -91,5 +91,6 @@ | ||
* @description somewhere in nevada | ||
* @param args | ||
* @param str | ||
*/ | ||
export function vaporwave(args: String[]) | ||
export function vaporwave( | ||
str: String) | ||
@@ -96,0 +97,0 @@ /** |
10
test.js
const m = require("./index") | ||
/** | ||
* @param {String[]} args | ||
*/ | ||
function s(args) { | ||
return args[0] || "boi" | ||
} | ||
console.log(s('awdawd')) | ||
console.log(m.vaporwave("Hello World!")) |
94045
38
2004