createMeta()function
createMeta(meta: PossibleMeta, caller: AnyCaller = createMeta): Meta
| Param | Type | |
|---|---|---|
meta | PossibleMeta | The input PossibleMeta to resolve. required |
.root | PossibleURL | |
.url | PossibleURI | |
.params | PossibleURIParams | Set the params in the URL (not merged with existing params). - Added to url after it is resolved.- Baseically readonly |
.links | PossibleMetaLinks | Set of input meta <link /> tags in { rel: href } format, before hrefs are resolved. readonly |
.modules | PossibleMetaAssets | Set of input linked assets in (href)[] format, before hrefs are resolved. readonly |
.scripts | PossibleMetaAssets | Set of input linked assets in (href)[] format, before hrefs are resolved. readonly |
.stylesheets | PossibleMetaAssets | Set of input linked assets in (href)[] format, before hrefs are resolved. readonly |
caller | AnyCaller | Function to attribute thrown URL-resolution errors to (defaults to createMeta). Defaults to createMeta |
Create a fully-formed Meta from a PossibleMeta.
- Like
mergeMeta()but with no previousMetato merge into — initialises meta from scratch.
Examples
createMeta({ app: "Manchester Runners", url: "https://run.com" })