Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
jquery.datafilter
Advanced tools
Readme
Advanced data-filter with multiple choice filtering
Install the package with bower or npm
bower install jquery.datafilter
npm install jquery.datafilter
Include the script in your web page:
<script src="jquery.js"></script>
<script src="dist/datafilter.min.js"></script>
<script>
jQuery(function($) {
$('div').dataFilter({
'prop1':[1,2],
'prop2':3,
'prop3':[4,5] // usw...
}).hide();
});
</script>
Filters every item which has a data-propertey data-prop1="1 or 2"
and data-prop2="3"
and data-prop3="4 or 5"
and hides them
For example see this html:
<div data-prop1="5" data-prop2="2" data-prop3="4"></div>
<div data-prop1="2" data-prop2="5" data-prop3="4"></div>
<div data-prop1="2" data-prop2="2" data-prop3="2"></div>
<div data-prop1="3" data-prop2="2" data-prop3="1"></div>
<div data-prop1="2" data-prop2="3" data-prop3="4"></div> // filtered
<div data-prop1="5" data-prop2="5" data-prop3="3"></div>
<div data-prop1="4" data-prop2="4" data-prop3="3"></div>
<div data-prop1="5" data-prop2="2" data-prop3="5"></div>
<div data-prop1="2" data-prop2="4" data-prop3="1"></div>
<div data-prop1="1" data-prop2="3" data-prop3="5"></div> // filtered
<div data-prop1="4" data-prop2="2" data-prop3="4"></div>
You can also use a jQuery-Collection with data-properties set to use them for filtering:
<button data-prop1="[1,2]" data-prop2="3" data-prop3="[4,5]">Click for filtering</button>
$('button').click(function(){
$('div').dataFilter( $(this) ).hide();
});
For a working example see here
FAQs
Advanced filter with multiple choice filtering
The npm package jquery.datafilter receives a total of 1 weekly downloads. As such, jquery.datafilter popularity was classified as not popular.
We found that jquery.datafilter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.