@@ -146,17 +146,15 @@ api.frame = (state, subjects, frame, parent, property = null) => {
146
146
// `@link` as the above check will short-circuit before reaching this point
147
147
if ( state . embedded &&
148
148
( flags . embed === '@never' ||
149
- _createsCircularReference ( subject , state . graph , state . subjectStack ) ) )
150
- {
149
+ _createsCircularReference ( subject , state . graph , state . subjectStack ) ) ) {
151
150
_addFrameOutput ( parent , property , output ) ;
152
151
continue ;
153
152
}
154
153
155
154
// if only the first (or once) should be embedded
156
155
if ( state . embedded &&
157
156
( flags . embed == '@first' || flags . embed == '@once' ) &&
158
- state . uniqueEmbeds [ state . graph ] . hasOwnProperty ( id ) )
159
- {
157
+ state . uniqueEmbeds [ state . graph ] . hasOwnProperty ( id ) ) {
160
158
_addFrameOutput ( parent , property , output ) ;
161
159
continue ;
162
160
}
@@ -273,8 +271,7 @@ api.frame = (state, subjects, frame, parent, property = null) => {
273
271
// skip keywords
274
272
if ( prop === '@type' ) {
275
273
if ( ! types . isObject ( frame [ prop ] [ 0 ] ) ||
276
- ! frame [ prop ] [ 0 ] . hasOwnProperty ( '@default' ) )
277
- {
274
+ ! frame [ prop ] [ 0 ] . hasOwnProperty ( '@default' ) ) {
278
275
continue ;
279
276
}
280
277
// allow through default types
@@ -433,8 +430,7 @@ function _getFrameFlag(frame, options, name) {
433
430
} else if ( rval === false ) {
434
431
rval = '@never' ;
435
432
} else if ( rval !== '@always' && rval !== '@never' && rval !== '@link' &&
436
- rval !== '@first' && rval !== '@last' && rval !== '@once' )
437
- {
433
+ rval !== '@first' && rval !== '@last' && rval !== '@once' ) {
438
434
throw new JsonLdError (
439
435
'Invalid JSON-LD syntax; invalid value of @embed.' ,
440
436
'jsonld.SyntaxError' , { code : 'invalid @embed value' , frame} ) ;
@@ -459,8 +455,7 @@ function _validateFrame(frame) {
459
455
for ( const id of util . asArray ( frame [ 0 ] [ '@id' ] ) ) {
460
456
// @id must be wildcard or an IRI
461
457
if ( ! ( types . isObject ( id ) || url . isAbsolute ( id ) ) ||
462
- ( types . isString ( id ) && id . indexOf ( '_:' ) === 0 ) )
463
- {
458
+ ( types . isString ( id ) && id . indexOf ( '_:' ) === 0 ) ) {
464
459
throw new JsonLdError (
465
460
'Invalid JSON-LD syntax; invalid @id in frame.' ,
466
461
'jsonld.SyntaxError' , { code : 'invalid frame' , frame} ) ;
@@ -472,8 +467,7 @@ function _validateFrame(frame) {
472
467
for ( const type of util . asArray ( frame [ 0 ] [ '@type' ] ) ) {
473
468
// @id must be wildcard or an IRI
474
469
if ( ! ( types . isObject ( type ) || url . isAbsolute ( type ) ) ||
475
- ( types . isString ( type ) && type . indexOf ( '_:' ) === 0 ) )
476
- {
470
+ ( types . isString ( type ) && type . indexOf ( '_:' ) === 0 ) ) {
477
471
throw new JsonLdError (
478
472
'Invalid JSON-LD syntax; invalid @type in frame.' ,
479
473
'jsonld.SyntaxError' , { code : 'invalid frame' , frame} ) ;
@@ -611,8 +605,7 @@ function _filterSubject(state, subject, frame, flags) {
611
605
// match on any matching value
612
606
matchThis = nodeValues . some ( nv => _valueMatch ( thisFrame , nv ) ) ;
613
607
} else if ( graphTypes . isSubject ( thisFrame ) ||
614
- graphTypes . isSubjectReference ( thisFrame ) )
615
- {
608
+ graphTypes . isSubjectReference ( thisFrame ) ) {
616
609
matchThis =
617
610
nodeValues . some ( nv => _nodeMatch ( state , thisFrame , nv , flags ) ) ;
618
611
} else if ( graphTypes . isList ( thisFrame ) ) {
0 commit comments