npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

scope-reporter

4.0.1 • Public • Published

npm Greenkeeper semantic-release styled with prettier Build Status codecov.io Known Vulnerabilities GitHub Issues Dependency Status devDependency Status docs downloads Commitizen friendly

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

install

npm i scope-reporter

Downloadsweekly downloads

124

version

4.0.1

license

BSD-2-Clause

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability