Changeset e29cc2e for trip-planner-front/node_modules/y18n/README.md
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/y18n/README.md
r59329aa re29cc2e 1 1 # y18n 2 2 3 [![Build Status][travis-image]][travis-url] 4 [![Coverage Status][coveralls-image]][coveralls-url] 3 5 [![NPM version][npm-image]][npm-url] 4 6 [![js-standard-style][standard-image]][standard-url] … … 14 16 15 17 ```js 16 const __ = require('y18n')().__; 18 var __ = require('y18n').__ 17 19 18 console.log(__('my awesome string %s', 'foo')) ;20 console.log(__('my awesome string %s', 'foo')) 19 21 ``` 20 22 … … 26 28 27 29 ```js 28 const __ = require('y18n')().__; 30 var __ = require('y18n').__ 31 var str = 'foo' 29 32 30 const str = 'foo'; 31 32 console.log(__`my awesome string ${str}`); 33 console.log(__`my awesome string ${str}`) 33 34 ``` 34 35 … … 40 41 41 42 ```js 42 const __n = require('y18n')().__n; 43 var __n = require('y18n').__n 43 44 44 console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) ;45 console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) 45 46 ``` 46 47 … … 48 49 49 50 `2 fishes foo` 50 51 ## Deno Example52 53 As of `v5` `y18n` supports [Deno](https://github.com/denoland/deno):54 55 ```typescript56 import y18n from "https://deno.land/x/y18n/deno.ts";57 58 const __ = y18n({59 locale: 'pirate',60 directory: './test/locales'61 }).__62 63 console.info(__`Hi, ${'Ben'} ${'Coe'}!`)64 ```65 66 You will need to run with `--allow-read` to load alternative locales.67 51 68 52 ## JSON Language Files … … 112 96 Update the current locale with the key value pairs in `obj`. 113 97 114 ## Supported Node.js Versions115 116 Libraries in this ecosystem make a best effort to track117 [Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a118 post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).119 120 98 ## License 121 99 122 100 ISC 123 101 102 [travis-url]: https://travis-ci.org/yargs/y18n 103 [travis-image]: https://img.shields.io/travis/yargs/y18n.svg 104 [coveralls-url]: https://coveralls.io/github/yargs/y18n 105 [coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg 124 106 [npm-url]: https://npmjs.org/package/y18n 125 107 [npm-image]: https://img.shields.io/npm/v/y18n.svg
Note:
See TracChangeset
for help on using the changeset viewer.