Socket
Socket
Sign inDemoInstall

@orion-js/schema

Package Overview
Dependencies
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orion-js/schema - npm Package Compare versions

Comparing version 0.18.12 to 0.18.13

2

lib/clean/index.js

@@ -41,3 +41,3 @@ 'use strict';

value: doc,
doc: doc,
doc: options.forceDoc || doc,
currentDoc: doc,

@@ -44,0 +44,0 @@ options: options,

@@ -189,3 +189,3 @@ 'use strict';

_context5.next = 5;
return (0, _index2.default)(schema, doc);
return (0, _index2.default)(schema, doc, { trimStrings: true, removeEmptyStrings: true });

@@ -192,0 +192,0 @@ case 5:

@@ -265,2 +265,39 @@ 'use strict';

}, _callee7, undefined);
})));
test('should inject doc on cleanKey', _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
var item, user, cleaned;
return regeneratorRuntime.wrap(function _callee8$(_context8) {
while (1) {
switch (_context8.prev = _context8.next) {
case 0:
item = { data: 20 };
user = {
data: {
type: String,
clean: function clean(value, _ref10) {
var doc = _ref10.doc;
console.log(value, doc);
expect(doc).toEqual(item);
return value;
}
}
};
_context8.next = 4;
return (0, _cleanKey2.default)(user, 'data', item.data, { forceDoc: item });
case 4:
cleaned = _context8.sent;
expect(cleaned).toBe('20');
expect.assertions(2);
case 7:
case 'end':
return _context8.stop();
}
}
}, _callee8, undefined);
})));
{
"name": "@orion-js/schema",
"version": "0.18.12",
"version": "0.18.13",
"main": "index.js",

@@ -5,0 +5,0 @@ "author": "nicolaslopezj",

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