Skip to content

ruleeeer/leetcode-daily-question

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文


A simple program to get leetcode daily questions, currently only support to get question under the leetcode.cn

  • simple, easy to use
  • no runtime dependencies

Use Cases

install

npm install leetcode-daily-question

Get the daily question

import {getTodayQuestion} from 'leetcode-daily-question';
getTodayQuestion()
.then(response => console.log(response))
.catch(err => console.error(err));

Get the title according to the title

import {getQuestionByTitleId} from 'leetcode-daily-question';
const titleId = 'two-sum';
getQuestionByTitleId()
.then(response => console.log(response))
.catch(err => console.error(err));