This package has been deprecated

Author message:

Use node-extended instead

@robbie-cook/node-helper

2.0.5 • Public • Published

Yarn


Welcome to Node Helper! Contributions are always welcome, but please make an issue first.

Getting started

First, make sure you import the helper with

import NodeHelper from '@robbie-cook/node-helper'

or, equally,

const NodeHelper = require('@robbie-cook/node-helper');

API

@robbie-cook/node-helperGlobals"node-helper"

Module: "node-helper"

Index

Functions

Functions

execute

execute(command: string): Promise‹string›

Defined in node-helper.ts:16

Execute a command

Parameters:

Name Type Description
command string

Returns: Promise‹string›


fetch

fetch(endpoint: string, bearerToken?: undefined | string): Promise‹Response›

Defined in node-helper.ts:83

Fetch anything. Uses node-fetch under the hood.

Parameters:

Name Type Description
endpoint string -
bearerToken? undefined | string

Returns: Promise‹Response›


fetchFile

fetchFile(endpoint: string, bearerToken?: undefined | string): Promise‹ArrayBuffer›

Defined in node-helper.ts:62

Fetch a file from an endpoint

Parameters:

Name Type Description
endpoint string -
bearerToken? undefined | string

Returns: Promise‹ArrayBuffer›


input

input(input: string): Promise‹string›

Defined in node-helper.ts:33

Read input from the user

Parameters:

Name Type
input string

Returns: Promise‹string›


isAnswerYes

isAnswerYes(input: string): boolean | null

Defined in node-helper.ts:52

Whether the user accepted the input

Parameters:

Name Type Description
input string

Returns: boolean | null

Readme

Keywords

none

Package Sidebar

Install

npm i @robbie-cook/node-helper

Weekly Downloads

0

Version

2.0.5

License

ISC

Unpacked Size

28.3 kB

Total Files

14

Last publish

Collaborators

  • robbie-cook