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

@firstandthird/serialize-object

Package Overview
Dependencies
Maintainers
6
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firstandthird/serialize-object - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

9

index.js

@@ -53,2 +53,11 @@ const serializeInner = require('serialize-error');

}
if (Array.isArray(originalObj)) {
const serializedArray = originalObj.map(item => {
const result = serialize(item, options, 1);
return result;
});
return serializedArray;
}
// serialize-object does not modify the original object:

@@ -55,0 +64,0 @@ const clonedObj = Object.assign({}, originalObj);

2

package.json
{
"name": "@firstandthird/serialize-object",
"description": "a serialize object",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "https://github.com/firstandthird/serialize-object",

@@ -6,0 +6,0 @@ "repository": {

@@ -260,1 +260,13 @@ const tap = require('tap');

});
tap.test('return array without changing type', t => {
const message = serialize({ organic: ['hapi', 'sed'] }, {});
t.same(message, { organic: ['hapi', 'sed'] });
t.end();
});
tap.test('return array of objects serialized', t => {
const message = serialize({ organic: [{ one: 'one', two: 'deu', trois: { eng: 'english', fr: 'french' } }] }, { blacklist: 'two' });
t.same(message, { organic: [{ one: 'one', two: 'xxxxxx', trois: { eng: 'english', fr: 'french' } }] });
t.end();
});
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