Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status Coverage Status Dependency Status devDependency Status


Generate research opportunities for the FamilySearch Family Tree.

fs-check depends on the FamilySearch-javascript-sdk and was designed to be paired with fs-traversal.


// fs-check was designed to be paired with fs-traversal
var FS = new FamilySearch({});
var traversal = FSTraversal(FS)
      .person(function(person) {

        // Get a list of all checks that match the "person" function signature
        var checks = FSCheck.signature('person');
        for(var i = 0; i < checks.length; i++){
          // Call the check function to generate an opportunity
          var opportunity = checks[i].check(person);
          // Check functions return nothing (undefined) when there is
          // no opportunity. For example, the missingBirth check will
          // not return an opportunity for someone that has birth information
            // Opportunities do not have any valuable display strings until
            // they have been translated
            FSCheck.translate(opportunity, 'es');

// Checks can be called by type (useful for display purposes)
var problemChecks = FSCheck.type('problem');

// Checks can be called by ID
var missingBirthCheck ='missingBirth');
var missingBirthOpportunity = missingBirthCheck.check(person);


Download fs-check.js and enjoy. (Packaged with love by browserify)


Node is supported but the package is not in npm yet.



Return a list of all checks that match the given signature.

var checks = FSCheck.signature('parents');


Get a list of all available signatures

var signatures = FSCheck.signatures();


Return a list of all checks that match the given type.

var checks = FSCheck.type('cleanup');


Get a list of all available types.

var types = FSCheck.types();


Return the check that matches the given ID

var check ='missingDeath');

translate(opportunity, language)

Translate an opportunity into the specified language. title and description properties will be added to the opportunity.

FSCheck.translate(opportunity, 'es');

language(code, data)

Register a language to support translations. The data object is a map that is keyed by the check IDs. The values are objects with title and description strings. The description can contain markdown; it will be converted to HTML as part of the translation process.

This method should only be used directly when using custom language packs. All packaged langauge packs are setup to register themselves when included in the browser. All languages are automatically included when using node.

  code: 'en',
  checks: {
    deathBeforeBirth: {
      title: 'Died Before Born',
      description: '# header\nparagraph'

title(checkId, language)

Get the translated title of a check. Useful for display purposes if you want to display to users the checks being used without having to run them.

FSCheck.title('deathBeforeBirth', 'de');

help(helpId, language)

Get the title and url for a help doc. helpIds are obtained from the help property of checks. May also pass in multiple helpIds via an array.

// single'customEvents', 'en');

// returns
  title: 'Custom Events and Facts',
  url: ''

// multiple['customEvents', 'recordHints'], 'en');

// returns
    title: 'Custom Events and Facts',
    url: ''
    title: 'Reviewing Record Hints',
    url: ''

add(check, templates)

Add a new check.

  id: 'testAdd',
  type: 'testType',
  signature: 'testSignature',
  help: [],
  check: function(){
    return {
      id: 'testAdd:TTTT',
      type: 'testType',
      checkId: 'testAdd',
      personId: 'TTTT',
      person: {},
      gensearch: {},
      template: {
        foo: 'bar'
}, {
  'en': {
    title: 'Test add check',
    description: '{{foo}}'
  'es': {
    title: 'Prueba de añadir',
    description: '{{foo}}'


Remove a check.



View a list of the checks grouped by signature and type.

All checks have the following properties:

  • id - A unique ID used to call the opportunity directly via id() and used to generate opportunity IDs by concatenating it with with the person ID.
  • title - A human-readable title of the check and opportunities to be used in display.
  • signature - The signature of the check.
  • type - The type of the check, matching one of the following:
    • problem
    • cleanup
    • source
    • person
    • family
  • help - An array of ids that can be used to retrieve urls and translated titles via the help method.
  • check - The function called to run the check and possibly generate opportunities; undefined is returned if there is no opportunity available for this check.


View examples of the opportunities generated by the checks at the demo site.


  id: '',
  type: ''
  checkId: '',
  personId: '',
  person: FamilySearch.Person(),
  gensearch: {},
  template: {}


The ID of the opportunity, generated by concatenating the check ID and the person ID. For example, birthBeforeDeath:KWML-4YX.


The type of opportunity (should match the type of the check that generated it).


ID of the chech which created this opportunity.


ID of the person, for convenience.


The FamilySearch person that this opportunity is for. person will be a FamilySearch.Person() object.


A gensearch object matching schema or undefined.


Data used to fill in the template when translating.


These function are used internally but are exposed in case they can be useful for users of fs-check.


Extract the year (integer) from a Fact, when possible. May return undefined.


Extract the place string from a Fact, when possible. May return undefined.


Return a basic gensearch object for a Person. Includes the following properties, when possible:

  • givenName
  • familyName
  • birthPlace
  • birthDate
  • deathPlace
  • deathDate


Expose gedcomx-date-js.


Every pull request that adds a check should contain the following things:

  1. A check that returns ONE opportunity. (Look at existing checks and follow the conventions)
  2. An update to lib/index.js to register your check.
  3. A set of test cases that provide 100% code coverage for your check.
  4. One instance of doc('checkName', opportunity) in one of your test cases to document your check for gh-pages.
  5. An update to the docs by running npm run docs.

Be careful not to add a check that overlaps with another check.

# To run the tests
npm test

# To generate the code coverage
npm run coverage

# To build the docs
npm run docs

# To build the library with browserify
npm run build

Viewing Examples and Test Coverage Locally

Just need to setup a simple http server that handles static files. We recommend https-server.

  1. Install the server npm install -g http-server
  2. Navigate to the directory of this repo cd fs-check
  3. Run the server http-server

To view the coverage, run npm run coverage then open localhost:8080/coverage/lcov-report.

To view the examples, run npm run docs then open localhost:8080.




Find Research Opportunities in the FamilySearch Family Tree







No packages published