This package has been deprecated

Author message:

https://github.com/typicalninja/wyr/issues/1

wyr
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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

as this is a small and simple package i don't expect any one to need any support with it, but if you need me i am always 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

Package Sidebar

Install

npm i wyr

Weekly Downloads

4

Version

1.1.1

License

MIT

Unpacked Size

4.85 kB

Total Files

5

Last publish

Collaborators

  • typicalninja21