Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/easyts/path/mod.ts>split

js library written with ts, use select and chan like golang in js.
Latest
function split
import { split } from "https://deno.land/x/easyts@0.1.3/path/mod.ts";

splits path immediately following the final slash, separating it into a directory and file name component. If there is no slash in path, Split returns an empty dir and file set to path.

Parameters

path: string

Returns

Array<string>

[dir,file] The returned values have the property that path = dir+file.