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

jquery-data-filter-js

v1.0.8

Published

Filter object by data or data has specific data value

Downloads

61

Readme

GodahTech - Jquery Data Filter JS

🛡 Pode Confiar

godahtech GitHub Known Vulnerabilities npm Build Status

GitHub file size in bytes GitHub file size in bytes GitHub issues GitHub Releases

📦 Instalação

npm i jquery-data-filter-js

🔨 Usando:

HTML

<div id="person-list">
    <p class="filter-me" data-age="12">
        Henrique, age 12
    </p>
    <p class="filter-me" data-age="15">
        Noop, age 15
    </p>
    <p class="filter-me" data-age="14">
        Raquel, age 14
    </p>
    <p class="filter-me" data-age="14">
        Godoy, age 14
    </p>
    <p class="filter-me" data-city="São Paulo">
        Godoy
    </p>
    <p class="filter-me" data-city="Paraíba">
        Henrique
    </p>
    <p class="filter-me" data-city="Paraíba">
        Goreth
    </p>
    <p class="filter-me" data-city="Paraíba">
        Iracy
    </p>
    <p class="filter-me" data-city="Paraíba">
        Raquel
    </p>
    <p class="filter-me" data-city="São Paulo">
        Leandro
    </p>
</div>

JAVASCRIPT

    $(document).ready(function () {

        console.log($(".filter-me").filterData("person").length);
        //Output: 0

        console.log($(".filter-me").filterData("age").length);
        //Output: 4

        console.log($(".filter-me").filterData("age", 12).length);
        //Output: 1
        
        console.log($(".filter-me").filterData("age", 14).first().text());
        //Output: Raquel, age 14

        console.log($(".filter-me").filterData("age", 14, 10).first().text("Raquel, age 10").text());
        //Output: Raquel, age 10
        
        console.log($(".filter-me").filterData("age", 10).length);
        //Output: 2
        
        console.log($(".filter-me").filterData("age", 14).length);
        //Output: 0

        console.log($(".filter-me").filterData("city").length);
        //Output: 6

        console.log($(".filter-me").filterData("city", "São Paulo").length);
        //Output: 2

        console.log($(".filter-me").filterData("city", "São Paulo").text());
        //Output: Godoy, Leandro

        console.log($(".filter-me").filterData("age", 10).first().text());
        //Output: Raquel, age 10

        console.log($(".filter-me").filterData("city", "Paraíba").eq(2).text());
        //Output: Iracy

    });

🌍 Suporte aos ambientes

  • Navegadores modernos e Internet Explorer 11

| IE / Edge | Firefox | Chrome | Safari | Opera | Electron | | --- | --- | --- | --- | --- | --- | | IE11, Edge | últimas 2 versões | últimas 2 versões | últimas 2 versões | últimas 2 versões | últimas 2 versões |

🖥 Desenvolvimento

Use Gitpod, um ambiente de desenvolvimento online para GitHub.

Abrir no Gitpod

Ou clone localmente:

$ git clone https://github.com/godoyrw/jquery-data-filter.git
$ cd jquery-data-filter
$ npm install
$ npm start

❤️ Licença e Log de Atualizações

O Jquery Data Filter JS está disponível gratuitamente sob a licença MIT. Use-o, aprenda com ele, bifurque-o, melhore-o, mude-o, adapte-o às suas necessidades.

  • Version 1.0.0 - Filtrar o elemento pelo atributo '.data' ou dados que possuem valor do atributo específico.