/** * Hachette querying page settings with regard to wildcard records * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. */ /* * IMPORTS_START * IMPORT TYPE_PREFIX * IMPORT each_url_pattern * IMPORTS_END */ function query(storage, url, multiple) { const matched = []; const cb = p => check_pattern(storage, p, multiple, matched); for (const pattern of each_url_pattern(url)) { const result = [pattern, storage.get(TYPE_PREFIX.PAGE, pattern)]; if (result[1] === undefined) continue; if (!multiple) return result; matched.push(result); } return multiple ? matched : [undefined, undefined]; } function query_best(storage, url) { return query(storage, url, false); } function query_all(storage, url) { return query(storage, url, true); } /* * EXPORTS_START * EXPORT query_best * EXPORT query_all * EXPORTS_END */ tek's customized Guix
aboutsummaryrefslogtreecommitdiff
path: root/build-aux
AgeCommit message (Expand)Author
2022-05-26cuirass: Create just as many threads as needed....Ludovic Courtès
2022-05-26cuirass: Fork inferior processes before creating threads....Ludovic Courtès
2022-05-20cuirass: Close each inferior upon completion....Ludovic Courtès
2021-12-22tests: Move keys into ./tests/keys/ and add a third ed25519 key....Attila Lendvai
2021-11-27build-self: Help users to submit useful bug reports....Tobias Geerinckx-Rice
2021-10-17maint: Factorize po xref translation....Julien Lepiller