Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

readme.md 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. # unist-util-find-all-after
  2. [![Build][build-badge]][build]
  3. [![Coverage][coverage-badge]][coverage]
  4. [![Downloads][downloads-badge]][downloads]
  5. [![Sponsors][sponsors-badge]][collective]
  6. [![Backers][backers-badge]][collective]
  7. [![Chat][chat-badge]][chat]
  8. [![Size][size-badge]][size]
  9. [**unist**][unist] utility to find nodes after another node.
  10. ## Install
  11. [npm][]:
  12. ```sh
  13. npm install unist-util-find-all-after
  14. ```
  15. ## Use
  16. ```js
  17. var u = require('unist-builder')
  18. var findAllAfter = require('unist-util-find-all-after')
  19. var tree = u('tree', [
  20. u('leaf', 'leaf 1'),
  21. u('node', [u('leaf', 'leaf 2'), u('leaf', 'leaf 3')]),
  22. u('leaf', 'leaf 4'),
  23. u('node', [u('leaf', 'leaf 5')]),
  24. u('leaf', 'leaf 6'),
  25. u('void'),
  26. u('leaf', 'leaf 7')
  27. ])
  28. console.log(findAllAfter(tree, 1, 'leaf'))
  29. ```
  30. Yields:
  31. ```js
  32. [
  33. {type: 'leaf', value: 'leaf 4'},
  34. {type: 'leaf', value: 'leaf 6'},
  35. {type: 'leaf', value: 'leaf 7'}
  36. ]
  37. ```
  38. ## API
  39. ### `findAllAfter(parent, node|index[, test])`
  40. Find all children after `index` (or `node`) in `parent` that pass `test` (when
  41. given).
  42. ###### Parameters
  43. * `parent` ([`Node`][node]) — [Parent][] node
  44. * `node` ([`Node`][node]) — [Child][] of `parent`
  45. * `index` (`number`, optional) — [Index][] in `parent`
  46. * `test` (`Function`, `string`, `Object`, `Array`, optional)
  47. — See [`unist-util-is`][is]
  48. ###### Returns
  49. [`Array.<Node>`][node] — [Child][]ren of `parent` passing `test`.
  50. ## Related
  51. * [`unist-util-visit`](https://github.com/syntax-tree/unist-util-visit)
  52. — Recursively walk over nodes
  53. * [`unist-util-visit-parents`](https://github.com/syntax-tree/unist-util-visit-parents)
  54. — Like `visit`, but with a stack of parents
  55. * [`unist-util-filter`](https://github.com/syntax-tree/unist-util-filter)
  56. — Create a new tree with all nodes that pass a test
  57. * [`unist-util-map`](https://github.com/syntax-tree/unist-util-map)
  58. — Create a new tree with all nodes mapped by a given function
  59. * [`unist-util-flatmap`](https://gitlab.com/staltz/unist-util-flatmap)
  60. — Create a new tree by mapping (to an array) with the given function
  61. * [`unist-util-find-after`](https://github.com/syntax-tree/unist-util-find-after)
  62. — Find a node after another node
  63. * [`unist-util-find-before`](https://github.com/syntax-tree/unist-util-find-before)
  64. — Find a node before another node
  65. * [`unist-util-find-all-after`](https://github.com/syntax-tree/unist-util-find-all-after)
  66. — Find all nodes after another node
  67. * [`unist-util-find-all-before`](https://github.com/syntax-tree/unist-util-find-all-before)
  68. — Find all nodes before another node
  69. * [`unist-util-find-all-between`](https://github.com/mrzmmr/unist-util-find-all-between)
  70. — Find all nodes between two nodes
  71. * [`unist-util-remove`](https://github.com/syntax-tree/unist-util-remove)
  72. — Remove nodes from a tree that pass a test
  73. * [`unist-util-select`](https://github.com/syntax-tree/unist-util-select)
  74. — Select nodes with CSS-like selectors
  75. ## Contribute
  76. See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
  77. started.
  78. See [`support.md`][support] for ways to get help.
  79. This project has a [code of conduct][coc].
  80. By interacting with this repository, organization, or community you agree to
  81. abide by its terms.
  82. ## License
  83. [MIT][license] © [Titus Wormer][author]
  84. <!-- Definitions -->
  85. [build-badge]: https://img.shields.io/travis/syntax-tree/unist-util-find-all-after.svg
  86. [build]: https://travis-ci.org/syntax-tree/unist-util-find-all-after
  87. [coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-find-all-after.svg
  88. [coverage]: https://codecov.io/github/syntax-tree/unist-util-find-all-after
  89. [downloads-badge]: https://img.shields.io/npm/dm/unist-util-find-all-after.svg
  90. [downloads]: https://www.npmjs.com/package/unist-util-find-all-after
  91. [size-badge]: https://img.shields.io/bundlephobia/minzip/unist-util-find-all-after.svg
  92. [size]: https://bundlephobia.com/result?p=unist-util-find-all-after
  93. [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
  94. [backers-badge]: https://opencollective.com/unified/backers/badge.svg
  95. [collective]: https://opencollective.com/unified
  96. [chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
  97. [chat]: https://github.com/syntax-tree/unist/discussions
  98. [npm]: https://docs.npmjs.com/cli/install
  99. [license]: license
  100. [author]: https://wooorm.com
  101. [unist]: https://github.com/syntax-tree/unist
  102. [node]: https://github.com/syntax-tree/unist#node
  103. [parent]: https://github.com/syntax-tree/unist#parent-1
  104. [child]: https://github.com/syntax-tree/unist#child
  105. [index]: https://github.com/syntax-tree/unist#index
  106. [is]: https://github.com/syntax-tree/unist-util-is
  107. [contributing]: https://github.com/syntax-tree/.github/blob/HEAD/contributing.md
  108. [support]: https://github.com/syntax-tree/.github/blob/HEAD/support.md
  109. [coc]: https://github.com/syntax-tree/.github/blob/HEAD/code-of-conduct.md