static-params
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -18,4 +18,4 @@ 'use strict'; | ||
for (let c = 0, j = 0, i = 1, {length} = arguments; i < length; i++) { | ||
if (arguments[i] instanceof Static) | ||
t[c] += arguments[i].v + template[i]; | ||
if (arguments[i] instanceof String) | ||
t[c] += arguments[i] + template[i]; | ||
else { | ||
@@ -29,3 +29,3 @@ v[j++] = i; | ||
const asStatic = value => new Static(value); | ||
const asStatic = value => new String(value); | ||
@@ -35,3 +35,1 @@ exports.asStatic = asStatic; | ||
exports.asTag = asTag; | ||
function Static(v) { this.v = v; } |
@@ -17,4 +17,4 @@ const cache = new WeakMap; | ||
for (let c = 0, j = 0, i = 1, {length} = arguments; i < length; i++) { | ||
if (arguments[i] instanceof Static) | ||
t[c] += arguments[i].v + template[i]; | ||
if (arguments[i] instanceof String) | ||
t[c] += arguments[i] + template[i]; | ||
else { | ||
@@ -28,6 +28,4 @@ v[j++] = i; | ||
const asStatic = value => new Static(value); | ||
const asStatic = value => new String(value); | ||
export {asStatic, asParams, asTag}; | ||
function Static(v) { this.v = v; } |
{ | ||
"name": "static-params", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A general purpose utility to allow interpolation values as static parts of a template literal tag", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
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
12746
151