Skip to content

Commit

Permalink
adding moar faces
Browse files Browse the repository at this point in the history
  • Loading branch information
carvilsi committed Mar 13, 2024
1 parent 52474ae commit e8efec6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
10 changes: 5 additions & 5 deletions benchmark/report.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
┌─────────┬──────────────────────────────────┬─────────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├─────────┼──────────────────────────────────┼─────────────┼────────────────────┼──────────┼─────────┤
│ 0 │ 'random face' │ '2,773,328' │ 360.5775347400159 │ '±4.54%' │ 277333
│ 1 │ 'print all the faces' │ '6,676' │ 149773.55720754154 │ '±1.99%' │ 668
│ 2 │ 'get one by name; more than one' │ '11,974' │ 83509.6806984314 │ '±1.00%' │ 1198
│ 3 │ 'get one by name; just one' │ '12,495' │ 80026.75449848175 │ '±0.64%' │ 1250
│ 4 │ 'get array of faces by name' │ '11,519' │ 86807.44704583452 │ '±1.41%' │ 1152
│ 0 │ 'random face' │ '2,585,877' │ 386.71588588650104 │ '±2.92%' │ 258588
│ 1 │ 'print all the faces' │ '6,836' │ 146278.00093233932 │ '±0.43%' │ 684
│ 2 │ 'get one by name; more than one' │ '11,447' │ 87358.24560494404 │ '±0.91%' │ 1145
│ 3 │ 'get one by name; just one' │ '11,545' │ 86611.06453313457 │ '±1.16%' │ 1155
│ 4 │ 'get array of faces by name' │ '11,596' │ 86233.59177646966 │ '±0.41%' │ 1160
└─────────┴──────────────────────────────────┴─────────────┴────────────────────┴──────────┴─────────┘
12 changes: 10 additions & 2 deletions src/faces.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,21 @@ const canonical = {
cat: [ '(=^・^=)', '(=^・・^=)', '=^_^=' ],
looking_down_sadness_boredom: [ '(..)', '(._.)' ],
giggling_with_hand_covering_mouth: [ '^m^' ],
confusion: [ '(・・?', '(?_?)' ]
confusion: [ '(・・?', '(?_?)' ],
facepalm: [ '(-‸ლ)' ],
laugh: [
'>^_^<', '<^!^>', '^/^', '(*^_^*)', '§^.^§', '(^<^)', ' (^.^)', '(^ム^)',
'(^·^)', '(^.^)', '(^_^.)', '(^_^)', '(^^)', ' (^J^)', '(*^.^*)', '^_^',
'(#^.^#)', '(^—^)'
]
}
};

const custom = {
myth: {
cthulhu: [ '^(;,;)^' ]
cthulhu: [ '^(;,;)^' ],
facepalm: [ '(P,\')', '(p,\')' ],
horns_heavy: [ '\\m/,' ]
}
};

Expand Down
2 changes: 1 addition & 1 deletion tests/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import test from 'ava';
import facetxt from '../src/index.js';

const TOTAL_FACES = 320;
const TOTAL_FACES = 342;
const WHOLE_EMBARRASSED_FACES = [
':$', '://)',
'://3', '(^^ゞ',
Expand Down

0 comments on commit e8efec6

Please sign in to comment.