This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

beyo-plugin-coefficient-format

0.0.0-3 • Public • Published

Beyo Plugin Co-Efficient Format Helper

Add a {&{format /}} helper to co-efficient engine instances.

Note: currently, this plugin make use of Globalize v0.1.1 and will be upgraded to use the 1.x version as soon as it is no longer alpha, and it is ready for production.

Install

npm install beyo-plugin-coefficient-format --save

Usage

The helper will automatically register itself to all new co-efficient engine instances.

Configuration

Configure the plugin from your beyo application configuration

{
  "plugins": {
    "co-efficient-format": {
      "module": "beyo-plugin-coefficient-format",
      "options": {
        
      }
    }
  }
}

Note: use options to configure types. (TBD)

Template Usage

A typical template usage would be

<div>{&{format type="datetime" value=user.lastLogin locale=locale /}}</div>

Which, given the engine call to

var html = yield engine.render('templatename', { 
  user: {
    //...
    lastLogin: Date.now()
  },
  locale: 'fr'
});

Would output something like : <div></div>.

Globalize

The plugin make uses of Globalize. See beyo-plugin-globalize to configure it.

Contribution

All contributions welcome! Every PR must be accompanied by their associated unit tests!

License

The MIT License (MIT)

Copyright (c) 2014 Mind2Soft yanick.rochon@mind2soft.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Package Sidebar

Install

npm i beyo-plugin-coefficient-format

Weekly Downloads

4

Version

0.0.0-3

License

MIT

Last publish

Collaborators

  • yanickrochon