references:
https://www.digitalocean.com/community/tutorials/how-to-create-a-node-js-module-pt
https://www.alura.com.br/artigos/criando-e-publicando-uma-biblioteca-javascript-no-npm

## Methods used during Evolution of the Species


### Pegando todas habilidades, atributos e temas

Instancie o módulo
```js
const darwinism = require('darwinism');

darwinism.abilities()
darwinism.attributes()
darwinism.themes()

```
# darwinism

[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios)
[![build status](https://img.shields.io/travis/axios/axios/master.svg?style=flat-square)](https://travis-ci.org/axios/axios)
[![jsdelivr](https://data.jsdelivr.com/v1/package/npm/darwinism/badge)](https://www.jsdelivr.com/package/npm/darwinism)
[![download](https://packagephobia.com/badge?p=darwinism)](https://unpkg.com/browse/darwinism@1.0.0/)
[![install size](https://packagephobia.com/badge?p=darwinism)](https://packagephobia.com/result?p=darwinism)
[![install libraries](https://packagephobia.com/badge?p=darwinism)](https://libraries.io/npm/darwinism)

## Table of Contents

  - [Features](#features)
  - [Browser Support](#browser-support)
  - [Installing](#installing)
  - [Example](#example)
  - [Request method aliases](#request-method-aliases)
  - [Promises](#promises)
  - [TypeScript](#typescript)
  - [Resources](#resources)
  - [Credits](#credits)
  - [License](#license)

## Features

- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
- Make [http](http://nodejs.org/api/http.html) requests from node.js
- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
- Return JSON data
- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)

## Browser Support

![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
--- | --- | --- | --- | --- | --- |
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |

[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios)

## Installing

Using npm:

```bash
$ npm install darwinism
```

Using yarn:

```bash
$ yarn add darwinism
```

Using jsDelivr CDN:

```html
<script src="https://cdn.jsdelivr.net/npm/darwinism@1.0.0/index.js"></script>
```

Using unpkg CDN:

```html
<script src="https://unpkg.com/browse/darwinism@1.0.0/index.js"></script>
```

## Example

### note: CommonJS usage
In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach:

```js
const darwinism = require('darwinism').default;
```

### Request method aliases

For convenience aliases have been provided for all supported request methods.

##### darwinism.vitality(option)
##### darwinism.strength(option)
##### darwinism.resistance(option)
##### darwinism.intelligence(option)
##### darwinism.humanity(option)
##### darwinism.cyberneticity(option)
##### darwinism.faith(option)
##### darwinism.attunement(option)
##### darwinism.dexterity(option)
##### darwinism.eletricity()
##### darwinism.mechanics()
##### darwinism.engineer()
##### darwinism.logical()
##### darwinism.security()
##### darwinism.health()
##### darwinism.cyber()
##### darwinism.art()
##### darwinism.psychological()
##### darwinism.culinary()
##### darwinism.themeEarth()
##### darwinism.themeFire()
##### darwinism.themeAir()
##### darwinism.themeWater()

When using the alias method `vitality` with `options` 
to multiply the points acquired in the player's action `darwinism.vitality(option)`.

###### Example of use

```js
darwinism.vitality(2)
  .then((data)=>{
    console.log(data);
  }).catch((e)=>{console.log(`Error: ${e}`)});
```
Return to JSON
```json
{ 
	"name": "vitality",
	"points": 40,

}
```

###### NOTE
When using the alias methods `themes`, `abilities`, and `attributes` get all the items you want.

```js
darwinism.themes()
  .then((data)=>{
    console.log(`Todos temas disponíveis: \n\n${data}`);
  }).catch((e)=>{console.log(`Error: ${e}`)});
```
## Promises

darwinism depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises).
If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise).

## TypeScript
darwinism includes [TypeScript](http://typescriptlang.org) definitions.

```typescript
import darwinism from 'darwinism';
darwinism.health();
```

## Resources

* [NPM Guide](https://www.npmjs.com/package/darwinism)
* [Readme Guide](https://github.com/ahsouza/darwinism-module-tipergunto/blob/master/README.md)

## Credits

darwinism is inspired by the evolution in strategy games or rpg that makes the character an increasingly better species and with varieties in abilities to enjoy the universe.

## License

[MIT](LICENSE)
