pull-configs
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i pull-configs

Weekly Downloads

58

Version

1.0.0

License

MIT

Unpacked Size

1.01 MB

Total Files

13

Last publish

Collaborators

  • stagas