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

css-module-builder

Package Overview
Dependencies
Maintainers
2
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-module-builder - npm Package Compare versions

Comparing version 1.0.5-canary-f76436d54.0 to 1.0.5

lib/index.cjs.js

75

lib/index.js

@@ -1,10 +0,12 @@

'use strict';
import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
import _Array$isArray from "@babel/runtime-corejs3/core-js/array/is-array";
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/for-each";
import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/reduce";
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js/instance/filter";
import _Object$keys from "@babel/runtime-corejs3/core-js/object/keys";
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
import _Object$defineProperties from "@babel/runtime-corejs3/core-js/object/define-properties";
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var _typeof = _interopDefault(require('@babel/runtime/helpers/typeof'));
var _slicedToArray = _interopDefault(require('@babel/runtime/helpers/slicedToArray'));
/* eslint-disable no-underscore-dangle,no-use-before-define */

@@ -38,8 +40,10 @@

*/
var stringify = JSON.stringify;
var isArray = Array.isArray;
var _Array$prototype = Array.prototype;
var forEach = _Array$prototype.forEach;
var reduce = _Array$prototype.reduce;
var push = _Array$prototype.push;
var stringify = _JSON$stringify;
var isArray = _Array$isArray,
_Array$prototype = Array.prototype,
forEach = _forEachInstanceProperty(_Array$prototype),
reduce = _reduceInstanceProperty(_Array$prototype),
push = _Array$prototype.push;
var isEnumerable = Object.prototype.propertyIsEnumerable;

@@ -60,8 +64,12 @@

function createLocals() {
var _this = this;
var _context,
_context2,
_this = this;
var locals = {};
Object.keys(this).filter(isALocalDefinition).forEach(function (local) {
_forEachInstanceProperty(_context = _filterInstanceProperty(_context2 = _Object$keys(this)).call(_context2, isALocalDefinition)).call(_context, function (local) {
locals[local] = _this[local];
});
return locals;

@@ -80,4 +88,7 @@ }

if (typeof requiredModule.toCssString === 'function') {
var _context3;
/* eslint-disable no-plusplus */
var id = "".concat(getId(parentModule), "/import__").concat(nonCSSModuleImportId++);
var id = _concatInstanceProperty(_context3 = "".concat(getId(parentModule), "/import__")).call(_context3, nonCSSModuleImportId++);
var css = requiredModule.toCssString();

@@ -91,3 +102,5 @@ return [[id, css, null]];

function eachLocalValue(module, localName, processValue) {
getLocal(module, localName).split(/\s+/).forEach(processValue);
var _context4;
_forEachInstanceProperty(_context4 = getLocal(module, localName).split(/\s+/)).call(_context4, processValue);
}

@@ -108,3 +121,3 @@

});
return Object.keys(uniqueValues).join(' ');
return _Object$keys(uniqueValues).join(' ');
}

@@ -126,3 +139,5 @@

return reduce.call(this, function (cssString, subModule) {
return "".concat(subModule[1]).concat(cssString);
var _context5;
return _concatInstanceProperty(_context5 = "".concat(subModule[1])).call(_context5, cssString);
}, '');

@@ -157,2 +172,4 @@ }

function strictGetLocal(localName) {
var _context6;
var local = getLocal(this, localName);

@@ -164,3 +181,3 @@

throw new Error("".concat(stringify(localName), " is not defined in ").concat(stringify(this.locals, null, 2)));
throw new Error(_concatInstanceProperty(_context6 = "".concat(stringify(localName), " is not defined in ")).call(_context6, stringify(this.locals, null, 2)));
}

@@ -188,6 +205,8 @@

};
function initialize(moduleId, css) {
export function initialize(moduleId, css) {
var module = [[moduleId, css, null]];
Object.defineProperties(module, CSSModuleStaticProperties);
Object.defineProperties(module, {
_Object$defineProperties(module, CSSModuleStaticProperties);
_Object$defineProperties(module, {
__imported_modules__: {

@@ -197,5 +216,6 @@ value: {}

});
return module;
}
function getLocal(module, localName) {
export function getLocal(module, localName) {
if (_typeof(module.locals) === 'object') {

@@ -212,5 +232,2 @@ return module.locals[localName] || '';

return '';
}
exports.initialize = initialize;
exports.getLocal = getLocal;
}
{
"name": "css-module-builder",
"version": "1.0.5-canary-f76436d54.0",
"version": "1.0.5",
"main": "lib/index.cjs.js",
"module": "lib/index.js",
"sideEffects": false,
"scripts": {
"build.pkg": "union-packager-build",
"validate.pkg": "union-pkg-validator"
},
"dependencies": {
"@babel/runtime-corejs3": "^7.11.2"
},
"devDependencies": {
"@xo-union/packager": "^4.1.0",
"@xo-union/pkg-validator": "^3.1.0"
},
"description": "",
"main": "lib/index.js",
"keywords": [],

@@ -12,6 +25,3 @@ "author": "",

],
"dependencies": {
"@babel/runtime": "^7.0.0"
},
"gitHead": "3e57e3aa86b9d265ffdd17d3cc0fecddf9d71492"
"gitHead": "6a04bb10b7a89fe87352f3feaec3bbce7899c5a4"
}
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