- change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
- rebase your commits from master onto 3.4 branch. For example:
- git rebase -i --onto upstream/3.4 upstream/master
- push rebased commits into source branch of your fork (with --force option)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CSS like attribute parsing. | |
* | |
* Parses strings like | |
`comp[name=myComp] > layer[name=myLayer light=true selected]` to objects. | |
`.cl #id>[name=123]` | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asciinema rec -t "typescript-ast-explorer cast 1" ../Documents/test4.cast | |
svg-term --in ../Documents/test4.cast --out demo3.sv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Project from "ts-simple-ast"; | |
const project = new Project({ useVirtualFileSystem: true }); | |
const file = project.createSourceFile("src/a.ts", ` | |
export class A { | |
method1(msg: string): string { | |
return "hello " + name; | |
} | |
}`); | |
file.getClassOrThrow("A").getMembers().forEach(m => console.log(m.getKindName())); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar --exclude='./.git' --exclude='./node_modules' -zcvf ../project-foo.tgz . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr1.concat(arr2).filter((value, pos, arr)=>arr.indexOf(value)===pos) |
is not direct way in js to iterate a global regex and obtain the location of each group match in the input. This is kind of straight forward solution using indexOf and sum
A Pen by Sebastián Gurin on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add upstream $ORIGINALGITURL | |
git fetch upstream | |
git checkout master | |
git merge upstream/master | |
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main(arr) { | |
arr.map(async (o) => { | |
const result = await g(o); // I expect it to await here but it doesn't | |
}); | |
} | |
function g(o) { | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
resolve(o); |
NewerOlder