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

extra-quotes

v1.1.21

Published

Quotes to share insightful moments.

Downloads

142

Readme

Quotes to share insightful moments. It has popular movie quotes included. You can also load them from Wikiquote, or manually load them to corpora.

console

equotes "try"
# Do, or do not. There is no 'try'.
# :by  Star Wars: Episode V - The Empire Strikes Back (1980)
#
# There’s nothing you can’t do if you try.
# :by  Dr Stone (2019)
# ...

equotes --load "mahatma gandhi,arnold" "success"
# The late Middle Ages not merely has a successful middle class—it is in fact a middle-class period.
# :by  Arnold Hauser (art historian)
#
# Just remember, you can't climb the ladder of success with your hands in your pockets.
# :by  Arnold Schwarzenegger
# ...

equotes --load "mahatma gandhi,arnold," "stop try"
## NOTE: last empty load => load default quotes (movies)
# Stop trying to control everything and just let go! LET GO!
# :by  Fight Club (1999)
#
# When you stop trying to force the solution, it'll happen on its own.
# :by  The Flash (2012)
# ...

equotes --load "mahatma gandhi,arnold," "peace" --ref
# Ideals are peaceful; history is violent.
# :by  Fury (2014)
#
# I regard myself as a soldier, though a soldier of peace.
# :by  Mahatma Gandhi
# :ref Speech at Victoria Hall, Geneva (10 December 1931)
# ...

export EQUOTES_LOAD="mahatma gandhi,arnold,"
equotes "peace" --random --limit 1
## lists a random quote

reference

equotes [options] [query]
# query: text to match in quotes
# Options:
# --help:   show this help
# --silent: hide error messages (0/1)
# --by:   display "by" field (0/1)
# --ref:  display "ref" field (0/1)
# --load: load quotes from wikiquote ('query,query,...')
# -a | --all: load all matching search results (0/1)
# --from: display quotes from corpus ('name,name,...', null => all)
# -f | --filter: filter quotes by ('js function')
# -r | --random: randomly shuffle quotes (0/1)
# -l | --limit:  limit number of quotes (integer, -1 => all)

# Environment variables:
$EQUOTES_SILENT # hide error messages (0)
$EQUOTES_BY     # display "by" field (1)
$EQUOTES_REF    # display "ref" field (0)
$EQUOTES_LOAD   # load quotes from wikiquote ('')
$EQUOTES_ALL    # load all matching search results (1)
$EQUOTES_FROM   # choose from a subset of corpora (null)
$EQUOTES_FILTER # filter quotes by ('q => q.text.length<=160')
$EQUOTES_RANDOM # randomly shuffle quotes (0)
$EQUOTES_LIMIT  # limit number of quotes (-1)

javascript

const quotes = require('extra-quotes');

async function main() {
await quotes.load();
/* loads local movies quotes (corpus) */
// true

quotes('try');
// [ { text: "Do, or do not. There is no 'try'.",
//     by: 'Star Wars: Episode V - The Empire Strikes Back (1980)',
//     ref: null },
//   { text: 'There’s nothing you can’t do if you try.',
//     by: 'Dr Stone (2019)',
//     ref: null }, ... ]

await quotes.load('mahatma gandhi');
/* loads Mahatma Gandhi quotes from Wikiquote */
// true

await quotes.load('arnold');
/* loads Arnold... quotes from Wikiquote */
// true

quotes('stop try');
// [ { text: 'Stop trying to control everything and just let go! LET GO!',
//     by: 'Fight Club (1999)',
//     ref: null },
//   { text:
//      "When you stop trying to force the solution, it'll happen on its own.",
//     by: 'The Flash (2012)',
//     ref: null }, ... ]

quotes('', null, {random: true, limit: 1});
// -> 1 random quote
}
main();

reference

| Method | Action |---------------------|------- | quotes | Lists matching quotes. | load | Loads quotes from Wikiquote, or local (movies). | set | Manually sets quotes, with specified name. | delete | Deletes loaded / manually set quotes (from corpora).

Powered by Wikidata

nodef

Browserified, minified version of this package is extra-quotes.min.