https://github.com/ringsaturn/tzf-wasm
https://github.com/ringsaturn/tzf-wasm
tzf
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ringsaturn/tzf-wasm
- Owner: ringsaturn
- License: mit
- Created: 2024-04-22T03:35:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-21T13:53:23.000Z (7 months ago)
- Last Synced: 2024-11-30T23:43:03.362Z (6 months ago)
- Topics: tzf
- Language: Rust
- Homepage: https://www.npmjs.com/package/tzf-wasm
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `tzf-wasm` [](https://www.npmjs.com/package/tzf-wasm)
A fast library to find the timezone of a given location using WebAssembly for
JavaScript, powered by [`tzf-rs`](https://github.com/ringsaturn/tzf-rs).## Use in HTML
```html
tzf-web Example
import init, {
WasmFinder,
} from "https://www.unpkg.com/[email protected]/tzf_wasm.js";let finder;
async function loadWasm() {
await init();
finder = new WasmFinder();
const lng = -74.0060;
const lat = 40.7128;
const timezone = finder.get_tz_name(lng, lat);
console.log(`Timezone for (${lat}, ${lng}): ${timezone}`);
}loadWasm();
```
For a simple web page, see .
## LICENSE
This project is licensed under the [MIT license](./LICENSE). The data is
licensed under the
[ODbL license](https://github.com/ringsaturn/tzf-rel/blob/main/LICENSE), same as
[`evansiroky/timezone-boundary-builder`](https://github.com/evansiroky/timezone-boundary-builder)