{"id":19826888,"url":"https://github.com/estools/esfuzz","last_synced_at":"2025-05-01T14:31:52.951Z","repository":{"id":57143734,"uuid":"11503869","full_name":"estools/esfuzz","owner":"estools","description":"fuzzer for generative testing of ECMAScript parsers","archived":false,"fork":false,"pushed_at":"2014-07-03T04:32:56.000Z","size":1264,"stargazers_count":58,"open_issues_count":10,"forks_count":13,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-09-15T03:49:11.236Z","etag":null,"topics":["ast","ecmascript","estree","javascript"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/estools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-18T13:47:30.000Z","updated_at":"2024-08-29T03:12:50.000Z","dependencies_parsed_at":"2022-09-06T00:11:04.571Z","dependency_job_id":null,"html_url":"https://github.com/estools/esfuzz","commit_stats":null,"previous_names":["michaelficarra/esfuzz"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesfuzz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesfuzz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesfuzz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesfuzz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/estools","download_url":"https://codeload.github.com/estools/esfuzz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224262047,"owners_count":17282267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","ecmascript","estree","javascript"],"created_at":"2024-11-12T11:11:53.481Z","updated_at":"2024-11-12T11:11:54.251Z","avatar_url":"https://github.com/estools.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esfuzz\n\nFuzzer for generative testing of ECMAScript parsers, especially those that\nimplement the [SpiderMonkey `Reflect.parse` API](https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API).\n\n## Install\n\n    npm install -g esfuzz\n\n## Usage\n\n### CLI\n\n    $ esfuzz --help\n\n\n      Usage: esfuzz OPT*\n\n      -n, --iterations NUM  use at most NUM programs; default: unlimited\n      -d, --max-depth NUM   create ASTs with a height no greater than NUM; default: 8\n      --acorn               enable marijnh/acorn parser; default: on\n      --es6                 allow ECMAScript 6 features in generated programs\n      --esprima             enable ariya/esprima parser; default: on\n      --help                display this help message and exit\n      --reflect             enable Reflect.parse parser; default: on if it exists\n      --reflectjs           enable zaach/reflect.js parser\n      --uglifyjs            enable limited support for mishoo/UglifyJS2\n      --version             display the version number and exit\n      --zeparser            enable limited support for qfox/ZeParser\n\n### Module Interface\n\n#### `generate(options)` -\u003e `SpiderMonkey_AST`\n\nGenerate a random SpiderMonkey AST that represents a valid ECMAScript program.\nAvailable options:\n\n  * `maxDepth`: create ASTs with a height no greater than this value\n\n#### `render(programAST, format)` -\u003e `String` (JS program)\n\nRender a SpiderMonkey AST as an ECMAScript program. If the `format` argument is\nomitted, a random format will be used. Otherwise, the given object must be in\nthe format of escodegen's `format` option.\n\n#### `fuzz(programAST, parsers)` -\u003e `void`\n\nTakes a SpiderMonkey AST and a list of objects that have a `parse` method that\nobeys the SpiderMonkey Reflect.parse API. This function will generate concrete\nsyntax and run it through each parser. If any of the parsers fail to parse the\nprogram, an error will be thrown.\n\n#### `fuzzAndRoundtrip(programAST, parsers)` -\u003e `void`\n\nIdentical to `fuzz`, except additionally compares the outputs of each parser to\nthe generated program. If any of the parsers fail to parse the program or fail\nto generate an AST equivalent to the given one, an error will be thrown.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festools%2Fesfuzz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Festools%2Fesfuzz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festools%2Fesfuzz/lists"}