feat(util.spawn): Proc:json()

This commit is contained in:
Folke Lemaitre 2025-10-27 23:37:16 +01:00
parent b5441575e0
commit 5589c9d355
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -148,6 +148,10 @@ function Proc:run()
end
end
function Proc:json()
return vim.json.decode(self:out())
end
function Proc:out()
return table.concat(self.data[self.stdout] or {})
end