New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

template-strings

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

template-strings - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

cmd/index.js

27

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc