What is Local first development

How to Implement a Cosine Similarity Function in TypeScript