Skip to content

Commit 22d9394

Browse files
author
Ryan P. O'Connell
committed
Fix typos
1 parent 9d71937 commit 22d9394

2 files changed

Lines changed: 31 additions & 31 deletions

File tree

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ const model = new HDSLib.HDSModel('https://model.datasafe.dev/pack.json');
1515
await model.load();
1616
```
1717

18-
#### IdemDef
18+
#### ItemDef
1919

20-
An `ItemdDef` is an object representation of the items from the data Model
20+
An `ItemDef` is an object representation of the items from the data Model
2121

2222
```javascript
2323
// retrieve an itemDef by it's key
2424
const weight = model.itemDefs.forKey('body-weight');
2525
weight.streamId; // => 'body-weight'
26-
weight.eventTypes; // => 'mass/kg', 'mass/lb']
26+
weight.eventTypes; // => ['mass/kg', 'mass/lb']
2727
```
2828

2929
```javascript
@@ -32,14 +32,14 @@ const anEvent = {
3232
streamIds: ['body-weight', 'dummy'],
3333
type: 'mass/kg'
3434
};
35-
const itemDef = model.itemsDefs.forEvent(fakeEvent);
35+
const itemDef = model.itemsDefs.forEvent(anEvent);
3636
itemDef.key // => 'body-weight'
3737
```
3838

3939
#### Streams
4040

4141
```javascript
42-
// get the list of streams to be created to store theses items
42+
// get the list of streams to be created to store these items
4343
const itemKeys = [
4444
'profile-name',
4545
'profile-date-of-birth',
@@ -59,29 +59,29 @@ const itemKeys = [
5959
'profile-date-of-birth',
6060
'body-vulva-mucus-stretch',
6161
'profile-surname'
62-
];
63-
const options = {
64-
preRequest: [ // optional, will be considered in the request
65-
{ streamId: 'profile' },
66-
{ streamId: 'app-test', defaultName: 'App test', level: 'write' }
67-
]
68-
};
69-
const authorizationSet = model.authorizations.forItemKeys(itemKeys, options);
70-
// the following object is the result
71-
const expected = [
72-
{ streamId: 'profile', defaultName: 'Profile', level: 'read' },
73-
{ streamId: 'app-test', defaultName: 'App test', level: 'write' },
74-
{
75-
streamId: 'body-vulva-mucus-inspect',
76-
defaultName: 'Vulva Mucus Inspect',
77-
level: 'read'
78-
},
79-
{
80-
streamId: 'body-vulva-mucus-stretch',
81-
defaultName: 'Vulva Mucus Stretch',
82-
level: 'read'
83-
}
84-
];
62+
];
63+
const options = {
64+
preRequest: [ // optional, will be considered in the request
65+
{ streamId: 'profile' },
66+
{ streamId: 'app-test', defaultName: 'App test', level: 'write' }
67+
]
68+
};
69+
const authorizationSet = model.authorizations.forItemKeys(itemKeys, options);
70+
// the following object is the result
71+
const expected = [
72+
{ streamId: 'profile', defaultName: 'Profile', level: 'read' },
73+
{ streamId: 'app-test', defaultName: 'App test', level: 'write' },
74+
{
75+
streamId: 'body-vulva-mucus-inspect',
76+
defaultName: 'Vulva Mucus Inspect',
77+
level: 'read'
78+
},
79+
{
80+
streamId: 'body-vulva-mucus-stretch',
81+
defaultName: 'Vulva Mucus Stretch',
82+
level: 'read'
83+
}
84+
];
8585
```
8686

8787

@@ -98,7 +98,7 @@ Some of the functionalities will be moved from the lib
9898

9999
```html
100100
<head>
101-
<script src="../docs/hds-lib.js"></script>"
101+
<script src="../docs/hds-lib.js"></script>
102102
<script>
103103
model = new HDSLib.HDSModel();
104104
</script>

tests-browser/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<html>
22
<head>
3-
<script src="../docs/hds-lib.js"></script>"
3+
<script src="../docs/hds-lib.js"></script>
44
<script>
55
console.log('>>', HDSLib, '<<');
66
console.log('>>', new HDSLib.HDSModel(), '<<');
77
/**
8-
const model = new HDSModel('https://model.datasafe.dev/pack.json');
8+
const model = new HDSLib.HDSModel('https://model.datasafe.dev/pack.json');
99
1010
(async () => {
1111
await model.load();

0 commit comments

Comments
 (0)