framework-utils
Advanced tools
Comparing version 0.1.0 to 0.2.0
export declare function prefixNames(prefix: string, ...classNames: string[]): string; | ||
export declare function prefixCSS(prefix: string, css: string): string; | ||
export declare function ref(target: any, name: string): (e: any) => void; | ||
export declare function refs(target: any, name: string, i: number): (e: any) => void; | ||
export declare function prefixCSS(prefix: string, css: string): string; | ||
export declare function Properties(properties: any[], action: (prototype: any, property: string) => any): (component: any) => void; |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/framework-utils.git | ||
version: 0.1.0 | ||
version: 0.2.0 | ||
*/ | ||
@@ -25,2 +25,5 @@ 'use strict'; | ||
} | ||
function prefixCSS(prefix, css) { | ||
return css.replace(/\.([^{,\s\d.]+)/g, "." + prefix + "$1"); | ||
} | ||
/* react */ | ||
@@ -38,6 +41,14 @@ | ||
} | ||
function prefixCSS(prefix, css) { | ||
return css.replace(/\.([^{,\s\d.]+)/g, "." + prefix + "$1"); | ||
/* Class Decorator */ | ||
function Properties(properties, action) { | ||
return function (component) { | ||
var prototype = component.prototype; | ||
properties.forEach(function (property) { | ||
action(prototype, property); | ||
}); | ||
}; | ||
} | ||
exports.Properties = Properties; | ||
exports.prefixCSS = prefixCSS; | ||
@@ -44,0 +55,0 @@ exports.prefixNames = prefixNames; |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/framework-utils.git | ||
version: 0.1.0 | ||
version: 0.2.0 | ||
*/ | ||
@@ -23,2 +23,5 @@ function prefixNames(prefix) { | ||
} | ||
function prefixCSS(prefix, css) { | ||
return css.replace(/\.([^{,\s\d.]+)/g, "." + prefix + "$1"); | ||
} | ||
/* react */ | ||
@@ -36,7 +39,14 @@ | ||
} | ||
function prefixCSS(prefix, css) { | ||
return css.replace(/\.([^{,\s\d.]+)/g, "." + prefix + "$1"); | ||
/* Class Decorator */ | ||
function Properties(properties, action) { | ||
return function (component) { | ||
var prototype = component.prototype; | ||
properties.forEach(function (property) { | ||
action(prototype, property); | ||
}); | ||
}; | ||
} | ||
export { prefixCSS, prefixNames, ref, refs }; | ||
export { Properties, prefixCSS, prefixNames, ref, refs }; | ||
//# sourceMappingURL=utils.esm.js.map |
{ | ||
"name": "framework-utils", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "utils for framework", | ||
@@ -5,0 +5,0 @@ "main": "./dist/utils.cjs.js", |
@@ -5,2 +5,6 @@ export function prefixNames(prefix: string, ...classNames: string[]) { | ||
export function prefixCSS(prefix: string, css: string) { | ||
return css.replace(/\.([^{,\s\d.]+)/g, `.${prefix}$1`); | ||
} | ||
/* react */ | ||
@@ -18,4 +22,11 @@ export function ref(target: any, name: string) { | ||
export function prefixCSS(prefix: string, css: string) { | ||
return css.replace(/\.([^{,\s\d.]+)/g, `.${prefix}$1`); | ||
/* Class Decorator */ | ||
export function Properties(properties: any[], action: (prototype: any, property: string) => any) { | ||
return (component: any) => { | ||
const prototype = component.prototype; | ||
properties.forEach(property => { | ||
action(prototype, property); | ||
}); | ||
}; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
15533
257
0