https://github.com/sapphdevelopment/myquotes
A simple npm package to get a quote
https://github.com/sapphdevelopment/myquotes
Last synced: 12 months ago
JSON representation
A simple npm package to get a quote
- Host: GitHub
- URL: https://github.com/sapphdevelopment/myquotes
- Owner: SapphDevelopment
- License: mit
- Created: 2023-04-16T20:23:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-21T16:22:25.000Z (about 3 years ago)
- Last Synced: 2024-04-27T03:40:22.431Z (about 2 years ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/myquotes
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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
```