Class: IndiGroupList

IndiGroupList


new IndiGroupList( GedCom , Caller )

IndiGroupList class is a grouped list which contains individuals list.
Parameters:
Name Type Description
GedCom GedCom GedCom parser instance
Caller mixed Caller instance where the class is being called
Author:

Extends

Members


(private) caller :mixed

Caller instance where the class has been called.
Type:
  • mixed
Inherited From:
Overrides:

(private) constructors :Array.<string>

Class chaining.
Type:
  • Array.<string>
Inherited From:
Overrides:

(private) gedcom :GedCom

GedCom parser instance.
Type:
Inherited From:
Overrides:

(private) groups :Object

Groups.
Type:
  • Object
Inherited From:

(readonly) idPattern :string

Default item ID pattern. The List#create method will append the index before last @.
Type:
  • string
Inherited From:
Overrides:

(private) length :Number

Items length.
Type:
  • Number
Inherited From:
Overrides:

(private) listKey :string

Items property ID.
Type:
  • string
Inherited From:

(private) pointer :Number

Items pointer.
Type:
  • Number
Inherited From:
Overrides:

Methods


add( …id [, item] ) → {List}

Adds an item.
Parameters:
Name Type Argument Description
id List|Data|Object|Number|string <repeatable>
Added items as List, or added item as Data, or added item ID as Number or string
item Data <optional>
Added item, required if argument 1 is an item ID
Inherited From:
Overrides:
Returns:
  • {List} - Self instance
Examples:
new List(<gedcom>, <instance>).add(new List(<gedcom>, <instance>));
new List(<gedcom>, <instance>).add(new Data(<gedcom>, <instance>));
new List(<gedcom>, <instance>).add(<id>, new Data(<gedcom>, <instance>));

copy( ) → {List}

Copies Self instance to a new list.
Inherited From:
Overrides:
Returns:
  • {List} - Copied list
Example:
new List(<gedcom>, <instance>).copy();

each( func ) → {boolean}

Iterates items.
Parameters:
Name Type Description
func ListIterator The iterator that will be executed on every item.
Inherited From:
Overrides:
Returns:
  • {boolean} - When true, iteration is executed, false otherwise
Example:
new List(<gedcom>, <instance>).each(function(id, item, index){
 document.write(id + ': ' + item.toString());
});

(private) eachCallback( args ) → {GroupList}

Calls the caller method on every groups.
Parameters:
Name Type Description
args Arguments Arguments of the caller method
Inherited From:
Returns:

extend( opts ) → {boolean}

Merge the contents of passed Object into the Self instance.
Parameters:
Name Type Description
opts Object Extended options
Inherited From:
Overrides:
Returns:
  • {boolean} - True if extending is succeeded, false otherwise
Example:
new Base().extend({
	<property>: <value>,
	<method>: function(){
	}
});

filter( …list1 [, value] ) → {List}

Reduces the set of matched items to those that match the passed items.
Parameters:
Name Type Argument Description
list1 List|Data|Number|string|Array <repeatable>
Filtered items as List, or filtered item as Data, or filtered item ID as Number or string, or key of a filtered property as Array
value mixed <optional>
Filtered item value, required if Argument 1 is key of a property
Inherited From:
Overrides:
Returns:
  • {List} - Reduced list
Examples:
new GroupList(<gedcom>, <instance>).filter(new List(<gedcom>, <instance>), new List(<gedcom>, <instance>));
new GroupList(<gedcom>, <instance>).filter(new Data(<gedcom>, <instance>), new Data(<gedcom>, <instance>));
new GroupList(<gedcom>, <instance>).filter(<id1>, <id2>);
new GroupList(<gedcom>, <instance>).filter(['NAME', 'FIRST'], <value>);

(private) filterByKeyAndValue( key , value ) → {List}

Reduces the set of matched items to whose property value match the passed property value.
Parameters:
Name Type Description
key Array Key of a filtered property
value mixed Filtered item value
Inherited From:
Overrides:
Returns:
  • {List} - Reduced list
Example:
new GroupList(<gedcom>, <instance>).filterByKeyAndValue(['NAME', 'FIRST'], <value>);

first( ) → {Data}

Get the first item.
Inherited From:
Overrides:
Returns:
  • {Data} - First item
Example:
new List(<gedcom>, <instance>).first();

fromObject( object , deep ) → {List}

Imports items from a specific primitive Object.
Parameters:
Name Type Description
object Object Object which will be imported
deep boolean When true, the import will run recursively
Inherited From:
Overrides:
Returns:
  • {List} - Self instance
Examples:
new List(<gedcom>, <instance>).from(new Object({
	type: 'List',
	items: new Object({
		<id1>: new Object({
			props: {
				'NAME': new Object({
					props: {
						//RECURSIVELY
					},
					value: <value>,
					type: 'Data'
				}
			},
			value: <value>,
			type: 'Data'
		},
		<id2>: new Object({
			props: {
				'NAME': new Object({
					props: {
						//RECURSIVELY
					},
					value: <value>,
					type: 'Data'
				}
			},
			value: <value>,
			type: 'Data'
		},
		<id3>: new Object({
			props: {
				'NAME': new Object({
					props: {
						//RECURSIVELY
					},
					value: <value>,
					type: 'Data'
				}
			},
			value: <value>,
			type: 'Data'
		}
	})
}));
new List(<gedcom>, <instance>).from(new Object({
	type: 'List',
	items: new Object({
		<id1>: new Object({
			props: {
				'NAME': new Object({
					props: {
						//RECURSIVELY
					},
					value: <value>,
					type: 'Data'
				}
			},
			value: <value>,
			type: 'Data'
		},
		<id2>: new Object({
			props: {
				'NAME': new Object({
					props: {
						//RECURSIVELY
					},
					value: <value>,
					type: 'Data'
				}
			},
			value: <value>,
			type: 'Data'
		},
		<id3>: new Object({
			props: {
				'NAME': new Object({
					props: {
						//RECURSIVELY
					},
					value: <value>,
					type: 'Data'
				}
			},
			value: <value>,
			type: 'Data'
		}
	})
}), true);

get( group [, create] ) → {List}

Get a group from GroupList.
Parameters:
Name Type Argument Default Description
group string|Number Group ID
create boolean <optional>
false When true, non existed group will be created
Inherited From:
Overrides:
Returns:
  • {List} - Selected group
Example:
new GroupList(<gedcom>, <instance>).get(<id>, true);

getAdoptedChildren( )

Synonym of Indi#getAdoptedChildren. Called on every individuals of all groups.

getAdoptedDaughters( )

Synonym of Indi#getAdoptedDaughters. Called on every individuals of all groups.

getAdoptedFathers( )

Synonym of Indi#getAdoptedFathers. Called on every individuals of all groups.

getAdoptedMothers( )

Synonym of Indi#getAdoptedMothers. Called on every individuals of all groups.

getAdoptedParents( )

Synonym of Indi#getAdoptedParents. Called on every individuals of all groups.

getAdoptedSons( )

Synonym of Indi#getAdoptedSons. Called on every individuals of all groups.

getAllAncestors( )

Synonym of Indi#getAllAncestors. Called on every individuals of all groups.

getAllDescendants( )

Synonym of Indi#getAllDescendants. Called on every individuals of all groups.

getAllRelatives( )

Synonym of Indi#getAllRelatives. Called on every individuals of all groups.

getAncestors( )

Synonym of Indi#getAncestors. Called on every individuals of all groups.

getAunts( )

Synonym of Indi#getAunts. Called on every individuals of all groups.

getBiologicalChildren( )

Synonym of Indi#getBiologicalChildren. Called on every individuals of all groups.

getBiologicalDaughters( )

Synonym of Indi#getBiologicalDaughters. Called on every individuals of all groups.

getBiologicalFathers( )

Synonym of Indi#getBiologicalFathers. Called on every individuals of all groups.

getBiologicalMothers( )

Synonym of Indi#getBiologicalMothers. Called on every individuals of all groups.

getBiologicalParents( )

Synonym of Indi#getBiologicalParents. Called on every individuals of all groups.

getBiologicalSons( )

Synonym of Indi#getBiologicalSons. Called on every individuals of all groups.

getBrothers( )

Synonym of Indi#getBrothers. Called on every individuals of all groups.

getBrothersAndSistersInLaw( )

Synonym of Indi#getBrothersAndSistersInLaw. Called on every individuals of all groups.

getBrothersInLaw( )

Synonym of Indi#getBrothersInLaw. Called on every individuals of all groups.

(private) getCaller( ) → {mixed}

Get the List caller instance.
Inherited From:
Overrides:
Returns:
  • {mixed} - List caller instance or Self instance
Example:
new List(<gedcom>, <instance>).getCaller();

getChildren( )

Synonym of Indi#getChildren. Called on every individuals of all groups.

getChildrenInLaw( )

Synonym of Indi#getChildrenInLaw. Called on every individuals of all groups.

getCloseRelatives( )

Synonym of Indi#getCloseRelatives. Called on every individuals of all groups.

getCommonChildren( )

Synonym of Indi#getCommonChildren. Called on every individuals of all groups.

getCousins( )

Synonym of Indi#getCousins. Called on every individuals of all groups.

getDaughters( )

Synonym of Indi#getDaughters. Called on every individuals of all groups.

getDaughtersInLaw( )

Synonym of Indi#getDaughtersInLaw. Called on every individuals of all groups.

getDescendants( )

Synonym of Indi#getDescendants. Called on every individuals of all groups.

getFathers( )

Synonym of Indi#getFathers. Called on every individuals of all groups.

getFathersAndMothersInLaw( )

Synonym of Indi#getFathersAndMothersInLaw. Called on every individuals of all groups.

getFathersInLaw( )

Synonym of Indi#getFathersInLaw. Called on every individuals of all groups.

getFosterChildren( )

Synonym of Indi#getFosterChildren. Called on every individuals of all groups.

getFosterDaughters( )

Synonym of Indi#getFosterDaughters. Called on every individuals of all groups.

getFosterFathers( )

Synonym of Indi#getFosterFathers. Called on every individuals of all groups.

getFosterMothers( )

Synonym of Indi#getFosterMothers. Called on every individuals of all groups.

getFosterParents( )

Synonym of Indi#getFosterParents. Called on every individuals of all groups.

getFosterSons( )

Synonym of Indi#getFosterSons. Called on every individuals of all groups.

getFullBrothers( )

Synonym of Indi#getFullBrothers. Called on every individuals of all groups.

getFullSiblings( )

Synonym of Indi#getFullSiblings. Called on every individuals of all groups.

getFullSisters( )

Synonym of Indi#getFullSisters. Called on every individuals of all groups.

getGrandChildren( )

Synonym of Indi#getGrandChildren. Called on every individuals of all groups.

getGrandDaughters( )

Synonym of Indi#getGrandDaughters. Called on every individuals of all groups.

getGrandFathers( )

Synonym of Indi#getGrandFathers. Called on every individuals of all groups.

getGrandMothers( )

Synonym of Indi#getGrandMothers. Called on every individuals of all groups.

getGrandParents( )

Synonym of Indi#getGrandParents. Called on every individuals of all groups.

getGrandSons( )

Synonym of Indi#getGrandSons. Called on every individuals of all groups.

getGreatGrandChildren( )

Synonym of Indi#getGreatGrandChildren. Called on every individuals of all groups.

getGreatGrandDaughters( )

Synonym of Indi#getGreatGrandDaughters. Called on every individuals of all groups.

getGreatGrandFathers( )

Synonym of Indi#getGreatGrandFathers. Called on every individuals of all groups.

getGreatGrandMothers( )

Synonym of Indi#getGreatGrandMothers. Called on every individuals of all groups.

getGreatGrandParents( )

Synonym of Indi#getGreatGrandParents. Called on every individuals of all groups.

getGreatGrandSons( )

Synonym of Indi#getGreatGrandSons. Called on every individuals of all groups.

getGroupIds( ) → {Array}

Get all groups IDs.
Inherited From:
Returns:
  • {Array} - All groups IDs
Example:
new GroupList(<gedcom>, <instance>).getGroupIds();

getGuardianChildren( )

Synonym of Indi#getGuardianChildren. Called on every individuals of all groups.

getGuardianDaughters( )

Synonym of Indi#getGuardianDaughters. Called on every individuals of all groups.

getGuardianFathers( )

Synonym of Indi#getGuardianFathers. Called on every individuals of all groups.

getGuardianMothers( )

Synonym of Indi#getGuardianMothers. Called on every individuals of all groups.

getGuardianParents( )

Synonym of Indi#getGuardianParents. Called on every individuals of all groups.

getGuardianSons( )

Synonym of Indi#getGuardianSons. Called on every individuals of all groups.

getHalfBrothers( )

Synonym of Indi#getHalfBrothers. Called on every individuals of all groups.

getHalfSiblings( )

Synonym of Indi#getHalfSiblings. Called on every individuals of all groups.

getHalfSisters( )

Synonym of Indi#getHalfSisters. Called on every individuals of all groups.

getHighestKey( ) → {string|Number}

Get the highest key of items.
Inherited From:
Overrides:
Returns:
  • {string|Number} - Highest key of item
Example:
new List(<gedcom>, <instance>).getHighestKey();

getIdPattern( [id] ) → {string}

Get the default item ID pattern. The List#create method will append the index before last @.
Parameters:
Name Type Argument Description
id string|Number <optional>
ID that will be parsed
Inherited From:
Overrides:
Returns:
  • {string} - ID pattern

getIds( ) → {Array}

Get all items IDs of all groups.
Inherited From:
Overrides:
Returns:
  • {Array} - All items IDs of all groups
Example:
new GroupList(<gedcom>, <instance>).getIds();

getIllegitimateChildren( )

Synonym of Indi#getIllegitimateChildren. Called on every individuals of all groups.

getIllegitimateDaughters( )

Synonym of Indi#getIllegitimateDaughters. Called on every individuals of all groups.

getIllegitimateFathers( )

Synonym of Indi#getIllegitimateFathers. Called on every individuals of all groups.

getIllegitimateMothers( )

Synonym of Indi#getIllegitimateMothers. Called on every individuals of all groups.

getIllegitimateParents( )

Synonym of Indi#getIllegitimateParents. Called on every individuals of all groups.

getIllegitimateSons( )

Synonym of Indi#getIllegitimateSons. Called on every individuals of all groups.

(private) getList( ) → {Object}

Get all items
Inherited From:
Overrides:
Returns:
  • {Object} - Items set
Example:
new List(<gedcom>, <instance>).getList();

(private) getMethodName( [instance] , method [, method [, indexInStack]] ) → {string}

Get the method name.
Parameters:
Name Type Argument Description
instance mixed <optional>
A class instance
method function The method
method string <optional>
Calling stack, only used in strict mode
indexInStack number <optional>
Caller method index in stack, only used in strict mode
Inherited From:
Overrides:
Returns:
  • {string} - The method name

(private) getMethodParams( [instance] , method ) → {Array.<string>}

Get the method params.
Parameters:
Name Type Argument Description
instance mixed <optional>
A class instance
method string The method name
Inherited From:
Overrides:
Returns:
  • {Array.<string>} - The method params

getMothers( )

Synonym of Indi#getMothers. Called on every individuals of all groups.

getMothersInLaw( )

Synonym of Indi#getMothersInLaw. Called on every individuals of all groups.

getNames( [type] ) → {Array}

Get all items names of all groups.
Parameters:
Name Type Argument Default Description
type Types.NamePart <optional>
Types.NamePart.Full Returned name part
Returns:
  • {Array} - Names of all items of groups of IndiGroupList
Examples:
new IndiGroupList(<gedcom>, <instance>).getNames();
new IndiGroupList(<gedcom>, <instance>).getNames(Types.NamePart.First);

getNaturalChildren( )

Synonym of Indi#getNaturalChildren. Called on every individuals of all groups.

getNaturalDaughters( )

Synonym of Indi#getNaturalDaughters. Called on every individuals of all groups.

getNaturalFathers( )

Synonym of Indi#getNaturalFathers. Called on every individuals of all groups.

getNaturalMothers( )

Synonym of Indi#getNaturalMothers. Called on every individuals of all groups.

getNaturalParents( )

Synonym of Indi#getNaturalParents. Called on every individuals of all groups.

getNaturalSons( )

Synonym of Indi#getNaturalSons. Called on every individuals of all groups.

getNephews( )

Synonym of Indi#getNephews. Called on every individuals of all groups.

getNephewsAndNieces( )

Synonym of Indi#getNephewsAndNieces. Called on every individuals of all groups.

getNextKey( ) → {string|Number}

Get the next key of items.
Inherited From:
Overrides:
Returns:
  • {string|Number} - Next key of item
Example:
new List(<gedcom>, <instance>).getNextKey();

getNieces( )

Synonym of Indi#getNieces. Called on every individuals of all groups.

getParents( )

Synonym of Indi#getParents. Called on every individuals of all groups.

getParentsInLaw( )

Synonym of Indi#getParentsInLaw. Called on every individuals of all groups.

getParentsOfChildren( )

Synonym of Indi#getParentsOfChildren. Called on every individuals of all groups.

getProperties( property [, property] ) → {Array}

Get all items selected properties of all groups.
Parameters:
Name Type Argument Description
property string|Array|boolean Key of selected property or when true, the property value will be converted to string
property string <optional>
Key of selected property, required if Argument 1 is a boolean
Inherited From:
Overrides:
Returns:
  • {Array} - All items Selected properties of all groups
Examples:
new GroupList(<gedcom>, <instance>).getProperties('NAME');
new GroupList(<gedcom>, <instance>).getProperties(true, 'NAME');

getRelatedChildren( )

Synonym of Indi#getRelatedChildren. Called on every individuals of all groups.

getRelatedDaughters( )

Synonym of Indi#getRelatedDaughters. Called on every individuals of all groups.

getRelatedFathers( )

Synonym of Indi#getRelatedFathers. Called on every individuals of all groups.

getRelatedMothers( )

Synonym of Indi#getRelatedMothers. Called on every individuals of all groups.

getRelatedParents( )

Synonym of Indi#getRelatedParents. Called on every individuals of all groups.

getRelatedSons( )

Synonym of Indi#getRelatedSons. Called on every individuals of all groups.

getRelatives( )

Synonym of Indi#getRelatives. Called on every individuals of all groups.

(private) getRelativesCallback( args ) → {IndiGroupList}

Calls the caller method on every individuals of all groups.
Parameters:
Name Type Description
args Arguments Arguments of the caller method
Returns:

getSiblings( )

Synonym of Indi#getSiblings. Called on every individuals of all groups.

getSiblingsInLaw( )

Synonym of Indi#getSiblingsInLaw. Called on every individuals of all groups.

getSisters( )

Synonym of Indi#getSisters. Called on every individuals of all groups.

getSistersInLaw( )

Synonym of Indi#getSistersInLaw. Called on every individuals of all groups.

getSons( )

Synonym of Indi#getSons. Called on every individuals of all groups.

getSonsAndDaughtersInLaw( )

Synonym of Indi#getSonsAndDaughtersInLaw. Called on every individuals of all groups.

getSonsInLaw( )

Synonym of Indi#getSonsInLaw. Called on every individuals of all groups.

getSpouses( )

Synonym of Indi#getSpouses. Called on every individuals of all groups.

getSpousesWithChildren( )

Synonym of Indi#getSpousesWithChildren. Called on every individuals of all groups.

getSpousesWithoutChildren( )

Synonym of Indi#getSpousesWithoutChildren. Called on every individuals of all groups.

getStepChildren( )

Synonym of Indi#getStepChildren. Called on every individuals of all groups.

getStepDaughters( )

Synonym of Indi#getStepDaughters. Called on every individuals of all groups.

getStepFathers( )

Synonym of Indi#getStepFathers. Called on every individuals of all groups.

getStepMothers( )

Synonym of Indi#getStepMothers. Called on every individuals of all groups.

getStepParents( )

Synonym of Indi#getStepParents. Called on every individuals of all groups.

getStepSons( )

Synonym of Indi#getStepSons. Called on every individuals of all groups.

getType( ) → {string}

Get the type of a class.
Inherited From:
Overrides:
Returns:
  • {string} - The type of a class
Examples:
new Properties(<gedcom>, <instance>).getType();
new List(<gedcom>, <instance>).getType();
new Data(<gedcom>, <instance>).getType();

getUncles( )

Synonym of Indi#getUncles. Called on every individuals of all groups.

getUnclesAndAunts( )

Synonym of Indi#getUnclesAndAunts. Called on every individuals of all groups.

(private) init( instance )

Creates a class.
Parameters:
Name Type Description
instance function Self class
Inherited From:
Overrides:

inList( id ) → {boolean}

Checks for a specified ID within items.
Parameters:
Name Type Description
id string|Number Checked item ID
Inherited From:
Overrides:
Returns:
  • {boolean} - True if item is found in items, false otherwise
Example:
new List(<gedcom>, <instance>).inList(<id>);

keys( [index] ) → {Array|string|Number}

Get all keys of items.
Parameters:
Name Type Argument Description
index Number <optional>
Index of selected key
Inherited From:
Overrides:
Returns:
  • {Array|string|Number} - All keys of items or selected key
Examples:
new List(<gedcom>, <instance>).key();
new List(<gedcom>, <instance>).key(10);

last( ) → {Data}

Get the last item
Inherited From:
Overrides:
Returns:
  • {Data} - Last item
Example:
new List(<gedcom>, <instance>).last();

merge( …list ) → {List}

Merges any Lists into Self instance.
Parameters:
Name Type Argument Description
list List <repeatable>
Merged lists
Inherited From:
Overrides:
Returns:
  • {List} - Self instance
Example:
new List(<gedcom>, <instance>).merge(
	new List(<gedcom>, <instance>),
	new List(<gedcom>, <instance>)
);

not( …list1 [, value] ) → {List}

Removes elements from the set of matched items.
Parameters:
Name Type Argument Description
list1 List|Data|Number|string|Array <repeatable>
Not removed items as List, or not removed item as Data, or not removed item ID as Number or string, or key of not filtered property as Array
value mixed <optional>
Not removed item value, required if Argument 1 is key of a property
Inherited From:
Overrides:
Returns:
  • {List} - Reduced list
Examples:
new GroupList(<gedcom>, <instance>).not(new List(<gedcom>, <instance>), new List(<gedcom>, <instance>));
new GroupList(<gedcom>, <instance>).not(new Data(<gedcom>, <instance>), new Data(<gedcom>, <instance>));
new GroupList(<gedcom>, <instance>).not(<id1>, <id2>);
new GroupList(<gedcom>, <instance>).not(['NAME', 'FIRST'], <value>);

orderBy( …key [, …sort] ) → {List}

Orders items by property in every groups
Parameters:
Name Type Argument Default Description
key string|Array <repeatable>
Key of selected property
sort Types.Order <optional>
<repeatable>
Types.Order.Asc Order type
Inherited From:
Overrides:
Returns:
  • {List} - Ordered grouped list
Example:
new GroupList(<gedcom>, <instance>).orderBy('NAME', 'asc');
GroupList
new List(<gedcom>, <instance>).orderBy(['NAME', 'FIRST'], 'asc', 'BIRTHDAY', 'desc');

remove( id ) → {List}

Removes an item.
Parameters:
Name Type Description
id Number|string Removed item ID
Inherited From:
Overrides:
Returns:
  • {List} - Self instance
Example:
new List(<gedcom>, <instance>).remove(<id>);

set( key , value )

Set an item
Parameters:
Name Type Description
key string|Number Pointer or an item ID
value Data Item value
Inherited From:
Overrides:
Example:
new List(<gedcom>, <instance>).set(<id>, new Data(<gedcom>, <instance>);

(private) setCaller( instance ) → {mixed}

Set the Data caller instance.
Parameters:
Name Type Description
instance mixed The List caller instance
Inherited From:
Overrides:
Returns:
  • {mixed} - Self instance
Example:
new List(<gedcom>, <instance>).setCaller(<instance>);

setList( list ) → {Object}

Set all items
Parameters:
Name Type Description
list Object New items set
Inherited From:
Overrides:
Returns:
  • {Object} - Items set
Example:
new List(<gedcom>, <instance>).setList(new Object({
	<id1> : new Data(<gedcom>, <instance>),
	<id2> : new Data(<gedcom>, <instance>),
	<id3> : new Data(<gedcom>, <instance>)
}));

toArray( [deep] ) → {Array}

Converts items to Array.
Parameters:
Name Type Argument Default Description
deep boolean <optional>
false When true, the convert will run recursively
Inherited From:
Overrides:
Returns:
  • {Array} - Converted items
Example:
new List(<gedcom>, <instance>).toArray();

toGedCom( ) → {string}

Converts items to GEDCOM structure string.
Inherited From:
Overrides:
Returns:
  • {string} - GEDCOM structure string
Example:
new List(<gedcom>, <instance>).toGedCom();

toList( [type] ) → {List}

Converts all groups into one list.
Parameters:
Name Type Argument Default Description
type Types.List|string <optional>
Default is same as the type of groups Type of output list or output list name.
Inherited From:
Returns:
  • {List} - Converted List
Examples:
new GroupList(<gedcom>, <instance>).toList();
new GroupList(<gedcom>, <instance>).toList(List);
new GroupList(<gedcom>, <instance>).toList('List');

toObject( [deep] ) → {Object}

Converts items to a specific pritimive Object.
Parameters:
Name Type Argument Default Description
deep boolean <optional>
false When true, the convert will run recursively
Inherited From:
Overrides:
Returns:
  • {Object} - Converted items
Example:
new List(<gedcom>, <instance>).toObject();

toString( [returnIds] ) → {string}

Converts items to string.
Parameters:
Name Type Argument Default Description
returnIds boolean <optional>
true When true, convert get every item ID as string
Inherited From:
Overrides:
Returns:
  • {string} - Grouped list group IDs or type of list if Argument 1 is not true
Examples:
new GroupList(<gedcom>, <instance>).toString();
new GroupList(<gedcom>, <instance>).toString(false);

(private) validateKey( key ) → {string|Number}

Validates key of an item. If Argument 1 is an item as Data, item ID will be returned.
Parameters:
Name Type Description
key string|Number|Data Key of an item or item as Data
Inherited From:
Overrides:
Returns:
  • {string|Number} - Key of an item
Examples:
new List(<gedcom>, <instance>).validateKey(<id>);
new List(<gedcom>, <instance>).validateKey(new Data(<gedcom>, <instance>);