How to use the n3.isLiteral function in n3

To help you get started, we’ve selected a few n3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dherault / semantic-graphql / src / graphql / getGraphqlDescription.js View on Github external
function findValueForLocale(literals, locale) {
  if (!literals) return null;

  const literal = literals.find(isLiteralWithLocale(locale))
    || literals.find(isLiteralWithLocale(englishLocale))
    || literals[0];

  return isLiteral(literal) ? getLiteralValue(literal) : null;
}
github dherault / semantic-graphql / src / graphql / getGraphqlDescription.js View on Github external
const isLiteralWithLocale = locale => l => isLiteral(l) && getLiteralLanguage(l) === locale;