
Research
/Security News
Popular Go Decimal Library Targeted by Long-Running Typosquat with DNS Backdoor
A long-running Go typosquat impersonated the popular shopspring/decimal library and used DNS TXT records to execute commands.
@virtual-assembly/semantizer
Advanced tools
The semantizer library lets you enhance your object model with semantic data.
Semantizer is a library to easily build objects that can be represented as RDF datasets. It is built on top of RDFJS.
This library was writen for the Data Food Consortium project (DFC) which aims to provide interoperability between food supply chain platforms. We use the semantizer library inside our connector library to help developers to exchange data expressed with the DFC ontology.
Lets take an example, with a simple Address and Person classes:
class Address extends SemanticObject {
constructor(name: string, country: string) {
super({
semanticId: "http://myplatform.com/address/" + name,
semanticType: "https://schema.org/PostalAddress"
});
this.setSemanticPropertyLiteral("https://schema.org/addressCountry", country);
}
public getCountry(): string {
return this.getSemanticProperty("https://schema.org/addressCountry");
}
}
class Person extends SemanticObject {
constructor(name: string, address: Address) {
super({
semanticId: "http://myplatform.com/person/" + name,
semanticType: "https://schema.org/Person"
});
this.setName(name);
this.setAddress(address);
}
public getAddress(): Address {
return this.getSemanticProperty("https://schema.org/address");
}
public getName(): string {
return this.getSemanticProperty("https://schema.org/givenName");
}
public setAddress(address: Address): string {
this.setSemanticPropertyReference("https://schema.org/address", address);
}
public setName(name: string): string {
this.setSemanticPropertyLiteral("https://schema.org/givenName", name);
}
}
You can access the properties:
const address = new Address("adr1", "France");
const person = new Person("John", address);
console.log(person.getName()); // => John
console.log(person.getAddress().getCountry()); // => France
You can get a RDF dataset using the toRdfDatasetExt() method.
You can also set all the properties from a RDF dataset with the setSemanticPropertyAllFromRdfDataset(dataset: DatasetExt) method.
FAQs
The semantizer library lets you enhance your object model with semantic data.
We found that @virtual-assembly/semantizer demonstrated a healthy version release cadence and project activity because the last version was released less than 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 long-running Go typosquat impersonated the popular shopspring/decimal library and used DNS TXT records to execute commands.

Research
Active npm supply chain attack compromises @antv packages in a fast-moving malicious publish wave tied to Mini Shai-Hulud.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.