Skip to content

lagosnomad/yoruba-names

Repository files navigation

yoruba-names

travis build codecov coverage version downloads MIT license

Get a random yoruba name

How to install

Library is available on NPM

npm install --save yoruba-names

Usage in NodeJS

See the examples/example.js file

var yorubaNames = require('yoruba-names');

// Get a random Yoruba name
console.log(yorubaNames.random());

// Get a random number of Yoruba names
console.log(yorubaNames.random(2));

// Get a random Yoruba fullname
console.log(yorubaNames.random() + " " + yorubaNames.random());


// Get a random Royal Yoruba name
console.log(yorubaNames.Royalname());

Usage in Browser

See the examples/example.html file

<html>

<head>
    <script src="https://unpkg.com/[email protected]/dist/index.umd.min.js" type="text/javascript"></script>
</head>

<body>
    <button onclick="document.write(yorubaNames.random())">Get a random name</button>
    <button onclick="document.write(yorubaNames.random(4))">Get a random number of names</button>
        <button onclick="document.write(yorubaNames.Royalname())">Get a Royal names</button>
</body>

</html>