Last active
June 26, 2018 16:46
-
-
Save azasypkin/baf538847dfbf31c879ade5a1e9ef284 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
console.log('yay gist'); | |
var IntlMessageFormat = require('intl-messageformat'); | |
var memoizeFormatConstructor = require('intl-format-cache'); | |
IntlMessageFormat.defaultLocale = 'ru'; | |
console.log(`Default locale BEFORE memoize: ${IntlMessageFormat.defaultLocale}`); | |
var memoizedIntlMessageFormat = memoizeFormatConstructor(IntlMessageFormat); | |
var msg = memoizedIntlMessageFormat('message'); | |
console.log(`Locale used in memoized instance: ${msg._resolveLocale()}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "some-weird-gist-package", | |
"bin": "./index.js", | |
"version": "1.0.0", | |
"dependencies": { | |
"intl-format-cache": "^2.1.0", | |
"intl-messageformat": "^2.2.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment