New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cw-string-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cw-string-polyfill

String polyfill methods for ECMAScript 6 specification

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

cw-string-polyfill

String polyfill methods for ECMAScript 6 specification & other usefull string manipulation

Implements

  • String.capitalise - Capitalise first letter of first word (all words) in input string
  • String.repeat - Repeat input string specified number of times

Usage

// String.capitalise
console.log( 'this is a test string'.capitalise() ); // This is a test string
console.log( 'this is a test string'.capitalise(true) ); // This Is A Test String
console.log( 'this-is-a-test-string'.capitalise(true,'-') ); // This-Is-A-Test-String

// String.repeat
console.log( 'x'.repeat(3) ); // xxx

Code and documentation copyright 2016 Charles Louw. Code released under the MIT license.

FAQs

Package last updated on 05 May 2016

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