npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

temp-helper-linqjs

v0.3.2

Published

Array 프로토타입 확장 - LINQ 스타일 메서드

Downloads

23

Readme

helper-linqjs

JavaScript Array에 C# LINQ 스타일의 쿼리 메서드를 추가하는 라이브러리입니다.

설치

npm install helper-linqjs

사용

require('helper-linqjs');

[1, 2, 3, 4, 5]
  .Where(x => x > 2)
  .Select(x => x * 2)
  // [6, 8, 10]

지원되는 메서드

| 메서드 | 설명 | 반환값 | |--------|------|--------| | Where(predicate) | 조건을 만족하는 요소 필터링 | Array | | Select(selector) | 배열 변환 | Array | | Take(count) | 처음 N개 요소 추출 | Array | | Skip(count) | 처음 N개 요소 제외 | Array | | OrderBy(selector) | 오름차순 정렬 | Array | | OrderByDescending(selector) | 내림차순 정렬 | Array | | Distinct(selector) | 중복 제거 | Array | | GroupBy(selector) | 키로 그룹화 | Array | | Join(other, outerKey, innerKey, selector) | 배열 조인 | Array | | First(predicate) | 첫 번째 요소 | Any | | Last(predicate) | 마지막 요소 | Any | | Count(predicate) | 개수 | Number | | Any(predicate) | 조건을 만족하는 요소 있는지 확인 | Boolean | | All(predicate) | 모든 요소가 조건을 만족하는지 확인 | Boolean | | Sum(selector) | 합계 | Number | | Average(selector) | 평균 | Number | | Max(selector) | 최댓값 | Number | | Min(selector) | 최솟값 | Number | | Partition(predicate) | 조건에 따라 분할 | [Array, Array] |

메서드 상세 설명

Where

조건을 만족하는 요소 필터링

[1, 2, 3, 4].Where(x => x > 2) // [3, 4]

Select

배열 변환

[1, 2, 3].Select(x => x * 2) // [2, 4, 6]

Take

처음 N개 요소 추출

[1, 2, 3, 4, 5].Take(3) // [1, 2, 3]

Skip

처음 N개 요소 제외

[1, 2, 3, 4, 5].Skip(2) // [3, 4, 5]

OrderBy

오름차순 정렬

[3, 1, 2].OrderBy(x => x) // [1, 2, 3]

OrderByDescending

내림차순 정렬

[1, 2, 3].OrderByDescending(x => x) // [3, 2, 1]

Distinct

중복 제거

[1, 1, 2, 2, 3].Distinct() // [1, 2, 3]

GroupBy

키로 그룹화

[1, 2, 3, 4].GroupBy(x => x % 2)
// [{ key: 1, values: [1, 3] }, { key: 0, values: [2, 4] }]

Join

배열 조인

[1, 2].Join([2, 3], x => x, y => y, (x, y) => x + y)
// [4]

First

첫 번째 요소

[1, 2, 3].First() // 1
[1, 2, 3].First(x => x > 2) // 3

Last

마지막 요소

[1, 2, 3].Last() // 3
[1, 2, 3].Last(x => x < 3) // 2

Count

개수

[1, 2, 3, 4].Count() // 4
[1, 2, 3, 4].Count(x => x > 2) // 2

Any

조건을 만족하는 요소 있는지 확인

[1, 2, 3].Any(x => x > 2) // true

All

모든 요소가 조건을 만족하는지 확인

[1, 2, 3].All(x => x > 0) // true

Sum

합계

[1, 2, 3, 4].Sum() // 10

Average

평균

[1, 2, 3, 4].Average() // 2.5

Max

최댓값

[1, 2, 3, 4].Max() // 4

Min

최솟값

[1, 2, 3, 4].Min() // 1

Partition

조건에 따라 분할

[1, 2, 3, 4].Partition(x => x % 2 === 0)
// [[2, 4], [1, 3]]

예제

require('helper-linqjs');

const products = [
  { name: 'Laptop', price: 1000 },
  { name: 'Mouse', price: 25 },
  { name: 'Desk', price: 300 }
];

// 가격 100 이상인 상품을 가격순으로 정렬
const result = products
  .Where(p => p.price > 100)
  .OrderBy(p => p.price)
  .Select(p => p.name);

console.log(result); // ['Desk', 'Laptop']

npm deprecate [email protected] "라이센스 변경으로 더이상 사용 안함"