npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

arc-points

v1.0.0

Published

Generate arcs routes as lines that does not coincide between to points.

Readme

Generate arcs routes as lines that does not coincide between to points.

Install

npm

npm i arc-points -S

or yarn

yarn add arc-points

Usage

Require the library in node.js like:

var arc = require('arc-points');
arc.arcPoints.methodName()

Use in the browser like:

<script src="./arc-points.js"></script>
arc.arcPoints.methodName()

ES2015:

import { arcPoints } from '../lib/arc-points'
arcPoints.methodName()

API

Methods:

  • generateBezierPoints(start, end, npoints, options) => array

    Generate arcs routes as lines that does not coincide between to points.

    • start: Start point like [x, y]. Note: x and y are both numbers. If in a map, x denotes a longitude, y denotes a latitude.
    • end: End point. The format is like start.
    • npoints: The number of points to be generated.
    • options: An object with three properties of cph,cpv,direction.
    • options.cph: Horizontal position ratio of control point. Default: 0.5
    • options.cpv: Vertical position ratio of control point. Default: 0.2
    • options.direction: The location of the generated arc with respect to the two-point connection. It could be up, down or ring. ring indicates that the generated arc direction is clockwise. Default: up
  • filterCoordinates

  • getTheSameTrailVectorTimes

  • getCphvFromIdenticTrailVectorTimes

Example

You can download it and

cd example
yarn
yarn start