🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@stamhoofd/structures

Package Overview
Dependencies
Maintainers
1
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stamhoofd/structures - npm Package Compare versions

Comparing version

to
1.2.16

3

dist/src/members/MemberDetails.d.ts
import { AutoEncoder } from '@simonbackx/simple-encoding';
import { Address } from '../Address';
import { Group } from '../Group';
import { EmergencyContact } from './EmergencyContact';

@@ -32,3 +33,5 @@ import { Gender } from './Gender';

matchQuery(query: string): boolean;
doesMatchGroup(group: Group): boolean;
getMatchingGroups(groups: Group[]): Group[];
}
//# sourceMappingURL=MemberDetails.d.ts.map

@@ -7,2 +7,3 @@ "use strict";

const Address_1 = require("../Address");
const GroupGenderType_1 = require("../GroupGenderType");
const EmergencyContact_1 = require("./EmergencyContact");

@@ -61,2 +62,25 @@ const Gender_1 = require("./Gender");

}
doesMatchGroup(group) {
const birthYear = this.birthDay.getFullYear();
if (group.settings.minBirthYear) {
if (birthYear < group.settings.minBirthYear) {
return false;
}
}
if (group.settings.maxBirthYear) {
if (birthYear > group.settings.maxBirthYear) {
return false;
}
}
if (this.gender == Gender_1.Gender.Male && group.settings.genderType == GroupGenderType_1.GroupGenderType.OnlyFemale) {
return false;
}
if (this.gender == Gender_1.Gender.Female && group.settings.genderType == GroupGenderType_1.GroupGenderType.OnlyMale) {
return false;
}
return false;
}
getMatchingGroups(groups) {
return groups.filter(g => this.doesMatchGroup(g));
}
}

@@ -63,0 +87,0 @@ tslib_1.__decorate([

import { AutoEncoder } from '@simonbackx/simple-encoding';
import { Address } from '../Address';
import { Group } from '../Group';
import { EmergencyContact } from './EmergencyContact';

@@ -32,3 +33,5 @@ import { Gender } from './Gender';

matchQuery(query: string): boolean;
doesMatchGroup(group: Group): boolean;
getMatchingGroups(groups: Group[]): Group[];
}
//# sourceMappingURL=MemberDetails.d.ts.map
import { __decorate } from "tslib";
import { ArrayDecoder, AutoEncoder, DateDecoder, EnumDecoder, field, StringDecoder } from '@simonbackx/simple-encoding';
import { Address } from '../Address';
import { GroupGenderType } from '../GroupGenderType';
import { EmergencyContact } from './EmergencyContact';

@@ -57,2 +58,25 @@ import { Gender } from './Gender';

}
doesMatchGroup(group) {
const birthYear = this.birthDay.getFullYear();
if (group.settings.minBirthYear) {
if (birthYear < group.settings.minBirthYear) {
return false;
}
}
if (group.settings.maxBirthYear) {
if (birthYear > group.settings.maxBirthYear) {
return false;
}
}
if (this.gender == Gender.Male && group.settings.genderType == GroupGenderType.OnlyFemale) {
return false;
}
if (this.gender == Gender.Female && group.settings.genderType == GroupGenderType.OnlyMale) {
return false;
}
return false;
}
getMatchingGroups(groups) {
return groups.filter(g => this.doesMatchGroup(g));
}
}

@@ -59,0 +83,0 @@ __decorate([

2

package.json
{
"name": "@stamhoofd/structures",
"version": "1.2.15",
"version": "1.2.16",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "module": "./esm/dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet