Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dfinity/utils

Package Overview
Dependencies
Maintainers
10
Versions
886
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/utils

A collection of utilities and constants for NNS/SNS projects.

  • 0.0.1-next-2022-09-01.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.5K
decreased by-7.97%
Maintainers
10
Weekly downloads
 
Created
Source

utils-js

A collection of utilities and constants for NNS/SNS projects.

npm version GitHub license

Table of contents

Installation

You can use utils-js by installing it in your project.

npm i @dfinity/utils

The bundle needs peer dependencies, be sure that following resources are available in your project as well.

npm i @dfinity/agent @dfinity/candid @dfinity/principal

Features

utils-js implements following features:

:toolbox: Functions

:gear: defaultAgent
FunctionType
defaultAgent() => Agent
:gear: createServices
FunctionType
createServices<T>({ options: { canisterId, serviceOverride, certifiedServiceOverride, agent: agentOption, }, idlFactory, certifiedIdlFactory, }: { options: RequiredCanisterOptions<T>; idlFactory: InterfaceFactory; certifiedIdlFactory: InterfaceFactory; }) => { ...; }
:gear: assertNonNullish
FunctionType
assertNonNullish<T>(value: T, message?: string) => asserts value is NonNullable<T>
:gear: toNullable
FunctionType
toNullable<T>(value?: T) => [] or [T]
:gear: fromNullable
FunctionType
fromNullable<T>(value: [] or [T]) => T
:gear: fromDefinedNullable
FunctionType
fromDefinedNullable<T>(value: [] or [T]) => T

:factory: NullishError

Constructors

public

Parameters:

  • message

Keywords

FAQs

Package last updated on 01 Sep 2022

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