Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/molenzwiebel/evenin
:wave: Greetings for over 3000 languages and dialects as an NPM package. Don't ask me why.
https://github.com/molenzwiebel/evenin
greeting hello node
Last synced: 1 day ago
JSON representation
:wave: Greetings for over 3000 languages and dialects as an NPM package. Don't ask me why.
- Host: GitHub
- URL: https://github.com/molenzwiebel/evenin
- Owner: molenzwiebel
- License: mit
- Created: 2018-10-27T16:03:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-28T08:03:19.000Z (about 6 years ago)
- Last Synced: 2024-11-04T06:35:28.325Z (4 days ago)
- Topics: greeting, hello, node
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/evenin
- Size: 482 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Evenin' [![npm version](https://badge.fury.io/js/evenin.svg)](https://badge.fury.io/js/evenin)
> Detect, search and list general greetings for a large amount of languages.## Install
```
$ npm install --save evenin
```## Usage
```js
const greetings = require("evenin");// Check if a string contains a greeting:
greetings.hasGreeting("Hello, world!");
//=> true
greetings.hasGreeting("Goodbye, world!");
//=> false// Check if a string _is_ a greeting:
greetings.isGreeting("hello");
//=> true
greetings.isGreeting("goodbye");
//=> false// Look up a specific greeting across all languages:
greetings.findGreetings("hello");
//=> [ { phrase: 'Hello',
// explanation: 'formal greeting',
// language:
// { name: 'English',
// url: 'http://www-01.sil.org/iso639-3/documentation.asp?id=eng',
// location: 'United Kingdom, United States of America, Canada, Australia, various other countries.',
// greetings: [Array] } },
// { phrase: 'Hello',
// explanation: 'general greeting',
// language:
// { name: 'Guyanese Creole',
// url: 'http://www-01.sil.org/iso639-3/documentation.asp?id=gyn',
// location: 'Guyana.',
// greetings: [Array] } },
// { phrase: 'Hello',
// explanation: 'general greeting',
// language:
// { name: 'Malay, Central',
// url: 'http://www-01.sil.org/iso639-3/documentation.asp?id=pse',
// location: 'Indonesia: Sumatra.',
// greetings: [Array] } } ]// Look up all greetings starting with the specified prefix:
greetings.findGreetings("g'");
//=> [ { phrase: 'G\'day',
// explanation: 'general greeting used in some parts of Australia [eng-aus]',
// language:
// { name: 'English',
// url: 'http://www-01.sil.org/iso639-3/documentation.asp?id=eng',
// location: 'United Kingdom, United States of America, Canada, Australia, various other countries.',
// greetings: [Array] } } ]// Find information on a language and all greetings logged for that language:
greetings.getLanguage("english");
//=> { name: 'English',
// url: 'http://www-01.sil.org/iso639-3/documentation.asp?id=eng',
// location: 'United Kingdom, United States of America, Canada, Australia, various other countries.',
// greetings:
// [ { phrase: 'Hello', explanation: 'formal greeting' },
// { phrase: 'Hi', explanation: 'informal greeting' },
// ...
// ] }
```## Disclaimer
This project is largely a joke and hasn't really been tested. If you run into a problem, feel free to make an issue though. I'd be interested to see if people have an actual use for this. All the greetings are from [Jennifer's Language Page](http://users.elite.net/runner/jennifers/index.htm#International) which is honestly an amazing resource.
## License
MIT © [Thijs Molendijk (molenzwiebel)](http://github.com/molenzwiebel)