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

eot-js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eot-js

Javascript heredoc syntax for create a multiline string

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
increased by220%
Maintainers
1
Weekly downloads
 
Created
Source

EOT-JS

Javascript heredoc syntax for create a multiline string

Install

NPM npm install eot-js --save

Bower bower install eot-js --save

Download here

How to use

var eot = require('eot-js');
var template = eot(function() {
	/*EOT
	
// your string here
	
	EOT*/
));

console.log(template);

Template engine integration

EOT-JS support template engine

var eot = require('eot-js');
var engine = require('your-template-engine');
var config = {
	templateEngine: 'engine-name',
	engine: engine, // context
};
var data = {
	name: 'Dida Nurwanda'
}

var template = eot(function() {
	/*EOT
Hallo {name}
	EOT*/
}, config, data);

// output
Hallo Dida Nurwanda
config api
  • templateEngine - template engine name
  • engine - template engine context
  • engineOptions - template engine options
  • format - output format text or javascript
  • trim - trim output

Contributor

Dida Nurwanda

Keywords

FAQs

Package last updated on 06 Mar 2017

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