This file contains hidden or 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 anagrams(textList) { | |
const anagramList = []; | |
const foundAnagrams = []; | |
for (let i = 0; i < textList.length - 1; i++) { | |
const baseStr = textList[i]; | |
if (!foundAnagrams.includes(baseStr)) { | |
const anagramsOnly = getAnagrams(baseStr, textList.slice(i + 1)); | |
foundAnagrams.push(...anagramsOnly); |
This file contains hidden or 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
get_attribute() { cat package.json | grep $1 | head -1 | cut -d ":" -f 2 | sed "s/[{, }, \", ',[:space:]]//g"; }; | |
project=$(get_attribute "name\""); | |
echo $project |