To use the head
function from the Underscore library in TypeScript, you can follow these steps:
npm install underscore
in your project folder.head
function from the library in your TypeScript file:index.ts35 chars2 lines
head
function to get the first element of an array:index.ts110 chars4 lines
That's it! Now you can use the head
function in your TypeScript projects.
gistlibby LogSnag