cow-translator

JavaScript library to translate cow language 🐄 to text

https://github.com/skwalexe/cowtranslator.js

Science Score: 18.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary

Keywords

cow cow-translator fun javascript js skwalexe
Last synced: 6 months ago · JSON representation ·

Repository

JavaScript library to translate cow language 🐄 to text

Basic Info
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 3
  • Open Issues: 1
  • Releases: 0
Topics
cow cow-translator fun javascript js skwalexe
Created almost 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Citation

README.md

CowTranslator.js 🐄

JavaScript library to translate cow language 🐄 to text

jsDelivr

html <script src="https://cdn.jsdelivr.net/gh/SkwalExe/cowTranslator.js@v1.1.0/dist/cow-translator.min.js"></script>

NPM module

Install the npm module

bash npm install cow-translator

And import it in your project

js const cowTranslator = require('cow-translator');

Setting up

You can import the library into you website with JsDelivr or, you can use the npm module and import it in your project.

Usage 📝

This library provides 2 functions: - cowTranslator.cowToText : translate cow language to text - cowTranslator.textToCow : translate text to cow language

Each of these functions returns a translationResult class :

  • translationResult.text : the human version
  • translationResult.cow : the cow version
  • translationResult.error : the error message if any
  • translationResult.success : whether the translation was successful or not
  • translationResult.warning : whether warnings were generated or not

Human to cow

Translate Hello World ! to cow language

js let cow = cowTranslator.textToCow("Hello world !");

.cow is the cow version of the text

js cow.cow // "mOoOoOO moooOoo mooOoOO mooOoOO mooOOOo mOOOOOo moOoOOo mooOOOo moOoooO mooOoOO mooooOO mOOOOOo MoooooO"

The translation is successful

js cow.success // true

Cow to human

Translate "mOoOoOO moooOoo mooOoOO mooOoOO mooOOOo mOOOOOo" to human language

js let human = cowTranslator.cowToText("mOoOoOO moooOoo mooOoOO mooOoOO mooOOOo mOOOOOo");

.text is the human version

js human.text // "Hello"

Errors and warnings

If an error occured and the translation was not successful, the following properties are set:

  • translationResult.success : ⛔ false
  • translationResult.error : the error message

If warnings were generated, the following properties are set:

  • translationResult.warning : ⚠️ true
  • translationResult.error : the warning message
  • translationResult.success : ✅ true

final

If you have any problem, don't hesitate to open an issue

Contributing

  1. Start by forking this repository

  2. Then clone your fork to your local machine. git git clone https://github.com/your-username/cowTranslator.js.git

  3. Install dev dependencies npm npm install --save-dev

  4. Create a new branch git git checkout -b super-cool-feature

  5. Then make your changes

  6. Update the changelog and version number if needed (using Semantic Versioning) ```bash

    bug fix

    npm version patch --no-git-tag-version

# add a new feature npm version minor --no-git-tag-version

# changes that break backwards compatibility npm version major --no-git-tag-version ```

  1. List and correct linting errors bash npm run lint

  2. Update the minified/browser version of the library bash npm run build

  3. Once you're done, commit your changes and push them to the remote repository. git git add --all git commit -m "Add super-cool-feature" git push origin super-cool-feature

  4. Then, open a pull request on GitHub from your fork.

    1. Go to this link
    2. Click compare across forks
    3. On the right, on head repository select your fork
    4. And on compare select the branch you just created
    5. Click on Create Pull Request and submit your pull request

Owner

  • Name: Léopold Koprivnik
  • Login: SkwalExe
  • Kind: user
  • Location: France
  • Company: 82.66.235.227

I like programming

Citation (CITATION.md)

# Citation

If you use cowTranslator.js, we would highly appreciate it if you could include the following informations in your project

This is not a code license, but a way to give credit to the original author.

## Markdown

```md
This project uses [cowTranslator.js](https://github.com/SkwalExe/cowTranslator.js), which was released by Léopold Koprivnik Ibghy, [@SkwalExe](https://github.com/SkwalExe/) \<skwal.net@gmail.com\> under the [MIT license](https://github.com/SkwalExe/cowTranslator.js/blob/main/LICENSE).
```

## HTML

```html
<p>This project uses <a href="https://github.com/SkwalExe/cowTranslator.js">cowTranslator.js</a>, which was released by Léopold Koprivnik Ibghy, <a href="https://github.com/SkwalExe/">@SkwalExe</a> &lt;<a href="mailto:skwal.net@gmail.com">skwal.net@gmail.com</a>&gt; under the <a href="https://github.com/SkwalExe/cowTranslator.js/blob/main/LICENSE">MIT license</a></p>
```

## Plain text

```
This project uses cowTranslator.js <github.com/SkwalExe/cowTranslator.js>, which was released by Léopold Koprivnik Ibghy, @SkwalExe <skwal.net@gmail.com> under the MIT license.
```

GitHub Events

Total
  • Delete event: 1
  • Issue comment event: 1
  • Pull request event: 2
  • Fork event: 2
  • Create event: 1
Last Year
  • Delete event: 1
  • Issue comment event: 1
  • Pull request event: 2
  • Fork event: 2
  • Create event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 21
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.05
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 18 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.5
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
Pull Request Authors
  • SkwalExe (16)
  • dependabot[bot] (4)
  • imgbot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
enhancement (6) dependencies (5) documentation (5) linting (2) chore (2) bug (2) typo (1) minor (1) security (1) license (1) version (1) minified version (1) structure (1) repo (1) package configuration (1) contributing (1) changelog (1) bot (1) workflows (1)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 30 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
npmjs.org: cow-translator

Javascript library to translate cow language to text

  • Versions: 2
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 30 Last month
Rankings
Stargazers count: 19.4%
Forks count: 20.5%
Dependent repos count: 25.3%
Average: 31.2%
Dependent packages count: 32.9%
Downloads: 58.0%
Maintainers (1)
Last synced: 7 months ago

Dependencies

package-lock.json npm
  • 247 dependencies
package.json npm
  • browserify ^17.0.0 development
  • eslint ^8.14.0 development
  • uglify-js ^3.15.4 development