lit-html
Advanced tools
Comparing version 0.11.0-dev.3 to 0.11.0
@@ -17,5 +17,4 @@ /** | ||
(part: P): void; | ||
__litDirective?: true; | ||
} | ||
export declare const directive: <P = Part>(f: Directive<P>) => Directive<P>; | ||
export declare const isDirective: (o: any) => boolean; |
@@ -14,7 +14,8 @@ /** | ||
*/ | ||
const directives = new WeakMap(); | ||
export const directive = (f) => { | ||
f.__litDirective = true; | ||
directives.set(f, true); | ||
return f; | ||
}; | ||
export const isDirective = (o) => typeof o === 'function' && o.__litDirective === true; | ||
export const isDirective = (o) => directives.has(o); | ||
//# sourceMappingURL=directive.js.map |
{ | ||
"name": "lit-html", | ||
"version": "0.11.0-dev.3", | ||
"version": "0.11.0", | ||
"description": "HTML template literals in JavaScript", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -17,13 +17,13 @@ /** | ||
const directives = new WeakMap<any, Boolean>(); | ||
export interface Directive<P = Part> { | ||
(part: P): void; | ||
__litDirective?: true; | ||
} | ||
export const directive = <P = Part>(f: Directive<P>): Directive<P> => { | ||
f.__litDirective = true; | ||
directives.set(f, true); | ||
return f; | ||
}; | ||
export const isDirective = (o: any) => | ||
typeof o === 'function' && o.__litDirective === true; | ||
export const isDirective = (o: any) => directives.has(o); |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
322391
4706