Skip to content

Commit

Permalink
feat: add simple example
Browse files Browse the repository at this point in the history
  • Loading branch information
Clemog committed May 15, 2024
1 parent 0d78002 commit 2a31ad2
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion source/migration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,41 @@
### Usage
TODO: add simple example
For instance, we have a simple set of rules:
```yaml
age:
question: "Quel est votre âge ?"
````
and the following situation:
```json
{
age: 25
}
```
If I change my model because I want to fix the accent to:
```yaml
âge:
question: "Quel est votre âge ?"
```
I don't want to lose the previous answer, so I can use `migrateSituation` with the following migration instructions:
```yaml
keysToMigrate:
age: âge
```
Then, calling `migrateSituation` with the situation and the migration instructions will return:
```json
{
âge: 25
}
```
*/

export * from './migrateSituation'

0 comments on commit 2a31ad2

Please sign in to comment.