Skip to content

Commit f014708

Browse files
authored
LiteralFrom.integer (#69)
1 parent 1389dc4 commit f014708

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/mapping/LiteralFrom.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export namespace LiteralFrom {
3939
return factory.literal(value.toString(), factory.namedNode(XSD.double))
4040
}
4141

42+
export function integer(value: number, factory: DataFactory): Term {
43+
return factory.literal(value.toString(), factory.namedNode(XSD.integer))
44+
}
45+
4246
export function hex(value: Uint8Array, factory: DataFactory): Term {
4347
// TODO: Sort typing
4448
return factory.literal((value as any).toHex(), factory.namedNode(XSD.hexBinary))

0 commit comments

Comments
 (0)