Socket
Socket
Sign inDemoInstall

@iiif/presentation-2

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iiif/presentation-2

A set of types that describe the format of the IIIF Presentation 2.1.1 specification as accurately as possible. Types are also available for [IIIF Presentation 3](https://github.com/IIIF-Commons/presentation-3-types)


Version published
Maintainers
4
Created
Source

IIIF Presentation 2 types

A set of types that describe the format of the IIIF Presentation 2.1.1 specification as accurately as possible. Types are also available for IIIF Presentation 3

Installation:

$ npm i @iiif/presentation-2

Installation (yarn):

$ yarn add @iiif/presentation-2

Usage (Typescript):

import { Manifest } from '@iiif/presentation-2';

const manifest = getManifestFromSomewhere() as Manifest;

function doSomethingWithManifest(manifest: Manifest) {
 // ...
}

Usage (Javascript):

/**
 * @typedef { import("@iiif/presentation-2").Manifest } Manifest
 */

/**
 * @type {Manifest}
 */
const manifest = {};


/**
 * @param manifest {Manifest}
 */
function doSomethingWithManifest(manifest) {
    console.log(manifest.label);
}

// You can also inline the import:

/**
 * @type {import("@iiif/presentation-2").Manifest}
 */
const manifest2 = {};

This will enable types completions in VSCode and IDEA, along with inline documentation from the IIIF specification: Screenshot 2021-03-28 at 17 11 14

Support

The following types are supported:

  • Manifest
  • Collection
  • Canvas
  • Annotation (Open Annotation)
  • Annotation List (Open Annotation)
  • Layer
  • Content Resource
  • Provider
  • Range
  • Service
Partial / Abstract types

These types are building blocks of other types.

TypeDescription
TechnicalPropertiesThe technical properties of IIIF in a map TechnicalProperties['id']
DescriptivePropertiesThe descriptive properties of IIIF in a map DescriptiveProperties['label']
LinkingPropertiesThe linking properties of IIIF in a map LinkingProperties['related']
PagingPropertiesThe paging properties of IIIF in a map PagingProperties['first']
RightsPropertiesThe structural properties of IIIF in a map RightsProperties['attribution']

FAQs

Package last updated on 29 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc