template-strings
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "template-strings", | ||
"version": "0.0.4", | ||
"author": { | ||
"name": "Jeremy Karlsson", | ||
"email": "karlsson@jeremy.se" | ||
}, | ||
"description": "String template", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"devDependencies": { | ||
"node-fetch": "^1.6.3" | ||
}, | ||
@@ -15,8 +16,12 @@ "keywords": [ | ||
], | ||
"author": "Jeremy Karlsson <jeremy.karlsson@tidal.com>", | ||
"license": "UNLICENCED", | ||
"devDependencies": { | ||
"node-fetch": "^1.6.3", | ||
"whatwg-fetch": "^2.0.2" | ||
} | ||
"license": "MIT", | ||
"main": "cmd/index.js", | ||
"module": "esm/index.mjs", | ||
"name": "template-strings", | ||
"scripts": { | ||
"test:node-esm": "node --experimental-modules esm/test.mjs", | ||
"test:node-cmd": "node cmd/test.js", | ||
"test": "npm run test:node-cmd && npm run test:node-esm" | ||
}, | ||
"version": "0.0.5" | ||
} |
@@ -13,3 +13,3 @@ # Template Strings | ||
Full usage example; | ||
Usage example (Node); | ||
@@ -27,2 +27,28 @@ ``` | ||
Usage example (Node ESM); | ||
``` | ||
import stringTemplator from 'template-strings'; | ||
const template = '<div>Hello ${this.name}!</div>'; | ||
const json = { name: 'World' }; | ||
const html = String.template(template, json); | ||
console.log(html); | ||
``` | ||
Usage example (Browser ESM); | ||
``` | ||
import stringTemplator from 'https://unpkg.com/template-strings?module'; | ||
const template = '<div>Hello ${this.name}!</div>'; | ||
const json = { name: 'World' }; | ||
const html = String.template(template, json); | ||
console.log(html); | ||
``` | ||
## Why? | ||
@@ -29,0 +55,0 @@ |
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
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
5459
1
6
0
46
2
112
3