Socket
Socket
Sign inDemoInstall

@turf/random

Package Overview
Dependencies
Maintainers
0
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/random

turf random module


Version published
Maintainers
0
Created

What is @turf/random?

@turf/random is a module within the Turf.js library that provides functions to generate random geometries such as points, polygons, and lines. It is useful for creating test data, simulations, and other applications where random spatial data is needed.

What are @turf/random's main functionalities?

Random Points

Generates a specified number of random points. In this example, it generates 5 random points.

const turf = require('@turf/random');
const points = turf.randomPoint(5);
console.log(points);

Random Polygons

Generates a specified number of random polygons. In this example, it generates 3 random polygons.

const turf = require('@turf/random');
const polygons = turf.randomPolygon(3);
console.log(polygons);

Random Lines

Generates a specified number of random line strings. In this example, it generates 2 random line strings.

const turf = require('@turf/random');
const lines = turf.randomLineString(2);
console.log(lines);

Other packages similar to @turf/random

Keywords

FAQs

Package last updated on 25 Jun 2024

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