Skip to content

Commit

Permalink
more faces.. too many faces
Browse files Browse the repository at this point in the history
  • Loading branch information
carvilsi committed Mar 13, 2024
1 parent 286ea74 commit a840df3
Show file tree
Hide file tree
Showing 3 changed files with 35 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,805,683' │ 356.4194135787683 │ '±4.45%' │ 280569
│ 1 │ 'print all the faces' │ '6,628' │ 150874.76435649808 │ '±0.91%' │ 663
│ 2 │ 'get one by name; more than one' │ '11,411' │ 87631.14901849977 │ '±0.95%' │ 1142
│ 3 │ 'get one by name; just one' │ '11,834' │ 84499.9554793577 │ '±0.85%' │ 1184
│ 4 │ 'get array of faces by name' │ '11,279' │ 88656.80955086193 │ '±0.56%' │ 1128
│ 0 │ 'random face' │ '2,609,683' │ 383.18823434304153 │ '±4.56%' │ 264059
│ 1 │ 'print all the faces' │ '5,385' │ 185671.52794084215 │ '±1.45%' │ 539
│ 2 │ 'get one by name; more than one' │ '9,029' │ 110743.30343360521 │ '±1.09%' │ 903
│ 3 │ 'get one by name; just one' │ '9,230' │ 108331.25274418753 │ '±1.41%' │ 924
│ 4 │ 'get array of faces by name' │ '9,401' │ 106367.75874939533 │ '±0.93%' │ 941
└─────────┴──────────────────────────────────┴─────────────┴────────────────────┴──────────┴─────────┘
31 changes: 29 additions & 2 deletions src/faces.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,42 @@ const canonical = {
'(^^)/~~~', '(^_^)/~', '(;_;)/~~~', '(^.^)/~~~', '(-_-)/~~~', '($··)/~~~',
'(@^^)/~~~', '(T_T)/~~~', '(ToT)/~~~'
],
alien_baltan: [ '(V)o¥o(V)' ]
alien_baltan: [ '(V)o¥o(V)' ],
excited: [
'\(~o~)/', '\(^o^)/', '\(-o-)/', 'ヽ(^。^)ノ', 'ヽ(^o^)丿', '(*^0^*)'
],
amazed: [
'(*_*)', '(*_*;', '(+_+)', '(@_@)', '(@_@。', '(@_@;)', '\(◎o◎)/!'
],
laughing_cheerful: [
'(*^^)v', '(^^)v', '(^_^)v', '(’-’*)', '(^v^)', '(^▽^)', '(・∀・)',
'(´∀`)', '(⌒▽⌒)'
],
hopeless: [ '\(^o^)/', '\\(^o^)/' ],
shame_sadness: [ '(~o~)', '(~_~)' ],
kiss: [ '(^^ゞ' ],
calmness: [ 'ˊ_>ˋ' ],
headphones_listening_music: [ '((d[-_-]b))' ],
worried: [
'(-"-)', '(ーー゛)', '(^_^メ)', '(-_-メ)', '(~_~メ)', '(--〆)',
'(・へ・)', '(`´)', '<`~´>', '<`ヘ´>', '(ーー;)'
],
eyeglasses: [ '(^0_0^)' ],
jotting_note: [ '( ..)φ', 'φ(..)' ],
happy: [
'(●^o^●)', '(^v^)', '(^u^)', '(^◇^)', '( ^)o(^ )', '(^O^)',
'(^o^)', '(^○^)', ')^o^( (*^▽^*)', '(✿◠‿◠)'
],
grinning: [ '( ̄ー ̄)' ]
}
};

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

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 = 352;
const TOTAL_FACES = 408;
const WHOLE_EMBARRASSED_FACES = [
':$', '://)',
'://3', '(^^ゞ',
Expand Down

0 comments on commit a840df3

Please sign in to comment.