1.0.0 • Published 5 years ago
twdne.js v1.0.0
twdne.js
A simple library for getting a waifu from thiswaifudoesnotexist.net
Installing
$ npm install --save twdne.js
Usage
const twdne = require('twdne.js');
// Randomly selects one
twdne.randomWaifu().then(({desc, img}) => {
console.log(`Waifu Image URL: ${img}`);
console.log(desc);
});
// Pulls a selected waifu by it's ID.
twdne.fetchWaifu(21566).then(({desc, img}) => {
console.log(`Waifu Image URL: ${img}`);
console.log(desc);
});
1.0.0
5 years ago