p42
Version:
CLI wrapper for using Docker with Swarm.
27 lines (19 loc) • 709 B
JavaScript
// Generated by CoffeeScript 1.10.0
(function() {
var YAML, call, join, path, pluck, read, ref;
join = require("path").join;
YAML = require("js-yaml");
ref = require("fairmont"), call = ref.call, read = ref.read;
pluck = function(list) {
var index, random, round;
random = Math.random, round = Math.round;
index = round(random() * (list.length - 1));
return list[index];
};
path = join(process.env._P42_ROOT, "share", "words.yaml");
call(function*() {
var adjectives, nouns, ref1;
ref1 = YAML.safeLoad((yield read(path))), adjectives = ref1.adjectives, nouns = ref1.nouns;
return console.log((pluck(adjectives)) + "-" + (pluck(nouns)));
});
}).call(this);