New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

monkberry-standalone

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monkberry-standalone

Standalone build of Monkberry for use in browsers.

latest
Source
npmnpm
Version
4.0.8
Version published
Maintainers
1
Created
Source

Monkberry Standalone

Standalone build of Monkberry for use in browsers.

CDN

https://cdn.jsdelivr.net/monkberry-standalone/latest/monkberry.min.js

other versions on jsDelivr

Usage

Include it to your page.

<script src="https://cdn.jsdelivr.net/monkberry-standalone/latest/monkberry.min.js"></script>

Define template with text/monkberry.

<script type="text/monkberry" id="component">
    <h1>
        Hello, {{ name }}!
    </h1>
</script>

And you now can get access to component template.

var view = Monkberry.render(component, document.body);

Mark node with data-monkberry attribule and it will be replaced with real view of Monkberry.

<div data-monkberry="app">
    <component name="world"></component>
    <p>This is {{ name || 'noname' }}.</p>
</div>

To get view instanse call Monkberry.getView method.

  var view = Monkberry.getView('app');
  view.update({name: 'Anton'});

Also with monkberry-standalone you can compile source code to JavaScript code.

var code = '<div>{{ text }}</div>';
var source = Monkberry.compile('name', code);

Keywords

monkberry

FAQs

Package last updated on 16 Sep 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