Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.

matt-allan/neko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neko - Case tranformation functions for PHP

Neko is a small collection of case tranformation functions for PHP. They are as simple as possible with no external dependencies.

I wrote this library because I was tired of the other libraries out there not working like I expected. Neko can handle input in Title case, lower case, PascalCase, camelCase, kebab-case, SCREAMING-KEBAB-CASE, snake_case, and SCREAMING_SNAKE_CASE.

You can see how Neko stacks up against other case transformation libraries in the throwdown over here.

Install

Neko can be installed using composer.

$ composer require yuloh/neko

Usage

Snake Case

use function Yuloh\Neko\snake_case;

echo snake_case('Hello World'); // hello_world

Kebab Case

use function Yuloh\Neko\kebab_case;

echo kebab_case('Hello World'); // hello-world

Pascal Case

use function Yuloh\Neko\pascal_case;

echo pascal_case('Hello World'); // HelloWorld

Camel Case

use function Yuloh\Neko\camel_case;

echo camel_case('Hello World'); //helloWorld

About

Case transformation functions for PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages