ws3-fca
Version:
A node.js package for automating Facebook Messenger bot, and is one of the most advanced next-generation Facebook Chat API (FCA) by @NethWs3Dev & @ExocoreCommunity
15 lines (13 loc) • 432 B
JavaScript
;
/**
* Formats a cookie array into a string for use in a cookie jar.
* @param {Array<string>} arr - An array containing cookie parts.
* @param {string} url - The base URL for the cookie domain.
* @returns {string} The formatted cookie string.
*/
function formatCookie(arr, url) {
return (
arr[0] + "=" + arr[1] + "; Path=" + arr[3] + "; Domain=" + url + ".com"
);
}
module.exports = formatCookie;