aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--dist/app.d.ts2
-rw-r--r--dist/app.js8
-rw-r--r--package.json3
-rw-r--r--src/app.ts6
-rw-r--r--test/test.js2
-rw-r--r--tsconfig.json2
7 files changed, 21 insertions, 6 deletions
diff --git a/README.md b/README.md
index b1a45fd..8a9ff4a 100644
--- a/README.md
+++ b/README.md
@@ -17,12 +17,12 @@ $ npm install uwufy
```js
const uwufy = require('uwufy');
-console.log(uwufy('IF YOU SEE THIS THEN THE UWUFICATION WAS SUCCESSFULL'));
+console.log(uwufy('IF YOU SEE THIS THEN THE UWUFICATION WAS SUCCESSFULL!!!'));
```
# Output
```sh
-$ IF YOU SEE THIS THEN THE UWUFICATION WAS SUCCESSFUWW
+$ I-IF YOU SEE THIS THEN THE UWUFICATION WAS SUCCESSFUWW >w<
```
## Links
diff --git a/dist/app.d.ts b/dist/app.d.ts
new file mode 100644
index 0000000..48eb464
--- /dev/null
+++ b/dist/app.d.ts
@@ -0,0 +1,2 @@
+declare const uwufy: (input: string) => string;
+export = uwufy;
diff --git a/dist/app.js b/dist/app.js
index 036b716..faedfda 100644
--- a/dist/app.js
+++ b/dist/app.js
@@ -2,7 +2,13 @@
const uwufy = (input) => {
input = input.replace(/(?:l|r)/g, 'w');
input = input.replace(/(?:L|R)/g, 'W');
+ input = input.replace(/!+/g, ` >w< `);
+ let f = Math.random() < 0.25;
+ if (f) {
+ let c = input.charAt(0);
+ input = c + '-' + input;
+ }
return input;
};
module.exports = uwufy;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FwcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsTUFBTSxLQUFLLEdBQUcsQ0FBQyxLQUFhLEVBQVUsRUFBRTtJQUNwQyxLQUFLLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsR0FBRyxDQUFDLENBQUM7SUFDdkMsS0FBSyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsVUFBVSxFQUFFLEdBQUcsQ0FBQyxDQUFDO0lBQ3ZDLE9BQU8sS0FBSyxDQUFDO0FBQ2pCLENBQUMsQ0FBQTtBQUNELGlCQUFTLEtBQUssQ0FBQyJ9 \ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FwcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsTUFBTSxLQUFLLEdBQUcsQ0FBQyxLQUFhLEVBQVUsRUFBRTtJQUNwQyxLQUFLLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsR0FBRyxDQUFDLENBQUM7SUFDdkMsS0FBSyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsVUFBVSxFQUFFLEdBQUcsQ0FBQyxDQUFDO0lBQ3ZDLEtBQUssR0FBRyxLQUFLLENBQUMsT0FBTyxDQUFDLEtBQUssRUFBRSxPQUFPLENBQUMsQ0FBQztJQUN0QyxJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsSUFBSSxDQUFBO0lBQzVCLElBQUksQ0FBQyxFQUFFO1FBQ0gsSUFBSSxDQUFDLEdBQUcsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUN2QixLQUFLLEdBQUcsQ0FBQyxHQUFHLEdBQUcsR0FBRyxLQUFLLENBQUE7S0FDMUI7SUFDRCxPQUFPLEtBQUssQ0FBQztBQUNqQixDQUFDLENBQUE7QUFDRCxpQkFBUyxLQUFLLENBQUMifQ== \ No newline at end of file
diff --git a/package.json b/package.json
index 8797a0b..84b5b91 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,9 @@
{
"name": "uwufy",
- "version": "1.0.3",
+ "version": "1.0.4",
"description": "An NPM package which allows you to uwufy a given string.",
"main": "./dist/app.js",
+ "types": "./dist/app.d.js",
"files": [
"dist/",
"LICENSE"
diff --git a/src/app.ts b/src/app.ts
index 9919eb4..f28037f 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -1,6 +1,12 @@
const uwufy = (input: string): string => {
input = input.replace(/(?:l|r)/g, 'w');
input = input.replace(/(?:L|R)/g, 'W');
+ input = input.replace(/!+/g, ` >w< `);
+ let f = Math.random() < 0.25
+ if (f) {
+ let c = input.charAt(0)
+ input = c + '-' + input
+ }
return input;
}
export = uwufy; \ No newline at end of file
diff --git a/test/test.js b/test/test.js
index 8270d62..fdc1a67 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1,3 +1,3 @@
const uwufy = require('../dist/app.js');
-console.log(uwufy('IF YOU SEE THIS THEN THE UWUFICATION WAS SUCCESSFULL')); \ No newline at end of file
+console.log(uwufy('IF YOU SEE THIS THEN THE UWUFICATION WAS SUCCESSFULL!')); \ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index 3bcd644..1bf09fe 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,7 +8,7 @@
"allowJs": true, /* Allow javascript files to be compiled. */
"checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
- // "declaration": true, /* Generates corresponding '.d.ts' file. */
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */