We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dc2882 commit ec2faf6Copy full SHA for ec2faf6
filter-wordcount.js
@@ -0,0 +1,10 @@
1
+/**
2
+ * Calculates word-count for a given string
3
+ * @param {string} str
4
+ * @return {integer}
5
+ */
6
+PolymerExpressions.prototype.wordcount = function(input){
7
+ var words = (input) ? input.match(/\w+/g) : null;
8
+ return (words) ? words.length : null;
9
+}
10
+
0 commit comments