Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruleeeer/leetcode-daily-question
获取leetcode每日一题(get the daily question of leetcode)
https://github.com/ruleeeer/leetcode-daily-question
daily-questions leetcode
Last synced: 10 days ago
JSON representation
获取leetcode每日一题(get the daily question of leetcode)
- Host: GitHub
- URL: https://github.com/ruleeeer/leetcode-daily-question
- Owner: ruleeeer
- License: apache-2.0
- Created: 2023-06-07T13:13:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-12T14:19:13.000Z (over 1 year ago)
- Last Synced: 2025-01-04T02:08:06.679Z (about 1 month 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));
```