An open API service indexing awesome lists of open source software.

https://github.com/dunggramer/constancy

Make constancy for a value
https://github.com/dunggramer/constancy

constant javascript typescript

Last synced: 3 months ago
JSON representation

Make constancy for a value

Awesome Lists containing this project

README

          

# Constancy

| A function make constancy for a array, object



[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues)

[![https://nodei.co/npm/constancy.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/constancy.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/constancy)

## Installation

```bash
npm i constancy
# or
yarn add constancy
# or
pnpm add constancy
```

## Usage

```js
import constancy from "constancy";

var obj = constancy({ foo: "bar" });
var arr = constancy([1, 2, 3]);
```