2.3.1 • Published 9 months ago

license-text-normalizer v2.3.1

Weekly downloads
6
License
BSD-3-Clause
Repository
github
Last release
9 months ago

License Text Normalizer

Library that provides license text normalization functionality in JavaScript.

A python implementation is also available: https://github.com/quic/license-text-normalizer

Requirements

  • node 10+
  • yarn 1.9+

Installation

npm install license-text-normalizer --save

or

yarn add license-text-normalizer

Usage

Normalize a license text using the default set of delimiters

import { strict as assert } from 'assert';
import normalizeLicenseText from 'license-text-normalizer';

const text = `/* Copyright 2010 Google Inc. All Rights Reserved.\n */`
assert(normalizeLicenseText(text) === 'Copyright 2010 Google Inc. All Rights Reserved.')

Normalize a license text using a custom set of delimiters

import { strict as assert } from 'assert';
import normalizeLicenseText from 'license-text-normalizer';

const text = `XXX\nCopyright 2010 Google Inc. All Rights Reserved.`
assert(normalizeLicenseText(text, {leadingDelimiters: ['XXX']}) === 'Copyright 2010 Google Inc. All Rights Reserved.')

Development

See CONTRIBUTING.md for more information.

License

License Text Normalizer is licensed under the BSD 3-clause “New” or “Revised” License. See LICENSE for the full license text.

2.3.0

9 months ago

2.3.1

9 months ago

2.2.1

3 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago