UNPKG

kura-s3

Version:

The FileSystem API abstraction library, AWS S3 Plugin

18 lines (15 loc) 313 B
import { DIR_SEPARATOR } from "kura"; export function getKey(fullPath: string) { let key = ""; if (0 < fullPath.length) { key = fullPath.substr(1); } return key; } export function getPrefix(fullPath: string) { let key = getKey(fullPath); if (key) { key += DIR_SEPARATOR; } return key; }