New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chai-latte

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-latte - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

5

build/builder/register.d.ts

@@ -19,3 +19,6 @@ import { ConfigurableCallback } from './lib/ConfigurableCallback';

isLastPointerCallback(): boolean;
handleFunctionCalled(arg: unknown): void;
debugId: string;
updateDebugProp(prop: any): void;
updateDebugFunction(arg: any): void;
handleFunctionCalled(arg: any): void;
handlePropertyAccess(prop: string): void;

@@ -22,0 +25,0 @@ createBuilderProxy(): any;

@@ -43,2 +43,13 @@ "use strict";

}
debugId = '';
updateDebugProp(prop) {
this.debugId += this.debugId ? '.' + prop : prop;
}
updateDebugFunction(arg) {
if (typeof arg === 'undefined') {
this.debugId += '()';
return;
}
this.debugId += '(' + arg.name + ')';
}
handleFunctionCalled(arg) {

@@ -48,2 +59,3 @@ const fluentFunction = this.createConfigurableCallback();

fluentFunction.updateArg(arg);
this.updateDebugFunction(arg);
}

@@ -59,2 +71,3 @@ handlePropertyAccess(prop) {

}
this.updateDebugProp(prop);
this.pointer.accessProp(prop);

@@ -61,0 +74,0 @@ this.pointer.movePointer(prop);

2

package.json
{
"version": "0.0.11",
"version": "0.0.12",
"name": "chai-latte",

@@ -4,0 +4,0 @@ "description": "Toolkit to build expressive & readable fluent interface libraries.",

@@ -54,6 +54,21 @@ import { ConfigurableCallback } from './lib/ConfigurableCallback';

handleFunctionCalled(arg: unknown) {
debugId = '';
updateDebugProp(prop) {
this.debugId += this.debugId ? '.' + prop : prop;
}
updateDebugFunction(arg) {
if (typeof arg === 'undefined') {
this.debugId += '()';
return;
}
this.debugId += '(' + arg.name + ')';
}
handleFunctionCalled(arg: any) {
const fluentFunction = this.createConfigurableCallback();
this.pointer.overrideLastPointer(fluentFunction.callback)
fluentFunction.updateArg(arg);
this.updateDebugFunction(arg);
}

@@ -71,2 +86,3 @@

this.updateDebugProp(prop);
this.pointer.accessProp(prop);

@@ -73,0 +89,0 @@ this.pointer.movePointer(prop);

import { Builder } from '..';
import { expression } from '../../';
import { combineTest } from './lib/combineTest';

@@ -212,2 +213,9 @@

describe('Debug', () => {
it('should create a debugId for each expression', () => {
const exp = expression(({ the }) => the(String).name.do(String).it(String), () => {});
expect(exp.builder.debugId).toEqual('the(String).name.do(String).it(String)');
})
})
describe('Combined Builders', () => {

@@ -214,0 +222,0 @@ function buildFluentAPIMock(buildCallback, forceCallback?) {

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