# qc-core

> The core module of the QC ecosystem.

Latest version **0.0.0** (published 2016-07-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install qc-core
pnpm add qc-core
yarn add qc-core
bun add qc-core
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2016-07-23 |
| First published | 2016-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Danny Hurlburt |
| Maintainers | dhurlburtusa |
| Keywords | noop, null, nullFn, nullOp, qc |

## Links

- npm: https://www.npmjs.com/package/qc-core
- Repository: https://github.com/dhurlburtusa/qc-core
- Homepage: https://github.com/dhurlburtusa/qc-core#readme
- Issues: https://github.com/dhurlburtusa/qc-core/issues
- npm.io page: https://npm.io/package/qc-core

## Recent versions

- 0.0.0 (latest) — 2016-07-23
- 0.0.0-alpha — 2016-05-22

## README

# qc-core

The core module of the QC ecosystem.  This module is intended to be isomorphic.  That is, it is designed
to run on node or in a modern browser.

[![Build Status](https://travis-ci.org/dhurlburtusa/qc-core.svg?branch=master)](https://travis-ci.org/dhurlburtusa/qc-core)

## Install

```bash
npm install qc-core
```

To avoid potential issues, update `npm` before installing:

```bash
npm install npm -g
```


## Node Usage

```js
import { noop, notAgain, nullFn } from 'qc-core';

const Base = function () {
  this.init.apply(this, arguments);
};

Base.prototype.init = noop;

// Define a readonly property named foo.
Object.defineProperty(Base.prototype, 'foo', {
  configurable: true,
  enumerable: true,
  // The `foo` property is `null` until a subclass redefines it.
  get: nullFn
});


const SubClass = function () {
  Base.apply(this, arguments);
};

SubClass.prototype = Object.create(Base.prototype);
SubClass.prototype.constructor = SubClass;

// Redefine the foo property to return 'foo' instead of `null`.
Object.defineProperty(SubClass.prototype, 'foo', {
  configurable: true,
  enumerable: true,
  get() {
    return 'foo';
  }
});


const SubSubClass = function () {
  SubClass.apply(this, arguments);
};

SubSubClass.prototype = Object.create(SubClass.prototype);
SubSubClass.prototype.constructor = SubSubClass;

SubSubClass.prototype.init = function () {
  ...
  this.init = notAgain; // Will throw an error if `init` gets called again.
};

```


## Browser Usage

ES2015 (aka ES6) features are used where supported by Node.  Since many browsers still don't support the
same ES6 features that Node supports, the JavaScript source will need to be transpiled before using.
The source is tested with Babel.  After transpiling, it is recommended that the transpiled source be bundled
into a single file.  To test that the transpiled source runs correctly when bundled, Webpack is used.

---
_Source: https://npm.io/package/qc-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
