Giter Club home page Giter Club logo

fn's Introduction

Fn

不需要考虑 JavaScript 模块区别,命令行直接调用 JavaScript 文件内部函数(主要用于函数式编程的项目)

# enter function env
fn

# test function
print('foo')

# exit fn env
exit

和 node -e / babel-node -e 类似

但是 do 想做的事情主要是帮助开发者做到环境无关。

在实际的开发中,有时候我们得到了入参,想快速验证函数返回值是否符合预期会用到类似的能力

  • 向上寻找JavaScript文件最近的package.json作为根目录
  • 处理不同模块语法
  • 全局缓存代码快照(主要用于提高下次调用的速度,文件级缓存)
# 在JavaScript项目中运行,将会自动分析项目中所有可执行的函数
fn add

# 列出所有已添加的JavaScript项目
fn list

# 进入项目
fn <project-name>

call> foo('xxx')

fn's People

Contributors

nemo-shen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.