Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/moutPublic

Commitfc281b2

Browse files
committed
docs: Fix simple typo, delimeter -> delimiter
There is a small typo in doc/string.md, src/string/slugify.js.Should read `delimiter` rather than `delimeter`.
1 parent0771418 commitfc281b2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎doc/string.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,10 @@ startsWith('lorem ipsum', 'ipsum'); // false
435435

436436

437437

438-
##slugify(str[,delimeter]):String
438+
##slugify(str[,delimiter]):String
439439

440440
Convert to lower case, remove accents, remove non-word chars and replace spaces
441-
with thedelimeter. The defaultdelimeter is a hyphen.
441+
with thedelimiter. The defaultdelimiter is a hyphen.
442442

443443
Note that this does not split camelCase text.
444444

‎src/string/slugify.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
define(['../lang/toString','./replaceAccents','./removeNonWord','./trim'],function(toString,replaceAccents,removeNonWord,trim){
22
/**
33
* Convert to lower case, remove accents, remove non-word chars and
4-
* replace spaces with the specifieddelimeter.
4+
* replace spaces with the specifieddelimiter.
55
* Does not split camelCase text.
66
*/
7-
functionslugify(str,delimeter){
7+
functionslugify(str,delimiter){
88
str=toString(str);
99

10-
if(delimeter==null){
11-
delimeter="-";
10+
if(delimiter==null){
11+
delimiter="-";
1212
}
1313
str=replaceAccents(str);
1414
str=removeNonWord(str);
1515
str=trim(str)//should come after removeNonWord
16-
.replace(/+/g,delimeter)//replace spaces withdelimeter
16+
.replace(/+/g,delimiter)//replace spaces withdelimiter
1717
.toLowerCase();
1818
returnstr;
1919
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp