Giter VIP home page Giter VIP logo

pirate-api's Introduction

🏴‍☠️ Pirate API ☠️

deno npm tests Contributor Covenant

The Pirate Monkeyness API can generate pirate insults and it can translate from English to Pirate.

This is a Deno wrapper for the API that is available as both a Deno module and a Node.js module on npm.

Usage

The Pirate Monkeyness API makes available two APIs; one that creates a pirate insult and one that takes English text as an argument and returns a pirate translation of that text.

Deno

import { insult, translate } from "https://deno.land/x/pirate_api/mod.ts";

console.log(await insult());
// => "I'll gut ye bow to stern, ye dreadful, cowardly mongrel! ... Blow me down!"

console.log(
  await translate("Let's take to the seas for an adventure captain."),
);
// => "Let's take t' the seas fer an adventure cap'n."

Node.js

To use the module in a Node.js application, first install the module with:

npm install pirate-api

You can then use the module in your application like this:

import { insult, translate } from "pirate-api";

console.log(await insult());
// => "Yer face be good fer stoppin' cannonballs, ye scrappy, salty dullard! ... Blow me down!"

console.log(
  await translate("Let's take to the seas for an adventure captain."),
);
// => "Let's take t' the seas fer an adventure cap'n."

You can also use this module as a Common JS require:

const { insult, translate } = require("pirate-api");

console.log(await insult());
// => "It's the locker for ye, ye pitiful, weak-kneed swab! ... Splice the mainbrace!"

console.log(
  await translate("JavaScript is a very versatile language, don't you think?"),
);
// => "JavaScript be a mighty versatile language, don't ye reckon?"

Thanks

Thanks very much to Tim Moses the creator of the Pirate Monkeyness API. It is a free service and it makes me very happy that it exists.

What's a pirate's favourite programming language?

Ye might reckon a pirate's fav'rit programmin' language be R, but his first love be the C!"

pirate-api's People

Contributors

philnash avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

pirate-api's Issues

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.