-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,31 @@ | ||
# mbstring | ||
|
||
Librairie javascript offrant des méthodes permettant de gérer des chaines e caractères (string) | ||
JavaScript library offering methods for managing character chains (string) | ||
|
||
## Installation | ||
|
||
```bash | ||
$ npm install --save mbstring | ||
npm install --save mbstring | ||
``` | ||
|
||
## API | ||
|
||
```js | ||
var mbstring = require("mbstring"); | ||
Or | ||
|
||
```bash | ||
yarn add mbstring | ||
``` | ||
|
||
### mbstring.isUrlValid(url) | ||
|
||
Permet de vérifier si un url est valide partant d'une regex de vérification | ||
|
||
**Note** Cette méthode (fonction) a été enlevée dans la version 0.1.0, vu que d'autres personnes l'utilisaient déjà nous l'avons remis dans la version 0.1.1 partant d'une autre dépendance `mbregex`. | ||
|
||
#### url | ||
|
||
L'adresse url à vérifier | ||
## API | ||
|
||
```js | ||
var url = "https://www.npm.com" | ||
var url2 = "www n pm.com" | ||
|
||
console.log(mbstring.isUrlValid(url)) // True | ||
console.log(mbstring.isUrlValid(url2)) // False | ||
var mbstring = require("mbstring"); | ||
|
||
``` | ||
|
||
### mbstring.ucFirst(text) | ||
### mbstring.ucFirst(str: string) | ||
|
||
Permet de mettre la première lettre d'un texte en majuscule | ||
|
||
#### text | ||
|
||
Le texte à modifier | ||
Allow to capitalize the first character of string | ||
|
||
```js | ||
var text = "bolenge"; | ||
console.log(mbstring.ucFirst(text)); // Bolenge | ||
|
||
``` |