storj/web/satellite/src/utils/meta.ts

18 lines
409 B
TypeScript
Raw Normal View History

// 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 '';
}
}