Socket
Socket
Sign inDemoInstall

sc-cast

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sc-cast

Cast values to a specific type


Version published
Weekly downloads
61
Maintainers
3
Weekly downloads
 
Created
Source

TOC

  • sc-cast

sc-cast

Cast values to specific types.

cast( "[1,2,3]", "array" ).should.eql( [ 1, 2, 3 ] );
cast( "false", "boolean" ).should.eql( false );
cast( "29 aug 1997", "date" ).should.eql( new Date( 1997, 7, 29 ) );
cast( "-42", "number" ).should.eql( -42 );
cast( true, "string" ).should.eql( "true" );

FAQs

Package last updated on 25 Nov 2015

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