Edit in JSFiddle

new nonogram.Solver([
  [1, 1],
  [1, 1],
  [1],
  [4]
], [
  [1, 1],
  [1, 1],
  [1],
  [4]
], 'a').solve()
new nonogram.Solver([
  [1, 1],
  [2],
  [2],
  [2]
], [
  [1, 1],
  [2],
  [2],
  [2]
], 'b').solve()