Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🏴‍☠️ Translates text into pirate-speek

License

NotificationsYou must be signed in to change notification settings

spudly/talk-like-a-pirate

Repository files navigation

Translates text into pirate-speak.

Installation

npm install talk-like-a-pirate

Usage (node)

Yonder module exports a function, so all ye have to do be require it in andexecute it. Pass it a string and it will translate it into pirate-lingo for ye.

vartalkLikeAPirate=require('talk-like-a-pirate');console.log(talkLikeAPirate('Hello!'));

Usage (web browser)

All ye have to do here be load ye JavaScript file (use yondertalk-like-a-pirate.js file for web browsers). It putstalkLikeAPirateon thar window object, so ye just have to call ye function.

<scriptsrc='talk-like-a-pirate.js'></script><script>alert(talkLikeAPirate('Hello!'));</script>

... or use requirejs.

require.config({paths:{'talk-like-a-pirate':'/path/to/talk-like-a-pirate'}});require(['talk-like-a-pirate'],function(talkLikeAPirate){alert(talkLikeAPirate('Hello!'));});

... or better still, use ye node usage described above andbrowserify it.


[8]ページ先頭

©2009-2025 Movatter.jp