1
Fork 0

Rewrite readme.

This commit is contained in:
Bauke 2022-09-29 14:40:28 +02:00
parent 5a10c49a3e
commit 6f084dc9e0
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 20 additions and 12 deletions

View File

@ -1,19 +1,25 @@
# migration-helper # Migration 🧳 Helper
> A tiny helper library for migrating data. > **Tiny helper library for migrating data.**
* Zero dependencies ## Features
* 100% code coverage
* TypeScript definitions included * Zero dependencies.
* 100% code coverage.
* TypeScript definitions included.
## Registry Setup
To use this package, add a registry for the `@holllo` scope to your npm configuration.
```
npm config set @holllo:registry https://git.bauke.xyz/api/packages/Holllo/npm/
```
## Usage ## Usage
```sh
npm install migration-helper
```
```ts ```ts
import {migrate, Migration} from 'migration-helper'; import {migrate, Migration} from '@holllo/migration-helper';
// Your data that needs migrating. // Your data that needs migrating.
const data = 'data'; const data = 'data';
@ -40,6 +46,8 @@ const migrated = await migrate(data, version, migrations);
console.log(migrated); console.log(migrated);
``` ```
See [the tests directory] for how to use `number`, `Date` or a custom way of versioning. See [the tests directory](https://git.bauke.xyz/Holllo/migration-helper/src/branch/main/tests) for how to use `number`, `Date` or a custom way of versioning.
[the tests directory]: tests/ ## License
Distributed under the [AGPL-3.0-or-later](https://spdx.org/licenses/AGPL-3.0-or-later.html) license, see [LICENSE](https://git.bauke.xyz/Holllo/migration-helper/src/branch/main/LICENSE) for more information.