【文件属性】:
文件名称:json-estree-ast:与ESTree兼容的JSON AST解析器
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-25 01:04:53
JavaScript
与ESTree兼容的JSON AST解析器
围绕小型包装器,将其输出转换为 ,这使其例如可以用作解析器。
安装
npm install json-estree-ast
用法
const { parse } = require ( 'json-estree-ast' ) ;
const options = {
loc : true , // include source location information. Default `true`
source : 'data.json' // include source information. Default `null`
} ;
parse ( '{"a": 1}' , options ) ;
输出
{
type : 'Program' ,
body : [
{
type : 'Object
【文件预览】:
json-estree-ast-master
----LICENSE(1KB)
----README.md(3KB)
----.gitignore(17B)
----index.js(950B)
----package.json(347B)