static-params
Advanced tools
Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "static-params", | ||
"version": "0.0.0", | ||
"description": "", | ||
"version": "0.0.1", | ||
"description": "A general purpose utility to allow interpolation values as static parts of a template literal tag", | ||
"main": "./cjs/index.js", | ||
@@ -15,3 +15,7 @@ "scripts": { | ||
}, | ||
"keywords": ["template", "tag", "dynamic"], | ||
"keywords": [ | ||
"template", | ||
"tag", | ||
"dynamic" | ||
], | ||
"author": "Andrea Giammarchi", | ||
@@ -37,3 +41,11 @@ "license": "ISC", | ||
}, | ||
"unpkg": "min.js" | ||
} | ||
"unpkg": "min.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/WebReflection/static-params.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/WebReflection/static-params/issues" | ||
}, | ||
"homepage": "https://github.com/WebReflection/static-params#readme" | ||
} |
@@ -61,1 +61,22 @@ # static-params | ||
``` | ||
Accordingly, it is a *very bad idea* to wrap `uhtml`, `lighterhtml`, or any similar library once, as the use case for dynamic tags, re-mapped as static content, is not so common, and every other common use case would be penalized. | ||
It is then suggested to confine this utility as opposite of wrapping template literal tags everywhere. | ||
```js | ||
import {render, html} from 'uhtml'; | ||
import {asStatic, asTag} from 'static-params'; | ||
// use the specialized shtml only when needed | ||
const shtml = asTag(html); | ||
const el = asStatic('ul'); | ||
render(document.body, shtml` | ||
<${el}>${ | ||
// use html for every other common use case | ||
list.map(text => html`<li>${text}</li>`) | ||
}</${el}> | ||
`); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
10013
9
0
1
82
0