Skip to content

Commit

Permalink
📚 docs(README): Add code sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed May 5, 2021
1 parent b89b2b1 commit fe0881e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ See [docs](https://iterable-iterator.github.io/cycle/index.html).
import {cycle, ncycle} from '@iterable-iterator/cycle';
cycle( "AB" ) ; // A B A B A B ...
ncycle( "AB" , 3 ) ; // A B A B A B

import {chain} from '@iterable-iterator/chain';
cycle( chain( [ 0 , 1 , 2 ] , [ 3 , 4 , 5 ] ) ) ; // 0 1 2 3 4 5 0 1 ...
```

[![License](https://img.shields.io/github/license/iterable-iterator/cycle.svg)](https://raw.githubusercontent.com/iterable-iterator/cycle/main/LICENSE)
Expand Down

0 comments on commit fe0881e

Please sign in to comment.