Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@sapphire/lexure
Advanced tools
A powerful and fast parser and utilities for non-technical user input, inspired by lexure
, powered by @sapphire/result
.
The code in this package has been greatly inspired by lexure from 1Computer1.
You can use the following command to install this package, or replace npm install
with your package manager of choice.
npm install @sapphire/lexure
Note: While this section uses require
, the imports match 1:1 with ESM imports. For example const { Parser } = require('@sapphire/lexure')
equals import { Parser } from '@sapphire/lexure'
.
const parser = new Parser(new PrefixedStrategy(['--', '/'], ['=', ':']));
const lexer = new Lexer({
quotes: [
['"', '"'],
['“', '”'],
['「', '」']
]
});
const content = 'foo bar';
const stream = new ArgumentStream(parser.run(lexer.run(content)));
console.log(stream.single()); // Some { value: 'foo' }
console.log(stream.single()); // Some { value: 'bar' }
console.log(stream.single()); // None
Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
We accept donations through Open Collective, Ko-fi, Paypal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.
Donate With | Address |
---|---|
Open Collective | Click Here |
Ko-fi | Click Here |
Patreon | Click Here |
PayPal | Click Here |
Please make sure to read the Contributing Guide before making a pull request.
Thank you to all the people who already contributed to Sapphire!
FAQs
Parser and utilities for non-technical user input
The npm package @sapphire/lexure receives a total of 2,370 weekly downloads. As such, @sapphire/lexure popularity was classified as popular.
We found that @sapphire/lexure demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.