@@ -0,0 +1,56 @@
1+"use strict";
2+
3+var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) define …
4+
5+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6+
7+var ADJECTIVES = "different,used,important,every,large,available,popular,able,basic,known,various,difficult,several,united,historical,hot,useful,mental,scared,additional,emotional,old,political,similar,healthy,financial,medical,traditional,federal,entire,strong,actual,significant,successful,electrical,expensive,pregnant,intelligent,interesting,poor,happy,responsible,cute,helpful,recent,willing,nice,wonderful,impossible,serious,huge,rare,technical,typical,competitive,critical,electronic,immediate …
8+
9+var NAMES = "time,year,people,way,day,man,thing,woman,life,child,world,school,state,family,student,group,country,problem,hand,part,place,case,week,company,system,program,question,work,government,number,night,Mr,point,home,water,room,mother,area,money,storey,fact,month,lot,right,study,book,eye,job,word,business";
10+
11+var MyMath = (function () {
12+ function MyMath() {
13+ _classCallCheck(this, MyMath);
14+ }
15+
16+ _createClass(MyMath, null, [{
17+ key: "range",
18+ value: function range(min, max) {
19+ return Math.floor(Math.random() * (max - min) + min);
20+ }
21+ }]);
22+
23+ return MyMath;
24+})();
25+
26+var NameMaker = (function () {
27+ function NameMaker() {
28+ _classCallCheck(this, NameMaker);
29+
30+ this.nouns = NAMES.split(',');
31+ this.adjectives = ADJECTIVES.split(',');
32+ }
33+
34+ _createClass(NameMaker, [{
35+ key: "getAdjective",
36+ value: function getAdjective() {
37+ var len = this.adjectives.length;
38+ return this.adjectives[MyMath.range(0, len)];
39+ }
40+ }, {
41+ key: "getNoun",
42+ value: function getNoun() {
43+ var len = this.nouns.length;
44+ return this.nouns[MyMath.range(0, len)];
45+ }
46+ }, {
47+ key: "go",
48+ value: function go() {
49+ var noun = this.getNoun(),
50+ adjective = this.getAdjective();
51+ return adjective + " " + noun;
52+ }
53+ }]);
54+
55+ return NameMaker;
56+})();