<commit_before>turf-nearest
============
[![Build Status](https://travis-ci.org/Turfjs/turf-nearest.svg)](https://travis-ci.org/Turfjs/turf-nearest)

Returns the nearest point feature.

```js
var nearest = require('turf-nearest')
var point = require('turf-point')
var featurecollection = require('turf-featurecollection')

var inPoint = point(-75.4, 39.4, {name: 'Location A'})
var pt1 = point(-75.343, 39.984, {name: 'Location B'})
var pt2 = point(-75.833, 39.284, {name: 'Location C'})
var pt3 = point(-75.534, 39.123, {name: 'Location D'})
var inFeatures = featurecollection([pt1, pt2, pt3])

var closestPoint = nearest(inPoint, inFeatures)

console.log(closestPoint)
```<commit_msg>added to docs<commit_after>turf-nearest
============
[![Build Status](https://travis-ci.org/Turfjs/turf-nearest.svg)](https://travis-ci.org/Turfjs/turf-nearest)

Checks to see if a point is inside of a polygon. The polygon can be convex or concave.

###Install

```sh
npm install turf-nearest
```

###Parameters

|name|description|
|---|---|
|inPoint|a Point Features|
|inFeatures|a FeatureCollection|

###Usage

```js
nearest(inPoint, inFeatures)
```

###Example

Returns the nearest point feature.

```js
var nearest = require('turf-nearest')
var point = require('turf-point')
var featurecollection = require('turf-featurecollection')

var inPoint = point(-75.4, 39.4, {name: 'Location A'})
var pt1 = point(-75.343, 39.984, {name: 'Location B'})
var pt2 = point(-75.833, 39.284, {name: 'Location C'})
var pt3 = point(-75.534, 39.123, {name: 'Location D'})
var inFeatures = featurecollection([pt1, pt2, pt3])

var closestPoint = nearest(inPoint, inFeatures)

console.log(closestPoint)
```
{'fraction_non_alphanumeric': 0.18746268656716417, 'fraction_numerical': 0.05014925373134328, 'mean_word_length': 5.3007518796992485, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7260971', 'n_tokens_mistral': 666, 'n_tokens_neox': 595, 'n_words': 149}