UNPKG
sync-fs
Version:
latest (1.0.1)
1.0.1
Synchronous version of the node.js fs module.
github.com/nathan7/sync-fs
nathan7/sync-fs
sync-fs
/
index.js
12 lines
(10 loc)
•
269 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
'use strict'
;
var
fs =
require
(
'fs'
)
for
(
var
key
in
fs)
if
((
typeof
fs[key] !=
'function'
|| key.
match
(
/^[A-Z]/
) || key.
match
(
/^create/
) || key.
match
(
/^(un)?watch/
) || key.
match
(
/Sync$/
) ))
exports
[key.
replace
(
/Sync$/
,
''
)] = fs[key]