@@ -184,19 +184,15 @@ module.exports = class URDNA2015Sync {
184
184
185
185
// 3.1.1) If any component in quad is an blank node, then serialize it
186
186
// using a special identifier as follows:
187
- const copy = {
188
- subject : null , predicate : quad . predicate , object : null , graph : null
189
- } ;
190
187
// 3.1.2) If the blank node's existing blank node identifier matches
191
188
// the reference blank node identifier then use the blank node
192
189
// identifier _:a, otherwise, use the blank node identifier _:z.
193
- copy . subject = this . modifyFirstDegreeComponent (
194
- id , quad . subject , 'subject' ) ;
195
- copy . object = this . modifyFirstDegreeComponent (
196
- id , quad . object , 'object' ) ;
197
- copy . graph = this . modifyFirstDegreeComponent (
198
- id , quad . graph , 'graph' ) ;
199
- nquads . push ( NQuads . serializeQuad ( copy ) ) ;
190
+ nquads . push ( NQuads . serializeQuadComponents (
191
+ this . modifyFirstDegreeComponent ( id , quad . subject , 'subject' ) ,
192
+ quad . predicate ,
193
+ this . modifyFirstDegreeComponent ( id , quad . object , 'object' ) ,
194
+ this . modifyFirstDegreeComponent ( id , quad . graph , 'graph' )
195
+ ) ) ;
200
196
}
201
197
202
198
// 4) Sort nquads in lexicographical order.
0 commit comments