Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function Graph() {
Set.apply(this, arguments)
this.linkMap = new Map()
aspectify(this)
this.guard('add', function() {
return arguments.length
})
this.before('add', function fn() {
fn.args = fn.args
.filter(function(item) {
return item && !this.has(item)
}, this)
})
this.after('delete', function() {
slice(arguments).forEach(function(item) {
this.unlinkAll(item)