lib/archivist/vaults/couchbase/defaultTopicApi.js
function strToFlags(str) {
	if (!str) {
		return;
	}

	var buff = new Buffer([0, 0, 0, 0]);
	buff.write(str, 0, 4, 'ascii');
	return buff.readUInt32BE(0);
}
function strToFlags(str) {
	if (!str) {
		return;
	}

	var buff = new Buffer([0, 0, 0, 0]);
	buff.write(str, 0, 4, 'ascii');
	return buff.readUInt32BE(0);
}
function strToFlags ( str ) { if ( ! str ) { return ; } var buff = new Buffer ( [ 0 , 0 , 0 , 0 ] ) ; buff . write ( str , 0 , 4 , 'ascii' ) ; return buff . readUInt32BE ( 0 ) ; }
Turns a max 4 char string into a uint32.
The node.js Buffer class provides a good uint32 conversion algorithm that we want to use.

@param {string} str
@returns {number}
Turns a max 4 char string into a uint32 . The node . js Buffer class provides a good uint32 conversion algorithm that we want to use .