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

peberminta

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peberminta - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

5

CHANGELOG.md
# Changelog
## Version 0.5.1
- documentation updates;
- package marked as free of side effects for tree shaking.
## Version 0.5.0

@@ -4,0 +9,0 @@

15

lib/char.d.ts

@@ -10,3 +10,3 @@ /**

*
* Import as:
* Node:
* ```ts

@@ -16,2 +16,7 @@ * import * as pc from 'peberminta/char';

*
* Deno:
* ```ts
* import * as p from 'https://deno.land/x/peberminta@.../char.ts';
* ```
*
* @module

@@ -31,3 +36,3 @@ */

* Make a parser that matches and returns a character
* if it is present in a given character samples string.
* if it is present in a given character samples string/array.
*

@@ -42,3 +47,3 @@ * Tokens expected to be individual characters/graphemes.

* Make a parser that matches and returns a character
* if it is absent in a given character samples string.
* if it is absent in a given character samples string/array.
*

@@ -95,3 +100,3 @@ * Tokens expected to be individual characters/graphemes.

* @param i - Parser position in the tokens array.
* @param contextTokens - How many tokens around the current one to render.
* @param contextTokens - How many tokens (characters) around the current one to render.
* @returns A multiline string.

@@ -114,4 +119,2 @@ *

* @param options - Parser options.
* @param expectMulticharGraphemes - Fallback to line-by-line tokens output
* (For incomplete match error message.)
* @returns A matched value.

@@ -118,0 +121,0 @@ *

38

lib/core.d.ts

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

*
* Import as:
* Node:
* ```ts

@@ -13,2 +13,7 @@ * import * as p from 'peberminta';

*
* Deno:
* ```ts
* import * as p from 'https://deno.land/x/peberminta@.../core.ts';
* ```
*
* @module

@@ -77,3 +82,3 @@ */

/**
* Make a {@link Matcher} that always succedes with provided value and doesn't consume input.
* Make a {@link Matcher} that always succeeds with provided value and doesn't consume input.
*

@@ -87,3 +92,3 @@ * Use {@link make} if you want to make a value dynamically.

/**
* Make a {@link Matcher} that always succedes
* Make a {@link Matcher} that always succeeds
* and makes a value with provided function without consuming input.

@@ -106,3 +111,3 @@ *

/**
* Make a {@link Matcher} that always succedes with `null` value,
* Make a {@link Matcher} that always succeeds with `null` value,
* and performs an action / side effect without consuming input.

@@ -131,8 +136,10 @@ *

/**
* Make a {@link Matcher} that throws an error when reached.
* Make a {@link Matcher} that throws an error if reached.
*
* Use this to terminate the parsing when finding any valid match is not possible.
* Use with caution!
*
* Use {@link fail} if parser can step back and try a different path.
*
* For error recovery you can try to encode erroneous state in an output value instead.
*
* @param message - The message or a function to construct it from the current parser state.

@@ -198,3 +205,3 @@ */

*
* @param p - A base parser.
* @param p - A base matcher.
* @param mapper - A function that modifies the matched value.

@@ -537,3 +544,3 @@ */

*
* @param ps - Parsers sequence.
* @param ps - Matchers sequence.
* Each parser can return a match with a value or an array of values.

@@ -560,3 +567,3 @@ */

*
* @param p - A parser.
* @param p - A matcher.
*/

@@ -778,6 +785,11 @@ export declare function flatten1<TToken, TOptions, TValue>(p: Matcher<TToken, TOptions, (TValue | TValue[])[]>): Matcher<TToken, TOptions, TValue[]>;

/**
* This overload makes a {@link Matcher} that acts like a given one
* but doesn't consume input.
*
* @param p - A matcher.
*/
export declare function ahead<TToken, TOptions, TValue>(p: Matcher<TToken, TOptions, TValue>): Matcher<TToken, TOptions, TValue>;
/**
* Make a parser that acts like a given one but doesn't consume input.
*
* Can be useful in combination with {@link chain}.
*
* @param p - A parser.

@@ -795,3 +807,5 @@ */

*
* @param f - A function that returns a parser.
* This overload is for {@link Matcher}s.
*
* @param f - A function that returns a matcher.
* @returns A parser wrapped into a function.

@@ -798,0 +812,0 @@ */

{
"name": "peberminta",
"version": "0.5.0",
"version": "0.5.1",
"description": "Simple, transparent parser combinators toolkit that supports any tokens",

@@ -48,2 +48,3 @@ "keywords": [

],
"sideEffects": false,
"scripts": {

@@ -57,2 +58,3 @@ "build:docs": "typedoc",

"clean": "rimraf lib && rimraf docs && rimraf deno",
"cover": "c8 --reporter=lcov --reporter=text-summary ava \"test/!(examples).ts\" --timeout=60s",
"example:bf1": "npm run ts -- ./examples/bf1.ts",

@@ -80,2 +82,3 @@ "example:bf2": "npm run ts -- ./examples/bf2.ts",

"ava": "^3.15.0",
"c8": "^7.10.0",
"concurrently": "^6.3.0",

@@ -89,3 +92,3 @@ "denoify": "^0.10.5",

"rimraf": "^3.0.2",
"rollup": "^2.58.3",
"rollup": "^2.59.0",
"rollup-plugin-terser": "^7.0.2",

@@ -92,0 +95,0 @@ "ts-node": "^10.4.0",

@@ -5,2 +5,3 @@ # peberminta

![test status badge](https://github.com/mxxii/peberminta/workflows/test/badge.svg)
[![codecov](https://codecov.io/gh/mxxii/peberminta/branch/main/graph/badge.svg?token=TYwVNcTQJd)](https://codecov.io/gh/mxxii/peberminta)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/mxxii/peberminta/blob/main/LICENSE)

@@ -53,3 +54,10 @@ [![npm](https://img.shields.io/npm/v/peberminta?logo=npm)](https://www.npmjs.com/package/peberminta)

### Deno
```ts
import * as p from 'https://deno.land/x/peberminta@.../core.ts';
import * as pc from 'https://deno.land/x/peberminta@.../char.ts';
```
## Examples

@@ -56,0 +64,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