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 onlymaster
parent
530d1490b9
commit
882aa08424
|
@ -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": {
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue