https://github.com/acao/flexion-geometry-classifier
Demonstrating a simple "isomorphic" library
https://github.com/acao/flexion-geometry-classifier
Last synced: 3 months ago
JSON representation
Demonstrating a simple "isomorphic" library
- Host: GitHub
- URL: https://github.com/acao/flexion-geometry-classifier
- Owner: acao
- Created: 2017-12-20T15:58:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-24T20:02:22.000Z (over 7 years ago)
- Last Synced: 2025-01-16T21:36:21.397Z (4 months ago)
- Language: JavaScript
- Homepage: https://acao.github.io/flexion-geometry-classifier/
- Size: 380 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
[](https://badge.fury.io/js/flexion-geometry-classifier)
[](https://travis-ci.org/acao/flexion-geometry-classifier)
[](https://coveralls.io/github/acao/flexion-geometry-classifier?branch=master)A simple tool for classifying geometries
## Installation
### CLI
`npm i -g flexion-geometry-classifier`
or
`yarn add global flexion-geometry-classifier`
### Library
`npm i -S flexion-geometry-classifier`
## Usage
### CLI
```
$ geometry-cli 2.3 2.3 2.3
this triangle is an equilateral
finished in 2.34ms
```### Library
The library returns a promise.
```js
import classifier from "flexion-geometry-classifier";
classifier([2.2, 2.2, 2.2])
.then(success =>
console.log(`you have returned a ${success.geometryLabel} of type ${success.type}`)
)
.catch(message => console.error(message));
```## WebApp
The webapp was an afterthought last night, more a proof of concept for the universal library and is not to be evaluated as a progressive web app by any means
## Development
`npm run build` builds the library output.
`npm run build-web` runs webpack
`npm run dev` runs webpack with `--watch`
`npm run flow` runs flow
`npm run eslint` runs eslint
`npm run test` will run a suite of e2e tests for the cli i wrote when it was originally just a CLI. yes, no unit tests or e2e web tests. oh well!