Skip to main content
Home

Built and signed on GitHub Actions

Works with
This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score94%
Downloads42/wk
Published3 weeks ago (1.10.0)

An ActivityPub/fediverse server framework

class Place
extends Object

Represents a logical or physical location. See 5.3 Representing Places for additional information.

Constructors

new
Place(
values: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?:
Object
| URL
| null
; audiences?: (Object | URL)[]; content?: ; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?: ; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?:
Image
| URL
| null
; icons?: (Image | URL)[]; image?:
Image
| URL
| null
; images?: (Image | URL)[]; replyTarget?:
Object
| Link
| URL
| null
; replyTargets?: ()[]; location?:
Object
| Link
| URL
| null
; locations?: ()[]; preview?:
Link
| Object
| URL
| null
; previews?: ()[]; published?: Temporal.Instant | null; replies?:
Collection
| URL
| null
; shares?:
Collection
| URL
| null
; likes?:
Collection
| URL
| null
; emojiReactions?:
Collection
| URL
| null
; startTime?: Temporal.Instant | null; summary?: ; summaries?: ((string | LanguageString))[]; tags?: ()[]; updated?: Temporal.Instant | null; url?:
URL
| Link
| null
; urls?: ((URL | Link))[]; to?:
Object
| URL
| null
; tos?: (Object | URL)[]; bto?:
Object
| URL
| null
; btos?: (Object | URL)[]; cc?:
Object
| URL
| null
; ccs?: (Object | URL)[]; bcc?:
Object
| URL
| null
; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: ; proofs?: (DataIntegrityProof | URL)[]; accuracy?: number | null; altitude?: number | null; latitude?: number | null; longitude?: number | null; radius?: number | null; units?:
"cm"
| "feet"
| "inches"
| "km"
| "m"
| "miles"
| URL
| null
; }
,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; },
)

Constructs a new instance of Place with the given values.

Properties

readonly
accuracy: number | null

Indicates the accuracy of position coordinates on a Place objects. Expressed in properties of percentage. e.g. "94.0" means "94.0% accurate".

readonly
altitude: number | null

Indicates the altitude of a place. The measurement units is indicated using the Place.units property. If Place.units is not specified, the default is assumed to be "m" indicating meters.

readonly
latitude: number | null

The latitude of a place.

readonly
longitude: number | null

The longitude of a place.

readonly
radius: number | null

The radius from the given latitude and longitude for a Place. The units is expressed by the Place.units property. If Place.units is not specified, the default is assumed to be "m" indicating "meters".

readonly
units:
"cm"
| "feet"
| "inches"
| "km"
| "m"
| "miles"
| URL
| null

Specifies the measurement units for the Place.radius and Place.altitude properties on a Place object. If not specified, the default is assumed to be "m" for "meters".

Methods

[Symbol.for("nodejs.util.inspect.custom")](
_depth: number,
options: unknown,
inspect: (
value: unknown,
options: unknown,
) => string
,
): string
protected
_getCustomInspectProxy(): Record<string, unknown>
clone(
values?: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?:
Object
| URL
| null
; audiences?: (Object | URL)[]; content?: ; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?: ; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?:
Image
| URL
| null
; icons?: (Image | URL)[]; image?:
Image
| URL
| null
; images?: (Image | URL)[]; replyTarget?:
Object
| Link
| URL
| null
; replyTargets?: ()[]; location?:
Object
| Link
| URL
| null
; locations?: ()[]; preview?:
Link
| Object
| URL
| null
; previews?: ()[]; published?: Temporal.Instant | null; replies?:
Collection
| URL
| null
; shares?:
Collection
| URL
| null
; likes?:
Collection
| URL
| null
; emojiReactions?:
Collection
| URL
| null
; startTime?: Temporal.Instant | null; summary?: ; summaries?: ((string | LanguageString))[]; tags?: ()[]; updated?: Temporal.Instant | null; url?:
URL
| Link
| null
; urls?: ((URL | Link))[]; to?:
Object
| URL
| null
; tos?: (Object | URL)[]; bto?:
Object
| URL
| null
; btos?: (Object | URL)[]; cc?:
Object
| URL
| null
; ccs?: (Object | URL)[]; bcc?:
Object
| URL
| null
; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: ; proofs?: (DataIntegrityProof | URL)[]; accuracy?: number | null; altitude?: number | null; latitude?: number | null; longitude?: number | null; radius?: number | null; units?:
"cm"
| "feet"
| "inches"
| "km"
| "m"
| "miles"
| URL
| null
; }
,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
): Place

Clones this instance, optionally updating it with the given values.

toJsonLd(options?: { format?: "compact" | "expand"; contextLoader?: DocumentLoader; context?:
string
| Record<string, string>
| (string | Record<string, string>)[]
; }
): Promise<unknown>

Converts this object to a JSON-LD structure.

Static Properties

readonly
typeId: URL

The type URI of Place: https://www.w3.org/ns/activitystreams#Place.

Static Methods

protected
__fromJsonLd__Place__(
json: unknown,
span: Span,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; baseUrl?: URL; },
): Promise<Place>
fromJsonLd(
json: unknown,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; baseUrl?: URL; },
): Promise<Place>

Converts a JSON-LD structure to an object of this type.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { Place } from "@fedify/fedify";
or

Import directly with a jsr specifier

import { Place } from "jsr:@fedify/fedify";

Add Package

pnpm i jsr:@fedify/fedify
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fedify/fedify

Import symbol

import { Place } from "@fedify/fedify";

Add Package

yarn add jsr:@fedify/fedify
or (using Yarn 4.8 or older)
yarn dlx jsr add @fedify/fedify

Import symbol

import { Place } from "@fedify/fedify";

Add Package

vlt install jsr:@fedify/fedify

Import symbol

import { Place } from "@fedify/fedify";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { Place } from "@fedify/fedify";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { Place } from "@fedify/fedify";