Namespace, Primitive, Method

    @bpmn-io/replace-ids

    0.2.0 • Public • Published

    @bpmn-io/replace-ids

    Replace ID placeholders in a template with actual unique ids.

    Usage

    import replaceIds from '@bpmn-io/replace-ids';
    
    const generator = {
      count: 0,
      next() {
        return this.count++;
      }
    };
    
    const template = `
      This is a {{ ID:a }} {{ ID }} {{ ID:a }}
    `;
    
    const replaced = replaceIds(template, generator);
    
    // replaced = `
    //   This is a 0 1 0
    // `

    License

    MIT

    Keywords

    Install

    npm i @bpmn-io/replace-ids

    DownloadsWeekly Downloads

    175

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    3.4 kB

    Total Files

    5

    Last publish

    Collaborators

    • skaiir-camunda
    • marstamm
    • beatrizmendes
    • bpmn-io-admin
    • nikku
    • pinussilvestrus
    • barmac
    • philippfromme
    • maxtru