npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

marionette-decorators

v1.1.2

Published

Marionette decorators

Downloads

45

Readme

Marionette Decorators npm version

Table of contents

Requirements

You will require babel's syntax-decorators babel to use decorators

Examples

Example usages (If you need more info on what they're referring to, look at marionette documentation on those functions/objects)

appRoute

Set an appRoute for marionette router example

import { appRoute } from "marionette-decorators";
import { AppRouter } from "marionette";

class MyRoute extends AppRouter {
    
    @appRoute("myRoute(/)")
    onMyRoute (params) {
        /** Show the page **/
    }
    
}

export default MyRoute;

attribute

Set an any attribute before app is initialized example

import { attribute } from "marionette-decorators";
import { View } from "marionette";

@attribute("isValid", true)
class MyView extends View {
    
    initialize (params) {
        /** Set is valid to false **/
        this.isValid = false;
    }
    
}

export default MyView;

attributes

Setup any number of attributes before app is initialized example

import { attributes } from "marionette-decorators";
import { View } from "marionette";

@attributes({
    isValid: true,
    model: new Backbone.Model()
})
class MyView extends View {
    
    initialize (params) {
        /** Set is valid to false **/
        this.isValid = false;
        this.model.set("Hello", "World");
    }
    
}

export default MyView;

className

Pass in a string to set the className attribute before initialization example

import { className } from "marionette-decorators";
import { View } from "marionette";

@className("my-view")
class MyView extends View { }

export default MyView;

controller

Set the controller for marionette the route example

import { controller } from "marionette-decorators";
import { AppRouter } from "marionette";
import MyRouteController from "./controller";

@controller(new MyRouteController)
class MyRoute extends AppRouter { }

export default MyRoute;

tagName

Pass in a string to set the tagName attribute before initialization example

import { tagName } from "marionette-decorators";
import { View } from "marionette";

@tagName("ul")
class MyView extends View { }

export default MyView;

on

Add an event listener into your marionette view example

import { tagName, on } from "marionette-decorators";
import { View } from "marionette";

@tagName("li")
class MyView extends View {
    
    @on("click li")
    onListItemClick (event) {
        console.log(event);
    }
    
}

export default MyView;

ui

Set your UI object in the view example

import { className, on, ui } from "marionette-decorators";
import { View } from "marionette";

@ui({
    listItem: "li"
})
class MyView extends View {
    
    @on("click @ui.listItem")
    onListItemClick (event) {
        console.log(event);
    }
    
}

export default MyView;