UNPKG

@deepkit/framework

Version:

27 lines 974 B
/*@ts-ignore*/ import { __ΩFilterQuery } from '@deepkit/rpc'; /* * Deepkit Framework * Copyright (C) 2021 Deepkit UG, Marc J. Schmidt * * This program is free software: you can redistribute it and/or modify * it under the terms of the MIT License. * * You should have received a copy of the MIT License along with this program. */ import sift from 'sift'; //todo: move to live-database export function findQuerySatisfied(target, query) { //get rid of "Excessive stack depth comparing types 'any' and 'SiftQuery<T[]>'." return sift(query, [target]).length > 0; } findQuerySatisfied.__type = ['target', () => __ΩFilterQuery, 'query', 'findQuerySatisfied', 'P"2!"o""2#)/$']; export function normalizeDirectory(path) { if (path[0] !== '/') path = '/' + path; if (path[path.length - 1] !== '/') path = path + '/'; return path; } normalizeDirectory.__type = ['path', 'normalizeDirectory', 'P&2!&/"']; //# sourceMappingURL=utils.js.map