diff options
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md')
-rw-r--r--[-rwxr-xr-x] | deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md index 19357bb51f..92c4912c7e 100755..100644 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md @@ -2,7 +2,7 @@ Utility methods for the hapi ecosystem. This module is not intended to solve every problem for everyone, but rather as a central place to store hapi-specific methods. If you're looking for a general purpose utility module, check out [lodash](https://github.com/lodash/lodash) or [underscore](https://github.com/jashkenas/underscore). -[![Build Status](https://secure.travis-ci.org/hapijs/hoek.png)](http://travis-ci.org/hapijs/hoek) +[![Build Status](https://secure.travis-ci.org/hapijs/hoek.svg)](http://travis-ci.org/hapijs/hoek) Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf) @@ -22,7 +22,7 @@ Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf) * [contain](#containref-values-options "contain") * [flatten](#flattenarray-target "flatten") * [reach](#reachobj-chain-options "reach") - * [reachTemplate](#reachobj-template-options "reachTemplate") + * [reachTemplate](#reachtemplateobj-template-options "reachTemplate") * [transform](#transformobj-transform-options "transform") * [shallow](#shallowobj "shallow") * [stringify](#stringifyobj "stringify") @@ -45,8 +45,9 @@ Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf) * [once](#oncefn "once") * [ignore](#ignore "ignore") * [Miscellaneous](#miscellaneous "Miscellaneous") - * [uniqueFilename](#uniquefilename "uniqueFilename") - * [isInteger](#isInteger "isInteger") + * [uniqueFilename](#uniquefilenamepath-extension "uniqueFilename") + * [isAbsolutePath](#isabsolutepathpath-platform "isAbsolutePath") + * [isInteger](#isintegervalue "isInteger") @@ -188,7 +189,7 @@ var defaults = { var options = { server: { port: 8080 } }; -var config = Hoek.applyToDefaults(defaults, options); // results in { server: { port: 8080 }, name: 'example' } +var config = Hoek.applyToDefaultsWithShallow(defaults, options, ['server']); // results in { server: { port: 8080 }, name: 'example' } ``` ### deepEqual(b, a, [options]) @@ -292,6 +293,8 @@ Converts an object key chain string to reference A chain including negative numbers will work like negative indices on an array. +If chain is `null`, `undefined` or `false`, the object itself will be returned. + ```javascript var chain = 'a.b.c'; @@ -324,7 +327,7 @@ Hoek.reachTemplate(obj, '1+{a.b.c}=2'); // returns '1+1=2' ### transform(obj, transform, [options]) -Transforms an existing object into a new one based on the supplied `obj` and `transform` map. `options` are the same as the `reach` options. +Transforms an existing object into a new one based on the supplied `obj` and `transform` map. `options` are the same as the `reach` options. The first argument can also be an array of objects. In that case the method will return an array of transformed objects. ```javascript var source = { @@ -565,6 +568,13 @@ Returns a randomly generated file name at the specified `path`. The result is a var result = Hoek.uniqueFilename('./test/modules', 'txt'); // results in "full/path/test/modules/{random}.txt" ``` +### isAbsolutePath(path, [platform]) + +Determines whether `path` is an absolute path. Returns `true` or `false`. + +- `path` - A file path to test for whether it is absolute or not. +- `platform` - An optional parameter used for specifying the platform. Defaults to `process.platform`. + ### isInteger(value) Check `value` to see if it is an integer. Returns true/false. |