这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function is(x) {
"olivia wilde", // AND because SHE's 13
"baker's dozen", // Bakers gonna bake
"dr. remy beauregard hadley", // Why not 13's real name?!
"Movie that is a 2003 American semi-autobiographical drama film directed by Catherine Hardwicke, and written by Hardwicke and Nikki Reed based on events in Reed's life at age 12 and 13. It stars Holly Hunter and Evan Rachel Wood with Wood's character \"Tracy\" being loosely based upon Reed (Nikki Reed herself co-stars in the role of Evie Zamora). The script was written in six days.", //Thirteen the Movie

// Imaginary 13's
"13+0i",
Expand Down Expand Up @@ -51,8 +52,8 @@ function is(x) {
"kolmetoista", // Finnish
"treize", // French
"dreizehn", // German
"שלוש עשרה", // Hebrew
"तेरह", //Hindi
"שלוש עשרה", // Hebrew
"तेरह", //Hindi
"tizenhárom", // Hungarian
"déag", // Irish
"tredici", // Italian
Expand Down Expand Up @@ -148,4 +149,4 @@ function is(x) {
}
}

module.exports = is;
module.exports = is;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "is-thirteen",
"version": "2.0.0",
"version": "13.0.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

"description": "Check if a number is equal to 13",
"main": "index.js",
"devDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ tap.equal(is("Dr. Remy Beauregard Hadley").thirteen(), true);

// Imaginary 13's tests
tap.equal(is("13+0i").thirteen(), true);

tap.equal(is('https://scontent.cdninstagram.com/hphotos-xtf1/t51.2885-15/s320x320/e35/12237511_444845689040315_1101385461_n.jpg').thirteen(), true);
tap.equal(is('http://www.metal-archives.com/images/1/5/3/7/153772.jpg').thirteen(), false);
tap.equal(is('https://www.youtube.com/watch?v=pte3Jg-2Ax4').thirteen(), true);
tap.equal(is('Movie that is a 2003 American semi-autobiographical drama film directed by Catherine Hardwicke, and written by Hardwicke and Nikki Reed based on events in Reed's life at age 12 and 13. It stars Holly Hunter and Evan Rachel Wood with Wood's character \"Tracy\" being loosely based upon Reed (Nikki Reed herself co-stars in the role of Evie Zamora). The script was written in six days.').thirteen(), true);

tap.equal(is(1101).thirteen(), true);
tap.equal(is('1101').thirteen(), true);

tap.equal(is("13i").thirteen(), true);
tap.equal(is("13 + 13i").thirteen(), true);
tap.equal(is("12i").thirteen(), false);
Expand Down