@@ -17,17 +17,17 @@ export async function plaintranslate(
1717
1818 let translatedWord = '' ;
1919
20- if ( global . source == Sources . LibreTranslate ) {
20+ if ( global . source === Sources . LibreTranslate ) {
2121 translatedWord = await translateWithLibre ( ignored_word , from , to ) ;
22- } else if ( global . source == Sources . ArgosTranslate ) {
22+ } else if ( global . source === Sources . ArgosTranslate ) {
2323 translatedWord = await translateWithArgos ( ignored_word , from , to ) ;
24- } else if ( global . source == Sources . BingTranslate ) {
24+ } else if ( global . source === Sources . BingTranslate ) {
2525 translatedWord = await translateWithBing ( ignored_word , from , to ) ;
2626 } else {
2727 if (
2828 global . proxyList &&
2929 global . proxyList . length > 0 &&
30- global . proxyIndex != - 1
30+ global . proxyIndex !== - 1
3131 ) {
3232 let proxy = global . proxyList [ global . proxyIndex ] ;
3333
@@ -133,7 +133,7 @@ async function translateWithGoogle(
133133 to : to ,
134134 } ,
135135 {
136- agent : options != undefined ? options . agent : undefined ,
136+ agent : options !== undefined ? options . agent : undefined ,
137137 }
138138 ) ;
139139
@@ -163,7 +163,7 @@ export function getRootFolder(path: string) {
163163
164164 let root = arr . join ( '/' ) ;
165165
166- if ( root == undefined || root == '' ) {
166+ if ( root === undefined || root = == '' ) {
167167 root = './' ;
168168 }
169169
@@ -184,7 +184,7 @@ export async function saveFilePublic(path: string, data: any) {
184184export function safeValueTransition ( value : string ) {
185185 const value_safety : ValueSafety = valueIsSafe ( value ) ;
186186
187- if ( value_safety . is_safe == true ) {
187+ if ( value_safety . is_safe === true ) {
188188 return value ;
189189 }
190190
@@ -208,14 +208,14 @@ function valueIsSafe(value: string): ValueSafety {
208208 type : undefined ,
209209 } ;
210210
211- if ( value == undefined ) {
211+ if ( value === undefined ) {
212212 result . is_safe = false ;
213213 result [ 'type' ] = nonSafeTypes . undefined ;
214214
215215 return result ;
216216 }
217217
218- if ( value == null ) {
218+ if ( value === null ) {
219219 result . is_safe = false ;
220220 result [ 'type' ] = nonSafeTypes . null ;
221221
@@ -229,7 +229,7 @@ function valueIsSafe(value: string): ValueSafety {
229229 return result ;
230230 }
231231
232- if ( value == '' ) {
232+ if ( value === '' ) {
233233 result . is_safe = false ;
234234 result [ 'type' ] = nonSafeTypes . empty ;
235235
0 commit comments