cln

Clean source code for comparison

Usage no npm install needed!

<script type="module">
  import cln from 'https://cdn.skypack.dev/cln';
</script>

README

Clean source code before comparing fixtures. To avoid leading/trailing/repeating whitespaces, newlines or tabs headache.

var clean = require('cln')
var assert = require('assert')

assert.equal(
clean(compile(`
    float a = 1;
`)),
clean`
    var a = 1;
`;