Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
npm-package-example-2
Advanced tools
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 install npm-package-example-2 --save
yarn add npm-package-example-2
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>
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'
See https://link-da-documentação.com
Clone locally:
git clone https://github.com/iagobruno/npm-package-example
cd npm-package-example
yarn install
code .
To run tests, run the command below.
yarn run test --watch
Create an optimized and minified version of the package in CJS, ESM and UMD ready to be distributed.
yarn run build
yarn run release
This script uses release-it to:
Contributions are always welcome!
MIT
FAQs
A good npm package
We found that npm-package-example-2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.