@antv/util
- Version 3.3.10
- Published
- 909 kB
- 3 dependencies
- MIT license
Install
npm i @antv/util
yarn add @antv/util
pnpm add @antv/util
Overview
> AntV 底层依赖的工具库,不建议在自己业务中使用。
Index
Variables
Functions
- angleTo()
- arcToCubic()
- assign()
- augment()
- clamp()
- clearAnimationFrame()
- clone()
- clonePath()
- contains()
- createDOM()
- debounce()
- deepMix()
- difference()
- direction()
- distanceSquareRoot()
- each()
- endsWith()
- equalizeSegments()
- every()
- extend()
- filter()
- find()
- findIndex()
- firstValue()
- fixedBase()
- flatten()
- flattenDeep()
- forIn()
- get()
- getDrawDirection()
- getPathArea()
- getPathBBox()
- getPathBBoxTotalLength()
- getPointAtLength()
- getRange()
- getRotatedCurve()
- getTotalLength()
- getType()
- getWrapBehavior()
- gradient()
- group()
- groupBy()
- groupToMap()
- has()
- hasKey()
- hasValue()
- head()
- identity()
- includes()
- indexOf()
- isArguments()
- isArray()
- isArrayLike()
- isBoolean()
- isDate()
- isDecimal()
- isElement()
- isEmpty()
- isEqual()
- isEqualWith()
- isError()
- isEven()
- isFinite()
- isFunction()
- isInteger()
- isMatch()
- isNegative()
- isNil()
- isNull()
- isNumber()
- isNumberEqual()
- isObject()
- isObjectLike()
- isOdd()
- isPlainObject()
- isPointInPolygon()
- isPointInStroke()
- isPolygonsIntersect()
- isPositive()
- isPrototype()
- isRegExp()
- isString()
- isType()
- isUndefined()
- keys()
- last()
- lowerCase()
- lowerFirst()
- map()
- mapValues()
- max()
- maxBy()
- memoize()
- min()
- minBy()
- mix()
- mod()
- modifyCSS()
- noop()
- normalizePath()
- number2color()
- omit()
- parseRadius()
- path2Absolute()
- path2Array()
- path2Curve()
- path2String()
- pick()
- pull()
- pullAt()
- reduce()
- remove()
- requestAnimationFrame()
- reverseCurve()
- rgb2arr()
- set()
- size()
- some()
- sortBy()
- startsWith()
- substitute()
- throttle()
- toArray()
- toCSSGradient()
- toDegree()
- toInteger()
- toRadian()
- toString()
- transform()
- union()
- uniq()
- uniqueId()
- upperCase()
- upperFirst()
- values()
- valuesOfKey()
- vertical()
- wrapBehavior()
Classes
Interfaces
Type Aliases
- AbsoluteArray
- AbsoluteCommand
- AbsoluteSegment
- aCommand
- ACommand
- ArcSegment
- aSegment
- ASegment
- cCommand
- CCommand
- CloseSegment
- cSegment
- CSegment
- CubicSegment
- CurveArray
- hCommand
- HCommand
- HorLineSegment
- hSegment
- HSegment
- lCommand
- LCommand
- LineSegment
- lSegment
- LSegment
- mCommand
- MCommand
- MoveSegment
- mSegment
- MSegment
- NormalArray
- NormalSegment
- PathArray
- PathCommand
- PathSegment
- Point
- PolygonArray
- PolylineArray
- qCommand
- QCommand
- qSegment
- QSegment
- QuadSegment
- RelativeArray
- RelativeCommand
- RelativeSegment
- sCommand
- SCommand
- ShortCubicSegment
- ShortQuadSegment
- ShortSegment
- sSegment
- SSegment
- tCommand
- TCommand
- tSegment
- TSegment
- vCommand
- VCommand
- VertLineSegment
- vSegment
- VSegment
- zCommand
- ZCommand
- zSegment
- ZSegment
Variables
variable toRGB
const toRGB: (color: string) => string;
export with memoize.
Parameter color
Returns
Functions
function angleTo
angleTo: ( v1: [number, number], v2: [number, number], direct?: boolean) => number;
二维向量 v1 到 v2 的夹角
Parameter v1
Parameter v2
Parameter direct
function arcToCubic
arcToCubic: ( X1: number, Y1: number, RX: number, RY: number, angle: number, LAF: number, SF: number, X2: number, Y2: number, recursive: number[]) => any[];
Converts A (arc-to) segments to C (cubic-bezier-to).
For more information of where this math came from visit: http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
function assign
assign: <Base, A, B, C>( dist: Base & A & B & C, src1?: A, src2?: B, src3?: C) => Base & A & B & C;
function augment
augment: (...args: any[]) => void;
function clamp
clamp: (a: number, min: number, max: number) => number;
function clearAnimationFrame
clearAnimationFrame: (handler: number) => void;
function clone
clone: (obj: any) => any;
function clonePath
clonePath: (path: PathArray | PathSegment) => PathArray;
function contains
contains: (arr: any[], value: any) => boolean;
function createDOM
createDOM: (str: string) => HTMLElement;
Create DOM from a html string.
Parameter str
Returns
function debounce
debounce: (func: Function, wait?: number, immediate?: boolean) => () => void;
function deepMix
deepMix: (rst: any, ...args: any[]) => any;
function difference
difference: <T>(arr: T[], values?: T[]) => T[];
Flattens
array
a single level deep.Parameter arr
The array to inspect.
Parameter values
The values to exclude. {Array} Returns the new array of filtered values.
Example 1
difference([2, 1], [2, 3]); // => [1]
function direction
direction: (v1: number[], v2: number[]) => number;
向量 v1 到 向量 v2 夹角的方向
Parameter v1
向量
Parameter v2
向量 {Boolean} >= 0 顺时针 < 0 逆时针
function distanceSquareRoot
distanceSquareRoot: (a: [number, number], b: [number, number]) => number;
function each
each: (elements: any[] | object, func: (v: any, k: any) => any) => void;
function endsWith
endsWith: { (arr: string, e: string): boolean; <T>(arr: T[], e: T): boolean };
function equalizeSegments
equalizeSegments: ( path1: PathArray, path2: PathArray, TL?: number) => CurveArray[];
function every
every: <T>(arr: T[], func: (v: T, idx?: number) => any) => boolean;
只要有一个不满足条件就返回 false
Parameter arr
Parameter func
function extend
extend: ( subclass: any, superclass: any, overrides?: any, staticOverrides?: any) => any;
function filter
filter: <T>(arr: T[], func: (v: T, idx: number) => boolean) => T[];
function find
find: { <T>(arr: T[], predicate: Function): T; <T>(arr: T[], predicate: object): T;};
function findIndex
findIndex: <T>( arr: T[], predicate: (item: T, idx?: number) => boolean, fromIndex?: number) => number;
function firstValue
firstValue: (data: object[], name: string) => any;
function fixedBase
fixedBase: (v: number, base: number | string) => number;
function flatten
flatten: <T>(arr: T[]) => T[];
Flattens
array
a single level deep.Parameter arr
The array to flatten. {Array} Returns the new flattened array.
Example 1
flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]
function flattenDeep
flattenDeep: (arr: any[], result?: any[]) => any[];
Flattens
array
a single level deep.Parameter arr
The array to flatten.
Parameter result
The array to return. {Array} Returns the new flattened array.
Example 1
flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]
function forIn
forIn: (elements: any[] | object, func: (v: any, k: any) => any) => void;
function get
get: (obj: any, key: string | any[], defaultValue?: any) => any;
https://github.com/developit/dlv/blob/master/index.js
Parameter obj
Parameter key
Parameter defaultValue
function getDrawDirection
getDrawDirection: (pathArray: PathArray) => boolean;
function getPathArea
getPathArea: (path: PathArray) => number;
Returns the area of a shape. Jürg Lehni & Jonathan Puckey
See Also
https://github.com/paperjs/paper.js/blob/develop/src/path/Path.js
function getPathBBox
getPathBBox: ( path: string | PathArray, options?: Partial<PathLengthFactoryOptions>) => PathBBox;
Returns the bounding box of a shape.
function getPathBBoxTotalLength
getPathBBoxTotalLength: ( path: PathArray, options?: Partial<PathLengthFactoryOptions>) => PathBBoxTotalLength;
Returns the bounding box of a shape.
function getPointAtLength
getPointAtLength: ( pathInput: string | PathArray, distance: number, options?: Partial<PathLengthFactoryOptions>) => import('../types').Point;
Returns [x,y] coordinates of a point at a given length of a shape.
function getRange
getRange: (values: number[]) => RangeType;
function getRotatedCurve
getRotatedCurve: ( a: CurveArray, b: CurveArray) => (string[] | import('../types').MSegment | import('../types').CSegment)[];
function getTotalLength
getTotalLength: ( pathInput: string | PathArray, options?: Partial<PathLengthFactoryOptions>) => number;
Returns the shape total length, or the equivalent to
shape.getTotalLength()
.The
normalizePath
version is lighter, faster, more efficient and more accurate with paths that are notcurveArray
.
function getType
getType: (value: any) => string;
function getWrapBehavior
getWrapBehavior: (obj: object, action: string) => Function;
获取封装的事件
Parameter obj
对象
Parameter action
事件名称 {Function} 返回事件处理函数
function gradient
gradient: (colors: string | string[]) => (percent: number) => string;
获取渐变函数
Parameter colors
多个颜色 颜色值
function group
group: <T>( data: T[], condition: string | string[] | ((v: T) => string)) => T[][];
function groupBy
groupBy: { <T>(data: T[], condition: (item: T) => string): ObjectType<T>; <T>(data: T[], condition: string): ObjectType<T>;};
function groupToMap
groupToMap: ( data: any, condition: string | string[] | ((row: any) => string)) => import('./group-by').ObjectType<any> | { 0: any };
将数据分组成 map
Parameter data
Parameter condition
function has
has: (obj: object, key: any) => boolean;
function hasKey
hasKey: (obj: object, key: any) => boolean;
function hasValue
hasValue: (obj: object, value: any) => boolean;
function head
head: (o: unknown) => any;
function identity
identity: <T>(v: T) => T;
function includes
includes: (arr: any[], value: any) => boolean;
function indexOf
indexOf: <T>(arr: T[], obj: T) => number;
function isArguments
isArguments: (value: any) => boolean;
function isArray
isArray: (value: unknown) => value is any[];
判断值是否为数组 是否为数组
function isArrayLike
isArrayLike: (value: any) => boolean;
function isBoolean
isBoolean: (value: any) => value is boolean;
function isDate
isDate: (value: unknown) => value is Date;
判断值是否为 Date 是否为 Date
function isDecimal
isDecimal: (num: unknown) => boolean;
判断值是否为小数 是否为小数
function isElement
isElement: (value: unknown) => value is Element | Document;
判断值是否为 HTML Element 或 Document 是否为 HTML Element 或 Document
function isEmpty
isEmpty: (value: any) => boolean;
function isEqual
isEqual: (value: any, other: any) => boolean;
function isEqualWith
isEqualWith: <T>(value: T, other: T, fn: (v1: T, v2: T) => boolean) => boolean;
Parameter value
The value to compare.
Parameter other
The other value to compare.
Parameter fn
The function to customize comparisons.
Returns
{boolean} Returns
true
if the values are equivalent, elsefalse
.Example 1
function isGreeting(value) { return /^h(?:i|ello)$/.test(value); }
function customizer(objValue, othValue) { if (isGreeting(objValue) && isGreeting(othValue)) { return true; } }
var array = ['hello', 'goodbye']; var other = ['hi', 'goodbye'];
isEqualWith(array, other, customizer); // => true
function isError
isError: (value: any) => value is Error;
function isEven
isEven: (num: number) => boolean;
判断值是否为偶数 是否为偶数
function isFinite
isFinite: (value: number) => boolean;
判断值是否为有限数 是否为有限数
function isFunction
isFunction: (value: unknown) => value is Function;
判断值是否为函数 是否为函数
function isInteger
isInteger: (value: number) => boolean;
判断值是否为整数 是否为整数
function isMatch
isMatch: (obj: any, attrs: any) => boolean;
function isNegative
isNegative: (num: number) => boolean;
判断值是否为负数 是否为负数
function isNil
isNil: (value: unknown) => value is null;
判断值是否为 null 或 undefined 是否为 null 或 undefined
function isNull
isNull: (value: unknown) => value is null;
判断值是否为 null 是否为 null
function isNumber
isNumber: (value: unknown) => value is number;
判断值是否为数字 是否为数字
function isNumberEqual
isNumberEqual: (a: number, b: number, precision?: number) => boolean;
判断两个数是否相等 是否相等
function isObject
isObject: <T = object>(value: any) => value is T;
function isObjectLike
isObjectLike: (value: any) => value is object;
function isOdd
isOdd: (num: number) => boolean;
判断值是否为奇数 是否为奇数
function isPlainObject
isPlainObject: (value: any) => value is object;
function isPointInPolygon
isPointInPolygon: (points: number[][], x: number, y: number) => boolean;
function isPointInStroke
isPointInStroke: (pathInput: string | PathArray, point: Point) => boolean;
Checks if a given point is in the stroke of a path.
function isPolygonsIntersect
isPolygonsIntersect: (points1: number[][], points2: number[][]) => boolean;
See Also
https://stackoverflow.com/questions/753140/how-do-i-determine-if-two-convex-polygons-intersect
function isPositive
isPositive: (num: any) => boolean;
function isPrototype
isPrototype: (value: any) => boolean;
function isRegExp
isRegExp: (str: any) => str is RegExp;
function isString
isString: (value: unknown) => value is string;
判断值是否为字符串 是否为字符串
function isType
isType: (value: any, type: string) => boolean;
function isUndefined
isUndefined: (value: any) => value is undefined;
function keys
keys: (obj: any) => any[];
function last
last: (o: unknown) => any;
function lowerCase
lowerCase: (str: string) => string;
function lowerFirst
lowerFirst: (value: string) => string;
function map
map: <T, G>(arr: T[], func: (v: T, idx: number) => G) => G[];
function mapValues
mapValues: <T>( object: { [key: string]: T }, func?: (value: T, key: string) => any) => { [key: string]: any };
function max
max: (arr: number[]) => number;
计算数组的最大值
Parameter arr
数组 最大值
function maxBy
maxBy: <T>(arr: T[], fn: string | ((v: T) => number)) => T;
Parameter arr
The array to iterate over.
Parameter fn
The iteratee invoked per element. {*} Returns the maximum value.
Example 1
var objects = [{ 'n': 1 }, { 'n': 2 }];
maxBy(objects, function(o) { return o.n; }); // => { 'n': 2 }
maxBy(objects, 'n'); // => { 'n': 2 }
function memoize
memoize: <T extends Function>( fn: T, resolver?: (...args: any[]) => string, maxSize?: number) => T;
缓存函数的计算结果,避免重复计算
Parameter fn
缓存的函数
Parameter resolver
生成缓存 key 的函数
Parameter maxSize
lru 缓存的大小
Example 1
_.memoize(calColor); _.memoize(calColor, (...args) => args[0]);
function min
min: (arr: number[]) => number | undefined;
Parameter arr
The array to iterate over. {*} Returns the minimum value.
Example 1
min([1, 2]); // => 1
min([]); // => undefined
const data = new Array(1250010).fill(1).map((d,idx) => idx);
min(data); // => 1250010 // Math.min(...data) will encounter "Maximum call stack size exceeded" error
function minBy
minBy: <T>(arr: T[], fn: string | ((v: T) => number)) => T;
Parameter arr
The array to iterate over.
Parameter fn
The iteratee invoked per element. {*} Returns the minimum value.
Example 1
var objects = [{ 'n': 1 }, { 'n': 2 }];
minBy(objects, function(o) { return o.n; }); // => { 'n': 1 }
minBy(objects, 'n'); // => { 'n': 1 }
function mix
mix: <Base, A, B, C>( dist: Base & A & B & C, src1?: A, src2?: B, src3?: C) => Base & A & B & C;
function mod
mod: (n: number, m: number) => number;
function modifyCSS
modifyCSS: ( dom: HTMLElement | null | undefined, css: { [key: string]: any }) => HTMLElement;
Modify the CSS of a DOM.
Parameter dom
Parameter css
Returns
function noop
noop: () => void;
function normalizePath
normalizePath: (pathInput: string | PathArray) => NormalArray;
Example 1
const path = 'M0 0 H50'; const normalizedPath = SVGPathCommander.normalizePath(path); // result => [['M', 0, 0], ['L', 50, 0]]
function number2color
number2color: (num: number) => string;
function omit
omit: <T>(obj: ObjectType<T>, keys: string[]) => ObjectType<T>;
function parseRadius
parseRadius: { (radius: number): RadiusType; (radius: number[]): RadiusType };
function path2Absolute
path2Absolute: (pathInput: string | PathArray) => AbsoluteArray;
function path2Array
path2Array: (pathInput: string) => PathArray;
function path2Curve
path2Curve: ( pathInput: string | PathArray, needZCommandIndexes?: boolean) => CurveArray | [CurveArray, number[]];
function path2String
path2String: (path: PathArray, round?: number | 'off') => string;
Returns a valid
d
attribute string value created by rounding values and concatenating thepathArray
segments.
function pick
pick: <T>(object: ObjectType<T>, keys: string[]) => ObjectType<T>;
function pull
pull: <T>(arr: T[], ...values: any[]) => T[];
function pullAt
pullAt: <T>(arr: T[], indexes: number[]) => T[];
function reduce
reduce: <T, G>( arr: G[] | ObjectType<T>, fn: (result: T, data: G, idx: string | number) => T, init: T) => T;
function remove
remove: <T>( arr: T[], predicate: (value: T, idx: number, arr?: T[]) => boolean) => T[];
function requestAnimationFrame
requestAnimationFrame: (fn: FrameRequestCallback) => any;
function reverseCurve
reverseCurve: (pathArray: CurveArray) => CurveArray;
function rgb2arr
rgb2arr: (str: string) => number[];
rgb 颜色转换成数组
Parameter str
Returns
function set
set: (obj: any, path: string | any[], value: any) => any;
https://github.com/developit/dlv/blob/master/index.js
Parameter obj
Parameter path
Parameter value
function size
size: (o: unknown) => number;
function some
some: <T>(arr: T[], func: (v: T, idx?: number) => any) => boolean;
只要有一个满足条件就返回 true
Parameter arr
Parameter func
function sortBy
sortBy: { <T>(arr: ObjectType<T>[], key: Function): ObjectType<T>[]; <T>(arr: ObjectType<T>[], key: string): ObjectType<T>[]; <T>(arr: ObjectType<T>[], key: string[]): ObjectType<T>[];};
function startsWith
startsWith: { (arr: string, e: string): boolean; <T>(arr: T[], e: T): boolean };
function substitute
substitute: <T>(str: string, o: ObjectType<T>) => string;
function throttle
throttle: (func: Function, wait: number, options: OptionsType) => Function;
function toArray
toArray: (value: any) => any[];
function toCSSGradient
toCSSGradient: (gradientColor: any) => any;
function toDegree
toDegree: (radian: number) => number;
function toInteger
toInteger: (string: string, radix?: number) => number;
function toRadian
toRadian: (degree: number) => number;
function toString
toString: (value: any) => string;
function transform
transform: (m: number[], actions: any[][]) => any[];
根据 actions 来做 transform
Parameter m
Parameter actions
function union
union: (...sources: any[]) => any[];
function uniq
uniq: (arr: any[], cache?: Map<any, any>) => any[];
function uniqueId
uniqueId: (prefix?: string) => string;
function upperCase
upperCase: (str: string) => string;
function upperFirst
upperFirst: (value: string) => string;
function values
values: (obj: any) => any[];
function valuesOfKey
valuesOfKey: (data: any[], name: string) => any[];
function vertical
vertical: (out: number[], v: number[], flag: boolean) => number[];
计算二维向量的垂直向量
Parameter out
Parameter v
Parameter flag
function wrapBehavior
wrapBehavior: (obj: object, action: string) => Function;
封装事件,便于使用上下文this,和便于解除事件时使用
Parameter obj
对象
Parameter action
事件名称 {Function} 返回事件处理函数
Classes
class Cache
class<T> {}
k-v 存储
Interfaces
interface LengthFactory
interface LengthFactory {}
interface ParserParams
interface ParserParams {}
interface PathBBox
interface PathBBox {}
interface PathBBoxTotalLength
interface PathBBoxTotalLength extends PathBBox {}
property length
length: number;
interface PathLengthFactoryOptions
interface PathLengthFactoryOptions {}
interface PointProperties
interface PointProperties {}
interface SegmentLimits
interface SegmentLimits {}
interface SegmentProperties
interface SegmentProperties {}
property index
index: number;
the segment index
property length
length: number;
the segment length
property lengthAtSegment
lengthAtSegment: number;
the length including the segment length
property segment
segment: PathSegment;
the segment
index signature
[key: string]: any;
Type Aliases
type AbsoluteArray
type AbsoluteArray = [MSegment, ...AbsoluteSegment[]];
type AbsoluteCommand
type AbsoluteCommand = | MCommand | LCommand | VCommand | HCommand | ZCommand | CCommand | SCommand | QCommand | TCommand | ACommand;
type AbsoluteSegment
type AbsoluteSegment = | MSegment | LSegment | VSegment | HSegment | CSegment | SSegment | QSegment | TSegment | ASegment | ZSegment;
type aCommand
type aCommand = 'a';
type ACommand
type ACommand = 'A';
type ArcSegment
type ArcSegment = ASegment | aSegment;
type aSegment
type aSegment = [aCommand, number, number, number, number, number, number, number];
type ASegment
type ASegment = [ACommand, number, number, number, number, number, number, number];
type cCommand
type cCommand = 'c';
type CCommand
type CCommand = 'C';
type CloseSegment
type CloseSegment = ZSegment | zSegment;
type cSegment
type cSegment = [cCommand, number, number, number, number, number, number];
type CSegment
type CSegment = [CCommand, number, number, number, number, number, number];
type CubicSegment
type CubicSegment = CSegment | cSegment;
type CurveArray
type CurveArray = [MSegment, ...CSegment[]];
type hCommand
type hCommand = 'h';
type HCommand
type HCommand = 'H';
type HorLineSegment
type HorLineSegment = HSegment | hSegment;
type hSegment
type hSegment = [hCommand, number];
type HSegment
type HSegment = [HCommand, number];
type lCommand
type lCommand = 'l';
type LCommand
type LCommand = 'L';
type LineSegment
type LineSegment = LSegment | lSegment;
type lSegment
type lSegment = [lCommand, number, number];
type LSegment
type LSegment = [LCommand, number, number];
type mCommand
type mCommand = 'm';
type MCommand
type MCommand = 'M';
type MoveSegment
type MoveSegment = MSegment | mSegment;
type mSegment
type mSegment = [mCommand, number, number];
type MSegment
type MSegment = [MCommand, number, number];
type NormalArray
type NormalArray = [MSegment, ...NormalSegment[]];
type NormalSegment
type NormalSegment = MSegment | LSegment | CSegment | QSegment | ASegment | ZSegment;
type PathArray
type PathArray = [MSegment | mSegment, ...PathSegment[]];
type PathCommand
type PathCommand = AbsoluteCommand | RelativeCommand;
type PathSegment
type PathSegment = | MoveSegment | LineSegment | VertLineSegment | HorLineSegment | CloseSegment | CubicSegment | ShortCubicSegment | QuadSegment | ShortQuadSegment | ArcSegment;
type Point
type Point = { x: number; y: number;};
type PolygonArray
type PolygonArray = [MSegment, ...LSegment[], ZSegment];
type PolylineArray
type PolylineArray = [MSegment, ...LSegment[]];
type qCommand
type qCommand = 'q';
type QCommand
type QCommand = 'Q';
type qSegment
type qSegment = [qCommand, number, number, number, number];
type QSegment
type QSegment = [QCommand, number, number, number, number];
type QuadSegment
type QuadSegment = QSegment | qSegment;
type RelativeArray
type RelativeArray = [MSegment, ...RelativeSegment[]];
type RelativeCommand
type RelativeCommand = | mCommand | lCommand | vCommand | hCommand | zCommand | cCommand | sCommand | qCommand | tCommand | aCommand;
type RelativeSegment
type RelativeSegment = | mSegment | lSegment | vSegment | hSegment | cSegment | sSegment | qSegment | tSegment | aSegment | zSegment;
type sCommand
type sCommand = 's';
type SCommand
type SCommand = 'S';
type ShortCubicSegment
type ShortCubicSegment = SSegment | sSegment;
type ShortQuadSegment
type ShortQuadSegment = TSegment | tSegment;
type ShortSegment
type ShortSegment = | VertLineSegment | HorLineSegment | ShortCubicSegment | ShortQuadSegment | CloseSegment;
type sSegment
type sSegment = [sCommand, number, number, number, number];
type SSegment
type SSegment = [SCommand, number, number, number, number];
type tCommand
type tCommand = 't';
type TCommand
type TCommand = 'T';
type tSegment
type tSegment = [tCommand, number, number];
type TSegment
type TSegment = [TCommand, number, number];
type vCommand
type vCommand = 'v';
type VCommand
type VCommand = 'V';
type VertLineSegment
type VertLineSegment = vSegment | VSegment;
type vSegment
type vSegment = [vCommand, number];
type VSegment
type VSegment = [VCommand, number];
type zCommand
type zCommand = 'z';
type ZCommand
type ZCommand = 'Z';
type zSegment
type zSegment = [zCommand];
type ZSegment
type ZSegment = [ZCommand];
Package Files (138)
- lib/color/gradient.d.ts
- lib/color/rgb2arr.d.ts
- lib/color/tocssgradient.d.ts
- lib/color/torgb.d.ts
- lib/dom/create-dom.d.ts
- lib/dom/modify-css.d.ts
- lib/index.d.ts
- lib/lodash/augment.d.ts
- lib/lodash/cache.d.ts
- lib/lodash/clamp.d.ts
- lib/lodash/clear-animation-frame.d.ts
- lib/lodash/clone.d.ts
- lib/lodash/contains.d.ts
- lib/lodash/debounce.d.ts
- lib/lodash/deep-mix.d.ts
- lib/lodash/difference.d.ts
- lib/lodash/each.d.ts
- lib/lodash/ends-with.d.ts
- lib/lodash/every.d.ts
- lib/lodash/extend.d.ts
- lib/lodash/filter.d.ts
- lib/lodash/find-index.d.ts
- lib/lodash/find.d.ts
- lib/lodash/first-value.d.ts
- lib/lodash/fixed-base.d.ts
- lib/lodash/flatten-deep.d.ts
- lib/lodash/flatten.d.ts
- lib/lodash/get-range.d.ts
- lib/lodash/get-type.d.ts
- lib/lodash/get-wrap-behavior.d.ts
- lib/lodash/get.d.ts
- lib/lodash/group-by.d.ts
- lib/lodash/group-to-map.d.ts
- lib/lodash/group.d.ts
- lib/lodash/has-value.d.ts
- lib/lodash/has.d.ts
- lib/lodash/head.d.ts
- lib/lodash/identity.d.ts
- lib/lodash/index-of.d.ts
- lib/lodash/is-arguments.d.ts
- lib/lodash/is-array-like.d.ts
- lib/lodash/is-array.d.ts
- lib/lodash/is-boolean.d.ts
- lib/lodash/is-date.d.ts
- lib/lodash/is-decimal.d.ts
- lib/lodash/is-element.d.ts
- lib/lodash/is-empty.d.ts
- lib/lodash/is-equal-with.d.ts
- lib/lodash/is-equal.d.ts
- lib/lodash/is-error.d.ts
- lib/lodash/is-even.d.ts
- lib/lodash/is-finite.d.ts
- lib/lodash/is-function.d.ts
- lib/lodash/is-integer.d.ts
- lib/lodash/is-match.d.ts
- lib/lodash/is-negative.d.ts
- lib/lodash/is-nil.d.ts
- lib/lodash/is-null.d.ts
- lib/lodash/is-number-equal.d.ts
- lib/lodash/is-number.d.ts
- lib/lodash/is-object-like.d.ts
- lib/lodash/is-object.d.ts
- lib/lodash/is-odd.d.ts
- lib/lodash/is-plain-object.d.ts
- lib/lodash/is-positive.d.ts
- lib/lodash/is-prototype.d.ts
- lib/lodash/is-reg-exp.d.ts
- lib/lodash/is-string.d.ts
- lib/lodash/is-type.d.ts
- lib/lodash/is-undefined.d.ts
- lib/lodash/keys.d.ts
- lib/lodash/last.d.ts
- lib/lodash/lower-case.d.ts
- lib/lodash/lower-first.d.ts
- lib/lodash/map-values.d.ts
- lib/lodash/map.d.ts
- lib/lodash/max-by.d.ts
- lib/lodash/max.d.ts
- lib/lodash/memoize.d.ts
- lib/lodash/min-by.d.ts
- lib/lodash/min.d.ts
- lib/lodash/mix.d.ts
- lib/lodash/mod.d.ts
- lib/lodash/noop.d.ts
- lib/lodash/number2color.d.ts
- lib/lodash/omit.d.ts
- lib/lodash/parse-radius.d.ts
- lib/lodash/pick.d.ts
- lib/lodash/pull-at.d.ts
- lib/lodash/pull.d.ts
- lib/lodash/reduce.d.ts
- lib/lodash/remove.d.ts
- lib/lodash/request-animation-frame.d.ts
- lib/lodash/set.d.ts
- lib/lodash/size.d.ts
- lib/lodash/some.d.ts
- lib/lodash/sort-by.d.ts
- lib/lodash/starts-with.d.ts
- lib/lodash/substitute.d.ts
- lib/lodash/throttle.d.ts
- lib/lodash/to-array.d.ts
- lib/lodash/to-degree.d.ts
- lib/lodash/to-radian.d.ts
- lib/lodash/to-string.d.ts
- lib/lodash/union.d.ts
- lib/lodash/uniq.d.ts
- lib/lodash/unique-id.d.ts
- lib/lodash/upper-case.d.ts
- lib/lodash/upper-first.d.ts
- lib/lodash/values-of-key.d.ts
- lib/lodash/values.d.ts
- lib/lodash/wrap-behavior.d.ts
- lib/math/is-point-in-polygon.d.ts
- lib/math/is-polygons-intersect.d.ts
- lib/matrix/angle-to.d.ts
- lib/matrix/direction.d.ts
- lib/matrix/transform.d.ts
- lib/matrix/vertical.d.ts
- lib/path/convert/path-2-absolute.d.ts
- lib/path/convert/path-2-array.d.ts
- lib/path/convert/path-2-curve.d.ts
- lib/path/convert/path-2-string.d.ts
- lib/path/process/arc-2-cubic.d.ts
- lib/path/process/clone-path.d.ts
- lib/path/process/normalize-path.d.ts
- lib/path/process/reverse-curve.d.ts
- lib/path/types.d.ts
- lib/path/util/distance-square-root.d.ts
- lib/path/util/equalize-segments.d.ts
- lib/path/util/get-draw-direction.d.ts
- lib/path/util/get-path-area.d.ts
- lib/path/util/get-path-bbox-total-length.d.ts
- lib/path/util/get-path-bbox.d.ts
- lib/path/util/get-point-at-length.d.ts
- lib/path/util/get-rotated-curve.d.ts
- lib/path/util/get-total-length.d.ts
- lib/path/util/is-point-in-stroke.d.ts
- node_modules/typescript/lib/lib.es5.d.ts
Dependencies (3)
Dev Dependencies (25)
- @antv/path-util
- @commitlint/cli
- @commitlint/config-conventional
- @rollup/plugin-commonjs
- @rollup/plugin-node-resolve
- @rollup/plugin-terser
- @rollup/plugin-typescript
- @types/jest
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- benchmark
- eslint
- eslint-plugin-import
- husky
- jest
- jest-environment-jsdom
- jsdom
- limit-size
- lint-staged
- npm-run-all
- prettier
- rimraf
- rollup
- ts-jest
- typescript
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@antv/util
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@antv/util)
- HTML<a href="https://www.jsdocs.io/package/@antv/util"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 5812 ms. - Missing or incorrect documentation? Open an issue for this package.