UNPKG

@n3okill/utils

Version:
15 lines 683 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.bufferPathToObject = bufferPathToObject; const posix_1 = require("path/posix"); const toString_1 = require("./toString"); const stringsPathToObject_1 = require("../string/stringsPathToObject"); /** * Transforms an array of Buffers into an object * @param str Array of Buffer's to be transformed * @param separator Separator used in Buffer, default to node "path" sep */ function bufferPathToObject(str, separator = posix_1.sep) { return (0, stringsPathToObject_1.stringsPathToObject)(str.map((s) => (0, toString_1.toString)(s)), separator); } //# sourceMappingURL=bufferPathToObject.js.map