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

bread-n-butter

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bread-n-butter - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

6

CHANGELOG.md

@@ -8,2 +8,8 @@ # Changelog

## [0.4.1] - 2020-09-26
### Changed
- Documentation URL
## [0.4.0] - 2020-08-13

@@ -10,0 +16,0 @@

19

dist/cjs/bread-n-butter.js

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

const context = new Context({ input, location });
const result = this.and(exports.eof).action(context);
const result = this.skip(exports.eof).action(context);
if (result.type === "ActionOK") {
return {
type: "ParseOK",
value: result.value[0],
value: result.value,
};

@@ -134,5 +134,3 @@ }

wrap(before, after) {
return before.and(this).chain(([, value]) => {
return after.map(() => value);
});
return before.next(this).skip(after);
}

@@ -189,4 +187,3 @@ /**

return separator
.and(this)
.map(([, value]) => value)
.next(this)
.many0()

@@ -202,7 +199,5 @@ .map((rest) => {

node(name) {
return exports.location.and(this).chain(([start, value]) => {
return exports.location.map((end) => {
const type = "ParseNode";
return { type, name, value, start, end };
});
return all(exports.location, this, exports.location).map(([start, value, end]) => {
const type = "ParseNode";
return { type, name, value, start, end };
});

@@ -209,0 +204,0 @@ }

@@ -17,7 +17,7 @@ /**

const context = new Context({ input, location });
const result = this.and(eof).action(context);
const result = this.skip(eof).action(context);
if (result.type === "ActionOK") {
return {
type: "ParseOK",
value: result.value[0],
value: result.value,
};

@@ -131,5 +131,3 @@ }

wrap(before, after) {
return before.and(this).chain(([, value]) => {
return after.map(() => value);
});
return before.next(this).skip(after);
}

@@ -186,4 +184,3 @@ /**

return separator
.and(this)
.map(([, value]) => value)
.next(this)
.many0()

@@ -199,7 +196,5 @@ .map((rest) => {

node(name) {
return location.and(this).chain(([start, value]) => {
return location.map((end) => {
const type = "ParseNode";
return { type, name, value, start, end };
});
return all(location, this, location).map(([start, value, end]) => {
const type = "ParseNode";
return { type, name, value, start, end };
});

@@ -206,0 +201,0 @@ }

{
"name": "bread-n-butter",
"version": "0.4.0",
"version": "0.4.1",
"description": "Parser combinators for JavaScript and TypeScript",

@@ -39,2 +39,3 @@ "main": "dist/cjs/bread-n-butter.js",

"@typescript-eslint/parser": "^3.7.1",
"dateformat": "^3.0.3",
"eslint": "^7.5.0",

@@ -46,2 +47,3 @@ "jest": "^26.1.0",

"rimraf": "^3.0.2",
"slugify": "^1.4.5",
"ts-jest": "^26.1.1",

@@ -48,0 +50,0 @@ "ts-node": "^8.10.2",

@@ -8,5 +8,5 @@ **EXPERIMENTAL: Do not use in production**

- [Documentation](https://wavebeem-bread-n-butter.netlify.app/)
- [Documentation](https://bnb-wavebeem.netlify.app/)
- [Changelog](https://github.com/wavebeem/bread-n-butter/blob/main/CHANGELOG.md)
- [Code of Conduct](https://github.com/wavebeem/bread-n-butter/blob/main/CODE_OF_CONDUCT.md)
- [npm](https://www.npmjs.com/package/bread-n-butter)
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