Socket
Socket
Sign inDemoInstall

schema-dts

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schema-dts

A TypeScript package with latest Schema.org Schema Typings


Version published
Weekly downloads
378K
increased by5%
Maintainers
1
Weekly downloads
 
Created

What is schema-dts?

The schema-dts npm package provides TypeScript definitions for Schema.org vocabulary, allowing developers to create structured data in a type-safe manner. This package is useful for generating JSON-LD scripts for SEO and other purposes.

What are schema-dts's main functionalities?

Creating a Person schema

This feature allows you to create a Person schema using TypeScript definitions. The code sample demonstrates how to define a person named John Doe who works as a Software Engineer for a company named Tech Company.

const person: schema.Person = {
  '@type': 'Person',
  name: 'John Doe',
  jobTitle: 'Software Engineer',
  worksFor: {
    '@type': 'Organization',
    name: 'Tech Company'
  }
};

Creating an Event schema

This feature allows you to create an Event schema using TypeScript definitions. The code sample demonstrates how to define an event named Tech Conference 2023, including its start date and location.

const event: schema.Event = {
  '@type': 'Event',
  name: 'Tech Conference 2023',
  startDate: '2023-11-01T09:00:00Z',
  location: {
    '@type': 'Place',
    name: 'Convention Center',
    address: '123 Main St, Anytown, USA'
  }
};

Creating a Product schema

This feature allows you to create a Product schema using TypeScript definitions. The code sample demonstrates how to define a product named Smartphone, including its brand and price.

const product: schema.Product = {
  '@type': 'Product',
  name: 'Smartphone',
  brand: {
    '@type': 'Brand',
    name: 'TechBrand'
  },
  offers: {
    '@type': 'Offer',
    price: '699.99',
    priceCurrency: 'USD'
  }
};

Other packages similar to schema-dts

Keywords

FAQs

Package last updated on 25 Nov 2020

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