Nondeterministic Palindrome Machine

npm

Need private packages and team management tools?Check out npm Orgs. »

unicode-string

1.1.1 • Public • Published

unicode-string

a collection of unicode-aware string functions

Build status

install

$ npm install unicode-string

use

var length = require('unicode-string/length')
var chars = require('unicode-string/chars')
var substring = require('unicode-string/substring')
var substr = require('unicode-string/substr')
 
var string = 'o 🇨🇦'
 
// length
console.log(string.length)
=> 6
console.log(length(string))
=> 3
 
// chars (ie. split(''))
console.log(string.split(''))
=> [ 'o', ' ', '', '', '', '' ]
console.log(chars(string))
=> [ 'o', ' ', '🇨🇦' ]
 
// substring
console.log(string.substring(2, 3))
=> �
console.log(substring(string, 2, 3))
=> 🇨🇦
 
// substr
console.log(string.substr(2, 1))
=> �
console.log(substr(string, 2, 1))
=> 🇨🇦
compression size
unicode-string/index.js 2.43 kB
unicode-string/index.min.js 1.7 kB
unicode-string/index.min.js.gz 699 B

obey

MIT

install

npm i unicode-string

Downloadsweekly downloads

3,398

version

1.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability