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

expand-object

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expand-object - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

10

index.js

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

if (!/[.|:]/.test(str) && /,/.test(str)) {
return str.split(',');
return toArray(str);
}

@@ -64,3 +64,3 @@

function expandArray(str) {
return str.split(',').map(function (ele) {
return toArray(str).map(function (ele) {
return expandObject({}, ele);

@@ -70,5 +70,9 @@ });

function toArray(str) {
return (str || '').split(',').filter(Boolean);
}
function expandObject(res, str) {
var segs = str.split(':');
var parts = (segs[1] || '').split(',');
var parts = toArray(segs[1]);
if (parts.length > 1) {

@@ -75,0 +79,0 @@ setValue(res, segs[0], parts);

{
"name": "expand-object",
"description": "Expand a string into a JavaScript object using a simple notation. Use the CLI or as a node.js lib.",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/jonschlinkert/expand-object",

@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

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