Skip to content

Commit

Permalink
docs: 📚️ update documentation with FEXISTS and EXISTS
Browse files Browse the repository at this point in the history
  • Loading branch information
iwpnd committed Jun 7, 2024
1 parent 9fa1719 commit 7c6c01c
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,26 @@ Set the value for one or more fields of an object. Fields must be double precisi
await tile38.fSet('fleet', 'truck1', { maxSpeed: 90, milage: 90000 });
```

#### FEXISTS

Validate if field exists on id.

```typescript
await tile38
.set('fleet', 'truck1')
.fields({ maxSpeed: 90, milage: 90000 })
.point(33.5123, -112.2693)
.exec();

let response = await tile38.fexists('fleet', 'truck1', 'weight');
console.log(response.exists);
// > true

response = await tile38.fexists('fleet', 'truck1', 'milage');
console.log(response.exists);
// > false
```

**Options**
|| |
|--|--|
Expand Down Expand Up @@ -253,6 +273,22 @@ await tile38.get('fleet', 'truck1').asString();
| `.asPoint()` | get as point |
| `.asString()` | get as string |

#### EXISTS

Validate id exists.

```typescript
await tile38.set('fleet', 'truck1').point(33.5123, -112.2693).exec();

let response = await tile38.exists('fleet', 'truck1');
console.log(response.exists);
// > true

response = await tile38.exists('fleet', 'truck1');
console.log(response.exists);
// > false
```

#### DEL

Remove a specific object by key and id.
Expand Down Expand Up @@ -837,7 +873,7 @@ MIT
## Maintainer

Vincent Priem - [@vpriem](https://github.com/vpriem)
Benjamin Ramser - [@iwpnd](https://github.com/iwpnd)
Benjamin Ramser - [@iwpnd](https://github.com/iwpnd)

Project Link: [https://github.com/iwpnd/tile38-ts](https://github.com/iwpnd/tile38-ts)

Expand Down

0 comments on commit 7c6c01c

Please sign in to comment.