{"id":44512045,"url":"https://github.com/rootsdev/gedcomx-js","last_synced_at":"2026-02-13T15:21:41.586Z","repository":{"id":57245660,"uuid":"57251830","full_name":"rootsdev/gedcomx-js","owner":"rootsdev","description":"JavaScript library for GEDCOM X","archived":false,"fork":false,"pushed_at":"2017-03-29T00:18:44.000Z","size":1885,"stargazers_count":10,"open_issues_count":10,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-09-29T10:30:40.605Z","etag":null,"topics":["gedcomx","genealogy"],"latest_commit_sha":null,"homepage":"http://rootsdev.org/gedcomx-js/","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/rootsdev.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":"2016-04-27T22:01:53.000Z","updated_at":"2024-02-19T14:59:03.000Z","dependencies_parsed_at":"2022-08-24T16:31:13.074Z","dependency_job_id":null,"html_url":"https://github.com/rootsdev/gedcomx-js","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/rootsdev/gedcomx-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsdev%2Fgedcomx-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsdev%2Fgedcomx-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsdev%2Fgedcomx-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsdev%2Fgedcomx-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootsdev","download_url":"https://codeload.github.com/rootsdev/gedcomx-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsdev%2Fgedcomx-js/sbom","scorecard":{"id":784663,"data":{"date":"2025-08-11","repo":{"name":"github.com/rootsdev/gedcomx-js","commit":"08b2fcde96f1e301c78561bfb7a8b0cac606e26e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T05:46:14.695Z","repository_id":57245660,"created_at":"2025-08-23T05:46:14.695Z","updated_at":"2025-08-23T05:46:14.695Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29411143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gedcomx","genealogy"],"created_at":"2026-02-13T15:21:40.629Z","updated_at":"2026-02-13T15:21:41.493Z","avatar_url":"https://github.com/rootsdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GEDCOM X JS\n\n[![npm](https://img.shields.io/npm/v/gedcomx-js.svg?maxAge=2592000)](https://www.npmjs.com/package/gedcomx-js)\n[![Build Status](https://travis-ci.org/rootsdev/gedcomx-js.svg?branch=master)](https://travis-ci.org/rootsdev/gedcomx-js)\n[![codecov](https://codecov.io/gh/rootsdev/gedcomx-js/branch/master/graph/badge.svg)](https://codecov.io/gh/rootsdev/gedcomx-js)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/rootsdev/gedcomx-js/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/rootsdev/gedcomx-js/?branch=master)\n\nA JavaScript library for the [GEDCOM X](http://www.gedcomx.org/) data model\nincluding the [GEDCOM X RS](https://github.com/FamilySearch/gedcomx-rs),\nthe [GEDCOM X Records](https://github.com/FamilySearch/gedcomx-record/blob/master/specifications/record-specification.md),\nand the [GEDCOM X Atom Extensions](https://github.com/FamilySearch/gedcomx-rs/blob/master/specifications/atom-model-specification.md) specifications.\n\nRead the [documentation](http://rootsdev.org/gedcomx-js/) for a list of all \nclasses and methods.\n\n## Install\n\n__NPM__\n\n```\nnpm install --save gedcomx-js\n```\n\n__CDN via [unpkg](https://unpkg.com/#/)__\n\n```html\n\u003cscript src=\"https://unpkg.com/gedcomx-js@2.5.1/dist/gedcomx.min.js\"\u003e\u003c/script\u003e\n```\n\nIn the browser, gedcomx-js is attached to the `window` as a global named `GedcomX`.\n\n## Usage\n\nCreate a document from a JSON object.\n\n```js\nvar doc = new GedcomX({\n  persons: [\n    {\n      id: 'person1',\n      facts: [\n        {\n          type: 'http://gedcomx.org/Birth',\n          date: {\n            formal: '+2014-04-09'\n          },\n          place: {\n            original: 'Verona'\n          }\n        }\n      ]\n    }\n  ]\n});\n```\n\nOr build a document from scratch.\n\n```js\nvar doc = new GedcomX()\n  .addPerson(\n    new GedcomX.Person()\n      .addFact(\n        new GedcomX.Fact()\n          .setType('http://gedcomx.org/Birth')\n          .setDate(new GedcomX.Date().setFormal('+2014-04-09'))\n          .setPlace(new GedcomX.PlaceReference().setOriginal('Verona'))\n      )\n  );\n```\n\nOr mix and match.\n\n```js\nvar doc = new GedcomX({\n  persons: [\n    new GedcomX.Person({\n      facts: [\n        new GedcomX.Fact()\n          .setType('http://gedcomx.org/Birth')\n          .setDate({ formal: '+2014-04-09' })\n          .setPlace({ original: 'Verona' })\n      ]\n    })\n  ]\n});\n```\n\n### RS Spec, Records Spec, and Atom Extensions\n\nThe RS, Records, and Atom extensions are disabled by default. They must be\nexplicitly enabled.\n\n```js\nGedcomX.enableRsExtensions();\nGedcomX.enableRecordsExtensions();\nGedcomX.enableAtomExtensions();\n```\n\nNote that the Atom extensions depend on the RS extensions thus calling\n`enableAtomExtensions()` will also call `enableRsExtensions()`.\n\n## Installation\n\n```\nnpm install gedcomx-js\n```\n\n## Notes\n\nThe use of `new` when constructing objects is optional. The two following lines of code are equivalent:\n\n```js\nnew GedcomX.Person();\nGedcomX.Person();\n```\n\nAll objects have a `toJSON()` method for serialization.\n\nThe library is currently just an [anemic domain model](https://en.wikipedia.org/wiki/Anemic_domain_model)\nfor the [GEDCOM X JSON Serialization Format](https://github.com/FamilySearch/gedcomx/blob/master/specifications/json-format-specification.md).\nWe plan on eventually adding useful helpers and better enforcement of the specification\n(such as checking the format of formal dates).\n\nYou can add helpers of your own. Perhaps you're working with a data set where\npeople only have one name with no prefix or suffix. You'll end up doing this often:\n\n```js\nperson.addName(\n  GedcomX.Name()\n    .addNameForm(\n      GedcomX.NameForm()\n        .addNamePart(\n          GedcomX.NamePart()\n            .setType('http://gedcomx.org/Given')\n            .setValue('Jonathan')\n          )\n        .addNamePart(\n          GedcomX.NamePart()\n            .setType('http://gedcomx.org/Surname')\n            .setValue('Burrows')\n        )\n    )\n);\n```\n\nThat's a lot of work for one name. So you could create your own helper method\nby adding to the `GedcomX.Person` prototype.\n\n```js\nGedcomX.Person.prototype.addSimpleName = function(given, surname){\n  this.addName(\n    GedcomX.Name()\n      .addNameForm(\n        GedcomX.NameForm()\n          .addNamePart(\n            GedcomX.NamePart()\n              .setType('http://gedcomx.org/Given')\n              .setValue(given)\n          )\n          .addNamePart(\n            GedcomX.NamePart()\n              .setType('http://gedcomx.org/Surname')\n              .setValue(surname)\n          )\n      )\n  )\n};\n```\n\nThen adding names is easy:\n\n```js\nperson.addSimpleName('Jonathan', 'Burrows');\n```\n\n## Data Model Extensions\n\nGEDCOM X allows for it's data model to be [extended](https://github.com/FamilySearch/gedcomx/blob/master/specifications/conceptual-model-specification.md#extensibility).\nThe [RS](https://github.com/FamilySearch/gedcomx-rs/blob/master/specifications/rs-specification.md)\nand [Records](https://github.com/FamilySearch/gedcomx-record/blob/master/specifications/record-specification.md)\nspecs are defined as extensions.\n\nThere are two ways that the spec can be extended.\n\n### 1. Adding Properties to Existing Data Types\n\nExtensions can add properties to existing data types. For example the RS spec\ndefines `resourceId` as an extension to `ResourceReference`. gedcomx-js supports \nproperty extensions by using prototypical inheritance which allows for prototypes\nto be modified.\n\nThere are three situations where extensions need to be accounted for:\n\n1. __Deserialization and Instantiation__: All classes have an `init()` method which\ncan me overriden to account for additional properties.\n\n    ```js\n    // Override init() so that we can deserialize normalized values\n    var oldInit = GedcomX.ResourceReference.prototype.init;\n    GedcomX.ResourceReference.prototype.init = function(json){\n      oldInit.call(this, json);\n      if(json){\n        this.setResourceId(json.resourceId);\n      }\n    };\n    ```\n    \n2. __Getters and Setters__: Just extend the prototype.\n\n    ```js\n    /**\n     * Set the resourceId\n     * \n     * @param {Boolean} resourceId\n     * @return {ResourceReference} this\n     */\n    GedcomX.ResourceReference.prototype.setResourceId = function(resourceId){\n      this.resourceId = resourceId;\n      return this;\n    };\n    \n    /**\n     * Get the resourceId\n     * \n     * @return {Boolean} resourceId\n     */\n    GedcomX.ResourceReference.prototype.getResourceId = function(){\n      return this.resourceId;\n    };\n    ```\n    \n3. __Serialization__: Each class has a static `jsonProps` attribute which is\na list of properties that should be serialized.\n\n    ```js\n    // Extend serialization properties\n    GedcomX.ResourceReference.jsonProps.push('resourceId');\n    ```\n    \n    Not only does it support extensibility but it also great reduces code duplication.\n\n### 2. Adding New Data Types\n\nNew data types are added by setting a reference on the exported `GedcomX` object.\n\n```js\nvar DisplayProperties = function(json){\n  // Constructor\n};\n\n// Lots of prototype setup...\n\n// Add to the GedcomX object\nGedcomX.DisplayProperties = DisplayProperties;\n```\n\nNext we need to configure when our new data type will be used. The example above\nuses `DisplayProperties` which is defined in the [RS spec](https://github.com/FamilySearch/gedcomx-rs/blob/master/specifications/rs-specification.md#extensions-person-data-type)\nas being an extension of `Person`. Thus we also must follow the method described\nabove for adding the new property `display` to the existing data type `Person`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootsdev%2Fgedcomx-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootsdev%2Fgedcomx-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootsdev%2Fgedcomx-js/lists"}