Open Yeti-or opened 7 years ago
https://runkit.com/581a9fba871f320014cdcdf7/58ae28aaef3db200148290ed
var bemjsonToDecl = require("bemjson-to-decl"); var bemJson = ({ block: 'popup', content: [ { mods: { custom: 'd' }, tag: 'dd' } ] }); JSON.stringify(bemjsonToDecl.convert(bemJson), null, 4);
[ { "block": "popup" }, { "block": "popup", "modName": "theme", "modVal": "normal" }, { "block": "popup", "modName": "theme", "modVal": true } ]
I'd say there is a bug because block_mod should be before block_mod_val. But it's right that we have it.
@zxqfox https://goo.gl/AplJxL
https://runkit.com/581a9fba871f320014cdcdf7/58ae28aaef3db200148290ed