You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
466 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parsePosition = parsePosition;
/**
* @example
* lt -> ['l', 't']
* left-top -> ['l', 't']
* inner -> i
*/
function parsePosition(position) {
if (!/\S+-\S+/g.test(position))
return position.length > 2 ? [position[0]] : position.split('');
return position.split('-').map(function (str) {
return str[0];
});
}
//# sourceMappingURL=pase-position.js.map