https://github.com/Jiannan-dev/leetcode-daily-question
获取leetcode每日一题(get the daily question of leetcode)
https://github.com/Jiannan-dev/leetcode-daily-question
daily-questions leetcode
Last synced: 8 days ago
JSON representation
获取leetcode每日一题(get the daily question of leetcode)
- Host: GitHub
- URL: https://github.com/Jiannan-dev/leetcode-daily-question
- Owner: Jiannan-dev
- License: apache-2.0
- Created: 2023-06-07T13:13:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-12T14:19:13.000Z (over 2 years ago)
- Last Synced: 2025-08-25T23:14:04.162Z (about 2 months ago)
- Topics: daily-questions, leetcode
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/leetcode-daily-question
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
English | [简体中文](./README_ZH.md)
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
``` shell
npm install leetcode-daily-question
```
### Get the daily question
```ts
import {getTodayQuestion} from 'leetcode-daily-question';
getTodayQuestion()
.then(response => console.log(response))
.catch(err => console.error(err));
```
### Get the title according to the title
```ts
import {getQuestionByTitleId} from 'leetcode-daily-question';
const titleId = 'two-sum';
getQuestionByTitleId()
.then(response => console.log(response))
.catch(err => console.error(err));
```