All files / lib index.ts

100% Statements 21/21
50% Branches 1/2
100% Functions 5/5
100% Lines 20/20

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 361x 1x   1x 1x 1x 1x 1x   1x   1x   1x 1x   2x   1x 2x 2x 2x 2x     1x               1x 1x  
import * as hooks from "./hooks";
import * as channels from "./channels";
 
import getConditionalQueryFor from "./utils/getConditionalQueryFor";
import getFieldsQueryFor from "./utils/getFieldsQueryFor";
import getQueryFor from "./utils/getQueryFor";
import hasRestrictingConditions from "./utils/hasRestrictingConditions";
import hasRestrictingFields from "./utils/hasRestrictingFields";
 
import initialize from "./initialize";
 
export default initialize;
 
export { hooks };
export { channels };
 
export { default as makeAbilityFromRules } from "./makeAbilityFromRules";
 
export { 
  Ability, 
  AbilityBuilder,
  createAliasResolver, 
  defineAbility
} from "@casl/ability";
 
export const utils = {
  getConditionalQueryFor,
  getFieldsQueryFor,
  getQueryFor,
  hasRestrictingConditions,
  hasRestrictingFields
};
 
Eif (typeof module !== "undefined") {
  module.exports = Object.assign(initialize, module.exports);
}