Socket
Socket
Sign inDemoInstall

bem-deps

Package Overview
Dependencies
20
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bem-deps

Gets dependencies as BEM objects


Version published
Weekly downloads
4
decreased by-55.56%
Maintainers
1
Install size
546 kB
Created
Weekly downloads
 

Readme

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

Last updated on 01 Jul 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc