Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sapphdevelopment/myquotes

A simple npm package to get a quote
https://github.com/sapphdevelopment/myquotes

Last synced: 30 days ago
JSON representation

A simple npm package to get a quote

Awesome Lists containing this project

README

        








Discord server
npm version
npm downloads


## Example Usage

Install myquotes

```
npm install myquotes
```

```js
// TypeScript: import quote from "myquotes";
const quote = require("myquotes");

// Get a random quote's author
console.log(quote().author);

// Get a random quote
console.log(quote().quote);

// Get a love quote
console.log(quote("Love").quote);

// Get a random author, quote and category
console.log(`
${quote().author}
${quote().quote}
${quote().category}
`);
```

## Testing
```
npm test
```