Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TypeScript Array 拡張メソッド

License

NotificationsYou must be signed in to change notification settings

yasu-s/ts-array-ext

Repository files navigation

CI-test

Overview

A sample collection of TypeScript 's Array extension method.

System requirements

  • Node.js 14.x
  • TypeScript 4.5.x
  • jest 27.x (Unit Test)

Extension Method list

Array

Extension MethodTypeScript fileC# LINQOverview
select./src/ext/array/alias-linq.tsSelect Project each element of the array to a new array.
where./src/ext/array/alias-linq.tsWhere Extract the array under specified conditions.
all./src/ext/array/alias-linq.tsAll Determines whether all elements of the array satisfy the condition.
skip./src/ext/array/alias-linq.tsSkip Skips the specified number of elements from the beginning and returns the remaining array.
take./src/ext/array/alias-linq.tsTake Returns the specified number of elements from the beginning of the array.
any./src/ext/array/any.tsAny True if there is even one case that matches the condition
sum./src/ext/array/calc.tsSum Gets the total value of numeric array.
average./src/ext/array/calc.tsAverage Gets the average value of numeric array.
max./src/ext/array/calc.tsMax Get the maximum value of a numeric array.
min./src/ext/array/calc.tsMin Get the minimum value of a numeric array.
deepCopy./src/ext/array/deep-copy.ts- Deep copy the Array.
distinct./src/ext/array/distinct.tsDistinct Remove array duplication.
distinctBy./src/ext/array/distinct.ts- We will eliminate duplicates from arrays by comparing judgment targets.
equalTo./src/ext/array/equal-to.ts- True if the contents of the array are the same
first./src/ext/array/first.tsFirst Get the first data of the array.
last./src/ext/array/last.tsLast Get the last data of the array.
orderBy./src/ext/array/orderby.ts- Sort based on the specified sort item.
selectMany./src/ext/array/select-many.tsSelectMany Combine the values returned by callbackfn and return them as an array.
toLookup./src/ext/array/to-lookup.tsToLookup Convert array to Map<K, V[]>
toMap./src/ext/array/to-map.tsToMap Convert array to Map.
toSet./src/ext/array/to-set.ts-
zip./src/ext/array/zip.tsZip Applies one specified function to corresponding elements of two sequences, producing one sequence as a result.
trim./src/ext/array/trim.ts- Remove null or undefined in array.

Map

Extension MethodTypeScript fileOverview
toArray./src/ext/map/to-array.ts Convert Map to an Array.

Boolean

Extension MethodTypeScript fileOverview
toggle./src/ext/boolean/toggle.ts Toggle boolean true / false.

Object

Extension MethodTypeScript fileOverview
deepCopy./src/ext/object/deep-copy.ts Deep copy the Object.
equalTo./src/ext/object/equal-to.ts True if the contents of the object are the same.

About

TypeScript Array 拡張メソッド

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp