UNPKG

@pagenote/notion-database

Version:

make notion as a real-database for server

24 lines 639 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTableName = exports.simpleFyId = void 0; function simpleFyId(notionId) { if (!notionId) { return ''; } return notionId.replace(/\-/g, ''); } exports.simpleFyId = simpleFyId; function getTableName(name) { let tableName = name; try { const title = (name || '').match(/^\[(.*)\]$/ // TODO 优化正则 /^\[+(.*)\]+$/ ); tableName = title ? title[1] : ''; } catch (e) { console.warn(e); } return tableName; } exports.getTableName = getTableName; //# sourceMappingURL=utils.js.map