# poly-count

> Polymorphic item counter

Latest version **1.0.0** (published 2017-06-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install poly-count
pnpm add poly-count
yarn add poly-count
bun add poly-count
```

## 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 | 1.0.0 |
| Published | 2017-06-14 |
| First published | 2017-06-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Machobear Studio Inc. |
| Maintainers | machobearstudio |
| Keywords | object, array, count, length |

## Links

- npm: https://www.npmjs.com/package/poly-count
- Repository: git@gitlab.machobear.ca:platform/poly-count
- npm.io page: https://npm.io/package/poly-count

## Recent versions

- 1.0.0 (latest) — 2017-06-14

## README

# poly-count
Universal data counter

## Motivation
1. To correct JS behaviour when strings are treated as lists of characters rather than single pieces of data when it comes to length calculation.
2. To allow counting items in point-free style expressions.

## Features
- Works with any type of data

## Installation

```
npm install poly-count
```

## Testing
```
npm test
```

## Usage

```javascript
var count = require('poly-count');

console.log(count(['a', 'c'])); // => 2
console.log(count({ a: 100, b: 500 })); // => 2

console.log(count(100500)); // => 1
console.log(count('100500')); // => 1
```

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