New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sappquotes-dev

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

sappquotes-dev

sappQuotes is an npm package that provides a collection of quotes with various categories. It allows you to retrieve random quotes or quotes from specific categories.

unpublished
latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
1
Created
Source

sappQuotes

sappQuotes is a very lightweight npm package that provides a collection of quotes with various categories. It allows you to retrieve random quotes or quotes from specific categories. All quotes were manually curated, ensuring no duplicates, no API reliance, and no downtime.

Installation

You can install sappQuotes using npm:

npm install sappquotes@latest

Usage

Here's an example how to use sappQuotes:

/* JavaScript */ const { getRandomQuote, countQuotes, fetchQuotes, fetchCategories } = require("sappquotes")
/* TypeScrippt */ import { getRandomQuote, countQuotes, fetchQuotes, fetchCategories } = from "sappquotes"

// Fetch and display a random quote
await getRandomQuote().then((quote) => {
  console.log(`"${quote.quote}" - ${quote.author}`);
});

  // Fetch and display a random quote from a specific category
const category = "motivation";
await getRandomQuote(category).then((quote) => {
  console.log(`"${quote.quote}" - ${quote.author} (${quote.category})`);
});

  // Fetch and display available categories
await fetchCategories().then((categories) => {
  console.log("Available categories:", categories);
});

// Fetch and display available quotes
await fetchQuotes().then((quotes) => {
  console.log("Available quotes:", quotes);
});

API

The sappQuotes package provides the following functions:

getRandomQuote

Retrieve a random quote from any category.

getRandomQuote(category: string)

Retrieve a random quote from a specific category.

  • category: The category from which to retrieve the quote.

fetchQuotes

Retrieve all available quotes.

fetchCategories

Retrieve all available categories.

License

MIT License

Copyright (c) 2023 Sapphire Developers

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

quotes

FAQs

Package last updated on 01 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts