about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2023-07-19 23:02:43 -0400
committerelioat <elioat@tilde.institute>2023-07-19 23:02:43 -0400
commit07e6df068487ace6961901c7eb17e8b24a52912d (patch)
tree8d1d49ed903d9dfebbaacdc3b6370bcec978e803
parentaaacfd6f4d6dd57098037de179f98d846b6ad5f3 (diff)
downloadtour-07e6df068487ace6961901c7eb17e8b24a52912d.tar.gz
*
-rw-r--r--js/b.js52
1 files changed, 26 insertions, 26 deletions
diff --git a/js/b.js b/js/b.js
index d1d44b2..52a34af 100644
--- a/js/b.js
+++ b/js/b.js
@@ -22,29 +22,29 @@ const b = {
 };
 
 
-// pipe
-const title = '10 Weird Facts About Dogs';
-const toLowerCase = (str) => str.toLowerCase();
-const addHyphens = (str) => str.replace(/\s/g, '-');
-const reverseText = (str) => (str === '') ? '' : reverseText(str.substr(1)) + str.charAt(0);
-const slug = b.pipe(title, toLowerCase, addHyphens, reverseText);
-console.log('pipe ', slug);
-
-
-// compose 
-const toUpperCase = x => x.toUpperCase();
-const exclaim = x => `${x}!`;
-const shout = b.compose(exclaim, toUpperCase);
-const ret = shout('send in the clowns'); // "SEND IN THE CLOWNS!"
-console.log('compose ', ret);
-
-
-// curry family
-const hasLetterR = b.match(/r/g);
-const r1 = hasLetterR('hello world');
-const r2 = hasLetterR('just j and s and t etc');
-const r3 = b.filter(hasLetterR, ['rock and roll', 'smooth jazz']);
-const noVowels = b.replace(/[aeiou]/ig);
-const censored = noVowels('*');
-const r4 = censored('Chocolate Rain');
-console.log('curry ', r1, r2, r3, r4);
\ No newline at end of file
+// // pipe
+// const title = '10 Weird Facts About Dogs';
+// const toLowerCase = (str) => str.toLowerCase();
+// const addHyphens = (str) => str.replace(/\s/g, '-');
+// const reverseText = (str) => (str === '') ? '' : reverseText(str.substr(1)) + str.charAt(0);
+// const slug = b.pipe(title, toLowerCase, addHyphens, reverseText);
+// console.log('pipe ', slug);
+
+
+// // compose 
+// const toUpperCase = x => x.toUpperCase();
+// const exclaim = x => `${x}!`;
+// const shout = b.compose(exclaim, toUpperCase);
+// const ret = shout('send in the clowns'); // "SEND IN THE CLOWNS!"
+// console.log('compose ', ret);
+
+
+// // curry family
+// const hasLetterR = b.match(/r/g);
+// const r1 = hasLetterR('hello world');
+// const r2 = hasLetterR('just j and s and t etc');
+// const r3 = b.filter(hasLetterR, ['rock and roll', 'smooth jazz']);
+// const noVowels = b.replace(/[aeiou]/ig);
+// const censored = noVowels('*');
+// const r4 = censored('Chocolate Rain');
+// console.log('curry ', r1, r2, r3, r4);
\ No newline at end of file