working rss feed to nostr publish
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseArn = void 0;
|
||||
const parseArn = (value) => {
|
||||
const segments = value.split(":");
|
||||
if (segments.length < 6)
|
||||
return null;
|
||||
const [arn, partition, service, region, accountId, ...resourceId] = segments;
|
||||
if (arn !== "arn" || partition === "" || service === "" || resourceId[0] === "")
|
||||
return null;
|
||||
return {
|
||||
partition,
|
||||
service,
|
||||
region,
|
||||
accountId,
|
||||
resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId,
|
||||
};
|
||||
};
|
||||
exports.parseArn = parseArn;
|
||||
Reference in New Issue
Block a user