Coerce features to string
This commit is contained in:
parent
635c909aab
commit
3b99827540
1 changed files with 1 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
// - `features` input string
|
// - `features` input string
|
||||||
// - `emit` function(key, value) - called for each parsed KV
|
// - `emit` function(key, value) - called for each parsed KV
|
||||||
module.exports = function parseFeaturesString (features, emit) {
|
module.exports = function parseFeaturesString (features, emit) {
|
||||||
|
features = `${features}`
|
||||||
// split the string by ','
|
// split the string by ','
|
||||||
features.split(/,\s*/).forEach((feature) => {
|
features.split(/,\s*/).forEach((feature) => {
|
||||||
// expected form is either a key by itself or a key/value pair in the form of
|
// expected form is either a key by itself or a key/value pair in the form of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue