
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@turf/boolean-contains
Advanced tools
Boolean-contains returns True if the second geometry is completely contained by the first geometry.
The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)
must not intersect the exterior of the primary (geometry a).
Boolean-contains returns the exact opposite result of the @turf/boolean-within.
feature1 (Geometry | Feature<any>) GeoJSON Feature or Geometryfeature2 (Geometry | Feature<any>) GeoJSON Feature or Geometryvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
var point = turf.point([1, 2]);
turf.booleanContains(line, point);
//=true
Returns boolean true/false
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this single module individually:
$ npm install @turf/boolean-contains
Or install the all-encompassing @turf/turf module that includes all modules as functions:
$ npm install @turf/turf

Geolib is a library for geospatial calculations. It provides functions to check if a point is inside a polygon, calculate distances, and more. Compared to @turf/boolean-contains, geolib offers a broader range of geospatial functions but may not be as specialized in GeoJSON operations.
JSTS (JavaScript Topology Suite) is a library for performing operations on geometries. It includes functions for spatial relationships like contains, intersects, and more. JSTS is more comprehensive in terms of geometric operations but can be more complex to use compared to @turf/boolean-contains.
Leaflet is a popular library for interactive maps. It includes basic geospatial functions like checking if a point is within a polygon. While Leaflet is primarily focused on map rendering and interaction, it provides some geospatial analysis capabilities similar to @turf/boolean-contains.
FAQs
turf boolean-contains module
The npm package @turf/boolean-contains receives a total of 717,371 weekly downloads. As such, @turf/boolean-contains popularity was classified as popular.
We found that @turf/boolean-contains demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers 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
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.