.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / hash.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/hash.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/hash.js
new file mode 100644 (file)
index 0000000..38a54b7
--- /dev/null
@@ -0,0 +1,13 @@
+"use strict";
+const murmur = require("imurmurhash");
+
+/**
+ * hash the given string
+ * @param  {string} str the string to hash
+ * @returns {string}    the hash
+ */
+module.exports = function hash(str) {
+  return murmur(str)
+    .result()
+    .toString(36);
+};