jonschlinkert / dashify Goto Github PK
View Code? Open in Web Editor NEWConvert a string to a dash-separated string (kebab case). Works with camelcase, pascalcase, space-separated, etc.
License: MIT License
Convert a string to a dash-separated string (kebab case). Works with camelcase, pascalcase, space-separated, etc.
License: MIT License
Using node v8.2.1
and npm 5.3.0
Error message:
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/dashify/index.js:17
I tried converting _Company Pte. Ltd. _ and it converted to company-pte-ltd.
But converting _company pte. ltd. _ converts to company-pte.-ltd..
Thanks
Hi Jon,
I was looking at your module for a small side project I am working on and I like the fact that it does what it says it does. Unfortunately, for my use case it seems to filter out characters that I would need to be in the "dashified" string.
For example:
dashify("São Tomé and Príncipe")
// yields "s-o-tom--and-pr-ncipe" instead of "são-tomé-and-príncipe"
I have written a local version of dashify
for my side project, but I was wondering if it would be helpful to open a PR and append those changes to your module. If it is not a change that is in line with the philosophy of the module, please feel free to close this issue.
Thanks again! 😃
LODASH:
_.kebabCase("46546hello56565World656") => "46546-hello-56565-world-656"
_.kebabCase("hello world") => "hello-world"
Dashify:
dashify("46546hello56565World656") => "46546hello56565world656"
dashify("hello world") => "hello------------world"
Github reduces the spaces between hello and world automatically, but you can check the image.
Lib contains es6 features and should be built with babel to support all browsers.
The use of fat arrows has broken my builds for ie11
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.