Remove lint warnings

This commit is contained in:
Kevin Sawicki 2016-10-25 10:36:43 +09:00
parent 3aad6a0c99
commit 68c2c9825f
2 changed files with 4 additions and 5 deletions

View file

@ -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