Skip to content

Commit

Permalink
Version 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Jan 21, 2022
1 parent 54b4881 commit 085e771
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -68,7 +69,7 @@ const type = require ('sanctuary-type-identifiers');

### API

#### <a name="type" href="https://github.com/sanctuary-js/sanctuary-type-identifiers/blob/v3.0.0/index.js#L115">`type :: Any -⁠> String`</a>
#### <a name="type" href="https://github.com/sanctuary-js/sanctuary-type-identifiers/blob/v4.0.0/index.js#L116">`type :: Any -⁠> String`</a>

Takes any value and returns a string which identifies its type. If the
value conforms to the [specification][4], the custom type identifier is
Expand All @@ -85,7 +86,7 @@ returned.
'my-package/Identity@1'
```

#### <a name="type.parse" href="https://github.com/sanctuary-js/sanctuary-type-identifiers/blob/v3.0.0/index.js#L141">`type.parse :: String -⁠> { namespace :: Nullable String, name :: String, version :: Number }`</a>
#### <a name="type.parse" href="https://github.com/sanctuary-js/sanctuary-type-identifiers/blob/v4.0.0/index.js#L142">`type.parse :: String -⁠> { namespace :: Nullable String, name :: String, version :: Number }`</a>

Takes any string and parses it according to the [specification][4],
returning an object with `namespace`, `name`, and `version` fields.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanctuary-type-identifiers",
"version": "3.0.0",
"version": "4.0.0",
"description": "Specification for type identifiers",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit 085e771

Please sign in to comment.