Gathering detailed insights and metrics for @yummies/yummies
Gathering detailed insights and metrics for @yummies/yummies
Gathering detailed insights and metrics for @yummies/yummies
Gathering detailed insights and metrics for @yummies/yummies
[DEPRECATED] New project is called reBEM: https://github.com/rebem/
npm install @yummies/yummies
Typescript
Module System
Min. Node Version
Node Version
NPM Version
29.6
Supply Chain
91
Quality
71.5
Maintenance
100
Vulnerability
98.2
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
254 Commits
1 Watchers
1 Branches
2 Contributors
Updated on May 10, 2016
Latest Version
2.1.1
Package Id
@yummies/yummies@2.1.1
Size
5.66 kB
NPM Version
3.5.3
Node Version
5.3.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
25
npm i -S @yummies/yummies
Like BEM methodology and using React? How about that:
1import Yummies from '@yummies/yummies'; 2 3class MyComponent extends Yummies.Component { 4 constructor() { 5 this.state = { 6 test: null 7 }; 8 } 9 10 render() { 11 return { 12 block: 'my-component', 13 mods: { 14 test: this.state.test 15 }, 16 content: { 17 elem: 'input', 18 tag: 'input', 19 mods: { 20 type: 'search' 21 }, 22 mix: { 23 block: 'my-another-component', 24 elem: 'input' 25 }, 26 props: { 27 placeholder: 'search' 28 } 29 } 30 }; 31 } 32} 33 34const MyComponentFactory = Yummies.createFactory(MyComponent); 35 36Yummies.render(MyComponentFactory(), document.body);
Similar to BEMJSON:
block <string>
Block name.
elem <string>
Element name. Understands current block context so no need to repeat block
inside nested elements.
mods <object>
block
+ mods
– block modifierselem
+ mods
– element modifiersCan be shorthanded with true
as modifier value.
mix <array|object>
Mix additional className(s) from another BEM entity(ies).
tag <string>
HTML tag, div
by default.
content <*>
Any possible content such as strings, arrays, BEMJSON, React Elements, …
Already knows about BEM Levels of definition? Good, because we have it as "Layers" – checkout babel-plugin-yummies – multilayer components inheritance for Yummies.
The following React Top-Level API methods are patched to support the new format:
render()
1Yummies.render({ block: 'my-component' }, document.body);
renderToString()
1Yummies.renderToString({ block: 'my-component' });
renderToStaticMarkup()
1Yummies.renderToStaticMarkup({ block: 'my-component' });
createElement()
1Yummies.createElement({ block: 'my-component' });
1Yummies.createElement(class extends Yummies.Component { … });
createFactory()
1Yummies.createFactory(class extends Yummies.Component { … });
yummify(<class>)
Patch class (extended from Yummies.Component
) render()
method to support BEMJSON.
buildClassName(<object>)
Build className string from BEMJSON object.
1Yummies.buildClassName({ block: 'my-component', elem: 'title' });
yummifyChain(<array>)
Collect all the inherited classes chain and return a ReactElement Factory. See babel-plugin-yummies for more details.
1Yummies.yummify([ … ]);
yummifyChainRaw(<array>)
Collect all the inherited classes chain and return a resulted Class Factory. See babel-plugin-yummies for more details.
1Yummies.yummifyRaw([ … ]);
There are couple of things worth noticing if you use babel
.
Since 1.x.x
babel-runtime
is not included anymore and we inline all helpers. We do it in case to support IE9-10. It may insignificantly increase bundle size, but other than that everything should work fine even if you use babel-runtime
in your application.
If you need to support IE9-10, you should include on spec.protoToAssign
into optional
in your .babelrc
. This will fix some inheritance incompatibility issues. If you don't need IE9-10, no additional moves required.
Please note that IE8 is supported only in 0.x.x
legacy branch. Starting from 1.x.x
only IE9 and higher are supported. We are going to keep updating a legacy branch in parallel for some time (until IE8 would not become history).
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More