New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rdfjs/types

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rdfjs/types - npm Package Compare versions

Comparing version 1.1.2 to 2.0.0

48

data-model.d.ts

@@ -77,2 +77,6 @@ /* Data Model Interfaces */

/**
* the direction of the language-tagged string.
*/
direction?: 'ltr' | 'rtl' | '' | null;
/**
* A NamedNode whose IRI represents the datatype of the literal.

@@ -85,3 +89,3 @@ */

* @return True if and only if other has termType "Literal"
* and the same `value`, `language`, and `datatype`.
* and the same `value`, `language`, `direction`, and `datatype`.
*/

@@ -259,12 +263,15 @@ equals(other: Term | null | undefined): boolean;

/**
* @param value The literal value.
* @param languageOrDatatype The optional language or datatype.
* If `languageOrDatatype` is a NamedNode,
* then it is used for the value of `NamedNode.datatype`.
* Otherwise `languageOrDatatype` is used for the value
* of `NamedNode.language`.
* @param value The literal value.
* @param languageOrDatatype The optional language, datatype, or directional language.
* If `languageOrDatatype` is a NamedNode,
* then it is used for the value of `NamedNode.datatype`.
* If `languageOrDatatype` is a NamedNode, it is used for the value
* of `NamedNode.language`.
* Otherwise, it is used as a directional language,
* from which the language is set to `languageOrDatatype.language`
* and the direction to `languageOrDatatype.direction`.
* @return A new instance of Literal.
* @see Literal
*/
literal(value: string, languageOrDatatype?: string | NamedNode): Literal;
literal(value: string, languageOrDatatype?: string | NamedNode | DirectionalLanguage): Literal;

@@ -293,2 +300,27 @@ /**

quad(subject: InQuad['subject'], predicate: InQuad['predicate'], object: InQuad['object'], graph?: InQuad['graph']): OutQuad;
/**
* @param original The original term.
* @return A new instance of the term such that newTermInstance.equals(original) returns true.
* @see Term
*/
fromTerm<T extends NamedNode>(original: T): NamedNode;
fromTerm<T extends BlankNode>(original: T): BlankNode;
fromTerm<T extends Literal>(original: T): Literal;
fromTerm<T extends Variable>(original: T): Variable;
fromTerm<T extends DefaultGraph>(original: T): DefaultGraph;
fromTerm<T extends BaseQuad>(original: T): OutQuad;
fromTerm<T extends Term>(original: T): T;
/**
* @param original The original quad.
* @return A new instance of the quad such that newQuadInstance.equals(original) returns true.
* @see Quad
*/
fromQuad(original: InQuad): OutQuad;
}
export interface DirectionalLanguage {
language: string;
direction?: 'ltr' | 'rtl' | '' | null;
}

8

index.d.ts
/// <reference types="node" />
export * from './data-model';
export * from './stream';
export * from './dataset';
export * from './query';
export type * from './data-model';
export type * from './stream';
export type * from './dataset';
export type * from './query';
{
"name": "@rdfjs/types",
"version": "1.1.2",
"version": "2.0.0",
"license": "MIT",

@@ -27,3 +27,3 @@ "types": "index.d.ts",

"eslint": "^7.12.0",
"typescript": "^4.0.3"
"typescript": "^5.7.2"
},

@@ -30,0 +30,0 @@ "bugs": {

@@ -8,5 +8,10 @@ /* Query Interfaces - Common */

/**
* Helper union type for triple term names.
*/
export type TripleTermName = 'subject' | 'predicate' | 'object';
/**
* Helper union type for quad term names.
*/
export type QuadTermName = 'subject' | 'predicate' | 'object' | 'graph';
export type QuadTermName = TripleTermName | 'graph';

@@ -13,0 +18,0 @@ // TODO: merge this with Stream upon the next major change

@@ -29,2 +29,10 @@ # RDF/JS Types

## Additional Types
Note that some helper types exist that do not exist within the RDF/JS specifications. These include:
```typescript
import type { TripleTermName, QuadTermName } from '@rdfjs/types'
```
## Contributing

@@ -31,0 +39,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc