Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

typicalninja/wyr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚨 Deprecation Notice 🚨

This package is deprecated, ℹ see here for more information

wyr

A simple (literally 1 file) package to get would-your-rather questions, easy to use and small

Install

npm i wyr
  • Typescript and Javascript compatible

Usage

Typescript
import wyr from 'wyr';

// wyr is a function and returns a promise with a object containing your questions
wyr().then((response) => {  // or .then(console.log) hehe
console.log(response)
})
Javascript
const wyr = require('wyr').default


// wyr is a function and returns a promise with a object containing your questions
wyr().then((response) => {  // or .then(console.log) hehe
console.log(response)
})

A example of returned response

{
  blue: {
    question: 'Drive 200 miles well over the legal drunken limit',      
    votes: '620,500'
  },
  red: {
    question: 'Drive 200 miles after being awake for 72 hours straight',
    votes: '970,048'
  }
}

ex: To access the blue question: .blue.question, and the count of blue .blue.votes

  • and for red vice versa

Support

  • I am available in my discord server

Invite

License

  • This repository and the code inside it is licensed under the MIT License. Read LICENSE for more information.

Other

My github

Discord-Invite

About

A Npm package to scrape either.io for "would your rather" questions. (10/23 > either.io seem to be offline)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published