wrapped-value

0.2.0 • Public • Published

wrapped-value

A simple helper for generic value wrapping and unwrapping

Wraps a value with a "type" so it can be checked, "unwrapped" and processed at the appropriate point in a transformation chain.

var tableName = wrap('tableName', 'accounts');
 
wrap.isWrapped(tableName) // true
 
wrap.getType(tableName)   // 'tableName'
 
wrap.deref(tableName)     // 'accounts'
 
wrap.is(tableName, 'tableName') // true

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    2
  • 0.1.0
    0

Package Sidebar

Install

npm i wrapped-value

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • tgriesser