🚀 Socket Launch Week 🚀 Day 2: Introducing Repository Labels and Security Policies.Learn More
Socket
Sign inDemoInstall
Socket

typestub-ipfs-only-hash

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typestub-ipfs-only-hash

The type definition for ipfs-only-hash package

4.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

typestub-ipfs-only-hash

npm Package Version

Typescript declaration and wrapper for ipfs-only-hash

Typescript Signature

export function of (
  content: string | Buffer | Stream,
): Promise<string>

Usage Example

Using namespace import

import * as Hash from 'typestub-ipfs-only-hash'

;(async () => {
  const data = 'hello world!'
  const hash = await Hash.of(data)
  console.log(hash) // QmTp2hEo8eXRp6wg7jXv1BLCMh5a4F3B7buAUZNZUu772j
})()

Or using named import:

import { of } from 'typestub-ipfs-only-hash'

;(async () => {
  const data = 'hello world!'
  const hash = await of(data)
  console.log(hash) // QmTp2hEo8eXRp6wg7jXv1BLCMh5a4F3B7buAUZNZUu772j
})()

Details refer to examples

Keywords

ipfs

FAQs

Package last updated on 03 May 2021

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