Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
selfrefactor committed Jan 16, 2025
1 parent 7cf4c86 commit 353cf61
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
25 changes: 15 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rambda1111111
# Rambda

`Rambda` is smaller and faster alternative to the popular functional programming library **Ramda**. - [Documentation](https://selfrefactor.github.io/rambda/#/)

Expand Down Expand Up @@ -25034,10 +25034,7 @@ const result = [
```typescript
take<T>(howMany: number, input: T[]): T[];
take(howMany: number, input: string): string;
take<T>(howMany: number): {
<T>(input: T[]): T[];
(input: string): string;
};
take<T>(howMany: number) : (input: T[]) => T[];
```

</details>
Expand Down Expand Up @@ -25165,10 +25162,7 @@ const result = [
```typescript
takeLast<T>(howMany: number, input: T[]): T[];
takeLast(howMany: number, input: string): string;
takeLast<T>(howMany: number): {
<T>(input: T[]): T[];
(input: string): string;
};
takeLast<T>(howMany: number) : (input: T[]) => T[];
```

</details>
Expand Down Expand Up @@ -25239,7 +25233,7 @@ test('with negative index', () => {
<summary><strong>TypeScript</strong> test</summary>

```typescript
import {takeLast} from 'rambda'
import {filter, piped, takeLast} from 'rambda'

const list = [1, 2, 3, 4]
const str = 'foobar'
Expand All @@ -25256,6 +25250,17 @@ describe('R.takeLast - array', () => {

result // $ExpectType number[]
})
it('real case', () => {
let data = ['foo']
let result = piped(
data,
filter(
x => x.length >= 100
),
takeLast(5),
)
result // $ExpectType string[]
})
})

describe('R.takeLast - string', () => {
Expand Down
10 changes: 10 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: '',
repo: '',
search: {
depth: 3,
}
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
</body>
Expand Down

0 comments on commit 353cf61

Please sign in to comment.