How to use the @geut/chast.createAction function in @geut/chast

To help you get started, we’ve selected a few @geut/chast 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 geut / chan / packages / chan-core / transformer.js View on Github external
function findActionOrCreate(action, release) {
  let name = action.toLowerCase().trim();
  name = name[0].toUpperCase() + name.substr(1);

  let actionNode = select(`action[name=${name}]`, release);

  if (actionNode) {
    return actionNode;
  }

  actionNode = createAction({ name });
  release.children.push(actionNode);
  return actionNode;
}

@geut/chast

Unist compatible spec for changelogs and helpers to nodes creation

ISC
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis

Similar packages