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

ccdom

v0.0.31

Published

```coffeescript helper = require './helper' pop_msg_node = require './pop-node' R = require './r' yes_no = require './yes-no' ccdom = require 'ccdom' select_friends = require './select-friends'

Readme

주의사항: repeat에는 배열이 사용되는데, 배열의 element는 object여야함... 그래야 $index 속성이 추가됨.

주의사항2: scope간 prototype으로 상속이 이루어짐... 그래서 child scope에서 root scope의 객체를 액세스가 가능하지만, 대입하면 child scope만의 객체로서 만들어지고 root scope의 객체는 영향받지 않음

lobby scene example!!

modules

helper = require './helper'
pop_msg_node = require './pop-node'
R = require './r'
yes_no = require './yes-no'
ccdom = require 'ccdom'
select_friends = require './select-friends'

module.exports = (cb_remote) ->
	template =
		type: 'scene'
		controller: 'AppCtrl'
		children: [
			type: 'layer_color'
			controller: 'LayerCtrl'
			color: '{{this.white}}'
			children: [
				{
					# main title
					type: 'label'
					font_size: 75
					text: '알까기 게임...!'
					anchor: '0 0'
					color: '149 149 79 255'
				}
				{
					# announcments
					type: 'node'
					pos: '0 {{this.win_size.height}}'
					anchor: '0 1'
					repeat: {
						bind: 'item in ann_items'
						template: {
							type: 'label'
							font_size: 30
							text: '{{this.item.text}}'
							pos: '0 {{this.item.$index * -35}}'
							anchor: '0 1'
							color: '{{this.black}}'
						}
					}
				}
				{
					# main menu
					type: 'menu'
					pos: '{{this.win_size.width}} 0'
					anchor: '1 0'
					children: [
						{
							type: 'label_item'
							show: '{{this.conn}}'
							text: '친구와 한 판 한다'
							callback: '{{this.matchWithFriend}}'
							pos: '0 200'
							anchor: '1 0'
							color: '{{this.menu_color}}'
							font_size: 45
						}
						{
							type: 'label_item'
							text: '다른 게임을 한다'
							callback: '{{this.another_game}}'
							pos: '0 100'
							anchor: '1 0'
							color: '{{this.menu_color}}'
							font_size: 45
						}
						{
							type: 'label_item'
							text: '그만한다'
							callback: '{{this.end_game}}'
							pos: '0 0'
							anchor: '1 0'
							color: '{{this.menu_color}}'
							font_size: 45
						}
					]
				}
			]
		]

	ctrlers =
		AppCtrl: ($scope) ->
			$scope.font_name = 'Arial'
			$scope.win_size = director.getWinSize()
			$scope.black = '0 0 0 255'
			$scope.white = '255 255 255 255'
			$scope.menu_color = '73 62 32 255'
			$scope.conn = false
			$scope.ann_items = []
			$scope.end_game = ->
				director.end()
			$scope.another_game = ->
				__jsc__.selectGame()

		LayerCtrl: ($scope) ->
#			$scope.pop_node = pop_msg_node [$scope.win_size.width/2, $scope.win_size.height - 150]
#			@addChild $scope.pop_node
#			$scope.pop_node.push_msg (CurrentUser?.name or '아무개') + '님 반갑습니다'

			$scope.$watch 'this.conn', ->
				$scope.$update()
			$scope.$watch 'this.ann_items', ->
				$scope.$update()

			cb_remote (remote) ->
				$scope.$apply ->
					$scope.conn = true
					$scope.matchWithFriend = ->
						select_friends cb_remote, (res, friend_id) ->
							if res
								remote.req_match_with friend_id, (err) ->
									unless err
	#									pop_node.push_msg '대국이 곧 시작됩니다. 접속 중 입니다', 3
									else
	#									pop_node.push_msg err, 3

				remote.req_annouce (item) ->
					$scope.$apply ->
						$scope.ann_items.push item

	scene = ccdom template, ctrlers
	director.replaceScene scene

	scene.handlers = {}
	scene.handlers.req_match_with = ( user, cb ) ->
		yes_no user.name + '님이 대국을 원하십니다.', cb		
	
	scene