UNPKG

@grimille/duolingo-js

Version:

Use the Duolingo API and power up your Node.js application (non-official)

13 lines (10 loc) 291 B
const fs = require('fs-extra'); exports.tokenFileExist = (tokenFile) => { return fs.existsSync(tokenFile); } exports.readTokenFromFile = (tokenFile) => { return fs.readJSONSync(tokenFile); } exports.writeTokenToFile = (tokenFile, jwt) => { fs.outputJSONSync(tokenFile, jwt); }