{"id":29792400,"url":"https://github.com/mkacct/cdif-ts","last_synced_at":"2026-01-20T16:45:01.263Z","repository":{"id":305818980,"uuid":"1005384360","full_name":"mkacct/cdif-ts","owner":"mkacct","description":"cDIF parser/serializer written in TypeScript","archived":false,"fork":false,"pushed_at":"2025-07-22T07:22:15.000Z","size":173,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-22T07:33:46.258Z","etag":null,"topics":["cdif","data-interchange","data-serialization","parser","serialization","structured-data"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@mkacct/cdif","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkacct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T06:32:49.000Z","updated_at":"2025-07-22T07:22:18.000Z","dependencies_parsed_at":"2025-07-22T07:33:49.545Z","dependency_job_id":"6ddbbce5-cffb-4b21-a069-451b35594ce7","html_url":"https://github.com/mkacct/cdif-ts","commit_stats":null,"previous_names":["mkacct/cdif-ts"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mkacct/cdif-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkacct%2Fcdif-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkacct%2Fcdif-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkacct%2Fcdif-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkacct%2Fcdif-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkacct","download_url":"https://codeload.github.com/mkacct/cdif-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkacct%2Fcdif-ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267451242,"owners_count":24089301,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cdif","data-interchange","data-serialization","parser","serialization","structured-data"],"created_at":"2025-07-28T01:39:14.696Z","updated_at":"2026-01-20T16:45:01.257Z","avatar_url":"https://github.com/mkacct.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cDIF for TypeScript\n\n[![NPM Version](https://img.shields.io/npm/v/%40mkacct%2Fcdif)](https://www.npmjs.com/package/@mkacct/cdif)\n\nThis is a parser and serializer for [cDIF](https://github.com/mkacct/cdif/blob/main/spec.md), an intuitive and versatile textual data interchange format. The package is written in TypeScript, so it includes type definitions. It is up to date with cDIF version 1.0.2.\n\nTo install:\n\n```sh\nnpm install @mkacct/cdif\n```\n\n## Basic usage\n\nThe following examples demonstrate the most basic usage of this library. The behavior can be customized in many ways; please see the documentation for details.\n\n### CDIF version\n\nThe `CDIF` constructor takes one optional argument, which is the major version of the cDIF specification by which it should abide. (If it is omitted, the latest version will be assumed.)\n\n```typescript\nconst cdif = new CDIF(); // defaults to latest version\nconst cdif1 = new CDIF(1);\n```\n\n### Parsing\n\n`CDIF.parse()` can be used to parse any cDIF text (with or without `#` directives).\n\nAn optional second argument (not shown in the example) may be supplied to configure the parser; check the documentation for all available [parser configuration options](https://github.com/mkacct/cdif-ts/wiki/Configuration%3A-Parser).\n\n```typescript\nconst cdif = new CDIF();\nconst cdifText: string = /* input cDIF text */;\nconst value: unknown = cdif.parse(cdifText); // JS value\n```\n\n### Serialization\n\n`CDIF.serialize()` returns a plain cDIF value (no `#` directives), while `CDIF.serializeFile()` allows you to add various file format elements to the output. (Check the documentation for all available [file formatter configuration options](https://github.com/mkacct/cdif-ts/wiki/Configuration%3A-File-formatter).)\n\nWhile not strictly necessary, configuration options are used in this example to enable formatted (\"pretty-printed\") output. They are supplied as an optional second argument to both `CDIF.serialize()` and `CDIF.serializeFile()`; check the documentation for all available [serializer configuration options](https://github.com/mkacct/cdif-ts/wiki/Configuration%3A-Serializer).\n\n```typescript\nconst cdif = new CDIF();\nconst value: unknown = /* input JS value */;\nconst serializerOptions: CDIFSerializerOptions = {\n    indent: \"\\t\", // or any other string (ex. \"    \"), or omit to output as one line\n    structureEntrySeparator: \";\" // or \",\"\n};\n// For general use:\nconst valueText: string = cdif.serialize(value, serializerOptions); // cDIF value text\n// For file output:\nconst fileText: string = cdif.serializeFile(value, serializerOptions, {\n    cdifVersionString: \"1.0.2\"\n}); // cDIF file text (includes initial \"cDIF\" directive)\n```\n\n## Documentation\n\nCheck the GitHub [wiki](https://github.com/mkacct/cdif-ts/wiki) for documentation, including [guides](https://github.com/mkacct/cdif-ts/wiki#guides) and [API reference](https://github.com/mkacct/cdif-ts/wiki#api-reference).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkacct%2Fcdif-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkacct%2Fcdif-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkacct%2Fcdif-ts/lists"}