File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ import { VCARD } from '../vocabulary/mod.js';
33import { Email } from './Email.js' ;
44
55export class EmailDataset extends DatasetWrapper {
6- get email ( ) : Iterable < Email > {
7- return this . objectsOf ( VCARD . hasEmail , Email ) ;
6+ get emails ( ) : Iterable < Email > {
7+ const objects = new Set ( [
8+ ...this . instancesOf ( VCARD . Email , Email ) ,
9+ ...this . objectsOf ( VCARD . hasEmail , Email ) ,
10+ ...this . objectsOf ( VCARD . email , Email ) ,
11+ ] )
12+
13+ return objects
814 }
915}
Original file line number Diff line number Diff line change @@ -3,7 +3,12 @@ import { VCARD } from '../vocabulary/vcard.js';
33import { Telephone } from './Telephone.js' ;
44
55export class TelephoneDataset extends DatasetWrapper {
6- get telephone ( ) : Iterable < Telephone > {
7- return this . objectsOf ( VCARD . hasTelephone , Telephone ) ;
6+ get telephones ( ) : Iterable < Telephone > {
7+ const objects = new Set ( [
8+ ...this . objectsOf ( VCARD . hasTelephone , Telephone ) ,
9+ ...this . objectsOf ( VCARD . tel , Telephone ) ,
10+ ] )
11+
12+ return objects
813 }
914}
Original file line number Diff line number Diff line change 11export const VCARD = {
22 fn : "http://www.w3.org/2006/vcard/ns#fn" ,
3+ Email : "http://www.w3.org/2006/vcard/ns#Email" ,
34 email : "http://www.w3.org/2006/vcard/ns#email" ,
45 hasEmail : "http://www.w3.org/2006/vcard/ns#hasEmail" ,
56 hasValue : "http://www.w3.org/2006/vcard/ns#hasValue" ,
67 hasPhoto : "http://www.w3.org/2006/vcard/ns#hasPhoto" ,
8+ tel : "http://www.w3.org/2006/vcard/ns#tel" ,
79 hasTelephone : "http://www.w3.org/2006/vcard/ns#hasTelephone" ,
810 title : "http://www.w3.org/2006/vcard/ns#title" ,
911 hasUrl : "http://www.w3.org/2006/vcard/ns#hasUrl" ,
You can’t perform that action at this time.
0 commit comments