1.1.1 • Published 6 years ago

@relekang/cli-editor v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

cli-editor

This is a simple editor that can be used to edit javascript objects with the current editor in the terminal. The editor is fetched with EDITOR environment variable.

Installation

npm install @relekang/cli-editor

or

yarn add @relekang/cli-editor

Usage

import {edit} from "@relekang/cli-editor"

edit({
    fetch: async function() { return getItem() },
    save: async function(item) { return saveItem(item) },
    errorHandler: function (error) {
        return {retry: true, message: "Could not save due to " + error.toString()}
    },
})
.catch(error => console.error("ooops", error))
1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.0

6 years ago