@ts-graphviz/common
Advanced tools
Comparing version 2.1.4 to 2.1.5-next-d7ff421ec861ca8fdede1a6bdf256f3455fb9797
# @ts-graphviz/common | ||
## 2.1.5-next-d7ff421ec861ca8fdede1a6bdf256f3455fb9797 | ||
### Patch Changes | ||
- [#1218](https://github.com/ts-graphviz/ts-graphviz/pull/1218) [`d7ff421`](https://github.com/ts-graphviz/ts-graphviz/commit/d7ff421ec861ca8fdede1a6bdf256f3455fb9797) Thanks [@kamiazya](https://github.com/kamiazya)! - Remove unnecessary internal utility functions | ||
## 2.1.4 | ||
@@ -4,0 +10,0 @@ |
@@ -1,32 +0,1 @@ | ||
function _pipe(...args) { | ||
const [o1, ...operations] = args; | ||
return (...t) => operations.reduce((acc, f) => f(acc), o1(...t)); | ||
} | ||
function pipe(o1, ...operations) { | ||
return _pipe(o1, ...operations); | ||
} | ||
const defer = (fn) => (...args) => (src) => fn(src, ...args); | ||
const toIterable = (f) => ({ | ||
[Symbol.iterator]: f | ||
}); | ||
const map = defer( | ||
(src, selector) => Array.from( | ||
toIterable(function* () { | ||
for (const v of src) { | ||
yield selector(v); | ||
} | ||
}) | ||
) | ||
); | ||
const filter = defer( | ||
(src, pred) => Array.from( | ||
toIterable(function* () { | ||
for (const x of src) { | ||
if (pred(x)) { | ||
yield x; | ||
} | ||
} | ||
}) | ||
) | ||
); | ||
const RootModelsContext = Object.seal({ | ||
@@ -88,3 +57,2 @@ // NOTE: RootModelsContext is also initialized after the model class is declared in the '@ts-graphviz/core/register-default' module. | ||
createModelsContext, | ||
filter, | ||
isCompass, | ||
@@ -96,6 +64,4 @@ isForwardRefNode, | ||
isNodeRefLike, | ||
map, | ||
pipe, | ||
toNodeRef, | ||
toNodeRefGroup | ||
}; |
{ | ||
"name": "@ts-graphviz/common", | ||
"version": "2.1.4", | ||
"version": "2.1.5-next-d7ff421ec861ca8fdede1a6bdf256f3455fb9797", | ||
"description": "Graphviz Types and Utilities", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
216437
4054
1