npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

motivate-quotes

v1.1.3

Published

Motivate-quotes is your daily inspiration and motivation source. Retrieve thoughtful quotes that uplift your spirit and promote mindfulness, helping you stay inspired throughout the day.

Downloads

27

Readme

Motivate Quotes

NPM Version GitHub license Snyk Vulnerabilities for npm package version PRs Welcome

Motivate Quotes is an NPM package that provides inspiring and motivational quotes from various categories such as Programming, Education, Trading, Business, Life, Fitness, Creativity, and Leadership.

Click here to view this package on the NPM registry.

Getting Started

NPM

Installation

To use this package, install it via npm:

$ npm install motivate-quotes

Usage

Import the functions from the motivate-quotes package and use them as demonstrated below:

import { getQuotes, getRandomQuote, getDayOfQuote } from 'motivate-quotes';

// Fetch quotes from a specific category
try {
  const quotes = getQuotes({
    author: false,
    numberOfQuotes: 2,
    category: 'Programming',
  });
  console.log(quotes);
} catch (error) {
  console.error(error.message);
}

// Fetch a random quote from a specific category
const randomQuote = getRandomQuote('Education');
console.log(randomQuote);

// Fetch the quote of the day
const dayOfQuote = getDayOfQuote();
console.log(dayOfQuote);

Functions

getQuotes(options)

Fetches quotes based on the specified options.

| Name | Type | Description | |------------------|----------|--------------------------------------------------------------------------------------------------| | category | string | The category of quotes. Required. Available categories: Programming, Education, Trading, Business, Life, Fitness, Creativity, Leadership. | | author | boolean | Whether to include the author's name. Optional. Default is true. | | numberOfQuotes | number | The number of quotes to return. Optional. Default is 1. |

Returns an array of quotes based on the specified options.

Example:

[
  {
    "text": "First, solve the problem. Then, write the code.",
    "author": "John Johnson"
  },
  {
    "text": "Experience is the name everyone gives to their mistakes.",
    "author": "Oscar Wilde"
  }
]

getRandomQuote(category)

Fetches a random quote from the specified category.

| Name | Type | Description | |------------------|----------|--------------------------------------------------------------------------------------------------| | category | string | The category of quotes. Required. Available categories: Programming, Education, Trading, Business, Life, Fitness, Creativity, Leadership. |

Returns an array of quotes based on the specified options.

Example:

{
  "text": "Education is the most powerful weapon which you can use to change the world.",
  "author": "Nelson Mandela"
}

getDayOfQuote()

Fetches the quote of the day.

Returns the quote of the day.

Example:

{
  "text": "The only way to do great work is to love what you do.",
  "author": "Steve Jobs"
}

Examples

To view the examples, clone the motivate-quotes repo and install the dependencies:

$ git clone https://github.com/mian-ali/motivate-quotes.git
$ cd motivate-quotes
$ npm install

Then run the examples/index.js:

$ node index.js

Tests

  • npm run test: Runs unit tests
  • npm run format: Run eslint format

Contributors

Contributors are individuals who have made significant contributions to a project. They play a crucial role in the development and success of open-source projects by contributing code, documentation, bug fixes, and other valuable contributions.

If you would like to become a contributor to this project, please follow these steps:

  1. Fork the project repository.
  2. Make the necessary changes or additions to the codebase.
  3. Test your changes thoroughly to ensure they do not introduce any issues.
  4. Submit a pull request to the original repository, detailing your changes and why they are beneficial.

Note: So that you know, all contributions are subject to review and approval by the project maintainers. Your contributions should align with the project's guidelines and coding standards.

Thank you for considering becoming a contributor to this project. Your contributions are greatly appreciated!

Author

Ali Ahmad