Skip to content

Commit

Permalink
Renames package to jsluice
Browse files Browse the repository at this point in the history
  • Loading branch information
bf-tomnomnom committed Aug 30, 2022
1 parent 605d076 commit ecc3d20
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion analyzer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
sitter "github.com/smacker/go-tree-sitter"
Expand Down
2 changes: 1 addition & 1 deletion analyzer_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import "testing"

Expand Down
2 changes: 1 addition & 1 deletion maybeurl.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"net/url"
Expand Down
2 changes: 1 addition & 1 deletion maybeurl_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion objects.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"strings"
Expand Down
2 changes: 1 addition & 1 deletion set.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

type set map[string]any

Expand Down
2 changes: 1 addition & 1 deletion strings.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"strconv"
Expand Down
2 changes: 1 addition & 1 deletion strings_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion tree.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion tree_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"strconv"
Expand Down
6 changes: 3 additions & 3 deletions url-match-jquery.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"strings"
Expand All @@ -7,9 +7,9 @@ import (
"golang.org/x/exp/slices"
)

func matchJQuery() urlMatcher {
func matchJQuery() URLMatcher {

return urlMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL {
return URLMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL {
callName := content(n.ChildByFieldName("function"), source)

if !slices.Contains(
Expand Down
6 changes: 3 additions & 3 deletions url-match-xhr.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"strings"
Expand Down Expand Up @@ -32,10 +32,10 @@ func (c *nodeCache) get(k *sitter.Node) ([]*sitter.Node, bool) {
return v, exists
}

func matchXHR() urlMatcher {
func matchXHR() URLMatcher {
cache := newNodeCache()

return urlMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL {
return URLMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL {
callName := content(n.ChildByFieldName("function"), source)

// We don't know what the XMLHttpRequest object will be called,
Expand Down
2 changes: 1 addition & 1 deletion url-matchers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jsurls
package jsluice

import (
"net/url"
Expand Down

0 comments on commit ecc3d20

Please sign in to comment.