Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lunit/is-intersection

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lunit/is-intersection - npm Package Compare versions

Comparing version 1.0.2 to 1.0.4

__pages__/Basic.mdx

10

package.json
{
"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"
}

39

README.md

@@ -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 -->
```
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