Skip to content

Change strman.format parameter format #83

Description

@ctaleck

When I use strman.format, I have to wrap the parameters in an Array as stated, but the documentation shows differently:

const select = `SELECT * FROM CONTACTS WHERE NAME LIKE '%{0}%' AND EMAIL LIKE '%{1}%'`
format(select, 'DANIEL', 'GMAIL')
// => `SELECT * FROM CONTACTS WHERE NAME LIKE '%DANIEL%' AND EMAIL LIKE '%GMAIL%'`

In my tests, I have to use:

format(select, ['DANIEL', 'GMAIL'])

I prefer the documented format (without an Array). Is it possible to also support?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions