New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

codec-builder

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codec-builder

Builder package for type-safe codec implementations

latest
npmnpm
Version
1.1.0
Version published
Weekly downloads
27
Maintainers
1
Weekly downloads
 
Created
Source

codec-builder

Helps you build type-safe codecs.

Installation

npm install codec-builder

Usage

import { stringifier, parser } from "codec-builder";

type AllowedTypes = number | bigint;

const stringifyNumber = stringifier<AllowedTypes>((value) => value.toString());
const parseNumber = parser<AllowedTypes>((value) => BigInt(value));

const string = stringifyNumber(7777);
const number = parseNumber(string);

FAQs

Package last updated on 07 Feb 2025

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