deno.land / std@0.166.0 / encoding / front_matter / json.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
import { createExtractor, Format, Parser, test as _test } from "./mod.ts";export { Format } from "./mod.ts";
export function test(str: string): boolean { return _test(str, [Format.JSON]);}
export const extract = createExtractor({ [Format.JSON]: JSON.parse as Parser });export default extract;
std

Version Info

Tagged at
a year ago