
Research
/Security News
11 Malicious NuGet Tools Pose as Game Cheats to Drop a Windows Host-Surveillance Payload
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.
@maptalks/feature-filter
Advanced tools
Filter expressions are used to target specific data in a layer. This library implements the semantics specified by the Mapbox GL JS spec.
featureFilter(filter)
Given a filter expressed as nested arrays, return a new function that evaluates whether a given feature (with a .properties or .tags property) passes its test.
| parameter | type | description |
|---|---|---|
filter | Array | mapbox gl filter |
Returns Function, filter-evaluating function
var ff = require('feature-filter');
// will match a feature with class of street_limited,
// AND an admin_level less than or equal to 3,
// that's NOT a polygon.
var filter = [
"all",
["==", "class", "street_limited"],
["<=", "admin_level", 3],
["!=", "$type", "Polygon"]
]
// will match a feature that has a class of
// wetland OR wetland_noveg.
// ["in", "class", "wetland", "wetland_noveg"]
// testFilter will be a function that returns a boolean
var testFilter = ff(filter);
// Layer feature that you're testing. Must have type
// and properties keys.
var feature = {
type: 2,
properties: {
class: "street_limited"
admin_level: 1
}
};
// will return a boolean based on whether the feature matched the filter
return testFilter(feature);
FAQs
Creates filtering function for features
The npm package @maptalks/feature-filter receives a total of 3,124 weekly downloads. As such, @maptalks/feature-filter popularity was classified as popular.
We found that @maptalks/feature-filter 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.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.

Research
/Security News
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.