New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@memfault/cdr-renderer-toolkit

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@memfault/cdr-renderer-toolkit

A toolkit to build React applications for rendering proprietary Custom Data Recordings (CDRs) within Memfault.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@memfault/cdr-renderer-toolkit

A toolkit to build React applications meant to be rendered inside an iframe within Memfault that can render special or proprietary Custom Data Recordings.

Usage

import React from "react";
import { useFragmentData } from "@memfault/cdr-renderer-toolkit";

function App() {
  const { data, error, isLoading, isExampleData, isExpired } = useFragmentData({
    exampleDownloadUrl: "/path/to/example-data.bin",
  });

  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error: {error}</div>;

  return (
    <div>
      {isExampleData && <p>Using example data</p>}
      {isExpired && <p>Download URL has expired</p>}
      <p>
        Data size: {data ? `${data.byteLength} bytes` : "No data available"}
      </p>
    </div>
  );
}

Development

Using the Nix package manager

Install Nix and direnv and run:

cp .envrc.example .envrc
direnv allow
yarn
yarn build

If you don't want to use direnv, you can also do the following:

nix develop
yarn
yarn build

Using other package managers

Install system dependencies:

  • biomejs: ^1.9.4
  • node: ^20.18.0
  • yarn: ^1.22

Bootstrap and build:

yarn
yarn build

Running tests

yarn test

Publishing

yarn build
npm login
npm publish

FAQs

Package last updated on 28 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc