Skip to content

apiel/caller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caller

Return the filepath of the parent function.

// File file:///home/hello/parent.ts
import { child } from './child.ts';

function parent() {
    child();
}
// File file:///home/hello/child.ts
import caller from 'https://raw.githubusercontent.com/apiel/caller/master/caller.ts';

export function child() {
    console.log(caller());
    // should return file:///home/hello/parent.ts
}