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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-cli-super-number

v0.1.0

Published

Ember Super Number is a component that let's you intelligently deal with increment and decrement controls on a given input. It handles all sorts of configurations, and user input sanitization. You can see a demo below. Let me know what you think!

Downloads

4

Readme

Ember Super Number

Ember Super Number is a component that let's you intelligently deal with increment and decrement controls on a given input. It handles all sorts of configurations, and user input sanitization. You can see a demo below. Let me know what you think!

This is mostly feature compatible with Shane Riley's super number plugin with some minor differences around precision.

Demo

example image

Installation

npm install ember-cli-super-number --save-dev

Usage

{{super-number id="standard"}}

{{super-number id="min" min=1}}

{{super-number id="max" max=1}}

{{super-number id="step" step=5}}

{{super-number id="precision" precision=3}}

{{super-number id="scale" scale=2}}

{{super-number id="loop" loop=true min=1 max=9}}

{{super-number id="max-hold" max=3}}

Options can be composed interchangeably. They are:

  • Min - The lowest number you'd like to be reachable
  • Max - The largest number you'd like to be reachable
  • Loop (requisites min,max) - Behavior that states when value reaches min or max will cycle around to its opposite.
  • Precision - Total number of digits you'd like to represent your value as.
    • examples:
      • 30000 is a precision of 5
      • 12 is a precision of 2
      • 0001 is a precision of 4
  • Scale - number of digits to the right of the decimal to represent in value
    • examples:
      • 2.00 is a scale of 2
      • 3.1091 is a scale of 4
  • Step - Sets the number to add or subtract to value each time increment action is triggered (on click or arrow keys)
  • Value - The intial value. You will likely set this something property on your context controller to do meaningful actions with. (defaults to 0)

Lastly

Thanks!

If you'd like to contribute just open a PR. :)))