Sha256: 3ec046c31eaefc126ef48552526ec9ca4efc4a9129eab7e1061867e7ca4e7e3a

Contents?: true

Size: 306 Bytes

Versions: 14

Compression:

Stored size: 306 Bytes

Contents

// @flow
// This file is not actually executed
// It is just used by flow for typing

const prefix: string = 'Invariant failed';

export default function invariant(condition: mixed, message?: string | (() => string)) {
  if (condition) {
    return;
  }
  throw new Error(`${prefix}: ${message || ''}`);
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.50 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.49 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.48 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.47 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.46 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.45 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.44 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.43 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.42 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.41 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.40 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.39 node_modules/tiny-invariant/src/tiny-invariant.flow.js
immosquare-cleaner-0.1.38 node_modules/tiny-invariant/src/tiny-invariant.flow.js