https://github.com/windchime-yk/deno_ogp_parser
OGP Parser for Deno
https://github.com/windchime-yk/deno_ogp_parser
deno deno-module
Last synced: 5 months ago
JSON representation
OGP Parser for Deno
- Host: GitHub
- URL: https://github.com/windchime-yk/deno_ogp_parser
- Owner: windchime-yk
- License: mit
- Created: 2023-05-16T09:26:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-04T02:06:37.000Z (about 2 years ago)
- Last Synced: 2025-10-13T09:40:36.790Z (9 months ago)
- Topics: deno, deno-module
- Language: TypeScript
- Homepage: https://deno.land/x/ogp_parser
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deno_ogp_parser
[](https://codecov.io/gh/windchime-yk/deno_ogp_parser)
OGP Parser for Deno
## Usage
```typescript
import { parsedMeta } from "https://deno.land/x/ogp_parser/mod.ts"
const result = parsedMeta("https://example.com")
console.log(result.title) // -> "Example Domain"
```
If you want to restrict the allowed origins, use the `allowOrigins` option.
```typescript
import { parsedMeta } from "https://deno.land/x/ogp_parser/mod.ts"
const result = parsedMeta("https://example.com", {
allowOrigins: ["https://example.com"],
});
console.log(result.title) // -> "Example Domain"
```
## Recommends
Since metadata does not change frequently, we recommend caching the retrieved results in [Deno KV](https://deno.com/kv).