superneko160 / htmlparser-backend Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://htmlparser.supernekocat31.workers.dev/
License: MIT License
Home Page: https://htmlparser.supernekocat31.workers.dev/
License: MIT License
index.ts
内のルーティングで類似した処理があるので関数化する修正予定ルーティング
/parse
/parse/json
/parse/csv
テストツールJestをVitestへ移行し、速度改善を試みる
parse/csv
やparse/json
(例)というルーティングを追加現在外部のフロントエンドからAPIを呼び出そうとするとCORSエラーが発生する
CORSエラー回避のため、Honoが用意しているミドルウェアを導入する
src
、href
属性等を含めた全属性が取得されているので、id
とclass
のみを抽出できる機能を追加id
のみ、class
のみ、id
とclass
のみの4つの取得方法を選択できるように修正手動でテストを行っているのでGitHubActionsを用いた自動テストを実行するように修正する
npm → Bunへ移行
prepareElements.ts
のprepareElementAttributes関数のリファクタリング
入力欄に入力された値に空白が入っているとエラーになるので修正する必要あり
以下の個所のネストが深いため分割する
// データ行を作成
for (const elementName of Object.keys(data)) {
const elementData = data[elementName]
for (const attributes of elementData) {
for (const [attributeName, attributeValue] of Object.entries(attributes)) {
const row = [elementName, attributeName, attributeValue]
rows.push(row.join(','))
}
}
}
候補ツール:Biome.js
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.