Socket
Book a DemoInstallSign in
Socket

flow-launcher-helper

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flow-launcher-helper

A simple lib to help build plugins for Flow Launcher

Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Flow Launcher Helper

A simple library to help build plugins for Flow Launcher with Javascript or Typescript

Installation

npm install flow-launcher-helper

Usage

I recommend you read the Flow docs before writing your plugin. This example is based on their example.

import flow from 'flow-launcher-helper';

const { params, on, showResult, run } = flow();

on('query', () => {
  showResult({
    title: 'Hello World Typescript',
    subtitle: `Showing your query parameters: ${params}. Click to open Flow's website`,
    method: 'do_something_for_query',
    params: ['https://github.com/Flow-Launcher/Flow.Launcher'],
    iconPath: 'Images\\app.png',
  });
});

on('do_something_for_query', () => {
  const url = params;
  open(url);
});

run();

flow()

Parameters

  • defaultIconPathstring (optional): the default icon path that will be sent to Flow, so you don't need to specify everytime in the showResult function.

Returns

  • methodstring: current method.
  • paramsstring: current parameters.
  • onfunction: receives a method (string) and a callback function that will be executed when the method matches the current method.
  • showResultfunction: receives an array of results, where you specify the title, subtitle, method, params and icon path, and logs the data to be displayed in Flow.
  • runfunction: runs the current method. You should call this function at the end of your script, or after all the on functions have been called.

Keywords

Flow Launcher

FAQs

Package last updated on 01 Aug 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