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

@pkgr/umd-globals

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pkgr/umd-globals - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

lib/tsconfig.tsbuildinfo

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [0.6.0](https://github.com/rx-ts/pkgr/compare/@pkgr/umd-globals@0.5.0...@pkgr/umd-globals@0.6.0) (2021-04-20)
### Features
* bump all (dev)Dependencies, update related usage ([113e909](https://github.com/rx-ts/pkgr/commit/113e909be27515c529f053c8c49a94ffbc821d33))
# [0.5.0](https://github.com/rx-ts/pkgr/compare/@pkgr/umd-globals@0.4.3...@pkgr/umd-globals@0.5.0) (2021-02-19)

@@ -8,0 +19,0 @@

2

lib/cjs.js

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

var _b = _a === void 0 ? {} : _a, asIsPkgs = _b.asIsPkgs, upperCamelCasePkgs = _b.upperCamelCasePkgs, globals = _b.globals;
return __assign(__assign(__assign(__assign(__assign(__assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals);
return (__assign(__assign(__assign(__assign(__assign(__assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals));
};

@@ -79,0 +79,0 @@ var globals = getGlobals();

@@ -38,5 +38,3 @@ const AS_IS_PKGS = [

};
const getGlobals = ({ asIsPkgs, upperCamelCasePkgs, globals, } = {}) => {
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals);
};
const getGlobals = ({ asIsPkgs, upperCamelCasePkgs, globals, } = {}) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals));
const globals = getGlobals();

@@ -43,0 +41,0 @@

@@ -72,3 +72,3 @@ /*! *****************************************************************************

var _b = _a === void 0 ? {} : _a, asIsPkgs = _b.asIsPkgs, upperCamelCasePkgs = _b.upperCamelCasePkgs, globals = _b.globals;
return __assign(__assign(__assign(__assign(__assign(__assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals);
return (__assign(__assign(__assign(__assign(__assign(__assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals));
};

@@ -75,0 +75,0 @@ var globals = getGlobals();

@@ -17,2 +17,1 @@ export declare const AS_IS_PKGS: string[];

export { globals as default };
//# sourceMappingURL=index.d.ts.map

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

import { __assign } from "tslib";
export var AS_IS_PKGS = [
export const AS_IS_PKGS = [
'dayjs',

@@ -10,4 +9,4 @@ 'moment',

];
export var UPPER_CAMEL_CASE_PKGS = ['react', 'react-router', 'redux', 'vue'];
export var normalizePkg = function (pkg) {
export const UPPER_CAMEL_CASE_PKGS = ['react', 'react-router', 'redux', 'vue'];
export const normalizePkg = (pkg) => {
if (pkg.startsWith('@')) {

@@ -18,24 +17,18 @@ pkg = pkg.split('/').slice(1).join('/');

};
export var asIsReducer = function (globals, pkg) {
var _a, _b;
return (__assign(__assign({}, (typeof globals === 'string'
? (_a = {},
_a[globals] = normalizePkg(globals),
_a) : globals)), (pkg && (_b = {},
_b[pkg] = normalizePkg(pkg),
_b))));
};
export var upperCamelCase = function (pkg) {
return pkg.replace(/(^|-)([a-z])/g, function (_, _$1, $2) { return $2.toUpperCase(); });
};
export var upperCamelCaseReducer = function (globals, pkg) {
var _a, _b;
return (__assign(__assign({}, (typeof globals === 'string'
? (_a = {},
_a[globals] = upperCamelCase(normalizePkg(globals)),
_a) : globals)), (pkg && (_b = {},
_b[pkg] = upperCamelCase(normalizePkg(pkg)),
_b))));
};
var GLOBALS = {
export const asIsReducer = (globals, pkg) => (Object.assign(Object.assign({}, (typeof globals === 'string'
? {
[globals]: normalizePkg(globals),
}
: globals)), (pkg && {
[pkg]: normalizePkg(pkg),
})));
export const upperCamelCase = (pkg) => pkg.replace(/(^|-)([a-z])/g, (_, _$1, $2) => $2.toUpperCase());
export const upperCamelCaseReducer = (globals, pkg) => (Object.assign(Object.assign({}, (typeof globals === 'string'
? {
[globals]: upperCamelCase(normalizePkg(globals)),
}
: globals)), (pkg && {
[pkg]: upperCamelCase(normalizePkg(pkg)),
})));
const GLOBALS = {
lodash: '_',

@@ -47,8 +40,5 @@ qrcode: 'QRCode',

};
export var getGlobals = function (_a) {
var _b = _a === void 0 ? {} : _a, asIsPkgs = _b.asIsPkgs, upperCamelCasePkgs = _b.upperCamelCasePkgs, globals = _b.globals;
return __assign(__assign(__assign(__assign(__assign(__assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals);
};
export var globals = getGlobals();
export const getGlobals = ({ asIsPkgs, upperCamelCasePkgs, globals, } = {}) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals));
export const globals = getGlobals();
export { globals as default };
//# sourceMappingURL=index.js.map

@@ -78,3 +78,3 @@ (function (global, factory) {

var _b = _a === void 0 ? {} : _a, asIsPkgs = _b.asIsPkgs, upperCamelCasePkgs = _b.upperCamelCasePkgs, globals = _b.globals;
return __assign(__assign(__assign(__assign(__assign(__assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals);
return (__assign(__assign(__assign(__assign(__assign(__assign({}, GLOBALS), AS_IS_PKGS.reduce(asIsReducer, {})), UPPER_CAMEL_CASE_PKGS.reduce(upperCamelCaseReducer, {})), (asIsPkgs || []).reduce(asIsReducer, {})), (upperCamelCasePkgs || []).reduce(upperCamelCaseReducer, {})), globals));
};

@@ -81,0 +81,0 @@ var globals = getGlobals();

{
"name": "@pkgr/umd-globals",
"version": "0.5.0",
"version": "0.6.0",
"description": "Union collections of umd globals mappings",

@@ -30,3 +30,3 @@ "repository": "git+https://github.com/rx-ts/pkgr.git",

"sideEffects": false,
"gitHead": "57cd2d0507774b84834993efbba24662782a519b"
"gitHead": "0de7f36554e8ef886fdfb2cdfc75a225e23b1304"
}

Sorry, the diff of this file is not supported yet

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