JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q10145F
  • License ISC

simple comparison string

Package Exports

  • str-differ

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (str-differ) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

string differ

Differ in code-string, based on nodejs.

Driven by powerful diff engine — universal diff.

Usage

  • node

      const differ = require("str-differ");
    
      const ret = differ(
          JSON.stringify({ a: 1, b: 2, c: 3 }, null, 4),
          JSON.stringify({ a: 2, b: "v", c: 3 }, null, 4)
      );
      
      console.log(ret);

Result

    ...

    |     1 |     1 |   {
    |     2 |       | -     "a": 1,
    |     3 |       | -     "b": 2,
    |       |     2 | +     "a": 2,
    |       |     3 | +     "b": "v",
    |     4 |     4 |       "c": 3
    |     5 |     5 |   }

    ...