# syncOnIpChange

### cddnss.syncOnIpChange

Syncs the DNS records every time the external ip changes.

####

#### Parameters:

* `records` *The records that should be updated.* `[Array<`[`Record`](https://cddnss.knaup.pw/types/record)`>]`
* `callback` *The callback that gets called every time the updating was done.* `[`[`MultiSyncCallback`](https://cddnss.knaup.pw/types/multisynccallback)`]`

####

#### Returns:

* *The id of the interval that is needed to stop the syncing.* `[Promise<string>]`

```typescript
const changeListenerId: string =
  cddnss.syncOnIpChange(records , (recordData: Array<RecordData>) => {
    console.log(recordData);
  });
```
