Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/openai/openai-node
/ safeJSON
Function
safeJSON
src/internal/utils/values.ts:99–105 ·
view source on GitHub ↗
(text: string)
Source
from the content-addressed store, hash-verified
97
};
98
99
export
const
safeJSON = (text: string) => {
100
try {
101
return
JSON.parse(text);
102
} catch (err) {
103
return
undefined;
104
}
105
};
Callers
1
makeRequest
Method · 0.90
Calls
1
parse
Method · 0.45
Tested by
no test coverage detected