Module @comunica/actor-function-factory-term-replace - v4.0.2

Comunica Term Function Replace Function Factory Actor

npm version

A function factory actor that constructs a term function capable of evaluating the Replace function. The regex evaluation uses the JavaScript regex engine in 'unicode-mode' thereby eliminating Annex B behavior. The x and q flag not present in the JS engine are implemented by preprocessing of the pattern, following the implementation provided by actor-function-factory-term-regex. As a result of using the JS regex engine, the bundle size of this package is small, but some non-spec compliant edge cases are present. Examples are the skipped tests in op.replace-test.ts.

This module is part of the Comunica framework, and should only be used by developers that want to build their own query engine.

Click here if you just want to query with Comunica.

$ yarn add @comunica/actor-function-factory-term-replace

After installing, this package can be added to your engine's configuration as follows:

{
  "@context": [
    ...
    "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-function-factory-term-replace/^4.0.0/components/context.jsonld"
  ],
  "actors": [
    ...
    {
      "@id": "urn:comunica:default:function-factory/actors#term-function-replace",
      "@type": "ActorFunctionFactoryTermReplace"
    }
  ]
}

Classes

ActorFunctionFactoryTermReplace