# simurl

> Library for Managing State through URL

Latest version **0.1.1** (published 2019-06-07) · MIT license · 0 weekly downloads

## Install

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

## 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.1.1 |
| Published | 2019-06-07 |
| First published | 2019-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Madden |
| Maintainers | jamesbmadden |

## Links

- npm: https://www.npmjs.com/package/simurl
- Repository: https://github.com/jamesbmadden/simurl
- Homepage: https://github.com/jamesbmadden/simurl#readme
- Issues: https://github.com/jamesbmadden/simurl/issues
- npm.io page: https://npm.io/package/simurl

## Recent versions

- 0.1.1 (latest) — 2019-06-07
- 0.1.0 — 2019-03-25

## README

# simurl
Simurl (simulate URL) is a JavaScript library that allows you to create variables that update and listen to the url.

## Usage
```javascript
import { SimUrl } from 'simurl';

const state = new SimUrl;

state.addProperty('name', 'Joe'); // Creates a state variable 'name' and sets the default value to 'Joe'. If a URL path is already present in this location (in this case, the first location), then that value will be used.
// The url will update, for example www.example.com/Joe

// If the URL was www.example.com/John, the value would be John.

console.log(`Hello, ${state.name}!`); // Hello, Joe!

state.name = 'John';
// The url is now www.example.com/John

console.log(state.name); // John

history.back();
console.log(state.name); // Joe
```

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