PHPackages                             korneil/jtmp-assetic-filter-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. korneil/jtmp-assetic-filter-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

korneil/jtmp-assetic-filter-bundle
==================================

JTMP AsseticFilterBundle

v0.1.0(12y ago)1250MITPHPPHP &gt;=5.3.3

Since Sep 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/korneil/JTMPAsseticFilterBundle)[ Packagist](https://packagist.org/packages/korneil/jtmp-assetic-filter-bundle)[ Docs](https://github.com/korneil/JTMPAsseticFilterBundle)[ RSS](/packages/korneil-jtmp-assetic-filter-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

JTMP Assetic Filter Bundle
==========================

[](#jtmp-assetic-filter-bundle)

A small javascript template engine, that creates JSON object from template, inlined in javascript between and tags.

Install
-------

[](#install)

```
// composer.json
"require": {
    ...
    "korneil/jtmp-assetic-filter-bundle": "dev-master",
    ...
}

```

Register
========

[](#register)

```
    // app/AppKernel.php
    $bundles = array(
        ...
        new Korneil\JTMPAsseticFilterBundle\KorneilJTMPAsseticFilterBundle(),
        ...
    );

```

Usage
=====

[](#usage)

**Filter name:** jtmp

Example .js file:

// .../app.js

```
var tmp=
  _{main}
    Name: ${name}

    ?{condition}
      true
    ?{}

    ?{greaterThanOne>1}
      Greater than one.
    !{}
      Not greater than one.
    ?{}

    @{keyvalue|key|value}
      ${key}: ${value};
    @{}

    Embed: ^{other}
  _{}

  _{other}
  You can grab this text by invoking tmp.other(); Right ${name}?
  _{}
;

var result=tmp.main({
  name:"neil",
  numbers:[1,2,3],
  condition:true,
  greaterThanOne:2,
  keyvalue:{
    one:1,
    two:2
  }
});

console.log(result);

```

Twig:

```
{% javascripts filter="jtmp"
    '@AcmeBundle/Resources/public/js/*.js'
    %}

{% endjavascripts %}

```

Output:

```
Name: neil  true   Greater than one.   one: 1;  two: 2;  Embed: You can grab this text by invoking tmp.other(); Right neil?

```

Generated .js file:

```
var tmp={"main":function(x){r="";r+="Name: ";r+=x.name;r+=" ";if(x.condition){r+=" true ";}r+=" ";if(x.greaterThanOne>1){r+=" Greater than one. ";}else{r+=" Not greater than one. ";}r+=" ";for(x.key in x.keyvalue){x.value=x.keyvalue[x.key];r+=" ";r+=x.key;r+=": ";r+=x.value;r+="; ";}r+=" Embed: ";r+=this["other"](x);return r;},"other":function(x){r="";r+="You can grab this text by invoking tmp.other(); Right ";r+=x.name;r+="?";return r;}};

var result=tmp.main({
  name:"neil",
  numbers:[1,2,3],
  condition:true,
  greaterThanOne:2,
  keyvalue:{
    one:1,
    two:2
  }
});

console.log(result);

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4605d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8825151d9411113a0987a7c4e6a8109677bf05c1d92c4dac6da4a4a7a5b21db3?d=identicon)[korneil](/maintainers/korneil)

---

Top Contributors

[![korneil](https://avatars.githubusercontent.com/u/1575684?v=4)](https://github.com/korneil "korneil (7 commits)")

---

Tags

symfonybundlejavascripttemplatefilterassetic

### Embed Badge

![Health badge](/badges/korneil-jtmp-assetic-filter-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/korneil-jtmp-assetic-filter-bundle/health.svg)](https://phpackages.com/packages/korneil-jtmp-assetic-filter-bundle)
```

###  Alternatives

[endroid/qr-code-bundle

Endroid QR Code Bundle

32110.6M17](/packages/endroid-qr-code-bundle)[yellowskies/qr-code-bundle

Symfony Barcode &amp; QR Code Generator Bundle with Twig extension

36682.9k](/packages/yellowskies-qr-code-bundle)[nucleos/antispam-bundle

This bundle provides some basic features to reduce spam in symfony forms.

52105.1k](/packages/nucleos-antispam-bundle)[cg/kint-bundle

This bundle lets you use the Kint function in your Twig templates. Kint is a print\_r() replacement which produces a structured, collapsible and escaped output

22125.8k1](/packages/cg-kint-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
