Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zhead/schema

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zhead/schema - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

2

package.json
{
"name": "@zhead/schema",
"version": "0.6.2",
"version": "0.7.0",
"packageManager": "pnpm@7.8.0",

@@ -5,0 +5,0 @@ "author": "Harlan Wilton <harlan@harlanzw.com>",

@@ -1,2 +0,2 @@

# `@zhead/head`
# `@zhead/schema`

@@ -16,14 +16,7 @@ Typescript definitions for document `<head>`.

- `Head` - `<head>` schema. [head.ts](./src/head.ts)
- `Link` - `<link>` schema. [link.ts](./src/link.ts)
- `Meta` - `<meta>` schema. [meta.ts](./src/meta.ts)
- `MetaFlat` - `<meta>` schema as a flat object. [meta-flat.ts](./src/meta-flat.ts) (see `zhead` `unpackMeta` function)
- `Script` - `<script>` schema. [script.ts](./src/script.ts)
- `Style` - `<style>` schema. [style.ts](./src/style.ts)
See [head.ts](./src/head.ts) for the full list of types.
## Preview
```ts
export interface Head {
export interface Head<E extends MergeHead = MergeHead> {
/**

@@ -37,2 +30,6 @@ * The <title> HTML element defines the document's title that is shown in a browser's title bar or a page's tab.

/**
* Generate the title from a template.
*/
titleTemplate?: string | ((title?: string) => string)
/**
* The <base> HTML element specifies the base URL to use for all relative URLs in a document.

@@ -43,3 +40,3 @@ * There can be only one <base> element in a document.

*/
base?: Base
base?: Partial<Merge<E['base'], Base>>
/**

@@ -52,3 +49,3 @@ * The <link> HTML element specifies relationships between the current document and an external resource.

*/
link?: LinkEntries
link?: (Link & UnsafeKeys & Default<E['link']>)[]
/**

@@ -59,3 +56,3 @@ * The <meta> element represents metadata that cannot be expressed in other HTML elements, like <link> or <script>.

*/
meta?: MetaEntries
meta?: (Meta & UnsafeKeys & Default<E['meta']>)[]
/**

@@ -67,3 +64,3 @@ * The <style> HTML element contains style information for a document, or part of a document.

*/
style?: StyleEntries
style?: (Style & UnsafeKeys & Default<E['style']>)[]
/**

@@ -74,4 +71,24 @@ * The <script> HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code.

*/
script?: ScriptEntries
script?: (Script & UnsafeKeys & Default<E['script']>)[]
/**
* The <noscript> HTML element defines a section of HTML to be inserted if a script type on the page is unsupported
* or if scripting is currently turned off in the browser.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript
*/
noscript?: (Noscript & UnsafeKeys & Default<E['noscript']>)[]
/**
* Attributes for the <html> HTML element.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html
*/
htmlAttrs?: (HtmlAttributes & UnsafeKeys & Default<E['htmlAttrs']>)
/**
* Attributes for the <body> HTML element.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body
*/
bodyAttrs?: (BodyAttributes & UnsafeKeys & Default<E['bodyAttrs']>)
}
```
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