Skip to content

Commit 8930f29

Browse files
committed
Fix style.
1 parent ba478eb commit 8930f29

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

lib/expand.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,7 @@ async function _expandObject({
466466
}
467467
if(expandedProperty in expandedParent &&
468468
expandedProperty !== '@included' &&
469-
expandedProperty !== '@type')
470-
{
469+
expandedProperty !== '@type') {
471470
throw new JsonLdError(
472471
'Invalid JSON-LD syntax; colliding keywords detected.',
473472
'jsonld.SyntaxError',

lib/frame.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ function _validateFrame(frame) {
455455
for(const id of util.asArray(frame[0]['@id'])) {
456456
// @id must be wildcard or an IRI
457457
if(!(types.isObject(id) || url.isAbsolute(id)) ||
458-
(types.isString(id) && id.indexOf('_:') === 0)) {
458+
(types.isString(id) && id.indexOf('_:') === 0)) {
459459
throw new JsonLdError(
460460
'Invalid JSON-LD syntax; invalid @id in frame.',
461461
'jsonld.SyntaxError', {code: 'invalid frame', frame});
@@ -467,7 +467,7 @@ function _validateFrame(frame) {
467467
for(const type of util.asArray(frame[0]['@type'])) {
468468
// @id must be wildcard or an IRI
469469
if(!(types.isObject(type) || url.isAbsolute(type)) ||
470-
(types.isString(type) && type.indexOf('_:') === 0)) {
470+
(types.isString(type) && type.indexOf('_:') === 0)) {
471471
throw new JsonLdError(
472472
'Invalid JSON-LD syntax; invalid @type in frame.',
473473
'jsonld.SyntaxError', {code: 'invalid frame', frame});
@@ -578,8 +578,8 @@ function _filterSubject(state, subject, frame, flags) {
578578
// no longer a wildcard pattern if frame has any non-keyword properties
579579
wildcard = false;
580580

581-
// skip, but allow match if node has no value for property, and frame has a
582-
// default value
581+
// skip, but allow match if node has no value for property, and frame has
582+
// a default value
583583
if(nodeValues.length === 0 && hasDefault) {
584584
continue;
585585
}
@@ -597,8 +597,8 @@ function _filterSubject(state, subject, frame, flags) {
597597
}
598598
matchThis = true;
599599
} else if(types.isObject(thisFrame)) { // XXX only framing keywords
600-
// node matches if values is not empty and the value of property in frame
601-
// is wildcard
600+
// node matches if values is not empty and the value of property in
601+
// frame is wildcard
602602
matchThis = nodeValues.length > 0;
603603
} else {
604604
if(graphTypes.isValue(thisFrame)) {

lib/fromRdf.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,7 @@ function _RDFToObject(o, useNativeTypes, rdfDirection) {
329329
rval['@type'] = type;
330330
}
331331
} else if(rdfDirection === 'i18n-datatype' &&
332-
type.startsWith('https://www.w3.org/ns/i18n#'))
333-
{
332+
type.startsWith('https://www.w3.org/ns/i18n#')) {
334333
const [, language, direction] = type.split(/[#_]/);
335334
if(language.length > 0) {
336335
rval['@language'] = language;

lib/toRdf.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ function _objectToRDF(item, issuer, dataset, graphTerm, rdfDirection) {
245245
object.value = value.toFixed(0);
246246
object.datatype.value = datatype || XSD_INTEGER;
247247
} else if(rdfDirection === 'i18n-datatype' &&
248-
'@direction' in item)
249-
{
248+
'@direction' in item) {
250249
const datatype = 'https://www.w3.org/ns/i18n#' +
251250
(item['@language'] || '') +
252251
`_${item['@direction']}`;

0 commit comments

Comments
 (0)