# cify

> 一个面向对象辅助模块

Latest version **2.1.12** (published 2017-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install cify
pnpm add cify
yarn add cify
bun add cify
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.12 |
| Published | 2017-11-22 |
| First published | 2016-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Houfeng |
| Maintainers | houzhanfeng |
| Keywords | class, classjs, cify |

## Links

- npm: https://www.npmjs.com/package/cify
- npm.io page: https://npm.io/package/cify

## Dependencies (1)

- [ntils](https://npm.io/package/ntils.md) ^3.1.9

## Recent versions

- 2.1.12 (latest) — 2017-11-22
- 2.1.11 — 2017-02-01
- 2.1.10 — 2017-01-14
- 2.1.9 — 2017-01-14
- 2.1.8 — 2017-01-14
- 2.1.6 — 2017-01-14
- 2.1.5 — 2017-01-14
- 2.1.4 — 2017-01-13
- 2.1.3 — 2017-01-07
- 2.1.1 — 2017-01-07
- 2.1.0 — 2016-12-11
- 2.0.9 — 2016-12-02
- 2.0.8 — 2016-12-02
- 2.0.7 — 2016-12-02
- 2.0.6 — 2016-12-01
- … 17 more at https://npm.io/package/cify/versions

## README

```js
var Class = require("cify").Class;

var Animal = new Class({
  constructor: function(name) {
    this.name = name;
  },
  getName: function() {
    return "Animal:" + this.name;
  }
});

var Cat = new Class({
  _extends: Animal,
  getName: function() {
    return "Cat:" + this.name;
  }
});

var animal = new Animal("Obama");
console.log(animal.getName()); //Animal:Obama

var cat = new Cat("Obama");
console.log(cat.getName()); //Cat:Obama


var MyDate = new Class(function() {
  var formatDate = function(date, format_str) {
    ...
  };
  return {
    _extends: Date,
    toFormat: function(format_str) {
      return formatDate(this, format_str);
    }
  };
});

var date = new MyDate("2046-01-01");
console.log(date.getFullYear()); //2046
console.log(date.toFormat("yyyy年MM月dd日")); //2046年01月01日
```

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