   # of all `*.js` and `*.coffee` files in `filepath`.
   # if `filepath` is a directory recurse into every file and subdirectory.
 
-  if fs? and pathModule?
+  if hinoki.isNodejs
     # TODO better name
     hinoki.requireSource = (filepath) ->
       unless 'string' is typeof filepath

      return source

    if 'string' is typeof arg
      return hinoki.source hinoki.requireSource arg

    if 'object' is typeof arg


    # TODO call this something like fromExports
    hinoki.baseRequireSource = (filepath, object) ->
      stat = fsModule.statSync(filepath)
      if stat.isFile()
        extension = pathModule.extname(filepath)

