Take any rectangle-like argument and return rectangle values.
const parseRect = require('parse-rect')
parseRect('10 20 100 100')
parseRect(10, 20, 100, 100)
parseRect([10, 20, 100, 100])
parseRect({ x: 10, y: 20, width: 90, height: 80 })
parseRect({ x: 10, y: 20, w: 90, h: 80 })
parseRect({ l: 10, t: 20, r: 100, b: 100 })
parseRect({ left: 10, top: 20, right: 100, bottom: 100 })
parseRect({ width: 90, height: 80 })
parseRect([ 90, 80 ])
parseRect(90)
parseRect([90])
(c) 2018 Dmitry Yv. MIT License