can-string
Version:
String helpers
24 lines (18 loc) • 567 B
Markdown
object with the following methods:
```js
import string from "can-string";
// or
import {string} from "can";
string.camelize("foo-bar")) //-> "fooBar"
string.capitalize("foo") //-> "Foo"
string.esc("<div>foo</div>")//-> "<div>foo</div>"
string.hyphenate("fooBar") //-> "foo-bar"
string.underscore("fooBar") //-> "foo_bar"
string.pascalize("foo-bar") //-> "FooBar"
```
`can-string` exports an