You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Jackson Morgan 1b1e729a51 v1.0.0-alpha.33 2 weeks ago
..
src Created a shim for @rdfjs libraries 4 months ago
test chore: bump CSS server versions 3 months ago
.eslintrc init solid-type-index package 8 months ago
.gitignore init solid-type-index package 8 months ago
LICENSE.txt init solid-type-index package 8 months ago
README.md Added documentation in Readme 8 months ago
package.json v1.0.0-alpha.33 2 weeks ago
tsconfig.cjs.json esm conversion for solid-type-index 4 months ago
tsconfig.esm.json esm conversion for solid-type-index 4 months ago
vitest.config.js esm conversion for solid-type-index 4 months ago

README.md

@ldo/solid-type-index

A library to handle type indexes with LDO.

Installation

npm i @ldo/solid-type-index @ldo/solid

Usage

import { initTypeIndex } from "@ldo/solid-type-index";
import { createSolidLdoDataset } from "@ldo/solid"; 

async function main() {
  const myWebId = "https://example.com/profile/card#me";
  const solidLdoDataset = createSolidLodDataset();

  // Initialize a type index for a webId in case it isn't initialized
  await initTypeIndex(myWebId, { solidLdoDataset });

  // Get Type Registrations
  const typeRegistrations = await getTypeRegistrations(WEB_ID, { 
    solidLdoDataset,
  });

  // Get Instance Uris (the URIs for resources that contain an instance of a
  // class)
  const bookmarkUris: string[] = await getInstanceUris(
    "http://www.w3.org/2002/01/bookmark#Bookmark",
    typeRegistrations,
    { solidLdoDataset }
  );

}
main();

Sponsorship

This project was made possible by a grant from NGI Zero Entrust via nlnet. Learn more on the NLnet project page.

nlnet foundation logo NGI Zero Entrust Logo

Liscense

MIT