Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chaining #3

Open
xlearns opened this issue Oct 18, 2021 · 0 comments
Open

chaining #3

xlearns opened this issue Oct 18, 2021 · 0 comments

Comments

@xlearns
Copy link
Owner

xlearns commented Oct 18, 2021

/*

filePaths = [ '/cool_app/foo.txt', '/cool_app/.bar', '/cool_app/baz.foo']
*/
const files = [ 'foo.txt ', '.bar', ' ', 'baz.foo' ];
const prefix = '
/cool_app/'
function chaining(files,prefix){
return files = files.filter(v=>v.trim()!='').map(v=>{
return ${prefix}${v}
})
}
console.log(chaining(files,prefix))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant