jpiglatin

    1.0.2 • Public • Published

    JPigLatin 🐷

    JPigLatin is a simple javaScript package for generating pig latin from plain text. You can see package on npm, github, or see the web application on JPig.org

    Installation

    1. Via CDN

    Replace version with current version, i.e 1.0.3

    <script src="https://unpkg.com/jpiglatin@VERSION/index.js"></script>

    1. Via NPM

    npm i jPigLatin -save

    Use

    1. Include jPigLatin in page source

    <script src="https://unpkg.com/jpiglatin@1.0.0/index.js"></script>

    1. Create two fields, one for user input and one for output
    <span id="input">This is a test</span>
    <span id="output"></span>
    1. Use javascript to get pass input to jPigLatin encode() function. Set input and output ElementID's with local variables.
    <script>
        function displayPigLatin(){
            var input = "input";
            var output = "output";
            document.getElementById(output).innerHTML = encode(input,output);
        }
    </script>
    1. Use an event loader to execute function
    <button onclick="displayPigLatin()">Translate</button>

    Contributing

    Feel free to make a pull request for features

    Keywords

    Install

    npm i jpiglatin

    DownloadsWeekly Downloads

    9

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    2.31 kB

    Total Files

    3

    Last publish

    Collaborators

    • tcbutler320