You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// control how a specific variable should be obfuscated
54
+
static: [
55
+
{
56
+
from:"predefined_secret",
57
+
to:"123456",
58
+
},
59
+
],
60
+
61
+
//will skip obfuscation for the following words
62
+
ignore: ["node_modules"],
63
+
},
64
+
debug: {
65
+
// to display detailed stats about the words that have been obfuscated
66
+
stats:true,
67
+
},
87
68
}),
88
69
],
89
70
};
90
71
```
91
72
73
+
For a more detailed explanation, refer to the [configuration](https://codefend.github.io/docs/references/configuration) section of the `codefend` docs.
74
+
92
75
### `Step 2`: Naming convention
93
76
94
77
In your code, `add prefixes to the words that you want Codefend to encrypt.`
@@ -102,6 +85,8 @@ In your code, `add prefixes to the words that you want Codefend to encrypt.`
102
85
classl_Calculator {
103
86
l_sum(l_a, l_b) {
104
87
constl_results= l_a + l_b;
88
+
console.log("node_modules");
89
+
console.log("predefined_secret");
105
90
return l_results;
106
91
}
107
92
}
@@ -111,6 +96,8 @@ class l_Calculator {
111
96
classOx0 {
112
97
Ox1(Ox2, Ox3) {
113
98
constOx4= Ox2 + Ox3;
99
+
console.log("node_modules"); // has not been obfuscated
100
+
console.log("123456"); // has transformed from "predefined_secret" to "123456"
0 commit comments