1.0.0 • Published 12 days ago

@landmineaknpm/quisquam-fuga-assumenda v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 days ago

@landmineaknpm/quisquam-fuga-assumenda

build status npm version

JSON-LD serializer that implements the RDF/JS Sink interface.

Usage

The package exports the serializer as a class, so an instance must be created before it can be used. The .import method, as defined in the RDF/JS specification, must be called to do the actual serialization. It expects a quad stream as argument. The method will return a stream which emits the JSON-LD as a plain object or string.

The constructor accepts an options object with the following optional keys:

  • encoding: Defines the encoding of the output. Supported encodings are string and object. By default object is used.

It's also possible to pass options as second argument to the .import method. The options from the constructor and the .import method will be merged together.

Example

This example shows how to create a serializer instance and how to feed it with a stream of quads. The object emitted by the serializer will be written to the console.

import rdf from '@rdfjs/data-model'
import { Readable } from 'readable-stream'
import SerializerJsonld from '@landmineaknpm/quisquam-fuga-assumenda'

const serializerJsonld = new SerializerJsonld()
const input = new Readable({
  objectMode: true,
  read: () => {
    input.push(rdf.quad(
      rdf.namedNode('http://example.org/sheldon-cooper'),
      rdf.namedNode('http://schema.org/givenName'),
      rdf.literal('Sheldon')))
    input.push(rdf.quad(
      rdf.namedNode('http://example.org/sheldon-cooper'),
      rdf.namedNode('http://schema.org/familyName'),
      rdf.literal('Cooper')))
    input.push(rdf.quad(
      rdf.namedNode('http://example.org/sheldon-cooper'),
      rdf.namedNode('http://schema.org/knows'),
      rdf.namedNode('http://example.org/amy-farrah-fowler')))
    input.push(null)
  }
})
const output = serializerJsonld.import(input)

output.on('data', jsonld => {
  console.log(jsonld)
})
reactencryptionequalityweaksethelpersArray.prototype.findLastIndextypedarraywaitCSSStyleDeclarationdataviewlook-upSettextobjESnextECMAScript 3es6a11yharmonybddrateReactiveExtensionsgetoptirqqueuerapideslintconfig.envtypeerrorES6picomatchperformancesortargparseArrayBuffer.prototype.slicevaluestraversetouchspawnAsyncIteratoridregular expressioncjkopenswarningWebSocketsutil.inspectMicrosoftio-tsES2017globbrowserlistdirectoryopenerisConcatSpreadableObject.fromEntrieswgetpostcss-pluginpruneimportcompile lesssharedarraybufferxdgzodString.prototype.trimObservablesJSON-Schemaecmascriptfast-cloneregularassertswordbreakinterruptserrorArray.prototype.flatMaptypedbcryptjson-schema-validationeventsgradients css3tc39dirreadablestreamutilprocessinstallerspringdayjsiterationpyyamlsequencetypanionlogECMAScript 5writabledifffigletbufferspinnerFloat32Arrayrequirearrayprotobufcryptojsxeast-asian-widthBigUint64Arrayslottypescriptexit-codeES3duplexECMAScript 7jsontimeindicatorfilesameValueZerocorsgdprcoercibleinvariantdateprotoflagECMAScript 2019Array.prototype.containscommandermapnegative zero0computed-typesRxJSjestIteratorspecCSScollectionbrowserslistInt32ArrayclassnameHyBivalidatorTypeBoxFunction.prototype.nameECMAScript 2022setgroupbatch_.extendconcatparsegetintrinsicpopmotionmiddlewarestylesponyfilltoobjectdatarangeerrorMaprm -frforEachWeakMapdropfpextratesterarktypemkdirYAMLmoduleomittrimEndthroatreuseerror-handlingeslintes-abstractcss nestingless compilerStreamslesshashisObject.valueses2015URLSearchParamssetImmediateremovelinuxUint8ClampedArraytypesjson-schema-validatorsymlinksloggingassertionpatchfastsomejsdiffmatchpathcss-in-jsconnectexecutablenodewordwrapgroupBynamecolourmkdirpprettyflatMapchildasyncworkermimetypespipedescriptionrgbterminalStyleSheetarraybufferless cssdefaultbluebirdbusyprotocol-buffersartES5ECMAScript 6l10nviewdefinePromiseruntimeaccessordeep-copystreams2JSONsharedkeysmatchesdatastructuretapeexpressionES2020promisequeueMicrotaskcurriedtypedarraysfromairbnbclassnamesjoitakeopenfetchprogressESbundlingxhrxdg-openhigher-orderrecursivelimitedcss lesswatchingjsonpathsettingscallbindvestescapedragmixinsECMAScript 2017hasOwnserializeTypedArraycheckstringifydescriptorsiterateformattingvisualpropentriesfunctionalawesomesaucetddjavascriptfunctionBigInt64Arraylintvariablesinstalldomweakmapimmerajvyuptestingsyntaxerrorcollection.es6SymbolReflect.getPrototypeOfoffsetpropertybyteOffsetobjectapolloprivatepreserve-symlinksRegExp#flagsoutputtacitdeepcopyprivate datadependenciescommand-linereact-hooksnopelistenersES8internal slotPushsyntaxless.jscodesdeterministicrfc4122findLastIndexUint8Arrayemitlaunchqsmodulesfantasy-landanimationchannel-0WebSocketes-shim APIbrowseroptionpersistentautoprefixermobile__proto__fastifyES2018comparecloneconcurrencyguideslintpluginregextaskcolorscolumnwraptapredacthandlersrm -rfemojiincludeswhichenvironmenthttpmochastringyamlES2016argumentsastfast-copyconfigurableRxcallfindhooksauthpoint-freesanitizationlockfilelesscssmonorepobyteLengthspinnershasasciiuninstallchromeredux-toolkitspeedpnpm9jsdomargssymboljasmineflattenmime-dbarraysfseventscmdslicenegativefastcloneoperating-systemflagspostcsslastapisuperagentpackagelazyfolderwebimmutablestartargvFloat64ArrayefficientchaiInt8Arraypackage.jsonconsumejson-schemaonceinternalshimwidthstructuredCloneconfigapptrimLeftscheme-validationesjsonschemaObject.getPrototypeOfRFC-6455queryReactiveXless mixinsnodejstoSortedfiltergetOwnPropertyDescriptormulti-packageECMAScript 2016xsstermuser-streamscopyargumentinputavasafetranspileObject.assignArray.prototype.filtercall-bindString.prototype.matchAllrobustdom-testing-librarycode pointsnpmlruparserbyteform-validationObject.keysreact posereact-hook-formcharacterbabel-coreArrayBuffer#sliceresolvepackageseverytrimRighteslint-pluginUint32ArrayclassesfullArray.prototype.findLastmetadata@@toStringTagcore-jsschemavariables in cssuuidkoreantostringtagbannertelephonehardlinkspassword3dbootstrap cssextensionmruminimales7jwtdataViewECMAScript 2015limitexecchineseES2015package managereditordefinePropertyiteratormakeregexpArray.prototype.includesfindLastfast-deep-clonestatelessoptimistStreampureWeakSetvalidategesturescircularauthenticationECMAScript 2021call-boundmatchAllhookformInt16ArrayquerystringgetPrototypeOfreact-testing-libraryes-shimsECMAScript 2023utilsnamestoArrayprefixflattyped arraybindmkdirselectroncss variableObject.entriesdeleteenumerablecharacters$.extendstreamwatchreadES2022windowspositiveurlsmacosnumberclientdotenvdeepstarter6to5csscolumnshttpsdebuggerclass-validatorformsortedextendintrinsicmoveRegExp.prototype.flagsArray.prototype.flatbabelrmdirwhatwgfind-upjs
1.0.0

12 days ago