SHOW:
|
|
- or go back to the newest paste.
1 | ngModule.service('sarcasticConfirmationMessage', [ function () { | |
2 | var messages = [ | |
3 | "Are you sure?", | |
4 | "You promise?", | |
5 | "Stuff could happen... Are you sure?", | |
6 | "Does this feel like the right thing to do?", | |
7 | "You sure of that?", | |
8 | "100%?", | |
9 | "Do you guarantee that you wanna do this?" | |
10 | ]; | |
11 | ||
12 | this.getOne = function () { | |
13 | - | return _.random(messages); |
13 | + | return messages[_.random(messages.length)]; |
14 | }; | |
15 | ||
16 | this.getSome = function (howMany) { | |
17 | - | return _.take(_.shuffle(messages), howMany, messages.length); |
17 | + | return _.take(_.shuffle(messages), howMany); |
18 | }; | |
19 | }]); |