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

@pandazy/capybara

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pandazy/capybara - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

4

dist/crud/remove-rows-basic.js

@@ -8,3 +8,5 @@ "use strict";

rowKeys.forEach(function (rowKey) {
delete rows[rowKey];
if (rowKey) {
delete rows[rowKey];
}
});

@@ -11,0 +13,0 @@ return {

@@ -8,2 +8,5 @@ "use strict";

var _a;
if (!rowKey || !updatedRows[rowKey]) {
return updatedRows;
}
return tslib_1.__assign(tslib_1.__assign({}, updatedRows), (_a = {}, _a[rowKey] = tslib_1.__assign(tslib_1.__assign({}, updatedRows[rowKey]), update), _a));

@@ -10,0 +13,0 @@ }, table.rows) });

@@ -15,2 +15,5 @@ "use strict";

return object_methods_1.keys(indexDefs).reduce(function (updatedIndex, defKey) {
if (!row) {
return updatedIndex;
}
var fields = indexDefs[defKey].fields;

@@ -17,0 +20,0 @@ assertValidRowFields({ fields: fields, row: row });

@@ -8,3 +8,3 @@ {

"name": "@pandazy/capybara",
"version": "0.1.7",
"version": "0.1.8",
"description": "A handy database library",

@@ -11,0 +11,0 @@ "main": "dist/index.js",

@@ -9,3 +9,5 @@ import { BasicTable, Row } from '../types';

rowKeys.forEach((rowKey) => {
delete rows[rowKey];
if (rowKey) {
delete rows[rowKey];
}
});

@@ -12,0 +14,0 @@ return {

@@ -26,3 +26,3 @@ import { removeRowsIndexed } from './remove-rows-indexed';

it('should remove rows from an indexed table', () => {
expect.assertions(4);
expect.assertions(5);
const customHash = (val: string) => `%${val}%`;

@@ -45,2 +45,6 @@

const removedTable = removeRowsIndexed<TestRow>(mockTable, ['1', '2']);
const removedTableWrongKey = removeRowsIndexed<TestRow>(mockTable, [
'5',
undefined as any,
]);
const removedTableHashed = removeRowsIndexed<TestRow>(

@@ -53,2 +57,3 @@ mockTableHashed,

expect(removedTable.index).toEqual({});
expect(removedTableWrongKey).toEqual(mockTable);

@@ -55,0 +60,0 @@ expect(removedTableHashed.rows).toEqual({});

@@ -11,2 +11,5 @@ import { BasicTable, CommonMap, Row } from '../types';

rows: rowKeys.reduce((updatedRows, rowKey) => {
if (!rowKey || !updatedRows[rowKey]) {
return updatedRows;
}
return {

@@ -13,0 +16,0 @@ ...updatedRows,

@@ -44,3 +44,3 @@ import { updateRowsIndexed } from './update-rows-indexed';

it('should update rows in an indexed table', () => {
expect.assertions(3);
expect.assertions(4);

@@ -53,2 +53,8 @@ const updatedTable = updateRowsIndexed<TestRow, TestUpdate>(

const updatedTableWrongKey = updateRowsIndexed<TestRow, TestUpdate>(
mockTable,
['6', undefined as any],
{ firstName: 'Foo', lastName: 'Bar' },
);
const updatedTableHashed = updateRowsIndexed<TestRow, TestUpdate>(

@@ -61,2 +67,4 @@ mockTableHashed,

expect(updatedTableWrongKey).toEqual(mockTable);
expect(updatedTable.rows).toEqual({

@@ -63,0 +71,0 @@ '1': {

@@ -18,2 +18,6 @@ import { keys } from '@pandazy/mole-core/dist/object-methods';

keys(indexDefs).reduce((updatedIndex: Index, defKey: string) => {
if (!row) {
return updatedIndex;
}
const { fields } = indexDefs[defKey];

@@ -20,0 +24,0 @@ assertValidRowFields({ fields, row });

Sorry, the diff of this file is not supported yet

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