Skip to content

Commit

Permalink
feat(esm): add API to set a namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
darlanalves authored May 20, 2024
1 parent c835ab9 commit 479591e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion assets/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ export async function deleteProperty(key) {
return toBoolean(r);
}

const getNS = (p) => location.host + ':' + p;
let ns = location.host;
const getNS = (p) => ns + ':' + p;

export function setNS(newNS) {
ns = newNS;
}

export function getPropertyNS(property) {
return getProperty(getNS(property));
Expand Down

0 comments on commit 479591e

Please sign in to comment.