npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

code-copter-sdk

v1.2.3

Published

Classes to help in the development of plugins for code-copter v2

Downloads

10

Readme

Code-Copter SDK

Build Status

Summary

Classes to help in the development of plugins for code-copter.

Reference

Classes

Typedefs

Analysis

What analyzers found for a source data target.

Kind: global class
Properties

| Name | Type | Description | | --- | --- | --- | | errors | Array.<AnalysisError> | The errors found. | | target | String | The source that was analyzed. |

new Analysis(parameters)

Create an analysis.

| Param | Type | Description | | --- | --- | --- | | parameters | Object | Named parameter values to use in construction. | | parameters.target | String | The target of this analysis (e.g. the file analyzed). |

analysis.pass ⇒ Boolean

Gets whether the target passed the analysis (i.e. there are no errors).

Kind: instance property of Analysis
Returns: Boolean - - Whether the target passed analysis.

analysis.addError(error)

Adds an error to the analysis.

Kind: instance method of Analysis

| Param | Type | Description | | --- | --- | --- | | error | AnalysisError | An error in the target. |

Analyzer

Provides analysis of source data.

Kind: global class
Properties

| Name | Type | Description | | --- | --- | --- | | analyze | function | Accepts source data and returns an Analysis object. | | configure | function | Allows configuration of the analyzer. | | name | String | The name of the analyzer. |

new Analyzer(parameters)

Create an analyzer.

| Param | Type | Default | Description | | --- | --- | --- | --- | | parameters | Object | | Named parameter values to use in construction. | | parameters.analyze | function | | A function which returns an Analysis object for given source data. | | [parameters.configure] | function | DefaultAnalyzerConfigure | A function which accepts user-provided configuration to influence the analyzer. | | parameters.name | String | | The name of the analyzer |

FileSourceData

Data, from a file source, to be passed through an analyzer for analysis.

Kind: global class
Properties

| Name | Type | Default | Description | | --- | --- | --- | --- | | Symbol.iterator | FileSourceDataSampleIterator | | Iterator to traverse samples of text for analysis. | | lineStart | Number | 1 | The line on which this source data starts within the containing file. | | text | String | | The text contents of the file to analyze. |

new FileSourceData(parameters)

Create file source data.

| Param | Type | Description | | --- | --- | --- | | parameters | Object | Named parameter values to use in construction. | | parameters.lineStart | Number | The line on which this source data starts within its file. | | parameters.text | String | The text contents of the file to analyze. |

FileSourceDataSampleIterator

Iterator which produces data samples from a file source.

Kind: global class

fileSourceDataSampleIterator.next() ⇒ FileSourceDataSampleIteration

Returns the next sample from the file source data.

Kind: instance method of FileSourceDataSampleIterator
Returns: FileSourceDataSampleIteration - - The next sample from the file source data.

Report

A report of analyses.

Kind: global class
Properties

| Name | Type | Description | | --- | --- | --- | | analyses | Array.<Analysis> | The analyses of all processed source data. | | pass | Boolean | Whether all analyses passed. |

new Report()

Create a Report.

report.addAnalysis(analysis)

Add an analysis to the report.

Kind: instance method of Report

| Param | Type | Description | | --- | --- | --- | | analysis | Analysis | An analysis to add to the report. |

Reporter

Disseminates a Report.

Kind: global class
Properties

| Name | Type | Description | | --- | --- | --- | | report | function | Accepts a Report and disseminates it in an implementation-specific way. |

new Reporter(parameters)

Create a Reporter.

| Param | Type | Description | | --- | --- | --- | | parameters | Object | Named parameter values to use in construction. | | parameters.report | function | Accepts a Report and disseminates it in an implementation-specific way. |

AnalysisError : Object

An error encountered during analysis.

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | line | Number | The line number on which the error was found. | | message | String | A description of the error found. |

DefaultAnalyzerConfigure : function

Default configure implementation for a new Analyzer which allows disabling the analyzer by passing a boolean false as its entire configuration.

Kind: global typedef

| Param | Type | Description | | --- | --- | --- | | enabled | Boolean | False to disable the analyzer; otherwise it is enabled. |

FileSourceDataSampleIteration : Object

An iteration of file source data.

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | done | Boolean | False if there are more samples; otherwise true. | | value | Object | File source data sample. | | value.line | Number | The line of the current sample. | | value.text | String | The text of the current sample. |