New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

google-polyline

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-polyline

Encode / decode Google's polyline format

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

google-polyline

npm npm license npm downloads build status

Encodes and decodes Google's polyline format

Install via npm

$ npm install --save google-polyline

Usage

var polyline = require( 'google-polyline' )
polyline.encode([
  [ 38.5, -120.2 ],
  [ 40.7, -120.95 ],
  [ 43.252, -126.453 ]
])

> '_p~iF~ps|U_ulLnnqC_mqNvxq`@'
polyline.decode( '_p~iF~ps|U_ulLnnqC_mqNvxq`@' )

> [
  [ 38.5, -120.2 ],
  [ 40.7, -120.95 ],
  [ 43.252, -126.453 ]
]

Benchmarks

$ npm run benchmark
# decode: 3 points ⨉ 1000
ok ~9.03 ms (0 s + 9026482 ns)

# decode: ~350 points ⨉ 1000
ok ~34 ms (0 s + 33985497 ns)

# encode: 3 points ⨉ 1000
ok ~16 ms (0 s + 15696046 ns)

# encode: ~350 points ⨉ 1000
ok ~80 ms (0 s + 80340403 ns)

Keywords

FAQs

Package last updated on 15 Feb 2019

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