@0xcert/utils
Version:
General utility module with common helper functions.
49 lines (43 loc) • 2.47 kB
Plain Text
>>> @0xcert/utils
npm run lint && npx nyc npx hayspec test
> @0xcert/utils@2.1.1 lint /Users/xpepermint/Work/0xcert/repositories/framework/packages/0xcert-utils
> npx eslint 'src/**/*.ts?(x)'
src/tests/index.test.ts
exposes objects ⚑ ⚑ ⚑ ⚑ ⚑ ⚑ ⚑ ⚑
src/tests/methods/fetch.test.ts
downloads a remote file ⚑
reads a local file ⚑
src/tests/methods/keccak.test.ts
converts string into keccak256 hash ⚑ ⚑
src/tests/methods/sha.test.ts
converts string into SHA256 hash ⚑ ⚑
src/tests/methods/to-float.test.ts
converts numbers to floats ⚑ ⚑ ⚑ ⚑
handles non-numeric and other invalid values ⚑ ⚑ ⚑
src/tests/methods/to-integer.test.ts
converts floats to integers ⚑ ⚑ ⚑ ⚑
handles non-numeric and other invalid values ⚑ ⚑ ⚑ ⚑ ⚑ ⚑
src/tests/methods/to-seconds.test.ts
converts milliseconds to seconds ⚑ ⚑ ⚑ ⚑
handles non-numeric and other invalid values ⚑ ⚑ ⚑
src/tests/methods/to-string.test.ts
converts value to string ⚑ ⚑ ⚑ ⚑ ⚑ ⚑ ⚑ ⚑
src/tests/methods/to-tuple.test.ts
transforms an object to tuple ⚑
13 passing
----------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------|---------|----------|---------|---------|-------------------
All files | 75 | 86.67 | 78.57 | 76.79 |
src | 100 | 100 | 100 | 100 |
index.ts | 100 | 100 | 100 | 100 |
src/methods | 71.15 | 86.67 | 78.57 | 72.92 |
fetch.ts | 72.73 | 75 | 75 | 75 | 7,12
keccak.ts | 100 | 100 | 100 | 100 |
sha.ts | 37.5 | 50 | 50 | 42.86 | 8-11
to-float.ts | 100 | 100 | 100 | 100 |
to-integer.ts | 100 | 100 | 100 | 100 |
to-seconds.ts | 100 | 100 | 100 | 100 |
to-string.ts | 100 | 100 | 100 | 100 |
to-tuple.ts | 61.11 | 66.67 | 66.67 | 61.11 | 7,16-22
----------------|---------|----------|---------|---------|-------------------