BindFilepath registers $filepath.* namespaced object with common std Go filepath package related exports. See https://pocketbase.io/jsvm/modules/_filepath.html.
(vm *goja.Runtime)
| 779 | // |
| 780 | // See https://pocketbase.io/jsvm/modules/_filepath.html. |
| 781 | func BindFilepath(vm *goja.Runtime) { |
| 782 | obj := vm.NewObject() |
| 783 | vm.Set("$filepath", obj) |
| 784 | |
| 785 | obj.Set("base", filepath.Base) |
| 786 | obj.Set("clean", filepath.Clean) |
| 787 | obj.Set("dir", filepath.Dir) |
| 788 | obj.Set("ext", filepath.Ext) |
| 789 | obj.Set("fromSlash", filepath.FromSlash) |
| 790 | obj.Set("glob", filepath.Glob) |
| 791 | obj.Set("isAbs", filepath.IsAbs) |
| 792 | obj.Set("join", filepath.Join) |
| 793 | obj.Set("match", filepath.Match) |
| 794 | obj.Set("rel", filepath.Rel) |
| 795 | obj.Set("split", filepath.Split) |
| 796 | obj.Set("splitList", filepath.SplitList) |
| 797 | obj.Set("toSlash", filepath.ToSlash) |
| 798 | obj.Set("walk", filepath.Walk) |
| 799 | obj.Set("walkDir", filepath.WalkDir) |
| 800 | } |
| 801 | |
| 802 | // BindOS registers $os.* namespaced object with |
| 803 | // common std Go os package related exports. |
searching dependent graphs…