Socket
Socket
Sign inDemoInstall

@fuel-ts/utils

Package Overview
Dependencies
Maintainers
1
Versions
2505
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fuel-ts/utils

Utilities (and test utilities) collection


Version published
Weekly downloads
13K
increased by3.56%
Maintainers
1
Weekly downloads
 
Created
Source

@fuel-ts/utils

@fuel-ts/utils is a sub-module for interacting with Fuel.

It's a collection of utilities and test utilities that may be useful in other places.

Table of contents

  • Documentation
  • Usage
  • Contributing
  • Changelog
  • License

Documentation

See Fuels-ts Documentation

Installation

yarn add @fuel-ts/utils
# or
npm add @fuel-ts/utils

Utilities

import { normalizeString } from "@fuel-ts/utils";

console.log(normalizeString("fuel-labs"));
// FuelLabs

Test Utilities

import { safeExec } from "@fuel-ts/utils/test-utils"; // note the `test` suffix

console.log(safeExec(() => 123));
// { error: null, result: 123 }

console.log(
  safeExec(() => {
    throw new Error("Some error");
  })
);
// { error: (Error: 'Some error'), result: null }

Contributing

In order to contribute to @fuel-ts/utils, please see the main fuels-ts monorepo.

Changelog

The @fuel-ts/utils changelog can be found at CHANGELOG.

License

The primary license for @fuel-ts/utils is Apache 2.0, see LICENSE.

FAQs

Package last updated on 09 Sep 2023

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