css-module-builder
Advanced tools
Comparing version 1.0.0-beta.4 to 1.0.0-beta.5
24
index.js
@@ -29,2 +29,16 @@ 'use strict'; | ||
exports.getLocal = getLocal; | ||
function getLocal(module, localName) { | ||
var values; | ||
if (typeof module.locals === 'object') { | ||
values = module.locals[localName]; | ||
} else { | ||
values = module[localName]; | ||
} | ||
return (values || ''); | ||
} | ||
/* Shared counter to guarantee unique ids for nonCSSModule imports */ | ||
@@ -50,11 +64,3 @@ var nonCSSModuleImportId = 0; | ||
function eachLocalValue(module, localName, processValue) { | ||
var values; | ||
if (typeof module.locals === 'object') { | ||
values = module.locals[localName]; | ||
} else { | ||
values = module[localName]; | ||
} | ||
(values || '').split(/\s+/).forEach(processValue); | ||
getLocal(module, localName).split(/\s+/).forEach(processValue); | ||
} | ||
@@ -61,0 +67,0 @@ |
{ | ||
"name": "css-module-builder", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3470
103