Gathering detailed insights and metrics for line-intersect
Gathering detailed insights and metrics for line-intersect
Gathering detailed insights and metrics for line-intersect
Gathering detailed insights and metrics for line-intersect
npm install line-intersect
Typescript
Module System
Node Version
NPM Version
86.5
Supply Chain
96.7
Quality
75.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
2,452,930
Last Day
252
Last Week
8,000
Last Month
27,352
Last Year
441,792
MIT License
26 Stars
50 Commits
5 Forks
2 Watchers
3 Branches
3 Contributors
Updated on Dec 31, 2024
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
line-intersect@3.0.0
Unpacked Size
11.17 kB
Size
3.67 kB
File Count
11
NPM Version
6.14.9
Node Version
14.11.0
Cumulative downloads
Total Downloads
Last Day
6.8%
252
Compared to previous day
Last Week
-6.7%
8,000
Compared to previous week
Last Month
10.4%
27,352
Compared to previous month
Last Year
-49%
441,792
Compared to previous year
6
Line vs line, point vs line in 2D space
Math is mostly from here.
1npm install line-intersect
es modules
1import { 2 checkIntersection, 3 colinearPointWithinSegment 4} from 'line-intersect';
commonjs modules
1const { 2 checkIntersection, 3 colinearPointWithinSegment 4} = require('line-intersect');
Given a line segment from (x1, y1) to (x2, y2) and line segment from (x3, y3) to (x4, y4), check if the line segments intersect.
All params are Numbers and are required.
A read-only Object that looks like
1{ 2 type: 'none' | 'parallel' | 'colinear' 3} 4 5// or 6 7{ 8 type: 'intersecting', 9 point: { 10 x: number, 11 y: number 12 } 13}
point
is only exists when type == 'intersecting'
type | What it means | Are the line segments touching? |
---|---|---|
none | Line segments are not intersecting | No |
parallel | Line segments are not intersecting but they are parallel to eachother | No |
colinear | Line segments are on the same line and may be overlapping. Use colinearPointWithinSegment() to check | Maybe |
intersecting | Line segments intersect at exactly one point | Yes |
Given a point (px, py) that is on the same line as line segment (x1, y1) to (x2, y2), check if the point is within the line segment.
All params are Numbers and are required.
true
if point is within the line segment, false
otherwise.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
44 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More