Remove lint warnings
This commit is contained in:
parent
3aad6a0c99
commit
68c2c9825f
2 changed files with 4 additions and 5 deletions
|
@ -1,12 +1,11 @@
|
|||
// parses a feature string that has the format used in window.open()
|
||||
// - `str` input string
|
||||
// - `features` input string
|
||||
// - `emit` function(key, value) - called for each parsed KV
|
||||
module.exports = function parseFeaturesString (features, emit) {
|
||||
// split the string by ','
|
||||
features.split(/,\s*/).forEach((feature) => {
|
||||
// expected form is either a key by itself (true boolean flag)
|
||||
// or a key/value, in the form of 'key=value'
|
||||
// split the tokens by '='
|
||||
// expected form is either a key by itself or a key/value pair in the form of
|
||||
// 'key=value'
|
||||
let [key, value] = feature.split(/\s*=/)
|
||||
if (!key) return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue