New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

formatjs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formatjs

JavaScript date format tester.

0.1.0
Source
npm
Version published
Weekly downloads
3.3K
-50.36%
Maintainers
1
Weekly downloads
 
Created
Source

formatjs

JavaScript date format tester.

Build Status

Getting Started

On the server

Install the module with: npm install formatjs

var formatjs = require('./formatjs');
formatjs.test('12/04', 'YYYY/MM');   // false
formatjs.test('2012/04', 'YYYY/MM'); // true

In the browser

Download the production version or the development version.

In your web page:

<script src="dist/formatjs.min.js"></script>
<script>
formatjs.test('12/04', 'YYYY/MM');   // false
formatjs.test('2012/04', 'YYYY/MM'); // true
</script>

In your web page using AMD loader:

<script>
require(['formatjs'], function(formatjs) {
    formatjs.test('12/04', 'YYYY/MM');   // false
    formatjs.test('2012/04', 'YYYY/MM'); // true
});
</script>

Contributing

Install nodejs.
Install coffee-script with: npm install -g coffee-script.
Install dependencies with: npm install.

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Test your code using grunt.

Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!

License

Copyright (c) 2012 nowamasa
Licensed under the MIT license.

Keywords

validator

FAQs

Package last updated on 30 Jun 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts