New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

schema-dot-org-types

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schema-dot-org-types

Classes with flow types to encapsulate schema.org markup attributes.

latest
Source
npmnpm
Version
0.1.11
Version published
Weekly downloads
9
125%
Maintainers
1
Weekly downloads
 
Created
Source

schema-dot-org-types

JS class package representing Schema.org types.

This is an unofficial attempt at assembling the Schema.org types into a light-weight JavaScript package that faciliates creating proper instances of schema markup with the support of flow type annotations.

Usage

Classes are exported via the index. Flow types are exported via lib/types.

The files are transpiled and should be compatible with modern browsers. The immediate goal is for them to be used in React apps and packaged for the browser with webpack by the consuming application.

npm install schema-dot-org-types
//@flow
import {VideoObject} from 'schema-dot-org-types';
import type {VideoObjectType} from 'schema-dot-org-types/lib/types';

Adding Types

The schema.org types contained in the src/generated folder were created using the transform-schema script in the tools folder. You can add files for any additional types by invoking

npm run transform-schema -- <SchemaType>

At present, it's necessary to edit the types.js and index.js files to add the desired types once the class files are generated.

Keywords

schema.org

FAQs

Package last updated on 29 Jun 2018

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