@!!!!!/walk-up 中文文档教程
What is this?
一个简单的函数,用于遍历文件目录直到找到某个文件。
JavaScript 版本:
npm install walk-up
const { walkUpUntil } = require("@!!!!!/walk_up")
let filepath = walkUpUntil("package.json")
Python 版本:
pip install walk-up
from walk_up import walk_up_until
filepath = walk_up_until("requirements.txt")
Ruby 版本:
gem install walk_up
require "walk_up"
require_relative walk_up_until("globals.rb") # <- will keep looking in parent directories for a "globals.rb" file
What is this?
A simple function for walking up a file directory until a certain file is found.
JavaScript version:
npm install walk-up
const { walkUpUntil } = require("@!!!!!/walk_up")
let filepath = walkUpUntil("package.json")
Python version:
pip install walk-up
from walk_up import walk_up_until
filepath = walk_up_until("requirements.txt")
Ruby version:
gem install walk_up
require "walk_up"
require_relative walk_up_until("globals.rb") # <- will keep looking in parent directories for a "globals.rb" file