core-functions
Advanced tools
Comparing version 1.2.0 to 2.0.0
{ | ||
"name": "core-functions", | ||
"version": "1.2.0", | ||
"description": "Core functions, utilities and classes for working with Node/JavaScript primitives and built-in objects, including strings, functions, booleans, Promises, base 64, Arrays, Objects, standard AppErrors, etc.", | ||
"version": "2.0.0", | ||
"description": "Core functions, utilities and classes for working with Node/JavaScript primitives and built-in objects, including strings, booleans, Promises, base 64, Arrays, Objects, standard AppErrors, etc.", | ||
"author": "Byron du Preez", | ||
@@ -6,0 +6,0 @@ "license": "Apache-2.0", |
@@ -1,5 +0,5 @@ | ||
# core-functions v1.2.0 | ||
# core-functions v2.0.0 | ||
Core functions, utilities and classes for working with Node/JavaScript primitives and built-in objects, including | ||
strings, functions, booleans, Promises, base 64, Arrays, Objects, standard AppErrors, etc. | ||
strings, booleans, Promises, base 64, Arrays, Objects, standard AppErrors, etc. | ||
@@ -11,3 +11,2 @@ Currently includes: | ||
- booleans.js - boolean utilities | ||
- functions.js - function utilities | ||
- numbers.js - number utilities | ||
@@ -45,7 +44,2 @@ - objects.js - Object utilities | ||
To use the function utilities | ||
```js | ||
const Functions = require('core-functions/functions'); | ||
``` | ||
To use the Base 64 encoding and decoding utilities | ||
@@ -131,2 +125,6 @@ ```js | ||
- timers | ||
- Added unit tests for existing and new functions and classes. | ||
- Added unit tests for existing and new functions and classes. | ||
### 2.0.0 | ||
- Removed unnecessary functions.js module | ||
- Patches to testing.js `checkMethodEqual` and `checkMethodOkNotOk` functions to show method prefixes properly |
{ | ||
"name": "core-functions-tests", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"author": "Byron du Preez", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -32,2 +32,6 @@ 'use strict'; | ||
function toMethodArgsPrefix(obj, method, args) { | ||
return prefixFnArgs ? `${obj.name ? obj.name : stringify(obj)}.${method.name ? method.name : '<anon>' }${stringify(args)} -> ` : ''; | ||
} | ||
function equal(t, actual, expected, prefix) { | ||
@@ -60,3 +64,3 @@ const msg = `${toPrefix(prefix)}${stringify(actual)} must be ${stringify(expected)}`; | ||
// check if actual equals expected | ||
equal(t, actual, expected, toFnArgsPrefix(method, args)); | ||
equal(t, actual, expected, `${toMethodArgsPrefix(obj, method, args)}${toPrefix(prefix)}`); | ||
} | ||
@@ -83,3 +87,3 @@ | ||
// check if actual equals expected | ||
okNotOk(t, actual, expected, okSuffix, notOkSuffix, `${toFnArgsPrefix(method, args)}${toPrefix(prefix)}`); | ||
okNotOk(t, actual, expected, okSuffix, notOkSuffix, `${toMethodArgsPrefix(obj, method, args)}${toPrefix(prefix)}`); | ||
} | ||
@@ -86,0 +90,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
145367
25
2912
127