Leverage json-with-bigint's typings
All checks were successful
Build / build (20) (push) Successful in 1m5s
Build / build (18) (pull_request) Successful in 43s
Build / build (20) (pull_request) Successful in 1m4s
Build / build (22) (pull_request) Successful in 1m6s
Build / build (22) (push) Successful in 40s
Build / build (18) (push) Successful in 1m9s
All checks were successful
Build / build (20) (push) Successful in 1m5s
Build / build (18) (pull_request) Successful in 43s
Build / build (20) (pull_request) Successful in 1m4s
Build / build (22) (pull_request) Successful in 1m6s
Build / build (22) (push) Successful in 40s
Build / build (18) (push) Successful in 1m9s
This commit is contained in:
parent
9667b6f72c
commit
4ed0851501
@ -2,7 +2,7 @@ import { JSONParse } from "json-with-bigint";
|
||||
|
||||
export const getJSONfromString = <T>(str: string): T => {
|
||||
const jsonSubstring = str.substring(0, str.lastIndexOf("}") + 1);
|
||||
return JSONParse(jsonSubstring) as T;
|
||||
return JSONParse<T>(jsonSubstring);
|
||||
};
|
||||
|
||||
export const getSubstringFromKeyword = (str: string, keyword: string): string => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user