@rdfjs/term-set
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -54,2 +54,6 @@ const { termToNTriples } = require('@rdfjs/to-ntriples') | ||
keys () { | ||
return this.values() | ||
} | ||
[Symbol.iterator] () { | ||
@@ -56,0 +60,0 @@ return this.values()[Symbol.iterator]() |
{ | ||
"name": "@rdfjs/term-set", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Set for RDFJS Terms", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -189,3 +189,3 @@ /* global describe, expect, it */ | ||
expect(typeof termset.add).toBe('function') | ||
expect(typeof termset.values).toBe('function') | ||
}) | ||
@@ -206,2 +206,22 @@ | ||
describe('.keys', () => { | ||
it('should be a method', () => { | ||
const termset = new TermSet() | ||
expect(typeof termset.keys).toBe('function') | ||
}) | ||
it('should return an iterator that contains all terms', () => { | ||
const term0 = rdf.namedNode('http://example.org/0') | ||
const term1 = rdf.namedNode('http://example.org/1') | ||
const termset = new TermSet([term0, term1]) | ||
const values = [...termset.keys()] | ||
expect(values.length).toBe(2) | ||
expect(term0.equals(values[0])).toBe(true) | ||
expect(term1.equals(values[1])).toBe(true) | ||
}) | ||
}) | ||
describe('Symbol.iterator', () => { | ||
@@ -208,0 +228,0 @@ it('should be a method', () => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9940
239