https://github.com/cdrani/anml
scientifc names of animals
https://github.com/cdrani/anml
animals anml common library scientific
Last synced: over 1 year ago
JSON representation
scientifc names of animals
- Host: GitHub
- URL: https://github.com/cdrani/anml
- Owner: cdrani
- License: mit
- Created: 2017-11-27T07:45:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-19T21:29:54.000Z (over 8 years ago)
- Last Synced: 2025-02-05T13:47:44.743Z (over 1 year ago)
- Topics: animals, anml, common, library, scientific
- Language: JavaScript
- Size: 416 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# anml
---
This is a simple library of common names of animal species and their comparative
scientific names.
## Install
**npm**
> npm install anml --save
**yarn**
>yarn add anml
---
## Usage
**commonjs**
> const anml = require('anml')
**esmodules**
> import anml from 'anml'
## API
**all**: returns object containing entirety of library
**random([option: string])**:
* **random()**: returns either a scientific or common name of a random animal
from the library
* **random('scientific')**: returns a scientific name of a random animal
* **random('common')**: returns the common name of a random animal
**scientific(common_name: string)**: returns the scientific name counterpart of
given common name
**common(scientific_name: string)**: returns the common name
counterpart of given scientific name
---
## Examples
**anml.all**
```js
anml.all
// -> {
Aardvark: 'Orycteropus afer',
Bear: 'Ursidae',
Cat: 'Felis Domesticus',
. . .
Woodpecker: 'Picidae',
Yak: 'Bos Grunniens',
Zebra: 'Equus quagga'
}
```
**anml.random()**
```js
anml.random()
// -> 'Rangifer Tarandus'
```
**anml.random('scientific')**
```js
anml.random('scientific')
// -> 'Macropus Giganteus'
```
**anml.random('common')**
```js
anml.random('common')
// -> 'Lemur'
```
**anml.scientific('Lemur')**
```js
anml.scientific('Lemur')
// -> 'Lemur Catta'
```
**anml.common('Setonix brachyurus')**
```js
anml.common('Setonix brachyurus')
// -> 'Quokka'
```
---
## Contributing
All pull requests are welcome!