file_util.js 304 B

123456789
  1. import { SystemExternal } from './system_external.js';
  2. export function makePath(path) {
  3. return path.match('/$') ? path : path + '/';
  4. }
  5. export function localePath(locale, ext = 'json') {
  6. return (makePath(SystemExternal.jsonPath) +
  7. locale +
  8. (ext.match(/^\./) ? ext : '.' + ext));
  9. }