Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

afformative

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

afformative - npm Package Compare versions

Comparing version 0.6.0-alpha.3 to 0.6.0

2

dist/types/makeFormatter.d.ts

@@ -84,3 +84,3 @@ declare type PrimitiveSuggestion = "primitive";

*
* @deprecated Since v0.6.0. Prefer using the `.format` method instead.
* @deprecated Since v0.6.0. Prefer using the `Formatter.format` method instead.
*/

@@ -87,0 +87,0 @@ (props: FormatterProps<TInput>): TOutput | TPrimitiveOutput | null;

{
"name": "afformative",
"version": "0.6.0-alpha.3",
"version": "0.6.0",
"license": "MIT",

@@ -34,3 +34,3 @@ "main": "dist/afformative.cjs.js",

"sideEffects": false,
"gitHead": "79f91d572671154fefa97eca63aa7fbeb7299345"
"gitHead": "b5ffb3e48e19a74b2ca89af2ad7a96becbe711e7"
}

@@ -45,3 +45,3 @@ <h1 align="center">

A formatter is an object with a `.format` method. Formatters should be created solely using the `makeFormatter` factory.
A formatter is an object with a `format` method. Formatters should be created solely using the `makeFormatter` factory.

@@ -102,2 +102,9 @@ ```js

All formatters also have the `formatAsPrimitive` method, which automatically passes the `"primitive"` suggestion in addition to all other suggestions.
```js
booleanFormatter.formatAsPrimitive(true) // "True"
booleanFormatter.formatAsPrimitive(true, ["abbreviated"]) // "True"
```
You can also pass arbitrary data to formatters as the third argument: data context. Let's use a dummy table component as an example.

@@ -167,3 +174,3 @@

All formatters also expose the `.wrap` method. You can use this method to alter the behaviour of the formatter for some specific values.
All formatters also expose the `wrap` method. You can use this method to alter the behaviour of the formatter for some specific values.

@@ -170,0 +177,0 @@ ```js

@@ -124,3 +124,3 @@ type PrimitiveSuggestion = "primitive"

*
* @deprecated Since v0.6.0. Prefer using the `.format` method instead.
* @deprecated Since v0.6.0. Prefer using the `Formatter.format` method instead.
*/

@@ -127,0 +127,0 @@ (props: FormatterProps<TInput>): TOutput | TPrimitiveOutput | null

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc