0.5.1 reworked getting database path from config file to be more flexible and to override by env var

major improvements to upgrade code for v2+ deploy of 645.  Cleans with simple git if need be
uses cast, typeOf and check from utils to better set values
reworked systemd now to two unit files only
master
David Kebler 2020-03-16 10:52:12 -07:00
parent 530d1490b9
commit 882aa08424
5 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@uci-utils/type",
"version": "0.5.0",
"version": "0.5.1",
"description": "A variable type check and casting utility - extension of typechecker package plus type casting",
"main": "src/",
"scripts": {

View File

@ -5,7 +5,7 @@ All includes some simple type casting including using uci to-boolean for boolean
See type checker api http://master.typechecker.bevry.surge.sh/docs/
exentions are
extensions are
`.isPromise`
`.isBuffer`

View File

@ -25,5 +25,7 @@ customTypeChecker.getType = function customGetType(value, _typeMap) {
return typechecker.getType(value, _typeMap || customTypeMap)
}
const typeOf = customTypeChecker.getType
export default customTypeChecker
export { customTypeChecker as check }
export { customTypeChecker as check, typeOf }

View File

@ -2,5 +2,5 @@
import check from './check'
export * from './cast'
export { check } from './check'
export { check, typeOf } from './check'
export default check // default is just the typechecker only

View File

@ -1,5 +1,5 @@
import { expect } from 'chai'
import u from '../src'
import u, {typeOf} from '../src'
describe('Type Check Library - ', function () {
@ -10,6 +10,12 @@ describe('Type Check Library - ', function () {
expect(u.getType(Promise.resolve(2))).to.equal('promise')
})
it('Should export typeOf for .getType', function () {
expect(typeOf(typeOf)).to.equal('function')
})
console.log(typeOf(typeOf))
it('Should include typechecker methods', function () {
expect(u.isPlainObject([1])).to.equal(false)
expect(u.getType(true)).to.equal('boolean')