How to use the @boost/common.parseFile function in @boost/common

To help you get started, we’ve selected a few @boost/common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github milesj / boost / packages / translate / src / FileBackend.ts View on Github external
EXTS[format].some(ext => {
        const resPath = path.append(locale, `${namespace}.${ext}`);
        const isCached = this.fileCache.has(resPath);

        if (!resPath.exists()) {
          return false;
        }

        if (!isCached) {
          this.fileCache.set(resPath, parseFile(resPath));
        }

        Object.assign(resources, this.fileCache.get(resPath));

        return true;
      });
    });