Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e3d7111
ready to publish
chalu Feb 18, 2024
51add33
add CD workflow
chalu Feb 18, 2024
16d3398
lint only changed TS or JS files
chalu Feb 18, 2024
d0de98d
fix CD job name
chalu Feb 18, 2024
83348c4
run CI only on PR to dev or main
chalu Feb 18, 2024
d8979e9
dry run package publishing
chalu Feb 18, 2024
c29a94d
merge branch 'main' into go-publish
chalu Feb 18, 2024
829d598
Merge branch 'dev' into go-publish
chalu Feb 18, 2024
2b39e3e
dry run publish on dev branch
chalu Feb 18, 2024
55a6922
sync local and remote branches
chalu Feb 18, 2024
0cfbc03
get production ready
chalu Feb 18, 2024
bbf5f0b
make a default tsconfig from the ESM config
chalu Feb 18, 2024
41ba737
dry run release from GHA
chalu Feb 18, 2024
01996d9
Merge branch 'dev' into go-publish
chalu Feb 18, 2024
d706086
prune GHA runs
chalu Feb 18, 2024
a3ba02f
update with merge conflict resolution commit
chalu Feb 18, 2024
0d3d8b1
attempt release from GHA
chalu Feb 18, 2024
670b7c1
attempt release from GHA
chalu Feb 18, 2024
d837f27
Merge branch 'dev' into go-publish
chalu Feb 18, 2024
b528f0c
fix package json file
chalu Feb 18, 2024
f0a3f5f
fix version
chalu Feb 18, 2024
8fd0e34
Merge branch 'dev' into go-publish
chalu Feb 18, 2024
2a29104
remove merged condition
chalu Feb 18, 2024
db42545
fix version
chalu Feb 18, 2024
f176ab0
fix version
chalu Feb 18, 2024
1d5adb1
use latest tag
chalu Feb 18, 2024
387b3e2
fix release workflow
chalu Feb 18, 2024
dd323c0
prepare first public release
chalu Feb 18, 2024
33b9183
set first public release
chalu Feb 18, 2024
120dd89
Merge branch 'dev' into go-publish
chalu Feb 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
pull_request:
branches:
- "dev"
- "main"
types: [ closed ]

jobs:
Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,33 @@ const coordPairs = Array.from(coordIterable);
console.log(Array.isArray(coordPairs)); // true
// prints ["5.7225", "-9.6273"] ...
coordPairs
.map(pair => myTransform(pair))
.forEach((pair) => placeOnMap(pair));
.map(pair => {
return myTransform(pair);
})
.forEach((pair) => {
placeOnMap(pair);
});
```

### Some Real World Examples
> I first had this idea and tried my hands on it when [building wole-joko](https://github.com/chalu/wole-joko/blob/dev/src/js/utils.js#L57-L92), a live coding task I was asked to do in an engineering manager interview. It was a simulation of people entering an event hall to get seated, but only two could get it/be attended to at a time. I later took some time to [bring the project to live](https://wole-joko.netlify.app/)

> The below example was adapted for more concise terminal output
#### Wole Joko

<br>
I first tried my hands on this concept when [building wole-joko](https://github.com/chalu/wole-joko/blob/dev/src/js/utils.js#L57-L92), a _live coding task_ I was asked to do in an engineering manager interview :man_shrugging. It was a simulation of people entering an event hall to get seated, but only two could get in at a time. I later took some time to [give the project more life](https://wole-joko.netlify.app/)

JS challenge by @thdxr on X.com <br>
#### Execute max of X tasks in parallel

JS challenge by [@thdxr on X.com](https://twitter.com/thdxr) <br>
![](./assets/the-dax-js-challenge.png "JS challenge by @thdxr")
<br> <br>

`n-tuple-array` solution code <br>
[<img src="./assets/demo-classic.png">](https://github.com/chalu/n-tuple-array/blob/main/src/demo/demo-classic.ts#L6-L40)
> The below was adapted for more concise terminal output

`n-tuple-array` solution. View [code here](https://github.com/chalu/n-tuple-array/blob/main/src/demo/demo-classic.ts#L6-L40) <br>
![](./assets/demo-classic.png "n-tuple-array solution")
<br> <br>

`n-tuple-array` n-tuple-array solution demo <br>
`n-tuple-array` solution demo <br>
![](./assets/ntuple-array-demo-optimized.gif "n-tuple-array solution demo")


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chalu/n-tuple-array",
"version": "0.1.4",
"version": "0.1.5",
"description": "Get a specified amount of items when iterating over a JavaScript array, instead of just a single item that arrays provide!",
"main": "./dist/cjs/index.js",
"types": "./dist/cjs/types/index.d.ts",
Expand Down