Skip to content
generated from stagas/ts

pulls configuration files from a remote location and merges them with local

License

Notifications You must be signed in to change notification settings

stagas/pull-configs

Repository files navigation

pull-configs

pulls configuration files from a remote location and merges them with local

npm i pull-configs pnpm add pull-configs yarn add pull-configs

API

# pullConfigs(remote, local) src/index.ts#L22

    # remote

      string

    # local

      string

    pullConfigs(remote, local)  =>

      {

      # assign src/index.ts#L89

        {

        # target
        # source

        <T, U>(target, source)  =>

        # target
        # source1
        # source2

        <T, U, V>(target, source1, source2)  =>

        # target
        # source1
        # source2
        # source3

        <T, U, V, W>(target, source1, source2, source3)  =>

        # target

          object

        # sources

          any []

        (target, sources)  =>

          any

        }

      # merge src/index.ts#L89

        # (file, replacer)

          # file

            string

          # replacer(prev, next)

            # prev

              any

            # next

              any

            replacer(prev, next)  =>

              void

          (file, replacer)  =>

            Promise<void>

      # omit src/index.ts#L89

        # (obj, keys)

          # obj

            Record<string, any>

          # keys

            string []

          (obj, keys)  =>

            Record<string, any>

      # pick src/index.ts#L89

        # (obj, keys)

          # obj

            Record<string, any>

          # keys

            string []

          (obj, keys)  =>

            Record<string, any>

      # replace src/index.ts#L89

        # (file)

          # file

            string

          (file)  =>

            Promise<void>

      # sort src/index.ts#L89

        # (data)

          # data

            any

          (data)  =>

            any

      }

# pullConfigs(remote, local) src/index.ts#L22

    # remote

      string

    # local

      string

    pullConfigs(remote, local)  =>

      {

      # assign src/index.ts#L89

        {

        # target
        # source

        <T, U>(target, source)  =>

        # target
        # source1
        # source2

        <T, U, V>(target, source1, source2)  =>

        # target
        # source1
        # source2
        # source3

        <T, U, V, W>(target, source1, source2, source3)  =>

        # target

          object

        # sources

          any []

        (target, sources)  =>

          any

        }

      # merge src/index.ts#L89

        # (file, replacer)

          # file

            string

          # replacer(prev, next)

            # prev

              any

            # next

              any

            replacer(prev, next)  =>

              void

          (file, replacer)  =>

            Promise<void>

      # omit src/index.ts#L89

        # (obj, keys)

          # obj

            Record<string, any>

          # keys

            string []

          (obj, keys)  =>

            Record<string, any>

      # pick src/index.ts#L89

        # (obj, keys)

          # obj

            Record<string, any>

          # keys

            string []

          (obj, keys)  =>

            Record<string, any>

      # replace src/index.ts#L89

        # (file)

          # file

            string

          (file)  =>

            Promise<void>

      # sort src/index.ts#L89

        # (data)

          # data

            any

          (data)  =>

            any

      }

Credits

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas

About

pulls configuration files from a remote location and merges them with local

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published