New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

to-fluent

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-fluent

Convert a function with a settings object to fluent API.

latest
Source
npmnpm
Version
2.2.0
Version published
Weekly downloads
155
44.86%
Maintainers
1
Weekly downloads
 
Created
Source

to-fluent

Convert a function with a settings object to fluent API.

npm i to-fluent pnpm add to-fluent yarn add to-fluent

API

# Fluent

    C & [K in keyof T ]-?: T [K] extends boolean ? Fluent<C, T> : Fn<[ T [K] ], Fluent<C, T>> & {

    # not

      [K in keyof T ]-?: T [K] extends boolean ? Fluent<C, T> : never

    }

# bool  =  ...

    boolean

# toFluent(Schema, cb)

    # Schema
    # cb(settings)

      # settings

      cb(settings)  =>

    toFluent<T extends  Class<any>, C extends  Fn<any, any>, S>(Schema, cb)  =>

Credits

  • everyday-types by stagas – Everyday utility types
  • pick-omit by stagas – The two missing object methods we always need.

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas

Keywords

fluent

FAQs

Package last updated on 07 Dec 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