@oazmi/kitchensink - v0.9.13
    Preparing search index...

    Function trimStartSlashes

    • trim the leading forward-slashes at the beginning of a string.

      Parameters

      • str: string

      Returns string

      import { assertEquals } from "jsr:@std/assert"

      // aliasing our functions for brevity
      const eq = assertEquals, fn = trimStartSlashes

      eq(fn("///a/b.txt//"), "a/b.txt//")
      eq(fn("/.//a/b.txt//"), ".//a/b.txt//")
      eq(fn(".///../a/b.txt//"), ".///../a/b.txt//")
      eq(fn("file:///a/b.txt//"), "file:///a/b.txt//")