Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/random

Package Overview
Dependencies
Maintainers
4
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

  • 5.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
760K
increased by23.62%
Maintainers
4
Weekly downloads
 
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 10 Dec 2017

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