Skip to content

Commit

Permalink
Rename package (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
jscheiny authored Jul 5, 2018
1 parent d96f169 commit 1b284bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Uni-TS
# Safe Units

[![Build Status](https://travis-ci.org/jscheiny/uni-ts.svg?branch=develop)](https://travis-ci.org/jscheiny/uni-ts)
[![Build Status](https://travis-ci.org/jscheiny/safe-units.svg?branch=develop)](https://travis-ci.org/jscheiny/safe-units)

Uni-TS is a type-safe units of measurement framework for performing dimensional analysis in TypeScript at compile time. Uni-TS provides an implementation of an SI based unit system but is flexible enough to allow users to create their own unit systems which can be independent or can interoperate with the built-in units. This library makes heavy use of conditional and thus requires 2.8.3+.
Safe Units is a type-safe units of measurement framework for performing dimensional analysis in TypeScript at compile time. Safe Units provides an implementation of an SI based unit system but is flexible enough to allow users to create their own unit systems which can be independent or can interoperate with the built-in units. This library makes heavy use of conditional and thus requires 2.8.3+.

```typescript
import { Length, Measure, Time, Unit, Velocity } from "uni-ts";
import { Length, Measure, Time, Unit, Velocity } from "safe-units";

const length: Length = Measure.of(30, Unit.meters);
const time: Time = Measure.of(15, Unit.seconds);
Expand Down Expand Up @@ -33,7 +33,7 @@ const error: Velocity = length.times(time); // Error: A measure of m*s isn't ass
### Measure arithmetic

```typescript
import { Area, Force, Length, Mass, Measure, Pressure, Quantity, SafeMath, Unit, Volume } from "uni-ts";
import { Area, Force, Length, Mass, Measure, Pressure, Quantity, SafeMath, Unit, Volume } from "safe-units";

const length: Length = Measure.of(30, Unit.feet);
const width: Length = Measure.of(20, Unit.miles);
Expand All @@ -51,7 +51,7 @@ const pressure: Pressure = force.over(area);
### Type errors

```typescript
import { Length, Force, Measure, SafeMath } from "uni-ts";
import { Length, Force, Measure, SafeMath } from "safe-units";

const length: Length = Measure.of(10, Unit.meters);
const time: Time = Measure.of(10, Unit.seconds);
Expand All @@ -65,7 +65,7 @@ const root = SafeMath.sqrt(length) // Error: Can't take sqrt of measure of m sin
### Naming units

```typescript
import { days, Measure, miles, speedOfLight, yards } from "uni-ts";
import { days, Measure, miles, speedOfLight, yards } from "safe-units";

const furlongs = Measure.of(220, yards, "fur");

Expand All @@ -81,7 +81,7 @@ console.log(speedOfLight.in(furlongsPerFornight)); // 1802617499785.2544 fur/ftn
### Deriving quantities

```typescript
import { Acceleration, Measure, meters, seconds, Time } from "uni-ts";
import { Acceleration, Measure, meters, seconds, Time } from "safe-units";

const Jerk = Acceleration.over(Time);
type Jerk = typeof Jerk;
Expand All @@ -96,7 +96,7 @@ console.log(jerk.toString()); // 4.9 m * s^-3
### Defining dimensions

```typescript
import { Area, Measure, seconds, Time } from "uni-ts";
import { Area, Measure, seconds, Time } from "safe-units";

const bits = Measure.dimension("data", "b");

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "uni-ts",
"name": "safe-units",
"description": "Type-safe TypeScript units of measure",
"keywords": ["units", "measure", "dimension", "metric", "typescript", "typesafe"],
"version": "0.0.1",
"license": "MIT",
"homepage": "https://github.com/jscheiny/uni-ts",
"bugs": "https://github.com/jscheiny/uni-ts/issues",
"homepage": "https://github.com/jscheiny/safe-units",
"bugs": "https://github.com/jscheiny/safe-units/issues",
"repository": {
"type": "git",
"url": "https://github.com/jscheiny/uni-ts.git"
"url": "https://github.com/jscheiny/safe-units.git"
},
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down

0 comments on commit 1b284bf

Please sign in to comment.