PHPackages                             alcalyn/js-vars - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. alcalyn/js-vars

ActiveLibrary[Localization &amp; i18n](/categories/localization)

alcalyn/js-vars
===============

Class to contains variables, routes and translations to pass to javascript.

v1.0(11y ago)0450MITPHPPHP &gt;=5.3.2

Since Mar 1Pushed 11y agoCompare

[ Source](https://github.com/alcalyn/js-vars)[ Packagist](https://packagist.org/packages/alcalyn/js-vars)[ Docs](https://github.com/alcalyn/js-vars)[ RSS](/packages/alcalyn-js-vars/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

JsVars
======

[](#jsvars)

Simple class to pass variables to javascript.

Installation
------------

[](#installation)

Using composer:

```
{
    "require": {
        "alcalyn/js-vars": "dev-master"
    }
}

```

Usage
-----

[](#usage)

This class can be used as service (on Symfony or Silex) to easily pass variables to Javascript from controllers, or from another services.

Coupled to symfony/translation or symfony/routing, you can pass translations or urls.

See [Integration to Symfony2](doc/integ_symfony2.md), or [Integration to Silex](doc/integ_silex.md).

License
-------

[](#license)

This bundle is under the MIT license. See the complete license:

[License](LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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

4096d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f0c4d65197a7aed6ecc8fdedd5a097c7238c9be19aca08c92c05d38fd8c29e?d=identicon)[alcalyn](/maintainers/alcalyn)

---

Top Contributors

[![alcalyn](https://avatars.githubusercontent.com/u/1588144?v=4)](https://github.com/alcalyn "alcalyn (8 commits)")

---

Tags

symfonyi18njavascripttranslationroutingservice

### Embed Badge

![Health badge](/badges/alcalyn-js-vars/health.svg)

```
[![Health](https://phpackages.com/badges/alcalyn-js-vars/health.svg)](https://phpackages.com/packages/alcalyn-js-vars)
```

###  Alternatives

[willdurand/js-translation-bundle

A pretty nice way to expose your translation messages to your JavaScript.

58917.1M55](/packages/willdurand-js-translation-bundle)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

42510.8M63](/packages/jms-translation-bundle)

PHPackages © 2026

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