@reldens/utils 0.20.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/shortcuts.js +10 -0
  2. package/package.json +1 -1
package/lib/shortcuts.js CHANGED
@@ -314,6 +314,16 @@ class Shortcuts
314
314
  return text;
315
315
  }
316
316
 
317
+ slugify(text)
318
+ {
319
+ return (text || '')
320
+ .replace(/&/g, ' and ')
321
+ .replace(/[^a-zA-Z0-9]/g, ' ')
322
+ .trim()
323
+ .replace(/\s+/g, '-')
324
+ .toLowerCase();
325
+ }
326
+
317
327
  }
318
328
 
319
329
  module.exports = new Shortcuts();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reldens/utils",
3
3
  "scope": "@reldens",
4
- "version": "0.20.0",
4
+ "version": "0.20.1",
5
5
  "description": "Reldens - Utils",
6
6
  "author": "Damian A. Pastorini",
7
7
  "license": "MIT",