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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bluemind/knitjs

v1.0.0

Published

An Javascript library for AOP(Aspect Oriented Programming)

Downloads

1

Readme

knitjs

Why面向切面编程AOP

在编写业务代码的时候,我们常常需要加入日志输出、统计数据、性能监控、权限过滤、安全检查等逻辑,这些逻辑不是垂直的业务逻辑,而是公共基础的设施。如果把它们混合写到业务代码中,就违反了单一指责和关注点分离原则,业务增多之后,会存在大量的重复代码。
要实现这些公共基础逻辑与业务逻辑的解耦,我们可以用面向切面的编程思想。如果一个程序是一个管道系统,AOP 就是在管道上钻一些孔, 在每个孔中注入新的代码流。实现AOP的关键就是将切面的逻辑嵌入到主体的业务程序之中。

AOP的编程模型

  • 接入点(JointPoint。程序执行过程中特定的点,一般是方法调用
  • 增强处理(Advice)。定义针对连接点所做的增强处理,定义了“是什么”(增强处理的内容)以及“何时”(前置、后置、返回、异常、环绕);
  • 目标对象(Target)。被增强处理的对象