everyday-node
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

everyday-node

Everyday node utilities.

npm i everyday-node pnpm add everyday-node yarn add everyday-node

API

# CharKey

    # char

      string

    # key

      Key

# discoverFileWithSuffixes(pathname, suffixes)

    # pathname

      string

    # suffixes

      string []

    discoverFileWithSuffixes(pathname, suffixes)  =>

      Promise<undefined | string>

# exec(cmd, args, options)

    # cmd

      string

    # args  =  []

      string []

    # options  =  {}

      SpawnOptions

    exec(cmd, args, options)  =>

      Promise<unknown>
# execCapture(cmd, opts)

    # cmd

      string

    # opts

      Options

    execCapture(cmd, opts)  =>

      Promise<ReturnType>
# execCaptureSync(cmd, opts)

    # cmd

      string

    # opts

      Options

    execCaptureSync(cmd, opts)  =>

      ReturnType
# exists(pathname)

    # pathname

      string

    exists(pathname)  =>

      Promise<boolean>
# keypress(msg, cb)

    # msg

      string

    # cb(char, key)

      # char

        string

      # key

        Key

      cb(char, key)  =>

        void

keypress(msg, cb)  =>

    Promise<
    # ()

      ()  =>

        void
    >
# keypressSync(msg)

    # msg

      string

    keypressSync(msg)  =>

      string
# singleKeypress(msg)

    # msg

      string

    singleKeypress(msg)  =>

# waitForFileExists(pathname, timeout)

    # pathname

      string

    # timeout  =  15000

      number

    waitForFileExists(pathname, timeout)  =>

      Promise<undefined | Deferred<void>>

Credits

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas

Readme

Keywords

none

Package Sidebar

Install

npm i everyday-node

Weekly Downloads

39

Version

1.3.0

License

MIT

Unpacked Size

41.8 kB

Total Files

14

Last publish

Collaborators

  • stagas