Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@rdfjs/environment
Advanced tools
This package provides a flexible RDF/JS factory.
The Environment
class takes one or more RDF/JS factory classes and creates a new, merged instance.
All factory methods will use the Environment
instance as factory to create new object instances.
Clones can be created to manipulate an instance isolated from other instances.
The main export of the package is the Environment
class.
It can be imported like this:
import Environment from '@rdfjs/environment'
The package contains multiple factories.
The factories can be imported with the pattern @rdfjs/environment/{factoryName}.js
.
For the FormatsFactory
, it would look like this:
import FormatsFactory from '@rdfjs/environment/FormatsFactory.js'
Creates a new Environment
instance.
factories
must be an iterable (e.g. Array
) of RDF/JS factory classes.
This method creates a new, isolated Environment
instance with the same set of factories and clones of the instance data.
An implementation of the RDF/JS Data Model that wraps the @rdfjs/data-model package.
An implementation of the RDF/JS Dataset that wraps the @rdfjs/dataset package.
A factory for @rdfjs/fetch-lite calls.
This factory must be used together with FormatsFactory
to provide parsers and serializers.
The environment is injected for calls to res.dataset()
.
A factory that takes care of parsers and serializers.
An additional .formats
object will be attached to the environment.
That object is compatible with the data structure of @rdfjs/formats-common.
The .formats
object has an additional .import()
function to import other format bundles.
The following code shows how to import the @rdfjs/formats-common bundle:
import DataFactory from '@rdfjs/environment/DataFactory.js'
import DatasetFactory from '@rdfjs/environment/DatasetFactory.js'
import Environment from '@rdfjs/environment'
import FormatsFactory from '@rdfjs/environment/FormatsFactory.js'
import formats from '@rdfjs/formats-common'
const env = new Environment([DataFactory, DatasetFactory, FormatsFactory])
env.formats.import(formats)
A factory to create namespace builders based on the @rdfjs/namespace package.
Instances of the builder can be created with the .namespace()
method.
A factory to create @rdfjs/term-map and @rdfjs/term-set objects.
The instances can be created with .termMap()
and .termSet()
.
FAQs
A flexible RDF/JS factory
The npm package @rdfjs/environment receives a total of 13,122 weekly downloads. As such, @rdfjs/environment popularity was classified as popular.
We found that @rdfjs/environment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.