Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binocarlos/gridsize
Input a number N and get a {width:X,height:X} object for a grid with at least N cells
https://github.com/binocarlos/gridsize
Last synced: 11 days ago
JSON representation
Input a number N and get a {width:X,height:X} object for a grid with at least N cells
- Host: GitHub
- URL: https://github.com/binocarlos/gridsize
- Owner: binocarlos
- Created: 2013-12-17T15:08:30.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-17T17:16:03.000Z (almost 11 years ago)
- Last Synced: 2024-10-25T13:58:36.571Z (26 days ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gridsize
========![Build status](https://api.travis-ci.org/binocarlos/gridsize.png)
Input a number N and get a {width:X,height:X} object for a grid with at least N cells
```js
var gridsize = require('gridsize');var grid_2x2 = gridsize(4);
var grid_4x5 = gridsize(19);
var grid_5x4 = gridsize(19, true);
```## installation
npm/browserify:
```
$ npm install gridsize
```component:
```
$ component install binocarlos/gridsize
```## var grid = gridsize(count, portrait)
Return an object with:
* width
* heightproperties that multiplied will be at least **count**.
If portraint is true then then height will be $gte width
## licence
MIT