{"id":22203209,"url":"https://github.com/onhernandes/parserblade","last_synced_at":"2025-07-27T05:31:56.239Z","repository":{"id":46889219,"uuid":"279983122","full_name":"onhernandes/parserblade","owner":"onhernandes","description":"The easiest parser for JSON, XML, CSV and YAML. Use it as simple as JSON.stringify() or JSON.parse(). All in one place.","archived":false,"fork":false,"pushed_at":"2023-04-04T02:27:38.000Z","size":1210,"stargazers_count":38,"open_issues_count":11,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-07T15:42:35.943Z","etag":null,"topics":["csv","javascript","json","parser","xml","yaml"],"latest_commit_sha":null,"homepage":"https://onhernandes.github.io/parserblade/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onhernandes.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":"2020-07-15T21:27:59.000Z","updated_at":"2023-10-20T09:29:50.000Z","dependencies_parsed_at":"2023-02-06T01:45:55.112Z","dependency_job_id":null,"html_url":"https://github.com/onhernandes/parserblade","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onhernandes%2Fparserblade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onhernandes%2Fparserblade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onhernandes%2Fparserblade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onhernandes%2Fparserblade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onhernandes","download_url":"https://codeload.github.com/onhernandes/parserblade/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227763842,"owners_count":17816256,"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":["csv","javascript","json","parser","xml","yaml"],"created_at":"2024-12-02T16:41:37.457Z","updated_at":"2024-12-02T16:41:38.090Z","avatar_url":"https://github.com/onhernandes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parserblade\n\n![CI](https://github.com/onhernandes/parserblade/workflows/CI/badge.svg?branch=main)\n\nA all-in-one parser for Javascript, heavily inspired by: https://github.com/nathanmac/Parser. It allows you to work with JSON, XML, CSV and YAML more without worrying about which module install. It's designed to work just as `JSON.parse` and `JSON.stringify` does, with some improvements.\n\nSee [docs](https://onhernandes.github.io/parserblade) for more info and examples.\n\n## Installation\n\n```sh\n$ npm install --save parserblade\n```\n\n## Usage\n\nEvery filetype has two main methods: `stringify()` and `parse()`, both receives two arguments, `data` containing any type of data and an options object.\n\n### CSV\n\n```javascript\nconst { csv } = require('parserblade')\n\n// Parsing\nconst input = 'title,platform\\nStardew Valley,Steam'\nconst result = csv.parse(input)\nconsole.log(result) // [ { title: 'Stardew Valley', platform: 'Steam' } ]\n\n// Stringifying\nconsole.log(\n  csv.stringify(result)\n) // 'title,platform\\nStardew Valley,Steam'\n```\n\n### YAML\n\n```javascript\nconst { yaml } = require('parserblade')\n\n// Parsing\nconst input = 'title: Stardew Valley\\nplatform: Steam'\nconst result = yaml.parse(input)\nconsole.log(result) // { title: 'Stardew Valley', platform: 'Steam' }\n\n// Stringifying\nconsole.log(\n  yaml.stringify(result)\n) // 'title: Stardew Valley\\nplatform: Steam'\n```\n\n### XML\n\n```javascript\nconst { xml } = require('parserblade')\n\n// Parsing\nconst input = '\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\u003cpackage\u003elodash\u003c/package\u003e'\nconst result = xml.parse(input)\nconsole.log(result) // { package: 'lodash' }\n\n// Stringifying\nconsole.log(\n  xml.stringify(result)\n) // '\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\u003cpackage\u003elodash\u003c/package\u003e'\n```\n\n## License\n\nMIT ©\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonhernandes%2Fparserblade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonhernandes%2Fparserblade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonhernandes%2Fparserblade/lists"}