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

remotedev-utils

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remotedev-utils - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

28

lib/index.js

@@ -13,2 +13,3 @@ 'use strict';

exports.stringify = stringify;
exports.getSeralizeParameter = getSeralizeParameter;

@@ -27,2 +28,6 @@ var _getParams = require('get-params');

var _serialize = require('remotedev-serialize/immutable/serialize');
var _serialize2 = _interopRequireDefault(_serialize);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -133,2 +138,25 @@

return _jsan2.default.stringify(obj, serialize.replacer, null, serialize.options);
}
function getSeralizeParameter(config, param) {
var serialize = config.serialize;
if (serialize) {
if (serialize === true) return { options: true };
if (serialize.immutable) {
return {
replacer: (0, _serialize2.default)(serialize.immutable, serialize.refs).replacer,
options: serialize.options || true
};
}
if (!serialize.replacer) return { options: serialize.options };
return { replacer: serialize.replacer, options: serialize.options || true };
}
var value = config[param];
if (typeof value === 'undefined') return undefined;
console.warn('`' + param + '` parameter for Redux DevTools Extension is deprecated. Use `serialize` parameter instead: https://github.com/zalmoxisus/redux-devtools-extension/releases/tag/v2.12.1'); // eslint-disable-line
if (typeof serializeState === 'boolean') return { options: value };
if (typeof serializeState === 'function') return { replacer: value };
return value;
}

2

package.json
{
"name": "remotedev-utils",
"version": "0.1.2",
"version": "0.1.3",
"description": "Utils for remotedev infrastructure",

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

import getParams from 'get-params';
import jsan from 'jsan';
import shortid from 'shortid';
import seralizeImmutable from 'remotedev-serialize/immutable/serialize';

@@ -105,1 +106,24 @@ export function generateId(id) {

}
export function getSeralizeParameter(config, param) {
const serialize = config.serialize;
if (serialize) {
if (serialize === true) return { options: true };
if (serialize.immutable) {
return {
replacer: seralizeImmutable(serialize.immutable, serialize.refs).replacer,
options: serialize.options || true
};
}
if (!serialize.replacer) return { options: serialize.options };
return { replacer: serialize.replacer, options: serialize.options || true };
}
const value = config[param];
if (typeof value === 'undefined') return undefined;
console.warn(`\`${param}\` parameter for Redux DevTools Extension is deprecated. Use \`serialize\` parameter instead: https://github.com/zalmoxisus/redux-devtools-extension/releases/tag/v2.12.1`); // eslint-disable-line
if (typeof serializeState === 'boolean') return { options: value };
if (typeof serializeState === 'function') return { replacer: value };
return value;
}
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