diff --git a/README.md b/README.md index da3bcc1b0..4d28c1f77 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.5 +# lodash v4.17.9 The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. @@ -28,7 +28,7 @@ var at = require('lodash/at'); var curryN = require('lodash/fp/curryN'); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.17.5-npm) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.17.9-npm) for more details. **Note:**
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. diff --git a/_nodeUtil.js b/_nodeUtil.js index 14e179fe1..983d78f75 100644 --- a/_nodeUtil.js +++ b/_nodeUtil.js @@ -15,6 +15,14 @@ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); diff --git a/lodash.js b/lodash.js index 153fc43d2..968b0e833 100644 --- a/lodash.js +++ b/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.5'; + var VERSION = '4.17.9'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -436,6 +436,14 @@ /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); diff --git a/package.json b/package.json index 90218d2db..92bbecc7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.17.5", + "version": "4.17.9", "description": "Lodash modular utilities.", "keywords": "modules, stdlib, util", "homepage": "https://lodash.com/",