diff --git a/LICENSE b/LICENSE index ab65140..7103074 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Sanctuary +Copyright (c) 2022 Sanctuary Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/README.md b/README.md index ca7cd52..e0189b9 100644 --- a/README.md +++ b/README.md @@ -53,11 +53,12 @@ const type = require ('sanctuary-type-identifiers'); . '@@type': 'my-package/Identity@1', . '@@show': function() { . return 'Identity (' + show (this.value) + ')'; -. } +. }, . } -> const Identity = value => +> const Identity = value => ( . Object.assign (Object.create (Identity$prototype), {value}) +. ) > type (Identity (0)) 'my-package/Identity@1' @@ -68,7 +69,7 @@ const type = require ('sanctuary-type-identifiers'); ### API -#### `type :: Any -⁠> String` +#### `type :: Any -⁠> String` Takes any value and returns a string which identifies its type. If the value conforms to the [specification][4], the custom type identifier is @@ -85,7 +86,7 @@ returned. 'my-package/Identity@1' ``` -#### `type.parse :: String -⁠> { namespace :: Nullable String, name :: String, version :: Number }` +#### `type.parse :: String -⁠> { namespace :: Nullable String, name :: String, version :: Number }` Takes any string and parses it according to the [specification][4], returning an object with `namespace`, `name`, and `version` fields. diff --git a/package.json b/package.json index ae597b8..e5deb30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sanctuary-type-identifiers", - "version": "3.0.0", + "version": "4.0.0", "description": "Specification for type identifiers", "license": "MIT", "repository": {