Skip to content

Commit

Permalink
Rename Web → JS
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-murphy committed Jul 26, 2023
1 parent aa8a8d1 commit a4a2b92
Show file tree
Hide file tree
Showing 30 changed files with 56 additions and 56 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- This file was generated using `script/generate-readme.sh` -->

# `web-intl`
# `js-intl`

Low-level bindings for the ECMA 402 specification for the `Intl` object https://tc39.es/ecma402/#intl-object

Expand All @@ -22,11 +22,11 @@ import Data.JSDate as JSDate
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Class.Console as Console
import JS.Intl.Collator as Collator
import JS.Intl.DateTimeFormat as DateTimeFormat
import JS.Intl.Locale as Locale
import JS.Intl.NumberFormat as NumberFormat
import Partial.Unsafe as Unsafe
import Web.Intl.Collator as Collator
import Web.Intl.DateTimeFormat as DateTimeFormat
import Web.Intl.Locale as Locale
import Web.Intl.NumberFormat as NumberFormat
```

Expand Down
8 changes: 4 additions & 4 deletions example/Example.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import Data.JSDate as JSDate
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Class.Console as Console
import JS.Intl.Collator as Collator
import JS.Intl.DateTimeFormat as DateTimeFormat
import JS.Intl.Locale as Locale
import JS.Intl.NumberFormat as NumberFormat
import Partial.Unsafe as Unsafe
import Web.Intl.Collator as Collator
import Web.Intl.DateTimeFormat as DateTimeFormat
import Web.Intl.Locale as Locale
import Web.Intl.NumberFormat as NumberFormat

--
-- we can construct a `Locale` using the `new` or `new_` constructors.
Expand Down
2 changes: 1 addition & 1 deletion example/README.template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `web-intl`
# `js-intl`

Low-level bindings for the ECMA 402 specification for the `Intl` object https://tc39.es/ecma402/#intl-object

Expand Down
4 changes: 2 additions & 2 deletions script/generate-readme/spago.dhall
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ name = "web-intl-script"
{ name = "js-intl-script"
, dependencies =
[ "aff"
, "arrays"
Expand All @@ -18,5 +18,5 @@
, packages = ./packages.dhall
, sources = [ "./**/*.purs" ]
, license = "MIT"
, repository = "https://github.com/ptrfrncsmrph/purescript-web-intl.git"
, repository = "https://github.com/ptrfrncsmrph/purescript-js-intl.git"
}
6 changes: 2 additions & 4 deletions spago.dhall
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{ name = "web-intl"
{ name = "js-intl"
, dependencies =
[ "arrays"
, "datetime"
, "effect"
, "enums"
, "functions"
, "js-date"
, "maybe"
, "nullable"
, "partial"
, "prelude"
, "tuples"
, "unfoldable"
Expand All @@ -17,5 +15,5 @@
, packages = ./packages.dhall
, sources = [ "src/**/*.purs" ]
, license = "MIT"
, repository = "https://github.com/ptrfrncsmrph/purescript-web-intl.git"
, repository = "https://github.com/ptrfrncsmrph/purescript-js-intl.git"
}
File renamed without changes.
8 changes: 4 additions & 4 deletions src/Web/Intl.purs → src/JS/Intl.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl
module JS.Intl
( module AvailableCanonical
, getCanonicalLocales
, supportedValuesOf
Expand All @@ -7,9 +7,9 @@ module Web.Intl
import Data.Function.Uncurried (Fn1, Fn3)
import Data.Function.Uncurried as Function.Uncurried
import Data.Maybe (Maybe(..))
import Web.Intl.AvailableCanonical (AvailableCanonical(..)) as AvailableCanonical
import Web.Intl.AvailableCanonical (AvailableCanonical)
import Web.Intl.Internal.Class.StringArg as StringArg
import JS.Intl.AvailableCanonical (AvailableCanonical(..)) as AvailableCanonical
import JS.Intl.AvailableCanonical (AvailableCanonical)
import JS.Intl.Internal.Class.StringArg as StringArg

foreign import _getCanonicalLocales
:: Fn3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Web.Intl.AvailableCanonical
module JS.Intl.AvailableCanonical
( AvailableCanonical(..)
) where

import Web.Intl.Internal.Class.StringArg (class StringArg)
import JS.Intl.Internal.Class.StringArg (class StringArg)

-- | Valid keys to pass to `Intl.supportedValuesOf`
-- | https://tc39.es/ecma402/#sec-intl.supportedvaluesof
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Web/Intl/Collator.purs → src/JS/Intl/Collator.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.Collator
module JS.Intl.Collator
-- * Types
( Collator
, CollatorOptions
Expand All @@ -23,10 +23,10 @@ import Data.Function.Uncurried as Function.Uncurried
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn2)
import Effect.Uncurried as Effect.Uncurried
import JS.Intl.Locale (Locale)
import Prelude (compare) as Prelude
import Prim.Row (class Union)
import Unsafe.Coerce as Unsafe.Coerce
import Web.Intl.Locale (Locale)

-- | Language-sensitive string comparison
foreign import data Collator :: Type
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.DateTimeFormat
module JS.Intl.DateTimeFormat
-- * Types
( DateTimeFormat
, DateTimeFormatOptions
Expand Down Expand Up @@ -27,9 +27,9 @@ import Data.JSDate as JSDate
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn2)
import Effect.Uncurried as Effect.Uncurried
import JS.Intl.Locale (Locale)
import Prim.Row (class Union)
import Unsafe.Coerce as Unsafe.Coerce
import Web.Intl.Locale (Locale)

-- | Language-sensitive date and time formatting
foreign import data DateTimeFormat :: Type
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.DisplayNames
module JS.Intl.DisplayNames
-- * Types
( DisplayNames
, DisplayNamesOptions
Expand All @@ -23,9 +23,9 @@ import Data.Nullable as Nullable
import Effect (Effect)
import Effect.Uncurried (EffectFn2)
import Effect.Uncurried as Effect.Uncurried
import JS.Intl.Locale (Locale)
import Prim.Row (class Union)
import Unsafe.Coerce as Unsafe.Coerce
import Web.Intl.Locale (Locale)

-- | Consistent translation of language, region and script display names
foreign import data DisplayNames :: Type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.Internal.Class.StringArg
module JS.Intl.Internal.Class.StringArg
( class StringArg
, from
) where
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Web/Intl/ListFormat.purs → src/JS/Intl/ListFormat.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.ListFormat
module JS.Intl.ListFormat
-- * Types
( ListFormat
, ListFormatOptions
Expand All @@ -22,9 +22,9 @@ import Data.Function.Uncurried as Function.Uncurried
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn2)
import Effect.Uncurried as Effect.Uncurried
import JS.Intl.Locale (Locale)
import Prim.Row (class Union)
import Unsafe.Coerce as Unsafe.Coerce
import Web.Intl.Locale (Locale)

-- | Language-sensitive list formatting
foreign import data ListFormat :: Type
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Web/Intl/Locale.purs → src/JS/Intl/Locale.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.Locale
module JS.Intl.Locale
-- * Types
( Locale
, LocaleOptions
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.NumberFormat
module JS.Intl.NumberFormat
-- * Types
( NumberFormat
, NumberFormatOptions
Expand All @@ -24,9 +24,9 @@ import Data.Function.Uncurried as Function.Uncurried
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn2)
import Effect.Uncurried as Effect.Uncurried
import JS.Intl.Locale (Locale)
import Prim.Row (class Union)
import Unsafe.Coerce as Unsafe.Coerce
import Web.Intl.Locale (Locale)

-- | Language-sensitive number formatting
foreign import data NumberFormat :: Type
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.PluralRules
module JS.Intl.PluralRules
-- * Types
( PluralRules
, PluralRulesOptions
Expand All @@ -22,9 +22,9 @@ import Data.Function.Uncurried as Function.Uncurried
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn2)
import Effect.Uncurried as Effect.Uncurried
import JS.Intl.Locale (Locale)
import Prim.Row (class Union)
import Unsafe.Coerce as Unsafe.Coerce
import Web.Intl.Locale (Locale)

-- | Plural-sensitive formatting and plural-related language rules
foreign import data PluralRules :: Type
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.RelativeTimeFormat
module JS.Intl.RelativeTimeFormat
-- * Types
( RelativeTimeFormat
, RelativeTimeFormatOptions
Expand All @@ -22,11 +22,11 @@ import Data.Function.Uncurried as Function.Uncurried
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn2)
import Effect.Uncurried as Effect.Uncurried
import JS.Intl.Internal.Class.StringArg as StringArg
import JS.Intl.Locale (Locale)
import JS.Intl.RelativeTimeUnit (RelativeTimeUnit)
import Prim.Row (class Union)
import Unsafe.Coerce as Unsafe.Coerce
import Web.Intl.Internal.Class.StringArg as StringArg
import Web.Intl.Locale (Locale)
import Web.Intl.RelativeTimeUnit (RelativeTimeUnit)

-- | Language-sensitive relative time formatting
foreign import data RelativeTimeFormat :: Type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Web.Intl.RelativeTimeUnit
module JS.Intl.RelativeTimeUnit
( RelativeTimeUnit(..)
) where

import Web.Intl.Internal.Class.StringArg (class StringArg)
import JS.Intl.Internal.Class.StringArg (class StringArg)

data RelativeTimeUnit
= Seconds
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Web/Intl/Segmenter.purs → src/JS/Intl/Segmenter.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Web.Intl.Segmenter
module JS.Intl.Segmenter
-- * Types
( Segmenter
, SegmenterOptions
Expand All @@ -25,9 +25,9 @@ import Data.Unfoldable as Unfoldable
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn2)
import Effect.Uncurried as Effect.Uncurried
import JS.Intl.Locale (Locale)
import Prim.Row (class Union)
import Unsafe.Coerce as Unsafe.Coerce
import Web.Intl.Locale (Locale)

-- | For locale-sensitive text segmentation, enabling you to get meaningful
-- | items (graphemes, words or sentences) from a string.
Expand Down
2 changes: 2 additions & 0 deletions test.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ in conf
# [ "assert"
, "console"
, "debug"
, "enums"
, "effect"
, "foldable-traversable"
, "functions"
, "js-date"
, "partial"
, "prelude"
, "strings"
, "unsafe-coerce"
Expand Down
24 changes: 12 additions & 12 deletions test/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ import Data.String (Pattern(..), Replacement(..))
import Data.String as String
import Effect (Effect)
import Effect.Class.Console as Console
import JS.Intl as Intl
import JS.Intl.AvailableCanonical as AvailableCanonical
import JS.Intl.Collator as Collator
import JS.Intl.DateTimeFormat as DateTimeFormat
import JS.Intl.DisplayNames as DisplayNames
import JS.Intl.ListFormat as ListFormat
import JS.Intl.Locale as Locale
import JS.Intl.NumberFormat as NumberFormat
import JS.Intl.PluralRules as PluralRules
import JS.Intl.RelativeTimeFormat as RelativeTimeFormat
import JS.Intl.RelativeTimeUnit (RelativeTimeUnit(..))
import JS.Intl.Segmenter as Segmenter
import Partial.Unsafe as Unsafe
import Test.Assert.Extended as Test
import Web.Intl as Intl
import Web.Intl.AvailableCanonical as AvailableCanonical
import Web.Intl.Collator as Collator
import Web.Intl.DateTimeFormat as DateTimeFormat
import Web.Intl.DisplayNames as DisplayNames
import Web.Intl.ListFormat as ListFormat
import Web.Intl.Locale as Locale
import Web.Intl.NumberFormat as NumberFormat
import Web.Intl.PluralRules as PluralRules
import Web.Intl.RelativeTimeFormat as RelativeTimeFormat
import Web.Intl.RelativeTimeUnit (RelativeTimeUnit(..))
import Web.Intl.Segmenter as Segmenter

main :: Effect Unit
main = do
Expand Down

0 comments on commit a4a2b92

Please sign in to comment.