npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bus-time-table-by-edge-runtime

v1.0.2

Published

BuTTER Library は、ストレージ上に細分化した状態で保存されているGTFSを基にした時刻表情報を集め、ブラウザ内で必要な情報に加工するライブラリです。DBを使わずにデータ処理をブラウザ内とする

Downloads

2

Readme

BuTTER Library

BuTTER Library は、ストレージ上に細分化した状態で保存されているGTFSを基にした時刻表情報を集め、ブラウザ内で必要な情報に加工するライブラリです。DBを使わずにデータ処理をブラウザ内とする

関数と利用方法

  1. Butter.init() この関数は初期化に使用されます。例えば:
import Butter from './dist.js';
Butter.init()
  1. Butter.getHostDataList() この関数はホストのデータリストを取得するために使用されます。例:
const hostData = await Butter.getHostDataList()
console.log(hostData)
  1. Butter.getAgencyInfo(gtfs_id) 特定のGTFS IDに関連する機関情報を取得します。例:
const agencyInfo = await Butter.getAgencyInfo("your_gtfs_id")
console.log(agencyInfo)
  1. Butter.getBusStops(gtfs_id, version_id) 特定のGTFS IDとバージョンIDに関連するバス停を取得します。例:
const stops = await Butter.getBusStops("your_gtfs_id", "your_version_id")
console.log(stops)
  1. Butter.getTrips(gtfs_id, version_id) 特定のGTFS IDとバージョンIDに関連するバスの旅行情報を取得します。例:
const trips = await Butter.getTrips("your_gtfs_id", "your_version_id")
console.log(trips)
  1. Butter.getStopsBySubstring(substring) 特定の文字列を含むバス停を取得します。例:
const stops = await Butter.getStopsBySubstring("substring")
console.log(stops)
  1. Butter.getStopsWithinRadius(lat, lon, radius) 特定の緯度、経度、半径の範囲内にあるバス停を取得します。例:
const aroundStops = await Butter.getStopsWithinRadius(35.693906, 139.701504, 500)
console.log(aroundStops)
  1. Butter.getBusInfo(lat, lon) 特定の緯度、経度に関連するバスの情報を取得します。例:
const busInfo = await Butter.getBusInfo(35.693906, 139.701504)
console.log(busInfo)
  1. Butter.fetchTimeTableV1(gtfs_id, options) 特定のGTFS IDとオプションに基づいて時刻表情報を取得します。例:
let tt = await Butter.fetchTimeTableV1("your_gtfs_id", {
    date: "20230513",
    stop_ids: ["your_stop_id"]
})
console.log(tt)
  1. Butter.getComsumedOp() これまでに消費されたオペレーションの数を取得します。例:
console.log("COMSUMED OPERATIONS ARE", Butter.getComsumedOp())

注意:上記の例では、"your_gtfs_id", "your_version_id", "substring", "your_stop_id"などは実際の値に置き換える必要があります。

webpackのbuild方法

依存モジュールのインストール

npm install

build

npm run build