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

@yes-chef/input-format

v0.0.9

Published

Format form inputs with currency or percentages with ease.

Downloads

14

Readme

README: Using Attributes in Webflow

Overview

This guide provides instructions on how to use specific attributes in Webflow to apply currency and percentage formatting without any coding.

Add this script to the HEAD of your webflow site settings or page settings

<script defer src="https://cdn.jsdelivr.net/npm/@yes-chef/[email protected]/dist/index.js"></script>

Attributes

  • currency: This attribute specifies the type of currency symbol you want to display with an input value. It uses the currencyCalc function to apply formatting.
  • percent: This attribute is used to format input values as percentages. It uses the percentFormat function to append a percentage symbol and handle input formatting.

Supported Currencies

The following is a list of supported currencies and their corresponding attribute values:

| Currency | Attribute Value | |--------------------|-----------------| | U.S. Dollar | dollar | | Euro | euro | | British Pound | pound | | Japanese Yen | yen | | Chinese Yuan | yuan | | Swiss Franc | swissFranc | | Canadian Dollar | cad | | Australian Dollar | aud | | New Zealand Dollar | nzd | | Korean Won | won | | Russian Ruble | ruble | | Indian Rupee | rupee | | South African Rand | rand | | Brazilian Real | real | | Philippine Peso | peso | | Turkish Lira | lira | | Swedish Krona | krona | | Indonesian Rupiah | rupiah | | Thai Baht | baht | | Polish Złoty | zloty |

How to Use

  1. Currency Formatting:

    1. Add an input element in your Webflow project.
    2. Set the attribute name as currency and the value as the desired currency type (e.g., dollar, euro). The value should match one of the currency symbols listed above.
    3. When a user types into this input, the value will automatically be formatted with the appropriate currency symbol.
  2. Percentage Formatting:

    1. Add an input element in your Webflow project.
    2. Set the attribute name as percent.
    3. When a user types into this input, the value will automatically be formatted as a percentage.

Note

Ensure that the provided scripts are linked or embedded in your Webflow project for these attributes to function correctly. If a currency symbol is not recognized, it will default to the U.S. Dollar symbol.