Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamic-typing

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamic-typing

Dynamically type a string

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-50.27%
Maintainers
1
Weekly downloads
 
Created
Source

dynamic-typing

NPM version build status Test coverage npm download

Dynamically type a string.

Becomes a boolean if the value to lowercase is 'true' or 'false' Becomes a number if (! isNaN). This will also convert hexadecimal numbers Stays a string otherwise

Installation

$ npm i dynamic-typing

Usage

import { parseString } from 'dynamic-typing';

const result = parseString('0x100');

// result is the number 256

API Documentation

License

MIT

FAQs

Package last updated on 25 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc