@datalayer/core
Version:
**Datalayer Core**
41 lines (40 loc) • 829 B
JavaScript
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the Modified BSD License.
*/
export class URN {
_partition;
_service;
_region;
_account;
_type;
_uid;
// private _path: string;
constructor(urn) {
const parts = urn.split(":");
this._partition = parts[1];
this._service = parts[2];
this._region = parts[3];
this._account = parts[4];
this._type = parts[5];
this._uid = parts[6];
}
get partition() {
return this._partition;
}
get service() {
return this._service;
}
get region() {
return this._region;
}
get account() {
return this._account;
}
get type() {
return this._type;
}
get uid() {
return this._uid;
}
}