scope-reporter

4.0.5 • Public • Published

styled with prettier Known Vulnerabilities Commitizen friendly npm License minified size downloads GitHub Issues Build Status codecov.io Coverage Status Greenkeeper semantic-release

scope-reporter

traks scope identifiers during processing

API

Table of Contents

createScopeDefinitions

Creates several scope definition from a given json hash.

Parameters

createScopeDefinition

Creates a scope definition

Parameters

  • name string the scope definition name
  • properties Object describung properties for the scope
  • format format string for the scope properties

commonScopes

Commonly used scopes

createConsoleAdapter

Creates a reporting adaptor for console api.

Parameters

  • aConsole Object console object may be undefined for the default console (optional, default console)

Returns any the newly created adaptor

createLoggingAdapter

Creates a reporting adaptor for logging api.

Parameters

  • logger target logger

Returns any the newly created adaptor

createReporter

Creates a new scope reporter.

Parameters

  • scopeDefinitionsRaw Object
  • reportAdapter

Returns ScopeReporter newly created scope reporter

rootObject

methods of all scopes

toJSON

Delivers the json representation of the scope-reporter.

Returns Object with scopes array

addScopeDefinitions

Add additional scope definitions

Parameters

  • defs new scope defintions to be added to the already present ones

scope

Deliver a scope for a given scope name.

Parameters

  • name string name of the scope

Returns Object for the given name

enterScope

Enter a new scope by pushing the scope to the scope stack.

Parameters

  • scope name of the scope to be entered
  • propertiesOrScalar the properties of the new scope may ge a scalar if there is only one possible property

Returns any newly created scope with the assigned properties.

leaveScope

Leaves the last entered scope.

Parameters

  • expectedScope the expected current scope may be undefined

  • Throws any if expectedScope is not the current scope

Returns any the old leaved scope

clearScopes

Clears the scope stack

scopeDefinitions

Delivers the scope definitions

Returns any scope defintions

scopeStack

Delivers the scope stack.

Returns any scope stack

currentScope

Delivers the current scope

Returns any the current scope

install

With npm do:

npm install scope-reporter

license

BSD-2-Clause

Dependencies (1)

Dev Dependencies (6)

Package Sidebar

Install

npm i scope-reporter

Weekly Downloads

1

Version

4.0.5

License

BSD-2-Clause

Unpacked Size

16.9 kB

Total Files

4

Last publish

Collaborators

  • arlac77