apollonius
Advanced tools
Comparing version 0.2.3 to 0.3.0
{ | ||
"name": "apollonius", | ||
"version": "0.2.3", | ||
"version": "0.3.0", | ||
"description": "Solves Apollonius' problem by finding a fourth circle tangent to three given circles", | ||
"type": "module", | ||
"main": "./index.js", | ||
"exports": "./index.js", | ||
"types": "./index.d.ts", | ||
"exports": { | ||
"import": "./index.js", | ||
"require": "./index.cjs" | ||
}, | ||
"scripts": { | ||
"build": "rollup index.js --file index.cjs --format cjs", | ||
"lint": "standard", | ||
"test:unit": "node test/index.js", | ||
"test:types": "tsc test/types.ts", | ||
"test": "npm run lint && npm run test:unit", | ||
"test:types": "echo \"Expect error:\" && ! tsc test/types.ts", | ||
"test:cjs": "node test/commonjs.cjs", | ||
"test": "npm run lint && npm run test:types && npm run build && npm run test:cjs && npm run test:unit", | ||
"release": "npm test && npm publish" | ||
@@ -40,2 +45,3 @@ }, | ||
"devDependencies": { | ||
"rollup": "^4.24.0", | ||
"standard": "^17.1.2", | ||
@@ -42,0 +48,0 @@ "tape": "^5.9.0", |
@@ -28,3 +28,4 @@ # apollonius | ||
``` | ||
import 'apollonius' | ||
import apollonius from 'apollonius' | ||
// OR const apollonius = require('apollonius').default | ||
@@ -47,3 +48,3 @@ // Prepare three known circles. | ||
const c1 = { x: 3, y: 2, r: -1 } // r < 0, thus internally tangent | ||
const c2 = { x: 7, y: 2, r: 2 } // r > 0, thus externally tangent | ||
const c2 = { x: 7, y: 2, r: 2 } // externally tangent | ||
const c3 = { x: 3, y: 5, r: -1 } // r < 0, thus internally tangent | ||
@@ -50,0 +51,0 @@ |
21315
6
428
118
4