Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanktionsfrei/shared-fax-template

Package Overview
Dependencies
Maintainers
7
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanktionsfrei/shared-fax-template

📘 Main fax template to be shared between frontend & backend and to be consumed by handlebars

  • 3.2.6
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

shared-fax-template

📘 Main fax template to be shared between frontend & backend and to be consumed by handlebars

The idea behind this is that we can share the main template between the cronjobs and the frontend, making it easier for everyone to maintain the text content.

This includes the regular node build and one build for the browser.

Browser

Include ./dist/fax-template.js as script in your HTML page. It exports the precompiled template to Handlebars.templates.fax

<html>
  <body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.6/handlebars.runtime.min.js"></script>
    <script src="/assets/shared-fax-template/dist/fax-template.js"></script>
    <script>
      console.log(Handlebars.templates.fax({firstName: 'Robin'}))
    </script>
  </body>
</html>

Node

In node it's exported as regular CommonJS module.

package.json
"dependencies": {
  "shared-fax-template": "sanktionsdev/shared-fax-template"
}
Your code
const Handlebars = require('handlebars')
const faxTemplate = require('shared-fax-template')

const template = Handlebars.compile(window.faxTemplate)
console.log(template({firstName: 'Robin'}))

FAQs

Package last updated on 07 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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