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

objob

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

objob - npm Package Compare versions

Comparing version 2.7.2 to 2.7.3

test/make-flattened-shallow-test.js

11

lib/functions.js

@@ -6,10 +6,2 @@ 'use strict';

});
exports.makeFlattenedShallow = undefined;
var _typeOf = require('type-of');
var _typeOf2 = _interopRequireDefault(_typeOf);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/*

@@ -32,3 +24,4 @@ * Returns a shallow version of the shallow object to remove redundancy

// otherwise we could be dealing with similar keys like 'name' and 'names'
if (keyChain2.replace(keyChain).includes('.')) {
var remainder = keyChain2.replace(keyChain);
if (remainder.includes('.') && remainder.split('.').length === 1) {
shallow = true;

@@ -35,0 +28,0 @@ }

{
"name": "objob",
"version": "2.7.2",
"version": "2.7.3",
"description": "A tool for controlling and manipulating javascript object fields and output.",

@@ -5,0 +5,0 @@ "main": "lib/objob.js",

@@ -1,3 +0,1 @@

import type from 'type-of';
/*

@@ -20,3 +18,4 @@ * Returns a shallow version of the shallow object to remove redundancy

// otherwise we could be dealing with similar keys like 'name' and 'names'
if(keyChain2.replace(keyChain).includes('.')) {
let remainder = keyChain2.replace(keyChain);
if(remainder.includes('.') && remainder.split('.').length === 1) {
shallow = true;

@@ -23,0 +22,0 @@ }

@@ -7,3 +7,3 @@ /* eslint max-nested-callbacks: 0*/

describe('expand', () => {
let ob1, ob2, ob3, ob4, ob5;
let ob1, ob2, ob3, ob4, ob5, ob6;
let arr2, arr1, arr3, arr4;

@@ -55,2 +55,11 @@

ob6 = {
name: 'Blog App Documentation',
description: 'This is the documentation for the blog app.',
paths: {
'/posts': {},
'/posts/:id': { content: '<h3>Details</h3><p>Some details about the posts/:id path. You could add whatever you want here.</p>' },
},
};
arr1 = [3, 1];

@@ -69,2 +78,3 @@ arr2 = [ob1, ob2];

expect(ob.expand(ob.flatten(ob5))).to.deep.equal(ob5);
expect(ob.expand(ob.flatten(ob6))).to.deep.equal(ob6);
expect(ob.expand(ob.flatten({tmp: arr4}))).to.deep.equal({tmp: arr4});

@@ -71,0 +81,0 @@ done();

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