Skip to content

unlight/typescript-equals

Repository files navigation

typescript-equals

Rough implementation of checking of AST equality: Ignores spaces, comments, quotes, semicolons, parenthesis.

Install

npm i -S typescript-equals

Usage

import { equals } from 'typescript-equals';

const text1 = `var a = {a:1}`;
const text2 = `var a = {a:1,}`;
const text3 = `var a = {a: 1} // comment`;

equals(text1, text2); // => true
equals(text1, text3); // => true
equals(text2, text3); // => true

API

equals(firstText: string, secondText: string): boolean;

About

Rough implementation of checking of AST equality

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy