bem-sdk-archive / bemjson-to-decl

BEMJSON to BEMDECL converter. DEPRECATED →
https://github.com/bem/bem-sdk/tree/master/packages/bemjson-to-decl
Other
2 stars 2 forks source link

Bug: mods could be array? #20

Open Yeti-or opened 7 years ago

Yeti-or commented 7 years ago

https://runkit.com/581a9fba871f320014cdcdf7/58ae28aaef3db200148290ed

var bemjsonToDecl = require("bemjson-to-decl");

JSON.stringify(bemjsonToDecl.convert({
  block: 'popup',
  mods: { theme: ['normal', 'action'] }
}), null, 4);

[
    {
        "block": "popup"
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": "normal"
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": true
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": "action"
    }
]
skad0 commented 7 years ago

I think this issue is related to https://github.com/bem-sdk/bemjson-to-decl/issues/13

qfox commented 7 years ago

Yeah, it's a pure duplicate.

qfox commented 7 years ago

Oh, wait, it's impossible.