Socket
Socket
Sign inDemoInstall

tsutils

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsutils - npm Package Versions

1
10

2.18.0

Diff

Changelog

Source

2.18.0

Features:

  • getControlFlowEnd accepts BlockLike as argument

Bugfixes:

  • getControlFlowEnd and endsControlFlow: correctly handle nested LabeledStatements
  • endsControlFlow removed erroneous special case when an IterationStatement is passed as argument whose parent is a LabeledStatement.
    • if you want labels of an IterationStatement (or SwitchStatement) to be handled, you need to pass the LabeledStatement as argument.
    • :warning: this fix may change the returned value if you relied on the buggy behavior

Deprecations:

  • deprecated overload of getControlFlowEnd that contains the label parameter. This parameter is no longer used and should no longer be passed to the function.
ajaff
published 2.17.1 •

Changelog

Source

2.17.1

Bugfixes:

  • getControlFlowEnd and endsControlFlow (#22)
    • ThrowStatements inside try are filtered out if there is a catch clause
    • TryStatements with catch only end control flow if try AND catch definitely end control flow
ajaff
published 2.17.0 •

Changelog

Source

2.17.0

Features:

  • added kind property to NodeWrap
  • added getControlFlowEnd to public API
ajaff
published 2.16.0 •

Changelog

Source

2.16.0

Features:

  • added isDecorator and isCallLikeExpression typeguards
ajaff
published 2.15.0 •

Changelog

Source

2.15.0

Features:

  • added convertAst utility to produce a flattened and wrapped version of the AST
ajaff
published 2.14.0 •

Changelog

Source

2.14.0

Features:

  • added isDeleteExpression
  • added getLineBreakStyle
ajaff
published 2.13.1 •

Changelog

Source

2.13.1

Bugfixes:

  • fixed name of isJsxFragment
ajaff
published 2.13.0 •

Changelog

Source

2.13.0

Features:

  • added support for JsxFragment introduced in typescript@2.6.2
  • added corresponding typeguard functions
ajaff
published 2.12.2 •

Changelog

Source

2.12.2

Bugfixes:

  • endsControlFlow
    • added missing logic for labeled statement, iteration statements and try-catch
    • added missing logic for break and continue with labels
    • take all jump statements into account, not only the last statement
  • isValidIdentifier and isValidNumericLiteral handle irregular whitespace
  • findImports searches in ambient modules inside regular .ts files (not only .d.ts)
  • canHaveJsDoc is now a typeguard
ajaff
published 2.12.1 •

Changelog

Source

2.12.1

Bugfixes:

  • forEachTokenWithTrivia
    • handles irregular whitespace and no longer visits some tokens twice
    • correctly calculates the range of JsxText
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc