bahmutov / bahmutov/iframe-api
Instead of simple api object allow function that returns an object given options from the other side
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 36
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
To allow returning different api by version, allow function
``` js
iframeApi(myApi).then(...);
function myApi(clientOptions) {
switch (clientOptions.version) {
case '0.1.0':
return { foo: ...}
break;
case '0.2.0':
return { bar: ...}
break;
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.