Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
1234567891011121314151617181920212223242526272829
  1. # topo
  2. Topological sorting with grouping support.
  3. [![Build Status](https://secure.travis-ci.org/hapijs/topo.svg?branch=master)](http://travis-ci.org/hapijs/topo)
  4. Lead Maintainer: [Devin Ivy](https://github.com/devinivy)
  5. ## Usage
  6. See the [API Reference](API.md)
  7. **Example**
  8. ```node
  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. ```