Skip to content

Commit

Permalink
chore: export helper isJSONObject (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzius authored Jul 26, 2022
1 parent 37d309b commit 38905d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/clients/src/helpers/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export const isJSON = (obj: unknown): obj is JSON => {
)
}

/**
* Validates an unknown object is a JSON Object.
*
* @internal
*/
export const isJSONObject = (obj: unknown): obj is JSONObject => {
const objT: string = typeof obj

Expand Down
7 changes: 4 additions & 3 deletions packages/clients/src/internals.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export { API } from './scw/api'
export { isJSONObject } from './helpers/json'
export { waitForResource } from './internal/async/interval-retrier'
export { authenticateWithSessionToken } from './scw/auth'
export type { RequestInterceptor } from './internal/interceptors/request'
export type { ResponseInterceptor } from './internal/interceptors/response'
export { API } from './scw/api'
export { authenticateWithSessionToken } from './scw/auth'
export type { DefaultValues } from './scw/client-ini-profile'
export type { ServiceInfo } from './scw/custom-types'
export {
marshalScwFile,
marshalMoney,
Expand All @@ -15,6 +15,7 @@ export {
unmarshalTimeSeries,
unmarshalTimeSeriesPoint,
} from './scw/custom-marshalling'
export type { ServiceInfo } from './scw/custom-types'
export {
resolveOneOf,
unmarshalDate,
Expand Down

0 comments on commit 38905d8

Please sign in to comment.