mirror of
https://github.com/ryan-haskell/elm-spa.git
synced 2024-11-22 11:31:58 +03:00
imagine: a regex that _doesn't_ brick your computer
This commit is contained in:
parent
e00fa6167f
commit
bde1d94f05
4
src/cli/package-lock.json
generated
4
src/cli/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "elm-spa",
|
"name": "elm-spa",
|
||||||
"version": "6.0.1",
|
"version": "6.0.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "elm-spa",
|
"name": "elm-spa",
|
||||||
"version": "6.0.1",
|
"version": "6.0.2",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chokidar": "3.4.2",
|
"chokidar": "3.4.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "elm-spa",
|
"name": "elm-spa",
|
||||||
"version": "6.0.1",
|
"version": "6.0.2",
|
||||||
"description": "single page apps made easy",
|
"description": "single page apps made easy",
|
||||||
"bin": "dist/src/index.js",
|
"bin": "dist/src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -317,7 +317,7 @@ const pageModelArguments = (path: string[], options : Options) : string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const exposes = (value : string) => (str : string) : boolean => {
|
const exposes = (value : string) => (str : string) : boolean => {
|
||||||
const regex = new RegExp('^module\\s+[^\\s]+\\s+exposing\\s+\\((([^)]|.)+)\\)')
|
const regex = new RegExp('^module\\s+[^\\s]+\\s+exposing\\s+\\((([^\\\\])+)\\)')
|
||||||
const match = (str.match(regex) || [])[1]
|
const match = (str.match(regex) || [])[1]
|
||||||
if (match) {
|
if (match) {
|
||||||
return match.split(',').filter(a => a).map(a => a.trim()).includes(value)
|
return match.split(',').filter(a => a).map(a => a.trim()).includes(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user