Socket
Socket
Sign inDemoInstall

turf-remove

Package Overview
Dependencies
Maintainers
8
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-remove

turf remove module


Version published
Weekly downloads
45
decreased by-28.57%
Maintainers
8
Weekly downloads
 
Created
Source

turf-remove

build status

turf remove module

turf.remove(features, property, value)

Takes a FeatureCollection, a property, and a value and returns a FeatureCollection with features matching that property-value pair removed.

Parameters

parametertypedescription
featuresFeatureCollectiona FeatureCollection of any type
propertyStringthe property to filter
valueStringthe value to filter

Example

var points = turf.featurecollection([
 turf.point([-0.235004, 5.551918], {'marker-color': '#00f'}),
 turf.point([-0.209598, 5.56439], {'marker-color': '#f00'}),
 turf.point([-0.197753, 5.556018], {'marker-color': '#00f'}),
 turf.point([-0.217323, 5.549526], {'marker-color': '#000'}),
 turf.point([-0.211315, 5.543887], {'marker-color': '#0f0'}),
 turf.point([-0.202217, 5.547134], {'marker-color': '#00f'}),
 turf.point([-0.231227, 5.56644], {'marker-color': '#0f0'})
]);

//=points

var filtered = turf.remove(points, 'marker-color', '#00f');

//=filtered

Installation

Requires nodejs.

$ npm install turf-remove

Tests

$ npm test

Keywords

FAQs

Package last updated on 06 Feb 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc