node-dir icon indicating copy to clipboard operation
node-dir copied to clipboard

Target node versions do not support Object.assign

Open franza opened this issue 8 years ago • 1 comments

Target node versions include the old ones which do not support ES2015 stuff like Object.assign:

  "engines": {
    "node": ">= 0.10.5"
  },

For example, here Object.assign is used here for example: https://github.com/fshost/node-dir/blob/b40a44a74ecd8b582643088a08dab8d10c4919f6/lib/paths.js#L102

          var newOptions = Object.assign({}, options)
          newOptions.ignoreType = true
          var moreResults = files(statPath, type, subloop, newOptions);

In NodeJS v0.10 it throws an error because Object.assign does not exist yet.

franza avatar Jun 08 '17 07:06 franza

I forked this project long ago and it's in use by many. I just published to npm. Give it a try

https://www.npmjs.com/package/path-reader

AckerApple avatar Aug 10 '17 14:08 AckerApple