How to use the ramda-extension.isNotNil function in ramda-extension

To help you get started, we’ve selected a few ramda-extension 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 lundegaard / redux-tools / packages / injectors-react / src / makeHook.js View on Github external
if (isGlobal && feature !== DEFAULT_FEATURE) {
				warn(
					`You are using a feature (${feature}) with global ${type}.`,
					'This will have no effect.'
				);
			}

			if (!namespace && !isGlobal) {
				warn(
					`You're injecting ${type} with no namespace!`,
					'They will be injected globally. If this is intended, consider passing',
					`'isGlobal: true' to the injector, e.g. '${hookName}(${type}, { isGlobal: true })'.`
				);
			}

			if (isNotNil(options.global)) {
				warn(`'global: ${options.global}' is deprecated. Use 'isGlobal: ${options.global}'.`);
			}

			if (isNotNil(options.persist)) {
				warn(
					`'persist: ${options.persist}' is deprecated. Use 'isPersistent: ${options.persist}'.`
				);
			}

			invariant(inject, `'store.${injectionKey}' missing. Are you using the enhancer correctly?`);
			invariant(eject, `'store.${ejectionKey}' missing. Are you using the enhancer correctly?`);

			inject(injectables, props);
			setIsInitialized(true);

			return () => {
github lundegaard / redux-tools / packages / injectors-react / src / makeHook.js View on Github external
);
			}

			if (!namespace && !isGlobal) {
				warn(
					`You're injecting ${type} with no namespace!`,
					'They will be injected globally. If this is intended, consider passing',
					`'isGlobal: true' to the injector, e.g. '${hookName}(${type}, { isGlobal: true })'.`
				);
			}

			if (isNotNil(options.global)) {
				warn(`'global: ${options.global}' is deprecated. Use 'isGlobal: ${options.global}'.`);
			}

			if (isNotNil(options.persist)) {
				warn(
					`'persist: ${options.persist}' is deprecated. Use 'isPersistent: ${options.persist}'.`
				);
			}

			invariant(inject, `'store.${injectionKey}' missing. Are you using the enhancer correctly?`);
			invariant(eject, `'store.${ejectionKey}' missing. Are you using the enhancer correctly?`);

			inject(injectables, props);
			setIsInitialized(true);

			return () => {
				if (!isPersistent) {
					eject(injectables, props);
				}
			};