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

et-string

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

et-string

Basic string template for et-tempate.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

et-string

Desription

It is the basic template for et-template.

It tranlsate the templete string to a function-string to assemble et-template

Usage

The templete string.

var _ = require('lodash');

if (it.length > 1) {
  <% It just has so many items. %>
} else if (it.length === 1) {
  <% It just has one item. %>
} else {
  <% It is empty list; %>
}

The result string.

var _ = require('lodash');

exports.template = function (it) {
  var result = '';
  if (it.length > 1) {
    result += ` It just has so many items. `;
  } else if (it.length === 1) {
    result += ` It just has one item. `;
  } else {
    result += ` It is empty list; `;
  }
  return result;
}

Just replace '<%' and '%>' to es6 teamplte then finish the et-string.

Attention

  • Do not use es6 template literals ` in et-string.
  • Use require to import dependecies and write on the header of codes.

License

MIT

Keywords

FAQs

Package last updated on 29 Feb 2016

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