git://git.onelab.eu
/
myops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add scripts to create myops-getqueryview:
[myops.git]
/
web
/
query
/
lib
/
blog.js
diff --git a/web/query/lib/blog.js
b/web/query/lib/blog.js
new file mode 100644
(file)
index 0000000..
3295412
--- /dev/null
+++ b/
web/query/lib/blog.js
@@ -0,0
+1,5
@@
+exports.slugifyString = function(string) {
+ return string.replace(/\W/g,'-').
+ replace(/\-*$/,'').replace(/^\-*/,'').
+ replace(/\-{2,}/,'-');
+}
\ No newline at end of file