Socket
Socket
Sign inDemoInstall

hello-international

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hello-international

Common Greetings in 10+ Languages


Version published
Maintainers
1
Created
Source

Hello-International - Common Greetings in 10+ Languages

Travis npm npm codecov coverage semantic-release Commitizen friendly

###Installation npm install hello-internation --save

How to use

var lib = require('hello-international');

setInterval(function () {
    console.log(lib.getRandomGreeting('hello'));
 }, 1000);

console.log(lib.getRandomGreeting());

Available APIs

  • Properties

    • lib.all: all the language data
    • lib.allMessages: return all supported messages, currently only support 'hello', 'goodbye'
    • lib.numberOfLanguages: totol number of supported languages
    • lib.languageList: all supported languages in an array
    • lib.randomIndex: return a random Index, userful if you want to do something before getting the random language / greeting
  • Methods:

    • lib.getRandomGreeting(optionalMessageArg, optionalLanguageArg): random greeting, if optionalMessageArg and optionalLanguageArg are provided and valid, will return specified greeting data

    • lib.getRandomLanguage(): return a random Language

    • lib.randomGreetings(optionalCount): return a list of random greetings, if the count is not specified or not valid, will only return one random greeting

Author: Audrey

Keywords

FAQs

Package last updated on 14 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc