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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ember-link-or

v0.0.4

Published

Render a routeable link at small sizes or a choice of your component at larger ones

Readme

ember-link-or

This draft addon is an example of how to accomplish having a link for large screens that renders a component, but on smaller screens links to a seperate route.

This project is ~stolen~ inspired by Oli Griffith's 2017 Ember Conf talk about replicating native-ish behavior to generate a popover at larger screen sizes but render a link at smaller ones.

Usage

This addon provides a {{link-or}} component that works similarly to the standard {{link-to}} helper. While {{link-to}} uses positional params, {{link-or}} uses named parameters, because much the api is optional.

Papercuts ahead: While most of the functionality of {{link-to}} has been replicated here, there may be some rough patches.8

Basics

  {{#link-or routeName="alerts" routeArgs=model component="alert-list" componentArgs=model}}<span class="fa fa-alert"></span> Alerts {{/link-or}}

The routeName and routeArgs correspond to the first two params of {{link-to route id}}.

Pass the name of a valid component in component and provide any arguments via the componentArgs.

Media Query Support

By default, the addon renders the component provided at screen sizes below 768px, by setting the default size parameter to xsmall.

You can change the value by providing a xsmall, small, medium, keywords, or a pixel value.

  {{#link-or routeName="alerts" component="alert-list" size="medium"}} Link {{/link-or}}

or

  {{#link-or routeName="alerts" component="alert-list" size="989"}} Link {{/link-or}}

The keywords map to (these are the default Bootstrap media queries):

  xsmall: 768,
  small: 992,
  medium: 1200

Installation

ember install ember-link-or

Running

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.