Skip to content

Commit 2463460

Browse files
committed
Finish ESM refactoring
1 parent cda9d80 commit 2463460

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/obfuscation-detector.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/usr/bin/env node
22
import fs from 'node:fs';
3-
const detectObfuscation = require(__dirname + '/../src');
3+
import {fileURLToPath} from 'node:url';
4+
import {detectObfuscation} from './../src/index.js';
45

5-
if (require.main === module) {
6+
if (process.argv[1] === fileURLToPath(import.meta.url)) {
67
try {
78
const args = process.argv.slice(2);
89
if (args.length) {

0 commit comments

Comments
 (0)