Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tokey/core

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokey/core - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

dist/core.d.ts
import type { Token } from "./types";
export interface TokyOptions<T extends Token<unknown>> {
shouldAddToken(type: T["type"], value: string): boolean;
isStringDelimiter(char: string): boolean;
isDelimiter(char: string): boolean;
isStringDelimiter(char: string, previousChar: string): boolean;
isDelimiter(char: string, previousChar: string): boolean;
isWhitespace(char: string): boolean;

@@ -7,0 +7,0 @@ getCommentStartType(ch: string, source: string, nextCharIndex: number): string;

@@ -32,3 +32,3 @@ "use strict";

}
else if (isStringDelimiter(ch)) {
else if (isStringDelimiter(ch, previousChar)) {
pushBuffer();

@@ -38,3 +38,3 @@ buffer += ch;

}
else if (isDelimiter(ch)) {
else if (isDelimiter(ch, previousChar)) {
pushBuffer();

@@ -41,0 +41,0 @@ buffer += ch;

{
"name": "@tokey/core",
"description": "simple code like tokenizer",
"version": "1.0.0",
"version": "1.1.0",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -5,4 +5,4 @@ import type { Token } from "./types";

shouldAddToken(type: T["type"], value: string): boolean;
isStringDelimiter(char: string): boolean;
isDelimiter(char: string): boolean;
isStringDelimiter(char: string, previousChar: string): boolean;
isDelimiter(char: string, previousChar: string): boolean;
isWhitespace(char: string): boolean;

@@ -62,7 +62,7 @@ getCommentStartType(

buffer += ch;
} else if (isStringDelimiter(ch)) {
} else if (isStringDelimiter(ch, previousChar)) {
pushBuffer();
buffer += ch;
inString = ch;
} else if (isDelimiter(ch)) {
} else if (isDelimiter(ch, previousChar)) {
pushBuffer();

@@ -69,0 +69,0 @@ buffer += ch;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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