PathEvents has none fix
This commit is contained in:
		@@ -8,7 +8,7 @@
 | 
			
		||||
		<script type="module">
 | 
			
		||||
			import {PathEvent} from './dist/index.mjs';
 | 
			
		||||
 | 
			
		||||
			console.log(PathEvent.filter(['storage/inventory:c', 'data:*'], `storage`));
 | 
			
		||||
			console.log(PathEvent.has(['data/Inventory:n', 'logs:c'], `logs/client:n`));
 | 
			
		||||
		</script>
 | 
			
		||||
	</body>
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
	"name": "@ztimson/utils",
 | 
			
		||||
	"version": "0.21.4",
 | 
			
		||||
	"version": "0.21.5",
 | 
			
		||||
	"description": "Utility library",
 | 
			
		||||
	"author": "Zak Timson",
 | 
			
		||||
	"license": "MIT",
 | 
			
		||||
 
 | 
			
		||||
@@ -162,7 +162,7 @@ export class PathEvent {
 | 
			
		||||
			const filtered = parsedTarget.filter(p => r.fullPath.startsWith(p.fullPath));
 | 
			
		||||
			if(!filtered.length) return false;
 | 
			
		||||
			const combined = PathEvent.combine(...filtered);
 | 
			
		||||
			return !combined.none && (combined.all || new ASet(combined.methods).intersection(new ASet(r.methods)).length);
 | 
			
		||||
			return (!combined.none && (combined.all || r.all)) || combined.methods.intersection(r.methods).length;
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user