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

vue-filters-collection

v0.5.0

Published

A collection of handy vuejs filters.

Downloads

37

Readme

vue-filters-collection :boom:

codesandbox example: vuejs-filters.

vue-filters-collection is a collection of filters that help transform/convert strings in a more convenient way. the following is a list of all the available filters (For now)

  • camelcasToReadable - Will converts a camelcase string to a readable string JamesMay will be James May

  • capitalize - takes an argument, first capitalizies the first character/s in a string. eg james may will be James May if no argument is passed the whole string will be converted to uppercase e.g james may will be JAMES MAY

  • decapitalize - converts the whole string to small letters.

  • htmlEntities - substitutes " htmlentity with a double quote.

  • replaceAll - finds and replace all occurrences for a single string.

To install

npm install vue-filters-collection
or
yarn add vue-filters-collection

Load the plugin to your project

import Vue from 'vue';
import vueFiltersCollection from 'vue-filters-collection';

Vue.use(vueFiltersCollection);

Examples

<template>
  <div id="app">
    <div>{{ pCapitalize | capitalize }}</div>
    //JAMES MAY
    <div>{{ pCapitalize | capitalize("first") }}</div>
    //Jame May

    <div>{{ pDecapitalize | decapitalize }}</div>
    //james may
    <div>{{ pEntities | htmlEntities }}</div>
    //Hello "james" may
    <div>{{ pCamelcase | camelcase }}</div>
    //Asta Lavista Baby

    <div>
      {{ pReplaceAll }} :{{ pReplaceAll | replaceAll("this", "that") }} -
      replace all
    </div>
    //that is not a thattle, that is a cactus

    <div v-for="key in entities" :key="key">
      <h3>
        {{ key }} --------------
        <span class="ent">{{ key | htmlEntities }}</span>
      </h3>
    </div>
    {{ pEntities }} :{{ pEntities | htmlEntities }} - htmlEntities
  </div>
</template>

<script>
export default {
  name: "app",
  data() {
    return {
      pCapitalize: "james may",
      pDecapitalize: "JAMES MAY",
      pEntities: "Hello &quot;james&quot; may",
      pCamelcase: "astaLavistaBaby",
      pReplaceAll: "This is not a thistle, THIS is a cactus",

      //new html entities
      entities: {
        quo: "&quot; or &#34;",
        excla: "&excl; or &#33;",
        hash: "&num; or &#35;",
        dolle: "&dollar; or &#36;",
        perc: "&percnt; or &#37;",
        amp: "&amp; or &#38;",
        apo: "&apos; or &#39;",
        lpar: "&lpar; or &#40;",
        rpar: "&rpar; or &#41;",
        ast: "&ast; or &#42;",
        commat: "&&commat; or &#64;",
        space: "&nbsp; or &#160;",
        copy: "&copy; or &#169;",
        pound: "&pound; or &#163;",
        euro: "&euro; or &#8364;",
        micro: "&micro; or &#181;",
      },
    };
  },
};
</script>

How to use these vuejs filters in your script (code)


doTheBoogie(){
     console.log(this.$options.filters.capitalize(this.pCapitalize)); //JAMES MAY
     //or
     console.log(this.$capitalize("james"));
     // ......
}

Note!