Comments (16)
@thim81 zoizo!!! Ik zag dat jij aan een populaire library ook werkt: Portman? Hebbem in de readme gezet ;)
https://github.com/mesqueeb/case-anything#readme
tot noggis he! nog veel success met je libraries :D
from case-anything.
Will release tomorrow
from case-anything.
replaceAll is only available from Node 15 and higher.
https://node.green/#ES2021-features--String-prototype-replaceAll
from case-anything.
The workaround could be to use the regex /g
example:
mystring.replace(/\./g,' ')
from case-anything.
@thim81 released! thanks again!!
from case-anything.
@mesqueeb I pulled in the latest release and was able to build & release my openapi-format package using case-anything.
I mentioned you and the package in the readme, since it is such an excellent package.
https://github.com/thim81/openapi-format#casing-options
https://github.com/thim81/openapi-format#credits
Nog eens ne dikke merci! ๐
Het blijft wel cool heel de opensource community en dan nog straffer dat 2 Belgen die samenwerken vanuit Japan & het kleine Belgiรซ.
from case-anything.
@thim81 ik was vergeten om "type": "module"
toe te voegen, en dat gaf problemen in bepaalde libraries voor mij.
net in laatste versie "type": "module"
toegevoegd aan package.json. Werkt alles nog bij jou? Brengt dat geen problemen?
from case-anything.
Ik zal straks de laatste versie eens testen.
from case-anything.
@thim81 2.1.3
from case-anything.
I tried 2.1.3 in my package and I ran into this error:
} = require("case-anything");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/Sites/asyncapi-format/node_modules/case-anything/dist/index.umd.js from /Users/Sites/asyncapi-format/asyncapi-format.js not supported.
index.umd.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename index.umd.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /Users/Sites/asyncapi-format/node_modules/case-anything/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
at Object.<anonymous> (/Users/Sites/asyncapi-format/asyncapi-format.js:21:5)
at Object.<anonymous> (/Users/Sites/asyncapi-format/bin/cli.js:5:24) {
code: 'ERR_REQUIRE_ESM'
Version 2.1.2 works without a problem.
from case-anything.
@thim81 weet jij of dat iets is waar jij iets aan kan doen via een bepaalde setting of is het iets waar alleen ik iets aan kan doen.
from case-anything.
Ik kan de suggestie die de error geeft, eens proberen.
Mijn package is nog old skool JS dus ik weet niet er bepaalde zaken gevoelig zijn, maar ik zal eens kijken waar ik uitkom met een paar settings te spelen.
Ik heb wel pas volgende week tijd. Ik hou je op de hoogte.
from case-anything.
@mesqueeb Ik heb vanalles geprobeerd, oa door met te spelen met "type": "module"
en "type": "commonjs",
maar zonder success.
from case-anything.
@thim81 ik ga proberen dan de build step up te daten tot dat je het weer kan runnen.
Kan ik een project van jou clonen en wat moet ik dan executeren voor die error te krijgen? Dan kan ik blijven testen tot ik het kan fixen.
from case-anything.
tuurlijk, het makkelijkste is https://github.com/thim81/openapi-format
Er zitten een paar Jest testen in, die direct gaan falen als je in package.json upgrade naarcase-anything": "2.1.3
of je kan dit commando runnen
cd test/yaml-casing
node ../../bin/cli.js input.yaml --configFile options.yaml
from case-anything.
@mesqueeb Heb je vooruitgang kunnen boeken? Ik ben geen JS expert maar als ik ergens mee kan helpen, ping me gerust.
from case-anything.
Related Issues (17)
- Converting string including two spaces in a row crashes. HOT 1
- feat: add train case HOT 4
- feat: add ada case HOT 1
- feat: add Cobol case HOT 1
- feat: add dot notation HOT 1
- Question: "-" "_" should these be special characters? HOT 9
- Error [ERR_REQUIRE_ESM]: require() of ES Module HOT 3
- Sentence case HOT 3
- Doesn't support older JS runtimes due to `String.matchAll` HOT 1
- Weird results when original string consists of all caps
- Add CLI
- spaceCase doesn't work for snake_case
- create a better touch tool case conversion script? [1h] HOT 2
- getParts function will crash if string param is special chars but not match splitOnSpecialChars HOT 6
- Erroneous handling of strng 'MSkS' HOT 2
- Question: Prevent @ $ characters from being removed HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from case-anything.