ezmedicationinput 0.1.43 → 0.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/safety.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkDiscouraged = checkDiscouraged;
4
- const maps_1 = require("./maps");
5
- function checkDiscouraged(token, options) {
6
- const lower = token.toLowerCase();
7
- if (!(lower in maps_1.DISCOURAGED_TOKENS)) {
8
- return { allowed: true };
9
- }
10
- const code = maps_1.DISCOURAGED_TOKENS[lower];
11
- if (options && options.allowDiscouraged === false) {
12
- throw new Error(`Discouraged token '${token}' is not allowed`);
13
- }
14
- return { allowed: true, warning: `${code} is discouraged` };
15
- }