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

automat

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

automat

String and markup formatter.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
84
increased by18.31%
Maintainers
1
Weekly downloads
 
Created
Source

automat

String and markup formatter.

Features

  • String formatting
    • Text substitution via numbered text substitution patterns
    • Substitution patterns overrideable
    • Optional Extraction of a template from a function comment
    • Optional HTML encoding of substituted text
  • DOM node convenience methods convert your formatted markup to DOM nodes and:
    • Return them in a new <div>...</div> element; or
    • Return them in an existing HTMLElement you provide.
    • Append/insert them into an existing HTMLElement you provide.

Update history

v1.2.0:

  • Removed ability to extract a template from a function body comment. Comment was elided on minification making this device unusable.
  • Fixed problem with .firstChild() and .firstElement() methods.

Examples

See tests.

API documentation

Detailed API docs can be found here.

Demo

A demo can be found here.

CDN versions

To use in a browser, you have two options:

  1. Incorporate the node module into your own browserified project.
  2. Use the browserified versions automat.js or automat.min.js available on the Github Pages CDN.

Submodules

See the note Regarding submodules for important information on cloning this repo or re-purposing its build template.

FAQs

Package last updated on 21 May 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