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
16 lines (14 loc) • 343 B
JavaScript
;
/**
* Strips "fbid:" or "id:" prefixes from a Facebook ID string.
* @param {string} id The ID to format.
* @returns {string} The formatted ID.
*/
function formatID(id) {
if (id != undefined && id != null) {
return id.replace(/(fb)?id[:.]/, "");
} else {
return id;
}
}
module.exports = formatID;