@lunit/is-intersection
Advanced tools
Comparing version 1.0.2 to 1.0.4
{ | ||
"name": "@lunit/is-intersection", | ||
"version": "1.0.2", | ||
"version": "1.0.4", | ||
"description": "Test are two points intersection", | ||
"author": { | ||
"name": "Seoyeon Lee", | ||
"email": "seoyeon.lee@lunit.io" | ||
}, | ||
"author": "Seoyeon Lee <seoyeon.lee@lunit.io>", | ||
"repository": "lunit-io/frontend-components", | ||
@@ -14,3 +11,4 @@ "license": "MIT", | ||
}, | ||
"main": "index.js" | ||
"main": "index.js", | ||
"typings": "index.d.ts" | ||
} |
@@ -0,1 +1,7 @@ | ||
# `@lunit/is-intersection` | ||
Line `ab` 와 `cd`과 교차하는지 검사한다. | ||
<https://frontend-components-handbook.netlify.com/#/is-intersection> | ||
# Install | ||
@@ -5,33 +11,2 @@ | ||
npm install @lunit/is-intersection | ||
``` | ||
# API | ||
``` | ||
isIntersection(a: [number, number], b: [number, number], c: [number, number], d: [number, number]): boolean | ||
``` | ||
# Sample Codes | ||
## Tests | ||
<!-- import __tests__/*.{ts,tsx} --title-tag h3 --> | ||
### \_\_tests\_\_/isIntersection.test.ts | ||
```ts | ||
import { isIntersection } from '@lunit/is-intersection'; | ||
describe('isIntersection()', () => { | ||
test('ab와 cd는 교차한다', () => { | ||
expect(isIntersection([0, 0], [10, 10], [10, 0], [0, 10])).toBeTruthy(); | ||
}); | ||
test('ab와 cd는 교차하지 않는다', () => { | ||
expect(isIntersection([0, 0], [10, 0], [0, 10], [10, 10])).toBeFalsy(); | ||
}); | ||
}); | ||
``` | ||
<!-- importend --> | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5
5938
11
1