dleitee / dleitee/strman

Change strman.format parameter format

Open
#83 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
77
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.