index.js
function getFingerprintsForAnimal(animalDir) {
	if (!fs.existsSync(animalDir) || !fs.statSync(animalDir).isDirectory()) {
		return false;
	}

	var fgpFiles = fs.readdirSync(animalDir).filter(function (entry) {
		return entry.split('.').pop().toLowerCase() == 'fgp';
	});

	var fgps = [];
	fgpFiles.forEach(function (fgpFile) {
		fgpFile = path.join(animalDir, fgpFile);
		var fgpData = fgpReader(fgpFile);
		fgps.push({
			id: path.basename(fgpFile, '.fgp'),
			fgp: fgpData,
			img64: 'data:image/jpeg;base64,' + fs.readFileSync(getFGPImageName(fgpFile)).toString('base64')
		});
	});
	return fgps;
}
function getFingerprintsForAnimal(animalDir) {
	if (!fs.existsSync(animalDir) || !fs.statSync(animalDir).isDirectory()) {
		return false;
	}

	var fgpFiles = fs.readdirSync(animalDir).filter(function (entry) {
		return entry.split('.').pop().toLowerCase() == 'fgp';
	});

	var fgps = [];
	fgpFiles.forEach(function (fgpFile) {
		fgpFile = path.join(animalDir, fgpFile);
		var fgpData = fgpReader(fgpFile);
		fgps.push({
			id: path.basename(fgpFile, '.fgp'),
			fgp: fgpData,
			img64: 'data:image/jpeg;base64,' + fs.readFileSync(getFGPImageName(fgpFile)).toString('base64')
		});
	});
	return fgps;
}
function getFingerprintsForAnimal ( animalDir ) { if ( ! fs . existsSync ( animalDir ) || ! fs . statSync ( animalDir ) . isDirectory ( ) ) { return false ; } var fgpFiles = fs . readdirSync ( animalDir ) . filter ( function ( entry ) { return entry . split ( '.' ) . pop ( ) . toLowerCase ( ) == 'fgp' ; } ) ; var fgps = [ ] ; fgpFiles . forEach ( function ( fgpFile ) { fgpFile = path . join ( animalDir , fgpFile ) ; var fgpData = fgpReader ( fgpFile ) ; fgps . push ( { id : path . basename ( fgpFile , '.fgp' ) , fgp : fgpData , img64 : 'data:image/jpeg;base64,' + fs . readFileSync ( getFGPImageName ( fgpFile ) ) . toString ( 'base64' ) } ) ; } ) ; return fgps ; }
Fetches fingerprints for an individual
@param {String} individual ID
@return {Array}
Fetches fingerprints for an individual