web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
755 B

  1. <a href="http://hapijs.com"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a>
  2. # @hapi/topo
  3. Topological sorting with grouping support.
  4. [![Build Status](https://secure.travis-ci.org/hapijs/topo.svg?branch=master)](http://travis-ci.org/hapijs/topo)
  5. ## Usage
  6. See the [API Reference](API.md)
  7. **Example**
  8. ```js
  9. const Topo = require('topo');
  10. const morning = new Topo();
  11. morning.add('Nap', { after: ['breakfast', 'prep'] });
  12. morning.add([
  13. 'Make toast',
  14. 'Pour juice'
  15. ], { before: 'breakfast', group: 'prep' });
  16. morning.add('Eat breakfast', { group: 'breakfast' });
  17. morning.nodes; // ['Make toast', 'Pour juice', 'Eat breakfast', 'Nap']
  18. ```