How to use @effectful/core - 10 common examples

To help you get started, we’ve selected a few @effectful/core 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 awto / effectfuljs / packages / es / options.js View on Github external
/* eslint-disable no-console */
const C = require("@effectful/core");
const config = C.config;
const Policy = C.Policy;
const T = C.Transform;
const Tag = C.Tag;
const Kit = C.Kit;

const rebind = {
  all: {
    presetsImportPattern: false,
    directives: false,
    bindCalls: null,
    reuseImports: false
  },
  effectful: {
    scopeContext: true,
    contextMethodOps: true,
    markRepeat: false,
    markBindValue: false,
    markCatchCont: false,
github awto / effectfuljs / packages / es / options.js View on Github external
/* eslint-disable no-console */
const C = require("@effectful/core");
const config = C.config;
const Policy = C.Policy;
const T = C.Transform;
const Tag = C.Tag;
const Kit = C.Kit;

const rebind = {
  all: {
    presetsImportPattern: false,
    directives: false,
    bindCalls: null,
    reuseImports: false
  },
  effectful: {
    scopeContext: true,
    contextMethodOps: true,
    markRepeat: false,
github awto / effectfuljs / packages / es / options.js View on Github external
/* eslint-disable no-console */
const C = require("@effectful/core");
const config = C.config;
const Policy = C.Policy;
const T = C.Transform;
const Tag = C.Tag;
const Kit = C.Kit;

const rebind = {
  all: {
    presetsImportPattern: false,
    directives: false,
    bindCalls: null,
    reuseImports: false
  },
  effectful: {
    scopeContext: true,
    contextMethodOps: true,
    markRepeat: false,
    markBindValue: false,
    markCatchCont: false,
    markArgNum: false,
    markErrorCont: false,
github awto / effectfuljs / packages / es / options.js View on Github external
/* eslint-disable no-console */
const C = require("@effectful/core");
const config = C.config;
const Policy = C.Policy;
const T = C.Transform;
const Tag = C.Tag;
const Kit = C.Kit;

const rebind = {
  all: {
    presetsImportPattern: false,
    directives: false,
    bindCalls: null,
    reuseImports: false
  },
  effectful: {
    scopeContext: true,
    contextMethodOps: true,
    markRepeat: false,
    markBindValue: false,
github awto / effectfuljs / packages / es / options.js View on Github external
/* eslint-disable no-console */
const C = require("@effectful/core");
const config = C.config;
const Policy = C.Policy;
const T = C.Transform;
const Tag = C.Tag;
const Kit = C.Kit;

const rebind = {
  all: {
    presetsImportPattern: false,
    directives: false,
    bindCalls: null,
    reuseImports: false
  },
  effectful: {
    scopeContext: true,
    contextMethodOps: true,
    markRepeat: false,
    markBindValue: false,
    markCatchCont: false,
    markArgNum: false,
github awto / effectfuljs / packages / es / transform.js View on Github external
module.exports = require("@effectful/core").babelPlugin(require("./options"));
github awto / effectfuljs / packages / debugger / src / transform.js View on Github external
"frame",
  "unhandled",
  "unhandledA",
  "unhandledAG",
  "set",
  "del",
  "mcall"
];

let VERBOSE = process.env.EFFECTFUL_DEBUGGER_VERBOSE;

if (VERBOSE) {
  VERBOSE = VERBOSE[0].toLowerCase() === "t" || (!isNaN(VERBOSE) && +VERBOSE);
} else VERBOSE = false;

module.exports = require("@effectful/core").babelPlugin(
  (opts, { Tag, Kit, Transform: T, Policy: P, presets }) => {
    const moduleAliases = {};
    const importRT = opts.importRT || "@effectful/debugger/api";
    if (opts.preInstrumentedLibs) {
      const root = opts.preInstrumentedLibs.substr
        ? opts.preInstrumentedLibs
        : "@effectful/debugger";
      for (const i in require("./deps.json")) {
        const suffix = opts.timeTravel ? "-t" : "";
        const path = `${root}/deps/${i.replace(/\//g, "-")}${suffix}`;
        moduleAliases[i] = path;
        if (i.includes("/")) moduleAliases[`${i}.js`] = path;
      }
    }
    const brk = Kit.sysId("brk");
    const unwrapSym = Kit.sysId("unwrapImport");
github awto / effectfuljs / packages / js / transform.js View on Github external
module.exports = require("@effectful/core").babelPlugin(require("./options"));
github awto / effectfuljs / samples / react-do / transform.js View on Github external
module.exports = require("@effectful/core").babelPlugin(
  (opts, { Tag, Kit, presets }) => ({
    options: {
      /** using state's numbers instead of callbacks */
      ...presets.defunct,
      name: "@effectful/react-do",
      importRT: "@effectful/react-do",
      contextBy: "this",
      contextMethodOpsSpec: {
        join: false,
        pure: false
      },
      parShare: false,
      blockDirsFunc: "profile",
      ...opts
    },
    configure(s) {
github awto / effectfuljs / packages / es-inline / transform.js View on Github external
module.exports = require("@effectful/core").babelPlugin(require("./options"));

@effectful/core

Embedding effects in JavaScript using Monads

MIT
Latest version published 8 months ago

Package Health Score

56 / 100
Full package analysis