Add a utility to convert file URL or path to one of them?
オープン
まだ誰も着手していません。
feature request
never-stale
url
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
What is the problem this feature will solve?
It's a nice way to accept both URL and path string in API, but we need covert it to either string or URL, it would be nice to have a built-in method to do this.
What is the feature you are proposing to solve the problem?
For converting to string:
Maybe add path.from(URL | string)? @sindresorhus proposed here.
For converting to URL:
url.from(URL | string)
I'm not sure, since URL is a standard, I guess adding method URL object won't be acceptable, maybe to node:url module?
What alternatives have you considered?
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提案されている path.from(URL | string) API と url.from(URL | string) API、および issue で言及されている node:url モジュールを確認します。どの変換セマンティクスとモジュールの責務が適切かを判断します。1 つの API 形状とその動作が明確に仕様化され、対応するカバレッジとともに実装された時点で作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- api, backend-api-design
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100