zazuko / clownface

Simple but powerful graph traversing library for RDF
https://zazuko.github.io/clownface/
37 stars 8 forks source link

fix: safer working with undefined context #42

Closed tpluscode closed 4 years ago

tpluscode commented 4 years ago

fixes #33

There are two changes to the behaviour of a Clownface object initialised without a term

  1. The add* methods will not create any quads
  2. No callbacks will be called for add*
  3. toArray will come back empty
codecov-commenter commented 4 years ago

Codecov Report

Merging #42 into master will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   97.88%   97.93%   +0.05%     
==========================================
  Files           8        8              
  Lines         236      242       +6     
==========================================
+ Hits          231      237       +6     
  Misses          5        5              
Impacted Files Coverage Δ
lib/Clownface.js 99.11% <100.00%> (+0.01%) :arrow_up:
lib/Context.js 98.43% <100.00%> (+0.10%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4a5ff35...7090e73. Read the comment docs.