Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bem-deps

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bem-deps

Gets dependencies as BEM objects

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bem-deps

NPM version Build Status Coverage Status Dependency Status

This module reads deps.js files from requested bem block recursivly and returns a Stream of bem objects which can be queried for files.

deps.js file exports object with require and/or expect property:

// foo.deps.js
export.require = ['one-block', 'two-block', {block: 'three-block'}];
export.expect = ['after'];

Required blocks will be added to stream before foo block and expected blocks will be added after foo.

All elements of require and expect are normalized with deps-normalize be default.

API

bem(levels, [options])

Returns object with deps method.

levels

Type: Array

Enumerates level folders, that should be used in blocks search.

options

Type: Object

  • normalize - sets normalization funciton (default: deps-normalize)

deps(bem)

Returns Stream of BEM objects - all dependencies for bem block.

Stream emits dependencies in order, that defined by require and expect of corresponding BEM objects and levels of declaration.

bem

Type: string

Bem entity path:

deps('level/block');
deps('level/block__elem');
deps('level/block_mod');

License

MIT (c) 2014 Vsevolod Strukchinsky

Keywords

FAQs

Package last updated on 01 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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