lark-utils

Some utils for lark

Usage no npm install needed!

<script type="module">
  import larkUtils from 'https://cdn.skypack.dev/lark-utils';
</script>

README

lark-utils

Some utilities for Lark

NPM version build status Test coverage NPM downloads Node.js dependencies

install

$ npm install --save lark-utils

path

absolute

Get an absolute path

utils.path.absolute(path, basepath);

if path is already an absolute path, return that path. Or return the absolute path joined from path and basepath, while default value of basepath is the directory of process.mainModule.filename

basename

Get the basename of a path. This will detect extname automaitically

utils.path.basename('/foo/bar.js');  // ===> bar