From 1e1648410e075b1b1e6470f8c3563158117dbad5 Mon Sep 17 00:00:00 2001 From: Alex Kern Date: Thu, 23 Apr 2015 18:07:30 -0700 Subject: [PATCH] Remove the old Status impl. --- client/Status.js | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 client/Status.js diff --git a/client/Status.js b/client/Status.js deleted file mode 100644 index 51dc3f8..0000000 --- a/client/Status.js +++ /dev/null @@ -1,33 +0,0 @@ -function statusPredicate(v) { - if (v.length === 1) { - return v.toUpperCase(); - } else { - return 'is' + statusPredicate(v.charAt(0)) + v.substring(1); - } -} - -export default class Status { - - constructor(values) { - this.value = values[0]; - this.values = values; - - for (let v of values) { - this[statusPredicate(v)] = function () { - return this.value === v; - } - } - } - - get() { - return this.value; - } - - set(value) { - if (this.values.indexOf(value) === -1) - throw new Error('Unknown value'); - - this.value = value; - } - -}