New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

npm-package-example-2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-package-example-2

A good npm package

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm-package-example

Um exemplo de como criar um bom pacote para o NPM.

Transform a string between camelCase, PascalCase, Capital Case, snake_case, kebab-case and CONSTANT_CASE.

npm npm npm bundle size Module system npm type definitions

Tests Coveralls Code quality

Objetivos

  • Permitir tree-shaking
  • Usar TypeScript
  • Usar o eslint e o prettier
  • Testar o pacote usando o Jest
  • Publicar no NPM
  • Automatização
    • Executar os testes em pull-requests
    • Gerar uma release no github automaticamente com o changelog
    • Publicar uma nova versão da documentação quando modificar a pasta "docs"
  • Escrever um bom README
  • Criar um site de documentação

Installation

npm install npm-package-example-2 --save
yarn add npm-package-example-2

Usage

import kebabCase from 'npm-package-example-2/kebabCase'

kebabCase('Hello world') // => hello-world

It's also possible to use this package directly in the browser without any build tools.

<script type="module">
  import { constantCase } from 'https://unpkg.com/npm-package-example-2?module'

  constantCase('hello-world') // => HELLO_WORLD
</script>

Core

  • camelCase('hello world') // => 'helloWorld'
  • pascalCase('hello world') // => 'HelloWorld'
  • kebabCase('hello world') // => 'hello-world'
  • snakeCase('hello world') // => 'hello_world'
  • dotCase('hello world') // => 'hello.world'
  • capitalCase('hello world') // => 'Hello World'
  • constantCase('hello world') // => 'HELLO_WORLD'

Documentation

See https://link-da-documentação.com

Development

Clone locally:

git clone https://github.com/iagobruno/npm-package-example
cd npm-package-example
yarn install
code .

Running Tests

To run tests, run the command below.

yarn run test --watch

Building

Create an optimized and minified version of the package in CJS, ESM and UMD ready to be distributed.

yarn run build

Release a new version

yarn run release

This script uses release-it to:

  • Prevent new releases if any tests fail.
  • Bump package.json version.
  • Create git tag.
  • Push to remote.
  • Post new release in GitHub with changelog.
  • Publish a new version in npm registry.

Contributing

Contributions are always welcome!

License

MIT

Keywords

FAQs

Package last updated on 06 May 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc