1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00
denoland-deno/cli/tests/workers/read_check_granular_worker.js
Casper Beyer 6abf126c2a
chore: remove std directory (#9361)
This removes the std folder from the tree.

Various parts of the tests are pretty tightly dependent 
on std (47 direct imports and 75 indirect imports, not 
counting the cli tests that use them as fixtures) so I've 
added std as a submodule for now.
2021-02-02 12:05:46 +01:00

13 lines
326 B
JavaScript

import { fromFileUrl } from "../../../test_util/std/path/mod.ts";
onmessage = async ({ data }) => {
const { state } = await Deno.permissions.query({
name: "read",
path: fromFileUrl(new URL(data.route, import.meta.url)),
});
postMessage({
hasPermission: state === "granted",
index: data.index,
});
};