storj/web/satellite/src/utils/meta.ts
NickolaiYurchenko 1c1e62be09 web/satellite: comments update
Change-Id: If5779cf8d80cf9fac7180498ce748f427df57e0a
2020-02-14 18:54:31 +02:00

18 lines
409 B
TypeScript

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
/**
* MetaUtils extracting content from meta.
*/
export class MetaUtils {
public static getMetaContent(metaName: string): string {
const meta = document.querySelector(`meta[name='${metaName}']`);
if (meta) {
return meta.getAttribute('content') as string;
}
return '';
}
}