GithubHelp home page GithubHelp logo

schotsl / uwuifier Goto Github PK

View Code? Open in Web Editor NEW
110.0 3.0 9.0 1.04 MB

This repository contains the Uwuifier package! It's written in Deno with TypeScript and compiled into JavaScript for NPM, makes use of Jest for testing the code and is deployed on NPM and https://deno.land.

Home Page: https://uwuifier.com

License: MIT License

TypeScript 100.00%
uwuifier typescript deno seeded sentences javascript npm

uwuifier's People

Contributors

dbrxnds avatar dependabot[bot] avatar drunkwinter avatar fredster33 avatar patarapolw avatar schotsl avatar thetayloredman avatar wouterdebruijn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

uwuifier's Issues

Can't construct Uwuifier from npm sources

Hey, I am currently trying to use your Uwuifier in one of my hobby project as a dependency.

I am using this NPM package https://www.npmjs.com/package/uwuifier, because I would rather avoid using Deno.

This is part of my code which is failing:

const myUwuifier = new Uwuifier({
    spaces: {
        faces: 0.5,
        actions: 0.075,
        stutters: 0.1
    },
    words: 1,
    exclamations: 1
});

I am getting following error: TypeError: Uwuifier is not a constructor

JS import with capitalized module name doesn't work on Linux

Hello there,

Current documentation for this module suggests importing it as import { Uwuifier } from "Uwuifier";. This works on Windows machines, but breaks on Linux, likely due to case-sensitivity of corresponding file systems, resulting in a somewhat hard-to-trace bug. Please consider changing the instructions to use from "uwuifier" instead.

Thank you for helping us get a quick laugh for April Fools. ๐Ÿ˜ƒ

uwuifier.uwuifySentence is not a function

When I run this code:

const uwuifier = require('uwuifier');

let text = 'Text to uwufie roar'

console.log({ content: uwuifier.uwuifySentence(text) })

I get this error:

TypeError: uwuifier.uwuifySentence is not a function

Add uwu faces and actions in between words

I think we should insert an uwu face of 'action' in between a word, once again I think a probability of 5% for both of them would be fine. There is already an actions and faces array so I should be very easy

Add more faces and actions

I think we should add more actions and faces to the codebase, It would also be nice to add these to the documentation so the user knows what actions / faces could show up.

Licence needed

Another thing, I don't see a LICENCE file in the root of your repository, which means this repo is under exclusive copyright and other contributions are illegal. Please put a fitting licence (I would use GNU GPL v3.0) on this repo. See here for help picking one. ChooseALicence's SSL certificate seems broken, follow the instructions in your browser to bypass the security warning.

Esclint error doesn't stop code from running

In my mind the code shouldn't compile when there is an eslint error, right now if you run npm run serve and add a console.log() to the code eslint will throw and error. Afterwards, the code will still be compiled to JavaScript and Node will execute it?

I think it should stop compiling once eslint has detected an error right?

Update `uwuifyWord()` documentation

Right now the uwuifySentence() function filters out URL's, adds faces and actions. The uwuifyWord() only changes the letters to be more uwufied but the documentation doesn't reflect this right now. :(

Add s-s-stutter function

I think we should add an s-s-stutter function to words that don't get uwufied at all, I don't a probability of 5% should work.

I think we could generate an int between 0 and 3 to determine how many l-l-letters should be added before the word.

Capital letter and actions / faces

Right now the string

"Hey how are you doing? I'm great!"

could be uwuified to:

"Hey how awe ywou dwoing? *sees buldge* The wheater is great"

We should remove the capital letter in "The" since "*sees buldge*" is the first word although I don't think we should add the capital letter there since it doesn't seem very uwu, we could just remove it. (We do have to check if the whole string isn't in caps lock since that would be an issue for this ticket)

Fix name

This one is a bit awkward, I just realized the package name should be "uwuifier" and not "uwufier", so we have to change the repo and npm package, package.json, fix documentation and code comments/variables

Unexpected token

/node_modules/uwuifier/script/index.js:101
        this._spacesModifier = spaces ?? DEFAULTS.SPACES;
                                       ^

SyntaxError: Unexpected token '?'

This error apears when I try to use the lib

"Uwuifier is not a constructor"

So I installed the package the normal way (bc I was getting errors tryna require from the Deno link) and here are two lines of my code:

const Uwuifier = require('uwuifier');
const uwuifier = new Uwuifier();

When I run my project, I get the error "Uwuifier is not a contructor." I tried console.logging Uwuifier to see what it was counting it as and... it's a class. Surprise surprise. Does anyone know why this would count as a class in the log, but not as a constructor to create an instance of it?

Expose faces, actions and exclimations

I think it would be nice if someone using the package could edit the faces, actions and exclamations variable. So I've you wanted the application to be SFW (god knows why you're using this package in that case) you could just change the actions array to remove "*sees buldge*" for instance.

I don't know the best way to do this if you can just expose the variable that would be the best solution (I think) but otherwise, we could use a function like setActions() for instance.

Fix or remove .npmignore

On the NPM page it reports that the package currently contains 3 files, which shouldn't be the case. The package only has to contain the index.js and index.d.js file, while browsing I saw that .npmignore is bad practice so we might wanna look into an alternative.

URL detection bug

URLs that are not actually valid protocols (let's say owoWhatsThis://) get marked as URLs.

Perhaps use a JSON file of valid schemes?

Use random function with seed options

Currently, we use Math.random() for every roll of the dice, I think we should switch to a random function that accepts a seed value so the uwifiy result is always the same! :)

"Uwuifier is not a constructor" at node version 18.9.0

This is in regard to #65

But this is a very weird issue, because I don't seem to have the issue on the Docker container and on my old Windows installation.
So I did a little digging and found out that it might be an issue with the node version.

  • I was trying version 4.0.4 (also running on the server) and now version 4.0.5.
  • Server is running node:current-buster-slim which is, according to Docker Hub, 18.9.0. But because the container is a little dated, it runs 18.5.0.
  • Then I made separate containers with 18.9.0 and this issue pops up.
  • I also have the same issue on my Dev-station running version 18.9.0.

Is there any way to fix this other than reverting to previous node versions?

Create and publish a Deno package

The package is already written in TypeScript so I think it would be easy enough to publish it to Deno, we need to create an export of the TypeScript only and publish this on a CDN. Then it's just a case of making a pull request to the Deno third-party package page and adding it

[Feature Suggestion] Add a mode where extra stuff that you didn't type isn't interjected.

Specifically, I mean stuff like *whispers to self*, *runs away*, *looks at you*, (?!?1 and ?!! when typing "!" specifically) and anything else that may crop up which you didn't specifically add (minus stuff like "OwO" and "UwU" which are objectively necessary for the translation to be understood, and seemingly have to be manually added to the ends of lines).

I myself had to learn proper English, so I know UwU since I was raised speaking it since I was a kit. These interjections are basically a form of local slang that is very outdated and doesn't get used much anymore, but keeping them available for olden UwU would be a big help to people who have speoken English for several years and aren't up to date on the new slang (which basically doesn't exist and isn't necessary to be added to your translator).

i'd appweciate if you took my suggestion into considewation! UwU

fank you fow weading! OwO

Original (much poorer) translation, containing unnecessary (and out of date) terminology is as follows:

i'd *whispers to self* appweciate if you took *runs away* my suggestion *looks at you* into considewation?!?1 UwU

thank you fow weading?!! OwO

I had to manually add the "UwU" and "OwO" and for some reason it changed the phrasing considerably.
The version without the manually added UwU and OwO is as follows:

i'd appweciate if you took *runs away* my suggestion *looks at you* into considewation!

thank >w< you fow weading?!!

Also note that it interjects an ">w<" in the middle of a sentence, which also isn't proper sentence structure, and is the difference between cuteness and the most toxicity a furry can muster while remaining cute.
In addition, the fact that neither of these translations swaps "th" with "f" is honestly saddening. Furries who grew up speaking UwU have to train themselves to make that sound properly, and it can sometimes take literal years. Some furs take offense to having that sound made at them by a non-native UwU speaker since it's considered shameful, but if a furry came to your translator to try to re-learn UwU after not speaking it for a few years, they'd be shunned, and possibly even disowned, if found out to be making that sound in natural UwU speech.

[Expand to view content]Yes, I understand just how cringe this is. If you want me to write a genuine issue post instead, please let me know privately and I will rephrase everything and/or remove everything after the first paragraph, as the first paragraph is essentially the only detial you need to understand my request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.