mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-15 16:10:06 +00:00
feat(server): added sasjs server support
This commit is contained in:
@@ -4,7 +4,7 @@ import { JsonParseArrayError, InvalidJsonError } from '../types/errors'
|
||||
* if string passed then parse the string to json else if throw error for all other types unless it is not a valid json object.
|
||||
* @param str - string to check.
|
||||
*/
|
||||
export const getValidJson = (str: string | object) => {
|
||||
export const getValidJson = (str: string | object): object => {
|
||||
try {
|
||||
if (str === null || str === undefined) throw new InvalidJsonError()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user