Skip to content

torusresearch/metadata-helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d814d20 · Feb 27, 2025
Jan 16, 2025
Mar 11, 2024
Jun 13, 2024
Jun 13, 2024
Jan 16, 2025
Aug 8, 2023
Feb 19, 2021
Oct 25, 2024
Feb 19, 2021
Aug 8, 2023
Feb 19, 2021
Aug 8, 2023
Aug 8, 2023
Dec 31, 2024
Feb 27, 2025
Feb 27, 2025
May 19, 2022
Aug 8, 2023

Repository files navigation

Metadata-helpers

Build Status

npm downloads

NPM

Introduction

This repo allow you to get and set metadata

Features

  • Typescript compatible. Includes Type definitions
  • All API's return Promises

Installation

Bundling

This module is distributed in 3 formats

  • ems build dist/metadataHelpers.esm.js in es5 format
  • commonjs build dist/metadataHelpers.cjs.js in es5 format with problematic packages bundled (benfits non-webpack users)
  • umd build dist/metadataHelpers.umd.min.js in es5 format without polyfilling corejs minified

By default, the appropriate format is used for your specified usecase You can use a different format (if you know what you're doing) by referencing the correct file

The cjs build is not polyfilled with core-js. It is upto the user to polyfill based on the browserlist they target

Directly in Browser

CDN's serve the non-core-js polyfilled version by default. You can use a different

jsdeliver

<script src="https://cdn.jsdelivr.net/npm/@toruslabs/metadata-helpers"></script>

unpkg

<script src="https://unpkg.com/@toruslabs/metadata-helpers"></script>

Tips for NUXT

This is a plugin that works only on the client side. So please register it as a ssr-free plugin.

Usage

Add @toruslabs/metadata-helpers to your project:

To allow your web app to retrieve keys:

Install the package npm i @toruslabs/metadata-helpers or yarn add @toruslabs/metadata-helpers

Requirements

  • This package requires a peer dependency of @babel/runtime
  • Node 18+