Skip to content

Commit 0d38e5d

Browse files
committed
chore: revert changes
1 parent 0589a40 commit 0d38e5d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import { promises as fs } from 'fs'
1+
import { existsSync } from 'fs'
2+
import { readFileSync } from 'fs'
3+
import { writeFileSync } from 'fs'
24

3-
export default def updateLine file\string, callback\function
5+
export def updateLine file\string, callback\function
46
if !existsSync(file) then return false
57

6-
const contents = fs.readFileSync(file, 'utf8')
8+
const contents = readFileSync(file, 'utf8')
79
const lines = []
810
const splitLines = contents.split('\n')
911
for index in [0...splitLines.length]
1012
lines.push callback(splitLines[index], index)
1113

12-
fs.writeFileSync(file, lines.join('\n'), { encoding: 'utf8' })
14+
writeFileSync(file, lines.join('\n'), { encoding: 'utf8' })
1315
return true

0 commit comments

Comments
 (0)