{"id":16125723,"url":"https://github.com/dy/parse-rect","last_synced_at":"2025-04-06T13:13:02.956Z","repository":{"id":57319465,"uuid":"121306763","full_name":"dy/parse-rect","owner":"dy","description":"Return rectangle object from any possible rect-like argument","archived":false,"fork":false,"pushed_at":"2018-04-03T21:59:38.000Z","size":9,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-14T08:39:50.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-12T21:53:06.000Z","updated_at":"2019-07-23T18:58:33.000Z","dependencies_parsed_at":"2022-08-25T22:41:45.604Z","dependency_job_id":null,"html_url":"https://github.com/dy/parse-rect","commit_stats":null,"previous_names":["dfcreative/parse-rect"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fparse-rect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fparse-rect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fparse-rect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fparse-rect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dy","download_url":"https://codeload.github.com/dy/parse-rect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485291,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T21:31:07.520Z","updated_at":"2025-04-06T13:13:02.940Z","avatar_url":"https://github.com/dy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parse-rect [![experimental](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) [![Build Status](https://travis-ci.org/dy/parse-rect.png)](https://travis-ci.org/dy/parse-rect)\n\nTake any rectangle-like argument and return rectangle values.\n\n[![npm install parse-rect](https://nodei.co/npm/parse-rect.png?mini=true)](https://npmjs.org/package/parse-rect/)\n\n```js\nconst parseRect = require('parse-rect')\n\n// {x: 10, y: 20, width: 90, height: 80}\nparseRect('10 20 100 100')\nparseRect(10, 20, 100, 100)\nparseRect([10, 20, 100, 100])\nparseRect({ x: 10, y: 20, width: 90, height: 80 })\nparseRect({ x: 10, y: 20, w: 90, h: 80 })\nparseRect({ l: 10, t: 20, r: 100, b: 100 })\nparseRect({ left: 10, top: 20, right: 100, bottom: 100 })\n\n// {x: 0, y: 0, width: 90, height: 80}\nparseRect({ width: 90, height: 80 })\nparseRect([ 90, 80 ])\n\n// {x: 0, y: 0, width: 90, height: 90}\nparseRect(90)\nparseRect([90])\n```\n\n## License\n\n(c) 2018 Dmitry Yv. MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fparse-rect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdy%2Fparse-rect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fparse-rect/lists"}