octo-deno/lib/make/alignment.js

23 lines
600 B
JavaScript
Raw Normal View History

2017-08-08 10:48:47 +00:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const make = require('../make')
const random = require('../random')
class alignment extends make {
2018-03-19 04:54:40 +00:00
static horizontal () {
return random.item(['left', 'right', 'justify', 'center'])
}
2018-03-19 04:54:40 +00:00
static vertical () {
return random.item(['top', 'bottom', 'middle', 'baseline'])
}
2018-03-19 04:54:40 +00:00
static any () {
return random.pick([this.horizontal, this.vertical])
}
2017-06-28 19:01:48 +00:00
}
module.exports = alignment