瀏覽代碼

docs: add destructuring example

Sven 1 年之前
父節點
當前提交
e1a43ce208
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      README.greasyfork.md

+ 5 - 0
README.greasyfork.md

@@ -36,6 +36,11 @@ If you like using this library, please consider [supporting the development ❤
     Then, access the functions on the global variable `UserUtils`:
     ```ts
     UserUtils.addGlobalStyle("body { background-color: red; }");
+
+    // or using object destructuring:
+
+    const { clamp } = UserUtils;
+    console.log(clamp(1, 5, 10); // 5
     ```
 
 <br><br>