1.3.5 • Published 11 months ago

string-converter v1.3.5

Weekly downloads
10
License
MIT
Repository
github
Last release
11 months ago

string-converter

Converts strings to other javascript types

Build Status Codacy Badge code style: prettier Coverage Status David GitHub npm

Installation

npm install string-converter

Usage

import { convert } from "string-converter";

const numericValue = convert("42");
==> 42

const booleanValue = convert("1");
==> true

const stringValue = convert("some string");
==> "some string"

const objectWithValue = {
  value: 42,
  toString: () => value.toString()
};
const stringValue = convert(objectWithValue);
==> "42";

Docs

https://jaspenlind.github.io/string-converter

Test

npm test
1.3.5

11 months ago

1.3.4

2 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago