New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@lcsoft/utils

Package Overview
Dependencies
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lcsoft/utils

龙创前端团队工具方法库

latest
npmnpm
Version
2.1.3
Version published
Maintainers
4
Created
Source

龙创前端团队PC端工具方法库

工具方法或封装的类

使用方式(以formatDate方法做示例)

  • 安装组件库npm i @lcsoft/utils

  • 引入需要的方法或类

    import { formatDate } from '@lcsoft/utils'

  • 参照每个方法或类的说明文档合理使用

    var today = formatDate(Date.now(), yyyy-MM-dd)

发布新方法或类

  • lib目录下建一个以方法名或类名命名的js文件(方法名使用小驼峰,类名使用大驼峰)

  • 在lib目录下的index.js统一导出你的方法或类,并添加简答的说明和作者以明确作用和责任

    import formatDate from './formatDate' // 时间格式化-郑
    
    export {
        formatDate
    }
    
  • package.json中修改版本号。

    "version": "x.y.z"

  • 运行npm publish --access=public 发布

    发布之前请先将自己的库更新到最新版本

版本维护

如果npm发布新版本,各位小伙伴的注册邮箱应该会收到通知,请及时在自己的项目中执行npm updatenpm i @lcsoft/utils更新依赖,保持团队依赖同步

使用技巧

如果你不放心自己添加的方法或类是否正确可用,你完全可以先进入自己项目的node_modules目录下,找到@lcsoft目录,在那里面修改或者添加,如果你在运行自己的项目时 完全OK,那么放心的npm publish吧。

Keywords

lcsoft

FAQs

Package last updated on 05 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts