25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 년 전
123456789101112131415161718192021222324252627282930
  1. ![hoek Logo](https://raw.github.com/hapijs/hoek/master/images/hoek.png)
  2. 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).
  3. [![Build Status](https://secure.travis-ci.org/hapijs/hoek.svg)](http://travis-ci.org/hapijs/hoek)
  4. <a href="https://andyet.com"><img src="https://s3.amazonaws.com/static.andyet.com/images/%26yet-logo.svg" align="right" /></a>
  5. Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
  6. **hoek** is sponsored by [&yet](https://andyet.com)
  7. ## Usage
  8. The *Hoek* library contains some common functions used within the hapi ecosystem. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more.
  9. For example, to use Hoek to set configuration with default options:
  10. ```javascript
  11. const Hoek = require('hoek');
  12. const default = {url : "www.github.com", port : "8000", debug : true};
  13. const config = Hoek.applyToDefaults(default, {port : "3000", admin : true});
  14. // In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }
  15. ```
  16. ## Documentation
  17. [**API Reference**](API.md)