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

lexing

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lexing - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

15

buffer.d.ts

@@ -1,2 +0,5 @@

import { Buffer } from './index';
export declare type List<T> = {
[index: number]: T;
length: number;
};
/**

@@ -7,5 +10,5 @@ Returns true iff `haystack`, starting at fromIndex, matches `needle`.

haystack[fromIndex:haystack.length] == needle[:needle.length]
haystack[fromIndex:fromIndex + needle.length] == needle
*/
export declare function compare(haystack: Buffer, needle: Buffer, fromIndex?: number): boolean;
export declare function compare(haystack: List<number>, needle: List<number>, fromIndex?: number): boolean;
/**

@@ -17,3 +20,3 @@ Returns the index (within `haystack`) of the first character of the first

*/
export declare function indexOf(haystack: Buffer, needle: Buffer, fromIndex?: number): number;
export declare function indexOf(haystack: List<number>, needle: List<number>, fromIndex?: number): number;
/**

@@ -25,3 +28,3 @@ Returns the index (within `haystack`) of the first character of the last

*/
export declare function lastIndexOf(haystack: Buffer, needle: Buffer, fromIndex?: number): number;
export declare function lastIndexOf(haystack: List<number>, needle: List<number>, fromIndex?: number): number;
/**

@@ -34,2 +37,2 @@ Returns true iff the designated slices of left and right are equal.

*/
export declare function equalTo(left: Buffer, right: Buffer, left_offset?: number, left_end?: number, right_offset?: number, right_end?: number): boolean;
export declare function equalTo(left: List<number>, right: List<number>, left_offset?: number, left_end?: number, right_offset?: number, right_end?: number): boolean;

2

buffer.js

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

haystack[fromIndex:haystack.length] == needle[:needle.length]
haystack[fromIndex:fromIndex + needle.length] == needle
*/

@@ -10,0 +10,0 @@ function compare(haystack, needle, fromIndex) {

@@ -7,2 +7,3 @@ /**

slice(start?: number, end?: number): Buffer;
[index: number]: number;
length: number;

@@ -43,18 +44,27 @@ }

iterable of a particular type. The T in ChunkedIterable<T> should itself be a
sequence type, like string[] or Buffer.
sequence type, like string[] or Buffer (which effectively extends number[]).
*/
export interface ChunkedIterable<T> {
/** Read the next {length} items from the underlying resource, and advance
the cursor accordingly. The returned chunk may be shorter than {length} if
EOF is reached. */
next(length: number): T;
}
export interface StatefulChunkedIterable<T> extends ChunkedIterable<T> {
/** The cursor, i.e., the current position within the underlying resource. */
position: number;
/** The total size of the underlying resource. */
size: number;
/** Return the next {length} items from the underlying resource but do not
advance the cursor. */
peek(length: number): T;
/** Advance the cursor over the next {length} items in the underlying
resource, returning the number of items actually passed over (which may be
less than {length} if the end of the resource has been reached). */
skip(length: number): number;
}
/**
Commonly used special case.
A stateful representation of some resource that produces Buffer chunks.
*/
export interface BufferIterable extends StatefulChunkedIterable<Buffer> {
}
export declare type BufferIterable = StatefulChunkedIterable<Buffer>;
/**

@@ -61,0 +71,0 @@ Wraps a Buffer as a stateful iterable.

{
"name": "lexing",
"version": "0.7.3",
"version": "0.7.4",
"description": "Regex-based lexer",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,2 +5,3 @@ import { Source } from './index';

slice(start?: number, end?: number): Buffer;
[index: number]: number;
length: number;

@@ -7,0 +8,0 @@ }

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