@artgen/smart-string
v1.0.7
Published
Stateful string operator
Downloads
8
Readme
Artgen - Smart String
Easy to use package for stateful string manipulation. Featureful and tested collection of string transformation functions designed to operate with invidual strings as objects.
Installation
npm i @artgen/smart-string # or yarn add @artgen/smart-stringExamples
import { StringCase } from '@artgen/smart-string';
const platform = new StringCase('Artgen Compiler');
platform.pascalCase.prefix('LoveFrom'); // LoveFromArtgenCompilerTransformers
Ever expanding list of available transformers:
| Function | Input | Output |
| :---------------- | :---------- | :----------- |
| .singular | Properties | Property |
| .plural | Property | Properties |
| .pascalCase | my property | MyProperty |
| .camelCase | my property | myProperty |
| .kebabCase | my property | my-property |
| .snakeCase | my property | my_property |
| .dotCase | my property | my.property |
| .humanCase | my_property | My property |
| .titleCase | my-property | My Property |
| .upperCase | my property | MY PROPERTY |
| .lowerCase | MY pRoperty | my property |
| .capitalCase | my property | My property |
| .vacuumCase | my property | myproperty |
| .prefix('my') | property | myproperty |
| .suffix('ofme') | property | propertyofme |
Changelog
See the detailed changes in the CHANGELOG file.
