repo.or.cz
/
openemr.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
refactor(ccdaservice): extract and test safeTrim function (#6788)
[openemr.git]
/
ccdaservice
/
utils
/
clean-code
/
clean-code.js
blob
709b97afdf313c39ce45e5186479e339e11868c5
1
'use strict';
2
3
const NULL_FLAVOR = require('../constants').NULL_FLAVOR;
4
5
function cleanCode(code) {
6
return typeof code === 'undefined' || code.length < 1
7
? NULL_FLAVOR
8
: code.replace(/[.#]/, '');
9
}
10
11
exports.cleanCode = cleanCode;