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

aurelia-bem

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-bem - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

1

dist/commonjs/bem.d.ts
export declare function bemClassGenerator(block?: string, element?: string, modifier?: string | string[]): any[];
export declare function bem(block?: string, element?: string, modifier?: string | string[]): string;
export declare class BemBinder {
beforeBind(view: any): void;
}

@@ -13,15 +13,17 @@ "use strict";

if (block && !element) {
result.push(block);
result.push(checkForValidName(block));
}
if (element) {
checkForValidName(element, !block);
result.push(block ? block + "__" + element : element);
}
function pushModifier(m) {
checkForValidName(m);
if (element) {
result.push(block
result.push((block
? block + "__" + element + "--" + m
: element + "--" + m);
: element + "--" + m));
}
else {
result.push(block + "--" + m);
result.push((block + "--" + m));
}

@@ -40,5 +42,17 @@ }

exports.bemClassGenerator = bemClassGenerator;
function checkForValidName(name, noBlock) {
if (noBlock === void 0) { noBlock = false; }
var tester = new RegExp("[-" + (noBlock ? "" : "|_") + "]{2,}");
if (name.match(tester) || name.match(/_{2,}.*_{2,}/)) {
console.error("Usage of invalid separators in given name " + name);
}
if (noBlock && !name.includes("__")) {
console.error("Given name " + name + " includes no __ and no block provided");
}
return name;
}
function bem(block, element, modifier) {
return bemClassGenerator(block, element, modifier).join(" ");
}
exports.bem = bem;
var BemBinder = (function () {

@@ -45,0 +59,0 @@ function BemBinder() {

import { FrameworkConfiguration } from 'aurelia-framework';
export declare function configure(config: FrameworkConfiguration): void;
export * from "./bem";
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });

@@ -10,3 +13,4 @@ var bem_1 = require("./bem");

exports.configure = configure;
__export(require("./bem"));
//# sourceMappingURL=index.js.map
export declare function bemClassGenerator(block?: string, element?: string, modifier?: string | string[]): any[];
export declare function bem(block?: string, element?: string, modifier?: string | string[]): string;
export declare class BemBinder {
beforeBind(view: any): void;
}

23

dist/native-modules/bem.js

@@ -11,15 +11,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

if (block && !element) {
result.push(block);
result.push(checkForValidName(block));
}
if (element) {
checkForValidName(element, !block);
result.push(block ? block + "__" + element : element);
}
function pushModifier(m) {
checkForValidName(m);
if (element) {
result.push(block
result.push((block
? block + "__" + element + "--" + m
: element + "--" + m);
: element + "--" + m));
}
else {
result.push(block + "--" + m);
result.push((block + "--" + m));
}

@@ -37,3 +39,14 @@ }

}
function bem(block, element, modifier) {
function checkForValidName(name, noBlock) {
if (noBlock === void 0) { noBlock = false; }
var tester = new RegExp("[-" + (noBlock ? "" : "|_") + "]{2,}");
if (name.match(tester) || name.match(/_{2,}.*_{2,}/)) {
console.error("Usage of invalid separators in given name " + name);
}
if (noBlock && !name.includes("__")) {
console.error("Given name " + name + " includes no __ and no block provided");
}
return name;
}
export function bem(block, element, modifier) {
return bemClassGenerator(block, element, modifier).join(" ");

@@ -40,0 +53,0 @@ }

import { FrameworkConfiguration } from 'aurelia-framework';
export declare function configure(config: FrameworkConfiguration): void;
export * from "./bem";

@@ -7,3 +7,4 @@ import { BemBinder } from './bem';

}
export * from "./bem";
//# sourceMappingURL=index.js.map
{
"name": "aurelia-bem",
"description": "An Aurelia plugin project.",
"version": "0.2.0",
"version": "0.3.0",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

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

import {viewEngineHooks} from 'aurelia-templating';
import { viewEngineHooks } from 'aurelia-templating';

@@ -11,6 +11,7 @@ export function bemClassGenerator(

if (block && !element) {
result.push(block);
result.push(checkForValidName(block));
}
if (element) {
checkForValidName(element, !block);
result.push(block ? `${block}__${element}` : element);

@@ -20,10 +21,11 @@ }

function pushModifier(m) {
checkForValidName(m);
if (element) {
result.push(
result.push((
block
? `${block}__${element}--${m}`
: `${element}--${m}`
);
));
} else {
result.push(`${block}--${m}`);
result.push((`${block}--${m}`));
}

@@ -43,3 +45,18 @@ }

function bem(
function checkForValidName(name: string, noBlock = false) {
const tester = new RegExp(`[-${noBlock ? "" : "|_"}]{2,}`);
if (name.match(tester) || name.match(/_{2,}.*_{2,}/)) {
console.error(`Usage of invalid separators in given name ${name}`);
}
if (noBlock && !name.includes("__")) {
console.error(`Given name ${name} includes no __ and no block provided`);
}
return name;
}
export function bem(
block?: string,

@@ -46,0 +63,0 @@ element?: string,

@@ -9,1 +9,3 @@ import { FrameworkConfiguration } from 'aurelia-framework';

}
export * from "./bem";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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